39 #ifndef __TENCSAMPLEADAPTIVEOFFSET__
40 #define __TENCSAMPLEADAPTIVEOFFSET__
76 ::memset(
count, 0,
sizeof(
Int64)*MAX_NUM_SAO_CLASSES);
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);
const SAOStatData & operator+=(const SAOStatData &src)
entropy encoder class (header)
sample adaptive offset class (header)
Int64 estSaoDist(Int64 count, Int64 offset, Int64 diffSum, Int shift)
Void addPreDBFStatistics(SAOStatData ***blkStats)
Void deriveOffsets(ComponentID compIdx, const Int channelBitDepth, Int typeIdc, SAOStatData &statData, Int *quantOffsets, Int &typeAuxInfo)
Int estIterOffset(Int typeIdx, Double lambda, Int offsetInput, Int64 count, Int64 diffSum, Int shift, Int bitIncrease, Int64 &bestDist, Double &bestCost, Int offsetTh)
#define MAX_NUM_SAO_CLASSES
picture class (symbol + YUV buffers)
Int64 getDistortion(const Int channelBitDepth, Int typeIdc, Int typeAuxInfo, Int *offsetVal, SAOStatData &statData)
Void initRDOCabacCoder(TEncSbac *pcRDGoOnSbacCoder, TComSlice *pcSlice)
TEncSbac * m_pcRDGoOnSbacCoder
const SAOStatData & operator=(const SAOStatData &src)
Void SAOProcess(TComPic *pPic, Bool *sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP)
virtual ~TEncSampleAdaptiveOffset()
Double m_lambda[MAX_NUM_COMPONENT]
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)
Double m_saoDisabledRate[MAX_NUM_COMPONENT][MAX_TLAYER]
TEncBinCABACCounter ** m_pppcBinCoderCABAC
SAOStatData *** m_preDBFstatData
Void getStatistics(SAOStatData ***blkStats, TComPicYuv *orgYuv, TComPicYuv *srcYuv, TComPic *pPic, Bool isCalculatePreDeblockSamples=false)
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)
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)
static const Int MAX_TLAYER
Explicit temporal layer QP offset - max number of temporal layer.
Context-adaptive entropy encoder class (header)
TEncSampleAdaptiveOffset()
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)
Int m_skipLinesR[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES]
SAOStatData *** m_statData
Void decidePicParams(Bool *sliceEnabled, const TComPic *pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP)
Int m_skipLinesB[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES]
Void getPreDBFStatistics(TComPic *pPic)
Void createEncData(Bool isPreDBFSamplesUsed)
Class for counting bits (header)
TEncSbac ** m_pppcRDSbacCoder