Changeset 1331 in SHVCSoftware


Ignore:
Timestamp:
22 Jul 2015, 01:30:58 (9 years ago)
Author:
seregin
Message:

port rev 4409

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1330 r1331  
    13631363  ("AlignCABACBeforeBypass",                          m_cabacBypassAlignmentEnabledFlag,                false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise" )
    13641364  ("SAO",                                             m_bUseSAO,                                         true, "Enable Sample Adaptive Offset")
     1365  ("TestSAODisableAtPictureLevel",                    m_bTestSAODisableAtPictureLevel,                  false, "Enables the testing of disabling SAO at the picture level after having analysed all blocks")
    13651366  ("MaxNumOffsetsPerPic",                             m_maxNumOffsetsPerPic,                             2048, "Max number of SAO offset per picture (Default: 2048)")
    13661367  ("SAOLcuBoundary",                                  m_saoCtuBoundary,                                 false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas")
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1330 r1331  
    248248  // coding tool (SAO)
    249249  Bool      m_bUseSAO;
     250  Bool      m_bTestSAODisableAtPictureLevel;
    250251  Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
    251252  Bool      m_saoCtuBoundary;                                 ///< SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1330 r1331  
    474474    m_acTEncTop[layer].setFastUDIUseMPMEnabled                             ( m_bFastUDIUseMPMEnabled );
    475475    m_acTEncTop[layer].setFastMEForGenBLowDelayEnabled                     ( m_bFastMEForGenBLowDelayEnabled );
    476     m_acTEncTop[layer]..setUseBLambdaForNonKeyLowDelayPictures             ( m_bUseBLambdaForNonKeyLowDelayPictures );
     476    m_acTEncTop[layer].setUseBLambdaForNonKeyLowDelayPictures              ( m_bUseBLambdaForNonKeyLowDelayPictures );
    477477    m_acTEncTop[layer].setPCMLog2MinSize                                   ( m_uiPCMLog2MinSize);
    478478    m_acTEncTop[layer].setUsePCM                                           ( m_usePCM );
     
    519519    m_acTEncTop[layer].setLFCrossSliceBoundaryFlag                          ( m_bLFCrossSliceBoundaryFlag );
    520520    m_acTEncTop[layer].setUseSAO                                            ( m_bUseSAO );
     521    m_acTEncTop[layer].setTestSAODisableAtPictureLevel                      ( m_bTestSAODisableAtPictureLevel );
    521522    m_acTEncTop[layer].setMaxNumOffsetsPerPic                               ( m_maxNumOffsetsPerPic );
    522523
     
    952953  m_cTEncTop.setLFCrossSliceBoundaryFlag                          ( m_bLFCrossSliceBoundaryFlag );
    953954  m_cTEncTop.setUseSAO                                            ( m_bUseSAO );
     955  m_cTEncTop.setTestSAODisableAtPictureLevel                      ( m_bTestSAODisableAtPictureLevel );
    954956  m_cTEncTop.setMaxNumOffsetsPerPic                               ( m_maxNumOffsetsPerPic);
    955957
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1330 r1331  
    164164  Bool      m_DeblockingFilterMetric;
    165165  Bool      m_bUseSAO;
     166  Bool      m_bTestSAODisableAtPictureLevel;
    166167  Int       m_maxNumOffsetsPerPic;
    167168  Bool      m_saoCtuBoundary;
     
    721722  Void      setUseSAO                  (Bool bVal)                   { m_bUseSAO = bVal; }
    722723  Bool      getUseSAO                  ()                            { return m_bUseSAO; }
     724  Void  setTestSAODisableAtPictureLevel (Bool bVal)                  { m_bTestSAODisableAtPictureLevel = bVal; }
     725  Bool  getTestSAODisableAtPictureLevel ( ) const                    { return m_bTestSAODisableAtPictureLevel; }
    723726  Void  setMaxNumOffsetsPerPic                   (Int iVal)          { m_maxNumOffsetsPerPic = iVal; }
    724727  Int   getMaxNumOffsetsPerPic                   ()                  { return m_maxNumOffsetsPerPic; }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1325 r1331  
    26152615      m_pcEncTop->getRDGoOnSbacCoder()->setBitstream(&tempBitCounter);
    26162616      m_pcSAO->initRDOCabacCoder(m_pcEncTop->getRDGoOnSbacCoder(), pcSlice);
    2617       m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas()
     2617      m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas(), m_pcCfg->getTestSAODisableAtPictureLevel()
    26182618#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    26192619                          , m_pcCfg->getSaoCtuBoundary()
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp

    r1307 r1331  
    254254
    255255
    256 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas
     256Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel
    257257#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    258258                                         , Bool isPreDBFSamplesUsed
     
    281281  //block on/off
    282282  SAOBlkParam* reconParams = new SAOBlkParam[m_numCTUsPic]; //temporary parameter buffer for storing reconstructed SAO parameters
    283   decideBlkParams(pPic, sliceEnabled, m_statData, srcYuv, resYuv, reconParams, pPic->getPicSym()->getSAOBlkParam());
     283  decideBlkParams(pPic, sliceEnabled, m_statData, srcYuv, resYuv, reconParams, pPic->getPicSym()->getSAOBlkParam(), bTestSAODisableAtPictureLevel);
    284284  delete[] reconParams;
    285285}
     
    791791}
    792792
    793 Void TEncSampleAdaptiveOffset::decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams)
     793Void TEncSampleAdaptiveOffset::decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams, const Bool bTestSAODisableAtPictureLevel)
    794794{
    795795  Bool allBlksDisabled = true;
     
    809809
    810810
    811 #if RD_TEST_SAO_DISABLE_AT_PICTURE_LEVEL
    812   Double totalCost = 0;
    813 #endif
     811  Double totalCost = 0; // Used if bTestSAODisableAtPictureLevel==true
    814812
    815813  for(Int ctuRsAddr=0; ctuRsAddr< m_numCTUsPic; ctuRsAddr++)
     
    872870    } //mode
    873871
    874 #if RD_TEST_SAO_DISABLE_AT_PICTURE_LEVEL
    875872    totalCost += minCost;
    876 #endif
    877873
    878874    m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[ SAO_CABACSTATE_BLK_NEXT ]);
     
    884880  } //ctuRsAddr
    885881
    886 #if RD_TEST_SAO_DISABLE_AT_PICTURE_LEVEL
    887   if (!allBlksDisabled && (totalCost >= 0)) //SAO is not beneficial - disable it
     882  if (!allBlksDisabled && (totalCost >= 0) && bTestSAODisableAtPictureLevel) //SAO has not beneficial in this case - disable it
    888883  {
    889884    for(Int ctuRsAddr = 0; ctuRsAddr < m_numCTUsPic; ctuRsAddr++)
     
    899894    m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[ SAO_CABACSTATE_PIC_INIT ]);
    900895  }
    901 #endif
    902896
    903897#if SAO_ENCODING_CHOICE
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h

    r1307 r1331  
    109109  Void destroyEncData();
    110110  Void initRDOCabacCoder(TEncSbac* pcRDGoOnSbacCoder, TComSlice* pcSlice) ;
    111   Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas
     111  Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel
    112112#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    113113                , Bool isPreDBFSamplesUsed
     
    125125                   );
    126126  Void decidePicParams(Bool* sliceEnabled, Int picTempLayer);
    127   Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams);
     127  Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams, const Bool bTestSAODisableAtPictureLevel);
    128128  Void getBlkStats(const ComponentID compIdx, const Int channelBitDepth, SAOStatData* statsDataTypes, Pel* srcBlk, Pel* orgBlk, Int srcStride, Int orgStride, Int width, Int height, Bool isLeftAvail,  Bool isRightAvail, Bool isAboveAvail, Bool isBelowAvail, Bool isAboveLeftAvail, Bool isAboveRightAvail
    129129#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
Note: See TracChangeset for help on using the changeset viewer.