Tappencoder is the encoder project that completes the encoding of the video sequence.
At run time, first call the main function in Encmain.cpp
The main function is to initialize the Encoder class, parse the CFG file, and then call the Tappenctop::encode function to the next layer, and timing the encoding process.
The important parameter tappenctop::encode is called, which is the topmost entry of the encoder.
int main (int argc, char* argv[]) {tappenctop ctappenctop;//definition Ctappenctop//Print information print information and standard output HM version 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"); Create Application Encoder class Ctappenctop.create (); To create the encoder class, the actual create is an empty function, without any action. Parse configuration Parse cfg config file try {if (!ctappenctop.parsecfg (argc, argv))//If the CFG file is correct, the Xcheckparameter function will be called in the command-line window In the output parsing hint, and call Xprintparameter parameter {Ctappenctop.destroy ();//If the CFG file is wrong, call the Destroy function, which is actually an empty function, do nothing. #if environment_variable_debug_and_test Envvar::p rintenvvar (); #endif return 1; }} catch (df::p rogram_options_lite::P arsefailure &e)//exception handling if the CFG file is incorrect when you echo the error prompt {Std::cerr << "error Parsin G option \ "<< e.arg <<" \ "with argument \" "<< e.val <<" \ "." << Std::endl; RetUrn 1; } #if print_macro_values//Print macro block value printmacrosettings (); #endif # if Environment_variable_debug_and_test envvar:: Printenvvarinuse (); #endif//Starting time Double Dresult; clock_t Lbefore = Clock (); Chronograph//Call encoding function Ctappenctop.encode (); Call the Encode function, encode//Ending Time Dresult = (Double) (Clock ()-lbefore)/clocks_per_sec; Timing results printf ("\ n Total time:%12.3f sec.\n", Dresult); Show timing Results//Destroy Application Encoder class Ctappenctop.destroy (); Call the Destroy function return 0;}
The main function of the HEVC code learning 1:tappencoder