Changeset 1344 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
- Timestamp:
- 22 Jul 2015, 03:01:47 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
r1332 r1344 82 82 return *this; 83 83 } 84 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK85 84 const SAOStatData& operator+= (const SAOStatData& src) 86 85 { … … 92 91 return *this; 93 92 } 94 #endif95 93 }; 96 94 … … 102 100 103 101 //interface 104 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK105 102 Void createEncData(Bool isPreDBFSamplesUsed); 106 #else107 Void createEncData();108 #endif109 103 Void destroyEncData(); 110 104 Void initRDOCabacCoder(TEncSbac* pcRDGoOnSbacCoder, TComSlice* pcSlice) ; 111 Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma 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); 116 106 public: //methods 117 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK118 107 Void getPreDBFStatistics(TComPic* pPic); 119 #endif120 108 private: //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 ); 109 Void getStatistics(SAOStatData*** blkStats, TComPicYuv* orgYuv, TComPicYuv* srcYuv,TComPic* pPic, Bool isCalculatePreDeblockSamples = false); 126 110 Void decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma); 127 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); 128 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 129 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 130 , Bool isCalculatePreDeblockSamples 131 #endif 132 ); 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); 133 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); 134 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); … … 137 117 inline Int64 estSaoDist(Int64 count, Int64 offset, Int64 diffSum, Int shift); 138 118 inline Int estIterOffset(Int typeIdx, Double lambda, Int offsetInput, Int64 count, Int64 diffSum, Int shift, Int bitIncrease, Int64& bestDist, Double& bestCost, Int offsetTh ); 139 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK140 119 Void addPreDBFStatistics(SAOStatData*** blkStats); 141 #endif142 120 private: //members 143 121 //for RDO … … 153 131 //statistics 154 132 SAOStatData*** m_statData; //[ctu][comp][classes] 155 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK156 133 SAOStatData*** m_preDBFstatData; 157 #endif158 134 Double m_saoDisabledRate[MAX_NUM_COMPONENT][MAX_TLAYER]; 159 135 Int m_skipLinesR[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES];
Note: See TracChangeset for help on using the changeset viewer.