HM编码架构

首先在encmain.cpp中,进入主函数int main
...
int main(int argc, char* argv[])
{
TAppEncTop cTAppEncTop;

// print information
fprintf( stdout, "\n" );
fprintf( stdout, "HM software: Encoder Version [%s] (including RExt)", NV_VERSION );
fprintf( stdout, NVM_ONOS );
fprintf( stdout, NVM_COMPILEDBY );
fprintf( stdout, NVM_BITS );
fprintf( stdout, "\n\n" );

// create application encoder class
cTAppEncTop.create();

// parse configuration
try
{
if(!cTAppEncTop.parseCfg( argc, argv ))
{
cTAppEncTop.destroy();

if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST

  EnvVar::printEnvVar();

endif

  return 1;
}

}
catch (df::program_options_lite::ParseFailure &e)
{
std::cerr << "Error parsing option ""<< e.arg <<"" with argument ""<< e.val <<""." << std::endl;
return 1;
}

if PRINT_MACRO_VALUES

printMacroSettings();

endif

if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST

EnvVar::printEnvVarInUse();

endif

// starting time
Double dResult;
clock_t lBefore = clock();

// call encoding function
cTAppEncTop.encode();

// ending time
dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC;
printf("\n Total Time: %12.3f sec.\n", dResult);

// destroy application encoder class
cTAppEncTop.destroy();
system("pause");
return 0;

}
...

你可能感兴趣的:(HM编码架构)