Ignore:
Timestamp:
2 Feb 2014, 04:51:29 (11 years ago)
Author:
seregin
Message:

update to HM-13.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h

    r540 r593  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5454// ====================================================================================================================
    5555
    56 #if HM_CLEANUP_SAO
    5756enum SAOCabacStateLablesRDO //CABAC state labels
    5857{
     
    146145  TEncSbac*              m_pcRDGoOnSbacCoder;
    147146  TEncBinCABACCounter**  m_pppcBinCoderCABAC;   
    148   Double                 m_labmda[NUM_SAO_COMPONENTS];
     147  Double                 m_lambda[NUM_SAO_COMPONENTS];
    149148
    150149  //statistics
     
    159158  Int                    m_skipLinesB[NUM_SAO_COMPONENTS][NUM_SAO_NEW_TYPES];
    160159};
    161 #else
    162 
    163 
    164 class TEncSampleAdaptiveOffset : public TComSampleAdaptiveOffset
    165 {
    166 private:
    167   TEncEntropy*      m_pcEntropyCoder;
    168   TEncSbac***       m_pppcRDSbacCoder;              ///< for CABAC
    169   TEncSbac*         m_pcRDGoOnSbacCoder;
    170 #if FAST_BIT_EST
    171   TEncBinCABACCounter*** m_pppcBinCoderCABAC;            ///< temporal CABAC state storage for RD computation
    172 #else
    173   TEncBinCABAC***   m_pppcBinCoderCABAC;            ///< temporal CABAC state storage for RD computation
    174 #endif
    175  
    176   Int64  ***m_iCount;      //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE][MAX_NUM_SAO_CLASS];
    177   Int64  ***m_iOffset;     //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE][MAX_NUM_SAO_CLASS];
    178   Int64  ***m_iOffsetOrg;  //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE];
    179   Int64  ****m_count_PreDblk;      //[LCU][YCbCr][MAX_NUM_SAO_TYPE][MAX_NUM_SAO_CLASS];
    180   Int64  ****m_offsetOrg_PreDblk;  //[LCU][YCbCr][MAX_NUM_SAO_TYPE][MAX_NUM_SAO_CLASS];
    181   Int64  **m_iRate;        //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE];
    182   Int64  **m_iDist;        //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE];
    183   Double **m_dCost;        //[MAX_NUM_SAO_PART][MAX_NUM_SAO_TYPE];
    184   Double *m_dCostPartBest; //[MAX_NUM_SAO_PART];
    185   Int64  *m_iDistOrg;      //[MAX_NUM_SAO_PART];
    186   Int    *m_iTypePartBest; //[MAX_NUM_SAO_PART];
    187   Int     m_iOffsetThY;
    188   Int     m_iOffsetThC;
    189   Bool    m_bUseSBACRD;
    190 #if SAO_ENCODING_CHOICE
    191 #if SAO_ENCODING_CHOICE_CHROMA
    192   Double  m_depthSaoRate[2][4];
    193 #else
    194   Double  m_depth0SaoRate;
    195 #endif
    196 #endif
    197 
    198 public:
    199   TEncSampleAdaptiveOffset         ();
    200   virtual ~TEncSampleAdaptiveOffset();
    201 
    202   Void startSaoEnc( TComPic* pcPic, TEncEntropy* pcEntropyCoder, TEncSbac*** pppcRDSbacCoder, TEncSbac* pcRDGoOnSbacCoder);
    203   Void endSaoEnc();
    204   Void resetStats();
    205 #if SAO_ENCODING_CHOICE
    206   Void SAOProcess(SAOParam *pcSaoParam, Double dLambda, Double dLambdaChroma, Int depth);
    207 #else
    208   Void SAOProcess(SAOParam *pcSaoParam, Double dLambda, Double dLambdaChroma);
    209 #endif
    210 
    211   Void runQuadTreeDecision(SAOQTPart *psQTPart, Int iPartIdx, Double &dCostFinal, Int iMaxLevel, Double dLambda, Int yCbCr);
    212   Void rdoSaoOnePart(SAOQTPart *psQTPart, Int iPartIdx, Double dLambda, Int yCbCr);
    213  
    214   Void disablePartTree(SAOQTPart *psQTPart, Int iPartIdx);
    215   Void getSaoStats(SAOQTPart *psQTPart, Int iYCbCr);
    216   Void calcSaoStatsCu(Int iAddr, Int iPartIdx, Int iYCbCr);
    217   Void calcSaoStatsBlock( Pel* pRecStart, Pel* pOrgStart, Int stride, Int64** ppStats, Int64** ppCount, UInt width, UInt height, Bool* pbBorderAvail, Int iYCbCr);
    218   Void calcSaoStatsCuOrg(Int iAddr, Int iPartIdx, Int iYCbCr);
    219   Void calcSaoStatsCu_BeforeDblk( TComPic* pcPic );
    220   Void destroyEncBuffer();
    221   Void createEncBuffer();
    222   Void assignSaoUnitSyntax(SaoLcuParam* saoLcuParam,  SAOQTPart* saoPart, Bool &oneUnitFlag, Int yCbCr);
    223   Void checkMerge(SaoLcuParam * lcuParamCurr,SaoLcuParam * lcuParamCheck, Int dir);
    224 #if SAO_ENCODING_CHOICE
    225   Void rdoSaoUnitAll(SAOParam *saoParam, Double lambda, Double lambdaChroma, Int depth);
    226 #else
    227   Void rdoSaoUnitAll(SAOParam *saoParam, Double lambda, Double lambdaChroma);
    228 #endif
    229   Void saoComponentParamDist(Int allowMergeLeft, Int allowMergeUp, SAOParam *saoParam, Int addr, Int addrUp, Int addrLeft, Int yCbCr, Double lambda, SaoLcuParam *compSaoParam, Double *distortion);
    230   Void sao2ChromaParamDist(Int allowMergeLeft, Int allowMergeUp, SAOParam *saoParam, Int addr, Int addrUp, Int addrLeft, Double lambda, SaoLcuParam *crSaoParam, SaoLcuParam *cbSaoParam, Double *distortion);
    231   inline Int64 estSaoDist(Int64 count, Int64 offset, Int64 offsetOrg, Int shift);
    232   inline Int64 estIterOffset(Int typeIdx, Int classIdx, Double lambda, Int64 offsetInput, Int64 count, Int64 offsetOrg, Int shift, Int bitIncrease, Int *currentDistortionTableBo, Double *currentRdCostTableBo, Int offsetTh );
    233   inline Int64 estSaoTypeDist(Int compIdx, Int typeIdx, Int shift, Double lambda, Int *currentDistortionTableBo, Double *currentRdCostTableBo);
    234   Void setMaxNumOffsetsPerPic(Int iVal) {m_maxNumOffsetsPerPic = iVal; }
    235   Int  getMaxNumOffsetsPerPic() {return m_maxNumOffsetsPerPic; }
    236 };
    237 #endif
    238160//! \}
    239161
Note: See TracChangeset for help on using the changeset viewer.