Changeset 1239 in SHVCSoftware
- Timestamp:
- 13 Jul 2015, 20:58:53 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1235 r1239 3313 3313 3314 3314 TComDataCU *pCU = rTu.getCU(); 3315 const Charalpha = pCU->getCrossComponentPredictionAlpha( rTu.GetAbsPartIdxTU( compID ), compID );3315 const Int alpha = pCU->getCrossComponentPredictionAlpha( rTu.GetAbsPartIdxTU( compID ), compID ); 3316 3316 const Int diffBitDepth = pCU->getSlice()->getSPS()->getDifferentialLumaChromaBitDepth(); 3317 3317 … … 3320 3320 if (reverse) 3321 3321 { 3322 // A constraint is to be added to the HEVC Standard to limit the size of pResiL and pResiC at this point. 3323 // The likely form of the constraint is to either restrict the values to CoeffMin to CoeffMax, 3324 // or to be representable in a bitDepthY+4 or bitDepthC+4 signed integer. 3325 // The result of the constraint is that for 8/10/12bit profiles, the input values 3326 // can be represented within a 16-bit Pel-type. 3327 #if RExt__HIGH_BIT_DEPTH_SUPPORT 3322 3328 for( Int x = 0; x < width; x++ ) 3323 3329 { 3324 3330 pResiT[x] = pResiC[x] + (( alpha * rightShift( pResiL[x], diffBitDepth) ) >> 3); 3325 3331 } 3332 #else 3333 const Int minPel=std::numeric_limits<Pel>::min(); 3334 const Int maxPel=std::numeric_limits<Pel>::max(); 3335 for( Int x = 0; x < width; x++ ) 3336 { 3337 pResiT[x] = Clip3<Int>(minPel, maxPel, pResiC[x] + (( alpha * rightShift<Int>(Int(pResiL[x]), diffBitDepth) ) >> 3)); 3338 } 3339 #endif 3326 3340 } 3327 3341 else 3328 3342 { 3343 // Forward does not need clipping. Pel type should always be big enough. 3329 3344 for( Int x = 0; x < width; x++ ) 3330 3345 { 3331 pResiT[x] = pResiC[x] - (( alpha * rightShift (pResiL[x], diffBitDepth) ) >> 3);3346 pResiT[x] = pResiC[x] - (( alpha * rightShift<Int>(Int(pResiL[x]), diffBitDepth) ) >> 3); 3332 3347 } 3333 3348 }
Note: See TracChangeset for help on using the changeset viewer.