Changeset 930 in SHVCSoftware


Ignore:
Timestamp:
17 Dec 2014, 01:38:36 (10 years ago)
Author:
seregin
Message:

fix compiler warnings

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r924 r930  
    13241324
    13251325#if CONFORMANCE_BITSTREAM_MODE
    1326   FILE *fptr;
    1327   if( this->getConfModeFlag() )
    1328   {
    1329     if( this->getMetadataFileRefresh() )
    1330     {
    1331       fptr = fopen( this->getMetadataFileName().c_str(), "w" );
    1332       fprintf(fptr, " LayerId      POC    MD5\n");
    1333       fprintf(fptr, "------------------------\n");
    1334     }
    1335     else
    1336     {
    1337       fptr = fopen( this->getMetadataFileName().c_str(), "a+" );
    1338     }
    1339     this->setMetadataFileRefresh(false);
    1340     UChar recon_digest[3][16];
    1341     calcMD5(*pic->getPicYuvRec(), recon_digest);
    1342     fprintf(fptr, "%8d%9d    MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), digestToString(recon_digest, 16));
    1343     fclose(fptr);
    1344 
    1345     // Output all picutres "decoded" in that layer that have POC less than the current picture
    1346     std::vector<TComPic> *layerBuffer = (m_acTDecTop->getLayerDec(pic->getLayerId()))->getConfListPic();
    1347     // Write all pictures to the file.
    1348     if( this->getDecodedYuvLayerRefresh(layerIdx) )
    1349     {
    1350       if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
    1351       if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
    1352 
    1353       char tempFileName[256];
    1354       strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerIdx ).c_str());
    1355       m_confReconFile[layerIdx].open(tempFileName, true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
    1356       this->setDecodedYuvLayerRefresh( layerIdx, false );
    1357     }
    1358     const Window &conf = pic->getConformanceWindow();
    1359     const Window &defDisp = m_respectDefDispWindow ? pic->getDefDisplayWindow() : Window();
    1360     Int xScal =  1, yScal = 1;
    1361   #if REPN_FORMAT_IN_VPS
    1362     UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
    1363     xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    1364     yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    1365   #endif
    1366     std::vector<TComPic>::iterator iterPic;
    1367     for(iterPic = layerBuffer->begin(); iterPic != layerBuffer->end(); iterPic++)
    1368     {
    1369        TComPic checkPic = *iterPic;
    1370        if( checkPic.getPOC() <= pic->getPOC() )
    1371        {
    1372          TComPicYuv* pPicCYuvRec = checkPic.getPicYuvRec();
    1373          m_confReconFile[layerIdx].write( pPicCYuvRec,
    1374                                   conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
    1375                                   conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
    1376                                   conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
    1377                                   conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
    1378          layerBuffer->erase(iterPic);
    1379          iterPic = layerBuffer->begin();  // Ensure doesn't go to infinite loop
    1380          if(layerBuffer->size() == 0)
    1381          {
    1382            break;
    1383          }
    1384        }
    1385     }
    1386   }
    1387   // Now to remove the pictures that have been output
     1326      FILE *fptr;
     1327      if( this->getConfModeFlag() )
     1328      {
     1329        if( this->getMetadataFileRefresh() )
     1330        {
     1331          fptr = fopen( this->getMetadataFileName().c_str(), "w" );
     1332          fprintf(fptr, " LayerId      POC    MD5\n");
     1333          fprintf(fptr, "------------------------\n");
     1334        }
     1335        else
     1336        {
     1337          fptr = fopen( this->getMetadataFileName().c_str(), "a+" );
     1338        }
     1339        this->setMetadataFileRefresh(false);
     1340        UChar recon_digest[3][16];
     1341        calcMD5(*pic->getPicYuvRec(), recon_digest);
     1342        fprintf(fptr, "%8d%9d    MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), digestToString(recon_digest, 16));
     1343        fclose(fptr);
     1344
     1345        // Output all picutres "decoded" in that layer that have POC less than the current picture
     1346        std::vector<TComPic> *layerBuffer = (m_acTDecTop->getLayerDec(pic->getLayerId()))->getConfListPic();
     1347        // Write all pictures to the file.
     1348        if( this->getDecodedYuvLayerRefresh(layerIdx) )
     1349        {
     1350          if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
     1351          if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
     1352
     1353          char tempFileName[256];
     1354          strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerIdx ).c_str());
     1355          m_confReconFile[layerIdx].open(tempFileName, true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
     1356          this->setDecodedYuvLayerRefresh( layerIdx, false );
     1357        }
     1358        const Window &conf = pic->getConformanceWindow();
     1359        const Window &defDisp = m_respectDefDispWindow ? pic->getDefDisplayWindow() : Window();
     1360        Int xScal =  1, yScal = 1;
     1361#if REPN_FORMAT_IN_VPS
     1362        UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
     1363        xScal = TComSPS::getWinUnitX( chromaFormatIdc );
     1364        yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     1365#endif
     1366        std::vector<TComPic>::iterator itPic;
     1367        for(itPic = layerBuffer->begin(); itPic != layerBuffer->end(); itPic++)
     1368        {
     1369          TComPic checkPic = *itPic;
     1370          if( checkPic.getPOC() <= pic->getPOC() )
     1371          {
     1372            TComPicYuv* pPicCYuvRec = checkPic.getPicYuvRec();
     1373            m_confReconFile[layerIdx].write( pPicCYuvRec,
     1374              conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
     1375              conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
     1376              conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
     1377              conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
     1378            layerBuffer->erase(itPic);
     1379            itPic = layerBuffer->begin();  // Ensure doesn't go to infinite loop
     1380            if(layerBuffer->size() == 0)
     1381            {
     1382              break;
     1383            }
     1384          }
     1385        }
     1386      }
     1387      // Now to remove the pictures that have been output
    13881388#endif
    13891389
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r924 r930  
    5252
    5353#if CONFORMANCE_BITSTREAM_MODE
    54 Bool pocCompareFunction( TComPic &pic1, TComPic &pic2 )
    55 {
    56   return (pic1.getPOC() < pic2.getPOC());
     54Bool pocCompareFunction( const TComPic &pic1, const TComPic &pic2 )
     55{
     56  return (const_cast<TComPic&>(pic1).getPOC() < const_cast<TComPic&>(pic2).getPOC());
    5757}
    5858#endif
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h

    r856 r930  
    115115  Void  filterPicture  (TComPic*& rpcPic );
    116116
    117   void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
     117  Void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
    118118#if Q0074_COLOUR_REMAPPING_SEI
    119   void setColourRemappingInfoSEIEnabled(Int enabled) { m_colourRemapSEIEnabled = enabled; }
     119  Void setColourRemappingInfoSEIEnabled(Int enabled) { m_colourRemapSEIEnabled = enabled; }
    120120#endif
    121121#if SVC_EXTENSION
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r903 r930  
    11221122  for ( i = 0; i < min(m_cSPS.getMaxTLayers(),(UInt) MAX_TLAYER); i++ )
    11231123  {
     1124#if SVC_EXTENSION
     1125    assert(i < MAX_TLAYER);
     1126#endif
    11241127    m_cSPS.setMaxDecPicBuffering(m_maxDecPicBuffering[i], i);
    11251128    m_cSPS.setNumReorderPics(m_numReorderPics[i], i);
Note: See TracChangeset for help on using the changeset viewer.