Changeset 593 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
- Timestamp:
- 2 Feb 2014, 04:51:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
r540 r593 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 54 54 // ==================================================================================================================== 55 55 56 #if HM_CLEANUP_SAO57 56 enum SAOCabacStateLablesRDO //CABAC state labels 58 57 { … … 146 145 TEncSbac* m_pcRDGoOnSbacCoder; 147 146 TEncBinCABACCounter** m_pppcBinCoderCABAC; 148 Double m_la bmda[NUM_SAO_COMPONENTS];147 Double m_lambda[NUM_SAO_COMPONENTS]; 149 148 150 149 //statistics … … 159 158 Int m_skipLinesB[NUM_SAO_COMPONENTS][NUM_SAO_NEW_TYPES]; 160 159 }; 161 #else162 163 164 class TEncSampleAdaptiveOffset : public TComSampleAdaptiveOffset165 {166 private:167 TEncEntropy* m_pcEntropyCoder;168 TEncSbac*** m_pppcRDSbacCoder; ///< for CABAC169 TEncSbac* m_pcRDGoOnSbacCoder;170 #if FAST_BIT_EST171 TEncBinCABACCounter*** m_pppcBinCoderCABAC; ///< temporal CABAC state storage for RD computation172 #else173 TEncBinCABAC*** m_pppcBinCoderCABAC; ///< temporal CABAC state storage for RD computation174 #endif175 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_CHOICE191 #if SAO_ENCODING_CHOICE_CHROMA192 Double m_depthSaoRate[2][4];193 #else194 Double m_depth0SaoRate;195 #endif196 #endif197 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_CHOICE206 Void SAOProcess(SAOParam *pcSaoParam, Double dLambda, Double dLambdaChroma, Int depth);207 #else208 Void SAOProcess(SAOParam *pcSaoParam, Double dLambda, Double dLambdaChroma);209 #endif210 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_CHOICE225 Void rdoSaoUnitAll(SAOParam *saoParam, Double lambda, Double lambdaChroma, Int depth);226 #else227 Void rdoSaoUnitAll(SAOParam *saoParam, Double lambda, Double lambdaChroma);228 #endif229 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 #endif238 160 //! \} 239 161
Note: See TracChangeset for help on using the changeset viewer.