The main function of the HEVC code learning 1:tappencoder

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.