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(); return 0; }
int main(int argc, char* argv[]) { TAppEncTop cTAppEncTop; nameFile = argv[9]; // 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" ); ofstream outfile; outfile.open((nameFile + ".txt").c_str(),ios::out); outfile.close(); // 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); ofstream timeTabs,countTabs; timeTabs.open(("time_" + nameFile + ".csv").c_str(),ios::out); countTabs.open(("count_" + nameFile + ".csv").c_str(),ios::out); dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC; printf("\n Total Time: %12.3f sec.\n", dResult); // timeTabs << "Tempo;" << ((Double)(totalCount)) << endl; // timeTabs << "Tempo intra;" << ((Double)(intraCount)) << endl; // timeTabs << "Tempo intraCSC;" << ((Double)(intraCSCount)) << endl; // timeTabs << "Tempo intraPCM;" << ((Double)(intraPCMCount)) << endl; // timeTabs << "Tempo inter;" << ((Double)(interCount)) << endl; // timeTabs << "Tempo intraBC;" << ((Double)(intraBCCount)) << endl; // timeTabs << "Tempo hash inter;" << ((Double)(HashInterCount)) << endl; // timeTabs << "Tempo palette;" <<((Double)(PalletMCount)) << endl; timeTabs << ((Double)(totalCount)) << ";" << ((Double)(intraCount)) << ";" << ((Double)(interCount)) << ";" << ((Double)(intraBCCount)) << ";" << ((Double)(HashInterCount)) << ";" << ((Double)(PalletMCount)); //timeTabs << endl; // countTabs << "Total CUs;" << totalCuCount << endl; // countTabs << "Intra CUs;" << intraCuCount << endl; // countTabs << "IntraBC CUs;" << ibcCuCount << endl; // countTabs << "Palette CUs;" << pltCuCount << endl; // countTabs << "Skip CUs;" << skipCount << endl; // countTabs << "??? CUs;" << unIdCount << endl; countTabs << totalCuCount << ";" << intraCuCount << ";" << ibcCuCount << ";" << pltCuCount << ";" << skipCount << ";" << unIdCount; // destroy application encoder class // destroy application encoder class cTAppEncTop.destroy(); return 0; }