Changeset 1402 in 3DVCSoftware for branches/HTM-16.1-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
- Timestamp:
- 26 May 2016, 15:03:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.1-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r1401 r1402 120 120 121 121 ::memset(m_saoDisabledRate, 0, sizeof(m_saoDisabledRate)); 122 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 123 m_lastIRAPPoc = MAX_INT; 124 #endif 122 125 123 126 for(Int typeIdc=0; typeIdc < NUM_SAO_NEW_TYPES; typeIdc++) … … 239 242 240 243 244 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 245 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP ) 246 #else 241 247 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed ) 248 #endif 242 249 { 243 250 TComPicYuv* orgYuv= pPic->getPicYuvOrg(); … … 256 263 } 257 264 //slice on/off 265 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 266 decidePicParams(sliceEnabled, pPic, saoEncodingRate, saoEncodingRateChroma, bResetStateAfterIRAP); 267 #else 258 268 decidePicParams(sliceEnabled, pPic->getSlice(0)->getDepth(), saoEncodingRate, saoEncodingRateChroma); 269 #endif 259 270 260 271 //block on/off … … 330 341 } 331 342 343 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 344 Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, const TComPic* pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP) 345 #else 332 346 Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma) 333 { 347 #endif 348 { 349 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 350 if (pic->getSlice(0)->isIRAP()) 351 { 352 m_lastIRAPPoc = pic->getSlice(0)->getPOC(); 353 } 354 if (bResetStateAfterIRAP && pic->getSlice(0)->getPOC() > m_lastIRAPPoc) 355 { // reset 356 for (Int compIdx = 0; compIdx < MAX_NUM_COMPONENT; compIdx++) 357 { 358 for (Int tempLayer = 1; tempLayer < MAX_TLAYER; tempLayer++) 359 { 360 m_saoDisabledRate[compIdx][tempLayer] = 0.0; 361 } 362 } 363 m_lastIRAPPoc = MAX_INT; 364 } 365 const Int picTempLayer = pic->getSlice(0)->getDepth(); 366 #endif 367 334 368 //decide sliceEnabled[compIdx] 335 369 const Int numberOfComponents = getNumberValidComponents(m_chromaFormatIDC);
Note: See TracChangeset for help on using the changeset viewer.