Changeset 1313 in 3DVCSoftware for trunk/source/App/TAppDecoder/decmain.cpp


Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/decmain.cpp

    r1179 r1313  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
     4 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    4444//! \{
    4545
    46 bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch
    47 
    4846// ====================================================================================================================
    4947// Main function
     
    5250int main(int argc, char* argv[])
    5351{
     52  Int returnCode = EXIT_SUCCESS;
    5453  TAppDecTop  cTAppDecTop;
    5554
    5655  // print information
    5756  fprintf( stdout, "\n" );
    58 #if H_MV
     57#if NH_MV
    5958  fprintf( stdout, "3D-HTM Software: Decoder Version [%s] based on HM Version [%s]", NV_VERSION, HM_VERSION ); 
    6059#else
    61   fprintf( stdout, "HM software: Decoder Version [%s]", NV_VERSION );
     60  fprintf( stdout, "HM software: Decoder Version [%s] (including RExt)", NV_VERSION );
    6261#endif
    6362  fprintf( stdout, NVM_ONOS );
     
    7372  {
    7473    cTAppDecTop.destroy();
    75     return 1;
     74    returnCode = EXIT_FAILURE;
     75    return returnCode;
    7676  }
    7777
    7878  // starting time
    79   double dResult;
    80   long lBefore = clock();
     79  Double dResult;
     80  clock_t lBefore = clock();
    8181
    8282  // call decoding function
    8383  cTAppDecTop.decode();
    8484
    85   if (g_md5_mismatch)
     85  if (cTAppDecTop.getNumberOfChecksumErrorsDetected() != 0)
    8686  {
    8787    printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n");
     88    returnCode = EXIT_FAILURE;
    8889  }
    8990
    9091  // ending time
    91   dResult = (double)(clock()-lBefore) / CLOCKS_PER_SEC;
     92  dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC;
    9293  printf("\n Total Time: %12.3f sec.\n", dResult);
    9394
     
    9596  cTAppDecTop.destroy();
    9697
    97   return g_md5_mismatch ? EXIT_FAILURE : EXIT_SUCCESS;
     98  return returnCode;
    9899}
    99100
Note: See TracChangeset for help on using the changeset viewer.