Changeset 1292 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
18 Jul 2015, 04:14:13 (10 years ago)
Author:
seregin
Message:

port rev 4326

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r1287 r1292  
    5252#include <time.h>
    5353
    54 extern Bool g_md5_mismatch; ///< top level flag to signal when there is a decode problem
    55 
    5654#if CONFORMANCE_BITSTREAM_MODE
    5755Bool pocCompareFunction( const TComPic &pic1, const TComPic &pic2 )
     
    6361//! \ingroup TLibDecoder
    6462//! \{
    65 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths);
     63static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors);
    6664// ====================================================================================================================
    6765// Constructor / destructor / initialization / destroy
     
    6967
    7068TDecGop::TDecGop()
     69 : m_numberOfChecksumErrorsDetected(0)
    7170{
    7271  m_dDecTime = 0;
     
    114113  m_pcSliceDecoder        = pcSliceDecoder;
    115114  m_pcLoopFilter          = pcLoopFilter;
    116   m_pcSAO  = pcSAO;
     115  m_pcSAO                 = pcSAO;
     116  m_numberOfChecksumErrorsDetected = 0;
     117
    117118#if SVC_EXTENSION   
    118119  m_ppcTDecTop            = ppcDecTop;
     
    247248    }
    248249#if SVC_EXTENSION
    249     calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths());
    250 #else
    251     calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths());
     250    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths(), m_numberOfChecksumErrorsDetected);
     251#else
     252    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths(), m_numberOfChecksumErrorsDetected);
    252253#endif
    253254  }
     
    279280 *            unk         - no SEI message was available for comparison
    280281 */
    281 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths)
     282static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors)
    282283{
    283284  /* calculate MD5sum for entire reconstructed picture */
     
    334335  if (mismatch)
    335336  {
    336     g_md5_mismatch = true;
     337    numChecksumErrors++;
    337338    printf("[rx%s:%s] ", hashType, hashToString(pictureHashSEI->m_pictureHash, numChar).c_str());
    338339  }
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h

    r1259 r1292  
    8080  Double                m_dDecTime;
    8181  Int                   m_decodedPictureHashSEIEnabled;  ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
     82  UInt                  m_numberOfChecksumErrorsDetected;
    8283
    8384#if SVC_EXTENSION
     
    112113
    113114  Void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
     115  UInt getNumberOfChecksumErrorsDetected() const { return m_numberOfChecksumErrorsDetected; }
     116
    114117#if SVC_EXTENSION
    115118  TDecTop*   getLayerDec(UInt layerId)  { return m_ppcTDecTop[layerId]; }
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1290 r1292  
    6363
    6464TDecTop::TDecTop()
    65   : m_pDecodedSEIOutputStream(NULL)
     65  : m_pDecodedSEIOutputStream(NULL),
     66    m_warningMessageSkipPicture(false)
    6667{
    6768  m_pcPic = 0;
     
    21672168    else
    21682169    {
    2169       static Bool warningMessage = false;
    2170       if(!warningMessage)
     2170      if(!m_warningMessageSkipPicture)
    21712171      {
    21722172        printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");
    2173         warningMessage = true;
     2173        m_warningMessageSkipPicture = true;
    21742174      }
    21752175      return true;
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1282 r1292  
    121121  std::ostream           *m_pDecodedSEIOutputStream;
    122122
     123  Bool                    m_warningMessageSkipPicture;
     124
    123125#if SVC_EXTENSION
    124126  Bool                    m_isLastNALWasEos;
     
    191193  Void  deletePicBuffer();
    192194
     195 
    193196  Void  executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
    194197  Void  checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic);
     
    203206#endif
    204207  Void  setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; }
     208  UInt  getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); }
    205209
    206210#if SVC_EXTENSION
     
    259263protected:
    260264#if SVC_EXTENSION
    261   Void      xGetNewPicBuffer  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
     265  Void  xGetNewPicBuffer  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    262266#else
    263   Void      xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    264 #endif
    265   Void      xCreateLostPicture (Int iLostPOC);
     267  Void  xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
     268#endif
     269  Void  xCreateLostPicture (Int iLostPOC);
    266270
    267271  Void      xActivateParameterSets();
Note: See TracChangeset for help on using the changeset viewer.