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/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h

    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 *
    66 * Copyright (c) 2010-2015, ITU/ISO/IEC
     
    3232 */
    3333
    34 /** 
     34/**
    3535 \file     TEncSampleAdaptiveOffset.h
    3636 \brief    estimation part of sample adaptive offset class (header)
     
    8282    return *this;
    8383  }
    84 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    8584  const SAOStatData& operator+= (const SAOStatData& src)
    8685  {
     
    9291    return *this;
    9392  }
    94 #endif
    9593};
    9694
     
    102100
    103101  //interface
    104 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    105102  Void createEncData(Bool isPreDBFSamplesUsed);
    106 #else
    107   Void createEncData();
    108 #endif
    109103  Void destroyEncData();
    110104  Void initRDOCabacCoder(TEncSbac* pcRDGoOnSbacCoder, TComSlice* pcSlice) ;
    111   Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas
    112 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    113                 , Bool isPreDBFSamplesUsed
    114 #endif
    115                 );
     105  Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed);
    116106public: //methods
    117 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    118   Void getPreDBFStatistics(TComPic* pPic);
    119 #endif
     107  Void getPreDBFStatistics(TComPic* pPic);
    120108private: //methods
    121   Void getStatistics(SAOStatData*** blkStats, TComPicYuv* orgYuv, TComPicYuv* srcYuv,TComPic* pPic
    122 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    123                    , Bool isCalculatePreDeblockSamples = false
    124 #endif
    125                    );
    126   Void decidePicParams(Bool* sliceEnabled, Int picTempLayer);
    127   Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams);
    128   Void getBlkStats(Int compIdx, 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, Bool isBelowLeftAvail, Bool isBelowRightAvail
    129 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    130                   , Bool isCalculatePreDeblockSamples
    131 #endif
    132                   );
    133   Void deriveModeNewRDO(Int ctu, std::vector<SAOBlkParam*>& mergeList, Bool* sliceEnabled, SAOStatData*** blkStats, SAOBlkParam& modeParam, Double& modeNormCost, TEncSbac** cabacCoderRDO, Int inCabacLabel);
    134   Void deriveModeMergeRDO(Int ctu, std::vector<SAOBlkParam*>& mergeList, Bool* sliceEnabled, SAOStatData*** blkStats, SAOBlkParam& modeParam, Double& modeNormCost, TEncSbac** cabacCoderRDO, Int inCabacLabel);
    135   Int64 getDistortion(Int ctu, Int compIdx, Int typeIdc, Int typeAuxInfo, Int* offsetVal, SAOStatData& statData);
    136   Void deriveOffsets(Int ctu, Int compIdx, Int typeIdc, SAOStatData& statData, Int* quantOffsets, Int& typeAuxInfo);
     109  Void getStatistics(SAOStatData*** blkStats, TComPicYuv* orgYuv, TComPicYuv* srcYuv,TComPic* pPic, Bool isCalculatePreDeblockSamples = false);
     110  Void decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma);
     111  Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma);
     112  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, Bool isCalculatePreDeblockSamples);
     113  Void deriveModeNewRDO(const BitDepths &bitDepths, Int ctuRsAddr, SAOBlkParam* mergeList[NUM_SAO_MERGE_TYPES], Bool* sliceEnabled, SAOStatData*** blkStats, SAOBlkParam& modeParam, Double& modeNormCost, TEncSbac** cabacCoderRDO, Int inCabacLabel);
     114  Void deriveModeMergeRDO(const BitDepths &bitDepths, Int ctuRsAddr, SAOBlkParam* mergeList[NUM_SAO_MERGE_TYPES], Bool* sliceEnabled, SAOStatData*** blkStats, SAOBlkParam& modeParam, Double& modeNormCost, TEncSbac** cabacCoderRDO, Int inCabacLabel);
     115  Int64 getDistortion(const Int channelBitDepth, Int typeIdc, Int typeAuxInfo, Int* offsetVal, SAOStatData& statData);
     116  Void deriveOffsets(ComponentID compIdx, const Int channelBitDepth, Int typeIdc, SAOStatData& statData, Int* quantOffsets, Int& typeAuxInfo);
    137117  inline Int64 estSaoDist(Int64 count, Int64 offset, Int64 diffSum, Int shift);
    138   inline Int estIterOffset(Int typeIdx, Int classIdx, Double lambda, Int offsetInput, Int64 count, Int64 diffSum, Int shift, Int bitIncrease, Int64& bestDist, Double& bestCost, Int offsetTh );
    139 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
     118  inline Int estIterOffset(Int typeIdx, Double lambda, Int offsetInput, Int64 count, Int64 diffSum, Int shift, Int bitIncrease, Int64& bestDist, Double& bestCost, Int offsetTh );
    140119  Void addPreDBFStatistics(SAOStatData*** blkStats);
    141 #endif
    142120private: //members
    143121  //for RDO
    144   TEncSbac**             m_pppcRDSbacCoder;           
     122  TEncSbac**             m_pppcRDSbacCoder;
    145123  TEncSbac*              m_pcRDGoOnSbacCoder;
    146   TEncBinCABACCounter**  m_pppcBinCoderCABAC;   
    147   Double                 m_lambda[NUM_SAO_COMPONENTS];
     124#if FAST_BIT_EST
     125  TEncBinCABACCounter**  m_pppcBinCoderCABAC;
     126#else
     127  TEncBinCABAC**         m_pppcBinCoderCABAC;
     128#endif
     129  Double                 m_lambda[MAX_NUM_COMPONENT];
    148130
    149131  //statistics
    150132  SAOStatData***         m_statData; //[ctu][comp][classes]
    151 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    152133  SAOStatData***         m_preDBFstatData;
    153 #endif
    154 #if SAO_ENCODING_CHOICE
    155   Double                 m_saoDisabledRate[NUM_SAO_COMPONENTS][MAX_TLAYER];
    156 #endif
    157   Int                    m_skipLinesR[NUM_SAO_COMPONENTS][NUM_SAO_NEW_TYPES];
    158   Int                    m_skipLinesB[NUM_SAO_COMPONENTS][NUM_SAO_NEW_TYPES];
     134  Double                 m_saoDisabledRate[MAX_NUM_COMPONENT][MAX_TLAYER];
     135  Int                    m_skipLinesR[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES];
     136  Int                    m_skipLinesB[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES];
    159137};
     138
     139
    160140//! \}
    161141
Note: See TracChangeset for help on using the changeset viewer.