コード例 #1
0
int main(int argc, char* argv[])
{
  TAppDecTop  cTAppDecTop;

  // print information
  fprintf( stdout, "\n" );
#if SVC_EXTENSION
  fprintf( stdout, "SHM software: Decoder Version [%s]", NV_VERSION );
#else
  fprintf( stdout, "HM software: Decoder Version [%s] (including RExt)", NV_VERSION );
#endif
  fprintf( stdout, NVM_ONOS );
  fprintf( stdout, NVM_COMPILEDBY );
  fprintf( stdout, NVM_BITS );
  fprintf( stdout, "\n" );

  // create application decoder class
  cTAppDecTop.create();

  // parse configuration
  if(!cTAppDecTop.parseCfg( argc, argv ))
  {
    cTAppDecTop.destroy();
    return 1;
  }

  // starting time
  Double dResult;
  clock_t lBefore = clock();

  // call decoding function
  cTAppDecTop.decode();

  if (g_md5_mismatch)
  {
    printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n");
  }

  // ending time
  dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC;
  printf("\n Total Time: %12.3f sec.\n", dResult);

  // destroy application decoder class
  cTAppDecTop.destroy();

  return g_md5_mismatch ? EXIT_FAILURE : EXIT_SUCCESS;
}
コード例 #2
0
ファイル: decmain.cpp プロジェクト: xuguangxin/hevc
int main(int argc, char* argv[])
{
  TAppDecTop  cTAppDecTop;

  // print information
  fprintf( stdout, "\n" );
  fprintf( stdout, "TMuC SW candidate: Decoder Version [%s]", NV_VERSION );
  fprintf( stdout, NVM_ONOS );
  fprintf( stdout, NVM_COMPILEDBY );
  fprintf( stdout, NVM_BITS );
  fprintf( stdout, "\n" );

  // create application decoder class
  cTAppDecTop.create();

  // parse configuration
  if(!cTAppDecTop.parseCfg( argc, argv ))
  {
    cTAppDecTop.destroy();
    return 1;
  }

  // starting time
  double dResult;
  long lBefore = clock();

  // call decoding function
  cTAppDecTop.decode();

  // ending time
  dResult = (double)(clock()-lBefore) / CLOCKS_PER_SEC;
  printf("\n Total Time: %12.3f sec.\n", dResult);

  // destroy application decoder class
  cTAppDecTop.destroy();

  return 0;
}
コード例 #3
0
ファイル: decmain.cpp プロジェクト: listenlink/3D-HEVC
int main(int argc, char* argv[])
{
  Int returnCode = EXIT_SUCCESS;
#if !NH_MV
  TAppDecTop  cTAppDecTop;
#endif
  // print information
  fprintf( stdout, "\n" );
#if NH_MV
  fprintf( stdout, "3D-HTM Software: Decoder Version [%s] based on HM Version [%s]", NV_VERSION, HM_VERSION );  
#else
  fprintf( stdout, "HM software: Decoder Version [%s] (including RExt)", NV_VERSION );
#endif
  fprintf( stdout, NVM_ONOS );
  fprintf( stdout, NVM_COMPILEDBY );
  fprintf( stdout, NVM_BITS );
  fprintf( stdout, "\n" );

#if NH_MV
  Int numDecodings = 1; 
  Int curDecoding  = 0; 
  Double dResult = 0; 
  do {
    TAppDecTop  cTAppDecTop;
#endif
    // create application decoder class
    cTAppDecTop.create();

    // parse configuration
    if(!cTAppDecTop.parseCfg( argc, argv ))
    {
      cTAppDecTop.destroy();
      returnCode = EXIT_FAILURE;
      return returnCode;
    }
#if NH_MV
    numDecodings = cTAppDecTop.getNumDecodings(); 
#endif

    // starting time    
#if !NH_MV
  Double dResult;
#endif
    clock_t lBefore = clock();

    // call decoding function
#if NH_MV
    cTAppDecTop.decode( curDecoding );
#else
    cTAppDecTop.decode();
#endif

    if (cTAppDecTop.getNumberOfChecksumErrorsDetected() != 0)
    {
      printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n");
      returnCode = EXIT_FAILURE;
    }

    // ending time
#if NH_MV
    dResult += (double)(clock()-lBefore) / CLOCKS_PER_SEC;
#else
  dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC;
  printf("\n Total Time: %12.3f sec.\n", dResult);
#endif

    // destroy application decoder class
    cTAppDecTop.destroy();
#if NH_MV
    curDecoding++; 
  } 
  while ( curDecoding < numDecodings );

  printf("\n Total Time: %12.3f sec.\n", dResult);
#endif
  return returnCode;
}