51 return ((x)>0) ? (
Int)(((
Int)(x)+(1<<(bitDepth-8-1)))/(1<<(bitDepth-8))) : ((
Int)(((
Int)(x)-(1<<(bitDepth-8-1)))/(1<<(bitDepth-8))));
56 return (bitDepth > 8 ?
xRoundIbdi2(bitDepth, (x)) : ((x)>=0 ? ((
Int)((x)+0.5)) : ((
Int)((x)-0.5)))) ;
107 if(isPreDBFSamplesUsed)
132 if(isPreDBFSamplesUsed)
175 printf(
"Not a supported type");
254 if(isPreDBFSamplesUsed)
260 decidePicParams(sliceEnabled, pPic, saoEncodingRate, saoEncodingRateChroma, bResetStateAfterIRAP);
265 delete[] reconParams;
289 Bool isLeftAvail,isRightAvail,isAboveAvail,isBelowAvail,isAboveLeftAvail,isAboveRightAvail,isBelowLeftAvail,isBelowRightAvail;
307 isBelowRightAvail = (isRightAvail && isBelowAvail);
308 isBelowLeftAvail = ((xPos > 0) && (isBelowAvail));
309 isAboveRightAvail = ((yPos > 0) && (isRightAvail));
311 for(
Int compIdx = 0; compIdx < numberOfComponents; compIdx++)
319 Pel* srcBlk = srcYuv->
getAddr(component) + ((yPos >> componentScaleY) * srcStride) + (xPos >> componentScaleX);
322 Pel* orgBlk = orgYuv->
getAddr(component) + ((yPos >> componentScaleY) * orgStride) + (xPos >> componentScaleX);
325 , srcBlk, orgBlk, srcStride, orgStride, (width >> componentScaleX), (height >> componentScaleY)
326 , isLeftAvail, isRightAvail, isAboveAvail, isBelowAvail, isAboveLeftAvail, isAboveRightAvail
327 , isCalculatePreDeblockSamples
357 sliceEnabled[compIdx] =
false;
360 for (
Int compIdx = 0; compIdx < numberOfComponents; compIdx++)
363 sliceEnabled[compIdx] =
true;
365 if (saoEncodingRate>0.0)
367 if (saoEncodingRateChroma>0.0)
370 if( (picTempLayer > 0)
373 sliceEnabled[compIdx] =
false;
379 if( (picTempLayer > 0)
382 sliceEnabled[compIdx] =
false;
403 dist +=
estSaoDist( statData.
count[offsetIdx], invQuantOffset[offsetIdx], statData.
diff[offsetIdx], shift);
409 for (
Int offsetIdx=typeAuxInfo; offsetIdx<typeAuxInfo+4; offsetIdx++)
412 dist +=
estSaoDist( statData.
count[bandIdx], invQuantOffset[bandIdx], statData.
diff[bandIdx], shift);
418 printf(
"Not a supported type");
429 return (( count*offset*offset-diffSum*offset*2 ) >> shift);
435 Int iterOffset, tempOffset;
436 Int64 tempDist, tempRate;
437 Double tempCost, tempMinCost;
438 Int offsetOutput = 0;
439 iterOffset = offsetInput;
441 tempMinCost = lambda;
442 while (iterOffset != 0)
445 tempRate = (typeIdx ==
SAO_TYPE_BO) ? (abs((
Int)iterOffset)+2) : (abs((
Int)iterOffset)+1);
446 if (abs((
Int)iterOffset)==offsetTh)
451 tempOffset = iterOffset << bitIncrease;
452 tempDist =
estSaoDist( count, tempOffset, diffSum, shift);
453 tempCost = ((
Double)tempDist + lambda * (
Double) tempRate);
454 if(tempCost < tempMinCost)
456 tempMinCost = tempCost;
457 offsetOutput = iterOffset;
461 iterOffset = (iterOffset > 0) ? (iterOffset-1):(iterOffset+1);
468 Int bitDepth = channelBitDepth;
476 for(
Int classIdx=0; classIdx< numClasses; classIdx++)
483 if(statData.
count[classIdx] == 0)
492 quantOffsets[classIdx] =
Clip3(-offsetTh, offsetTh, quantOffsets[classIdx]);
509 quantOffsets[classIdx] =0;
513 quantOffsets[classIdx] =0;
517 quantOffsets[classIdx] =0;
521 quantOffsets[classIdx] =0;
524 if( quantOffsets[classIdx] != 0 )
540 costBOClasses[classIdx]=
m_lambda[compIdx];
541 if( quantOffsets[classIdx] != 0 )
543 quantOffsets[classIdx] =
estIterOffset( typeIdc,
m_lambda[compIdx], quantOffsets[classIdx], statData.
count[classIdx], statData.
diff[classIdx], shift,
m_offsetStepLog2[compIdx], distBOClasses[classIdx], costBOClasses[classIdx], offsetTh );
549 for(
Int band=0; band< NUM_SAO_BO_CLASSES- 4+ 1; band++)
551 cost = costBOClasses[band ];
552 cost += costBOClasses[band+1];
553 cost += costBOClasses[band+2];
554 cost += costBOClasses[band+3];
564 ::memset(clearQuantOffset, 0,
sizeof(
Int)*NUM_SAO_BO_CLASSES);
565 for(
Int i=0; i< 4; i++)
567 Int band = (typeAuxInfo+i)%NUM_SAO_BO_CLASSES;
568 clearQuantOffset[band] = quantOffsets[band];
570 ::memcpy(quantOffsets, clearQuantOffset,
sizeof(
Int)*NUM_SAO_BO_CLASSES);
575 printf(
"Not a supported type");
588 UInt previousWrittenBits;
612 modeDist[compIdx] = 0;
615 if(sliceEnabled[compIdx])
620 testOffset[compIdx].
typeIdc = typeIdc;
626 invertQuantOffsets(compIdx, typeIdc, testOffset[compIdx].typeAuxInfo, invQuantOffset, testOffset[compIdx].offset);
640 modeDist[compIdx] = dist[compIdx];
641 modeParam[compIdx]= testOffset[compIdx];
653 previousWrittenBits = 0;
655 for(
UInt componentIndex =
COMPONENT_Cb; componentIndex < numberOfComponents; componentIndex++)
660 modeDist [component] = 0;
664 cost +=
m_lambda[component] * (currentWrittenBits - previousWrittenBits);
665 previousWrittenBits = currentWrittenBits;
676 previousWrittenBits = 0;
679 for(
UInt componentIndex =
COMPONENT_Cb; componentIndex < numberOfComponents; componentIndex++)
682 if(!sliceEnabled[component])
689 testOffset[component].
typeIdc = typeIdc;
693 invertQuantOffsets(component, typeIdc, testOffset[component].typeAuxInfo, invQuantOffset, testOffset[component].offset);
699 cost += dist[component] + (
m_lambda[component] * (currentWrittenBits - previousWrittenBits));
700 previousWrittenBits = currentWrittenBits;
706 for(
UInt componentIndex =
COMPONENT_Cb; componentIndex < numberOfComponents; componentIndex++)
708 modeDist[componentIndex] = dist[componentIndex];
709 modeParam[componentIndex] = testOffset[componentIndex];
717 for(
UInt componentIndex =
COMPONENT_Y; componentIndex < numberOfComponents; componentIndex++)
719 modeNormCost += (
Double)modeDist[componentIndex] /
m_lambda[componentIndex];
738 if(mergeList[mergeType] ==
NULL)
743 testBlkParam = *(mergeList[mergeType]);
746 for(
Int compIdx = 0; compIdx < numberOfComponents; compIdx++)
749 testBlkParam[compIdx].typeIdc = mergeType;
751 SAOOffset& mergedOffsetParam = (*(mergeList[mergeType]))[compIdx];
769 cost = normDist+(
Double)rate;
771 if(cost < modeNormCost)
774 modeParam = testBlkParam;
784 const Double saoEncodingRate,
const Double saoEncodingRateChroma)
786 Bool allBlksDisabled =
true;
788 for(
Int compId =
COMPONENT_Y; compId < numberOfComponents; compId++)
790 if (sliceEnabled[compId])
792 allBlksDisabled =
false;
808 codedParams[ctuRsAddr].
reset();
841 printf(
"Not a supported SAO mode\n");
847 if(modeCost < minCost)
850 codedParams[ctuRsAddr] = modeParam;
855 totalCost += minCost;
860 reconParams[ctuRsAddr] = codedParams[ctuRsAddr];
862 offsetCTU(ctuRsAddr, srcYuv, resYuv, reconParams[ctuRsAddr], pic);
865 if (!allBlksDisabled && (totalCost >= 0) && bTestSAODisableAtPictureLevel)
869 codedParams[ctuRsAddr].
reset();
874 sliceEnabled[componentIndex] =
false;
880 if (saoEncodingRate > 0.0)
885 for (
Int compIdx = 0; compIdx < numberOfComponents; compIdx++)
887 numCtusForSAOOff[compIdx] = 0;
890 if( reconParams[ctuRsAddr][compIdx].modeIdc ==
SAO_MODE_OFF)
892 numCtusForSAOOff[compIdx]++;
896 if (saoEncodingRateChroma > 0.0)
898 for (
Int compIdx = 0; compIdx < numberOfComponents; compIdx++)
903 else if (picTempLayer == 0)
913 ,
Bool isLeftAvail,
Bool isRightAvail,
Bool isAboveAvail,
Bool isBelowAvail,
Bool isAboveLeftAvail,
Bool isAboveRightAvail
914 ,
Bool isCalculatePreDeblockSamples
936 Int x,y, startX, startY, endX, endY, edgeType, firstLineStartX, firstLineEndX;
937 SChar signLeft, signRight, signDown;
939 Pel *srcLine, *orgLine;
950 diff = statsData.
diff;
951 count = statsData.
count;
958 endY = (isBelowAvail) ? (height - skipLinesB[typeIdx]) : height;
959 startX = (!isCalculatePreDeblockSamples) ? (isLeftAvail ? 0 : 1)
960 : (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1))
962 endX = (!isCalculatePreDeblockSamples) ? (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1))
963 : (isRightAvail ? width : (width - 1))
965 for (y=0; y<endY; y++)
967 signLeft = (
SChar)
sgn(srcLine[startX] - srcLine[startX-1]);
968 for (x=startX; x<endX; x++)
970 signRight = (
SChar)
sgn(srcLine[x] - srcLine[x+1]);
971 edgeType = signRight + signLeft;
972 signLeft = -signRight;
974 diff [edgeType] += (orgLine[x] - srcLine[x]);
977 srcLine += srcStride;
978 orgLine += orgStride;
980 if(isCalculatePreDeblockSamples)
984 startX = isLeftAvail ? 0 : 1;
985 endX = isRightAvail ? width : (width -1);
987 for(y=0; y<skipLinesB[typeIdx]; y++)
989 signLeft = (
SChar)
sgn(srcLine[startX] - srcLine[startX-1]);
990 for (x=startX; x<endX; x++)
992 signRight = (
SChar)
sgn(srcLine[x] - srcLine[x+1]);
993 edgeType = signRight + signLeft;
994 signLeft = -signRight;
996 diff [edgeType] += (orgLine[x] - srcLine[x]);
999 srcLine += srcStride;
1000 orgLine += orgStride;
1012 startX = (!isCalculatePreDeblockSamples) ? 0
1013 : (isRightAvail ? (width - skipLinesR[typeIdx]) : width)
1015 startY = isAboveAvail ? 0 : 1;
1016 endX = (!isCalculatePreDeblockSamples) ? (isRightAvail ? (width - skipLinesR[typeIdx]) : width)
1019 endY = isBelowAvail ? (height - skipLinesB[typeIdx]) : (height - 1);
1022 srcLine += srcStride;
1023 orgLine += orgStride;
1026 Pel* srcLineAbove = srcLine - srcStride;
1027 for (x=startX; x<endX; x++)
1029 signUpLine[x] = (
SChar)
sgn(srcLine[x] - srcLineAbove[x]);
1033 for (y=startY; y<endY; y++)
1035 srcLineBelow = srcLine + srcStride;
1037 for (x=startX; x<endX; x++)
1039 signDown = (
SChar)
sgn(srcLine[x] - srcLineBelow[x]);
1040 edgeType = signDown + signUpLine[x];
1041 signUpLine[x]= -signDown;
1043 diff [edgeType] += (orgLine[x] - srcLine[x]);
1046 srcLine += srcStride;
1047 orgLine += orgStride;
1049 if(isCalculatePreDeblockSamples)
1056 for(y=0; y<skipLinesB[typeIdx]; y++)
1058 srcLineBelow = srcLine + srcStride;
1059 srcLineAbove = srcLine - srcStride;
1061 for (x=startX; x<endX; x++)
1063 edgeType =
sgn(srcLine[x] - srcLineBelow[x]) +
sgn(srcLine[x] - srcLineAbove[x]);
1064 diff [edgeType] += (orgLine[x] - srcLine[x]);
1067 srcLine += srcStride;
1068 orgLine += orgStride;
1079 SChar *signUpLine, *signDownLine, *signTmpLine;
1084 startX = (!isCalculatePreDeblockSamples) ? (isLeftAvail ? 0 : 1)
1085 : (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1))
1088 endX = (!isCalculatePreDeblockSamples) ? (isRightAvail ? (width - skipLinesR[typeIdx]): (width - 1))
1089 : (isRightAvail ? width : (width - 1))
1091 endY = isBelowAvail ? (height - skipLinesB[typeIdx]) : (height - 1);
1094 Pel* srcLineBelow = srcLine + srcStride;
1095 for (x=startX; x<endX+1; x++)
1097 signUpLine[x] = (
SChar)
sgn(srcLineBelow[x] - srcLine[x-1]);
1101 Pel* srcLineAbove = srcLine - srcStride;
1102 firstLineStartX = (!isCalculatePreDeblockSamples) ? (isAboveLeftAvail ? 0 : 1) : startX;
1103 firstLineEndX = (!isCalculatePreDeblockSamples) ? (isAboveAvail ? endX : 1) : endX;
1104 for(x=firstLineStartX; x<firstLineEndX; x++)
1106 edgeType =
sgn(srcLine[x] - srcLineAbove[x-1]) - signUpLine[x+1];
1107 diff [edgeType] += (orgLine[x] - srcLine[x]);
1110 srcLine += srcStride;
1111 orgLine += orgStride;
1115 for (y=1; y<endY; y++)
1117 srcLineBelow = srcLine + srcStride;
1119 for (x=startX; x<endX; x++)
1121 signDown = (
SChar)
sgn(srcLine[x] - srcLineBelow[x+1]);
1122 edgeType = signDown + signUpLine[x];
1123 diff [edgeType] += (orgLine[x] - srcLine[x]);
1126 signDownLine[x+1] = -signDown;
1128 signDownLine[startX] = (
SChar)
sgn(srcLineBelow[startX] - srcLine[startX-1]);
1130 signTmpLine = signUpLine;
1131 signUpLine = signDownLine;
1132 signDownLine = signTmpLine;
1134 srcLine += srcStride;
1135 orgLine += orgStride;
1137 if(isCalculatePreDeblockSamples)
1141 startX = isLeftAvail ? 0 : 1 ;
1142 endX = isRightAvail ? width : (width -1);
1144 for(y=0; y<skipLinesB[typeIdx]; y++)
1146 srcLineBelow = srcLine + srcStride;
1147 srcLineAbove = srcLine - srcStride;
1149 for (x=startX; x< endX; x++)
1151 edgeType =
sgn(srcLine[x] - srcLineBelow[x+1]) +
sgn(srcLine[x] - srcLineAbove[x-1]);
1152 diff [edgeType] += (orgLine[x] - srcLine[x]);
1155 srcLine += srcStride;
1156 orgLine += orgStride;
1168 startX = (!isCalculatePreDeblockSamples) ? (isLeftAvail ? 0 : 1)
1169 : (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1))
1171 endX = (!isCalculatePreDeblockSamples) ? (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1))
1172 : (isRightAvail ? width : (width - 1))
1174 endY = isBelowAvail ? (height - skipLinesB[typeIdx]) : (height - 1);
1177 Pel* srcLineBelow = srcLine + srcStride;
1178 for (x=startX-1; x<endX; x++)
1180 signUpLine[x] = (
SChar)
sgn(srcLineBelow[x] - srcLine[x+1]);
1185 Pel* srcLineAbove = srcLine - srcStride;
1186 firstLineStartX = (!isCalculatePreDeblockSamples) ? (isAboveAvail ? startX : endX)
1189 firstLineEndX = (!isCalculatePreDeblockSamples) ? ((!isRightAvail && isAboveRightAvail) ? width : endX)
1192 for(x=firstLineStartX; x<firstLineEndX; x++)
1194 edgeType =
sgn(srcLine[x] - srcLineAbove[x+1]) - signUpLine[x-1];
1195 diff [edgeType] += (orgLine[x] - srcLine[x]);
1199 srcLine += srcStride;
1200 orgLine += orgStride;
1203 for (y=1; y<endY; y++)
1205 srcLineBelow = srcLine + srcStride;
1207 for(x=startX; x<endX; x++)
1209 signDown = (
SChar)
sgn(srcLine[x] - srcLineBelow[x-1]);
1210 edgeType = signDown + signUpLine[x];
1212 diff [edgeType] += (orgLine[x] - srcLine[x]);
1215 signUpLine[x-1] = -signDown;
1217 signUpLine[endX-1] = (
SChar)
sgn(srcLineBelow[endX-1] - srcLine[endX]);
1218 srcLine += srcStride;
1219 orgLine += orgStride;
1221 if(isCalculatePreDeblockSamples)
1225 startX = isLeftAvail ? 0 : 1 ;
1226 endX = isRightAvail ? width : (width -1);
1228 for(y=0; y<skipLinesB[typeIdx]; y++)
1230 srcLineBelow = srcLine + srcStride;
1231 srcLineAbove = srcLine - srcStride;
1233 for (x=startX; x<endX; x++)
1235 edgeType =
sgn(srcLine[x] - srcLineBelow[x-1]) +
sgn(srcLine[x] - srcLineAbove[x+1]);
1236 diff [edgeType] += (orgLine[x] - srcLine[x]);
1239 srcLine += srcStride;
1240 orgLine += orgStride;
1248 startX = (!isCalculatePreDeblockSamples)?0
1249 :( isRightAvail?(width- skipLinesR[typeIdx]):width)
1251 endX = (!isCalculatePreDeblockSamples)?(isRightAvail ? (width - skipLinesR[typeIdx]) : width )
1254 endY = isBelowAvail ? (height- skipLinesB[typeIdx]) : height;
1256 for (y=0; y< endY; y++)
1258 for (x=startX; x< endX; x++)
1261 Int bandIdx= srcLine[x] >> shiftBits;
1262 diff [bandIdx] += (orgLine[x] - srcLine[x]);
1265 srcLine += srcStride;
1266 orgLine += orgStride;
1268 if(isCalculatePreDeblockSamples)
1275 for(y= 0; y< skipLinesB[typeIdx]; y++)
1277 for (x=startX; x< endX; x++)
1279 Int bandIdx= srcLine[x] >> shiftBits;
1280 diff [bandIdx] += (orgLine[x] - srcLine[x]);
1283 srcLine += srcStride;
1284 orgLine += orgStride;
1294 printf(
"Not a supported SAO types\n");
#define NUM_SAO_BO_CLASSES_LOG2
Double xRoundIbdi(Int bitDepth, Double x)
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
Double xRoundIbdi2(Int bitDepth, Double x)
rounding with IBDI
picture class (symbol + YUV buffers)
Int getStride(const ComponentID id) const
estimation part of sample adaptive offset class (header)
TComSlice * getSlice(Int i)
Int64 getDistortion(const Int channelBitDepth, Int typeIdc, Int typeAuxInfo, Int *offsetVal, SAOStatData &statData)
ChromaFormat m_chromaFormatIDC
Int getMergeList(TComPic *pic, Int ctuRsAddr, SAOBlkParam *blkParams, SAOBlkParam *mergeList[NUM_SAO_MERGE_TYPES])
Void invertQuantOffsets(ComponentID compIdx, Int typeIdc, Int typeAuxInfo, Int *dstOffsets, Int *srcOffsets)
Void initRDOCabacCoder(TEncSbac *pcRDGoOnSbacCoder, TComSlice *pcSlice)
Int recon[MAX_NUM_CHANNEL_TYPE]
the bit depth as indicated in the SPS
TEncSbac * m_pcRDGoOnSbacCoder
Void reconstructBlkSAOParam(SAOBlkParam &recParam, SAOBlkParam *mergeList[NUM_SAO_MERGE_TYPES])
TComPicYuv * m_tempPicYuv
Void SAOProcess(TComPic *pPic, Bool *sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP)
TComPicYuv * getPicYuvRec()
virtual ~TEncSampleAdaptiveOffset()
Void offsetCTU(Int ctuRsAddr, TComPicYuv *srcYuv, TComPicYuv *resYuv, SAOBlkParam &saoblkParam, TComPic *pPic)
UInt m_offsetStepLog2[MAX_NUM_COMPONENT]
Void codeSAOBlkParam(SAOBlkParam &saoBlkParam, const BitDepths &bitDepths, Bool *sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail, Bool onlyEstMergeInfo=false)
#define NUM_SAO_BO_CLASSES
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]
Void codeSAOOffsetParam(ComponentID compIdx, SAOOffset &ctbParam, Bool sliceEnabled, const Int channelBitDepth)
TEncBinCABACCounter ** m_pppcBinCoderCABAC
Void copyToPic(TComPicYuv *pcPicYuvDst) const
SAOStatData *** m_preDBFstatData
static const Int MAX_INT
max. value of signed 32-bit integer
Void load(const TEncSbac *pSrc)
T Clip3(const T minVal, const T maxVal, const T a)
general min/max clip
TComPicYuv * getPicYuvOrg()
Int getBitDepth(ChannelType type) const
Void getStatistics(SAOStatData ***blkStats, TComPicYuv *orgYuv, TComPicYuv *srcYuv, TComPic *pPic, Bool isCalculatePreDeblockSamples=false)
const BitDepths & getBitDepths() const
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)
UInt getNumberOfWrittenBits()
ChromaFormat getChromaFormat() const
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)
const TComSPS & getSPS() const
static const Int MAX_TLAYER
Explicit temporal layer QP offset - max number of temporal layer.
static Int getMaxOffsetQVal(const Int channelBitDepth)
Void resetEntropy(const TComSlice *pSlice)
TEncSampleAdaptiveOffset()
static const Double MAX_DOUBLE
max. value of Double-type value
Pel * getAddr(const ComponentID ch)
Void deriveLoopFilterBoundaryAvailibility(Int ctuRsAddr, Bool &isLeftAvail, Bool &isRightAvail, Bool &isAboveAvail, Bool &isBelowAvail, Bool &isAboveLeftAvail, Bool &isAboveRightAvail, Bool &isBelowLeftAvail, Bool &isBelowRightAvail)
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)
#define DISTORTION_PRECISION_ADJUSTMENT(x)
Void store(TEncSbac *pDest) const
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 setBorderExtension(Bool b)
Void createEncData(Bool isPreDBFSamplesUsed)
TEncSbac ** m_pppcRDSbacCoder
SAOBlkParam * getSAOBlkParam()