| 376 | } |
| 377 | |
| 378 | int 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 | } |
nothing calls this directly
no test coverage detected