标签:
编码器在整个HM解决方案中的工程名为TAppEncoder,入口点函数位于encmain.cpp文件中:
1 int main(int argc, char* argv[]) 2 { 3 TAppEncTop cTAppEncTop; 4 5 // print information 6 fprintf( stdout, "\n" ); 7 fprintf( stdout, "HM software: Encoder Version [%s] (including RExt)", NV_VERSION ); 8 fprintf( stdout, NVM_ONOS ); 9 fprintf( stdout, NVM_COMPILEDBY ); 10 fprintf( stdout, NVM_BITS ); 11 fprintf( stdout, "\n\n" ); 12 13 // create application encoder class 14 cTAppEncTop.create(); 15 16 // parse configuration 17 try 18 { 19 if(!cTAppEncTop.parseCfg( argc, argv )) 20 { 21 cTAppEncTop.destroy(); 22 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 23 EnvVar::printEnvVar(); 24 #endif 25 return 1; 26 } 27 } 28 catch (df::program_options_lite::ParseFailure &e) 29 { 30 std::cerr << "Error parsing option \""<< e.arg <<"\" with argument \""<< e.val <<"\"." << std::endl; 31 return 1; 32 } 33 34 #if PRINT_MACRO_VALUES 35 printMacroSettings(); 36 #endif 37 38 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 39 EnvVar::printEnvVarInUse(); 40 #endif 41 42 // starting time 43 Double dResult; 44 clock_t lBefore = clock(); 45 46 // call encoding function 47 cTAppEncTop.encode(); 48 49 // ending time 50 dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC; 51 printf("\n Total Time: %12.3f sec.\n", dResult); 52 53 // destroy application encoder class 54 cTAppEncTop.destroy(); 55 56 return 0; 57 }
以上各个函数分别在前一个函数中调用,形成类似一个反向的call stack的结构。
标签:
原文地址:http://www.cnblogs.com/545235abc/p/5188754.html