MCPcopy Create free account
hub / github.com/MPEGGroup/mpeg-pcc-tmc2 / main

Function main

source/app/PccAppDecoder/PccAppDecoder.cpp:378–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378int main( int argc, char* argv[] ) {
379 std::cout << "PccAppDecoder v" << TMC2_VERSION_MAJOR << "." << TMC2_VERSION_MINOR << std::endl << std::endl;
380
381 // this is mandatory to print floats with full precision
382 std::cout.precision(std::numeric_limits<float>::max_digits10);
383
384 PCCDecoderParameters decoderParams;
385 PCCMetricsParameters metricsParams;
386 PCCConformanceParameters conformanceParams;
387 if ( !parseParameters( argc, argv, decoderParams, metricsParams, conformanceParams ) ) { return -1; }
388#if defined( ENABLE_TBB )
389 if ( decoderParams.nbThread_ > 0 ) { tbb::task_scheduler_init init( static_cast<int>( decoderParams.nbThread_ ) ); }
390#endif
391 // Timers to count elapsed wall/user time
392 pcc::chrono::Stopwatch<std::chrono::steady_clock> clockWall;
393 pcc::chrono::StopwatchUserTime clockUser;
394
395 clockWall.start();
396 int ret = decompressVideo( decoderParams, metricsParams, conformanceParams, clockUser );
397 clockWall.stop();
398
399 using namespace std::chrono;
400 using ms = milliseconds;
401 auto totalWall = duration_cast<ms>( clockWall.count() ).count();
402 auto totalUserSelf = duration_cast<ms>( clockUser.self.count() ).count();
403 auto totalUserChild = duration_cast<ms>( clockUser.children.count() ).count();
404 std::cout << "Processing time (wall): " << ( ret == 0 ? totalWall / 1000.0 : -1 ) << " s\n";
405 std::cout << "Processing time (user.self): " << ( ret == 0 ? totalUserSelf / 1000.0 : -1 ) << " s\n";
406 std::cout << "Processing time (user.children): " << ( ret == 0 ? totalUserChild / 1000.0 : -1 ) << " s\n";
407 std::cout << "Peak memory: " << getPeakMemory() << " KB\n";
408 return ret;
409}

Callers

nothing calls this directly

Calls 6

decompressVideoFunction · 0.85
getPeakMemoryFunction · 0.85
parseParametersFunction · 0.70
startMethod · 0.45
stopMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected