Changeset 488 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib/TLibEncoder
- Timestamp:
- 16 Nov 2013, 03:39:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r486 r488 232 232 slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(refWeightACDCParam); 233 233 #if O0194_WEIGHTED_PREDICTION_CGS 234 if (slice->getRefPic(eRefPicList, refIdxTemp)->isILR(slice->getLayerId())) 234 UInt currLayerId = slice->getLayerId(); 235 UInt refLayerId = slice->getRefPic(eRefPicList, refIdxTemp)->getLayerId(); 236 Bool validILRPic = slice->getRefPic(eRefPicList, refIdxTemp)->isILR( currLayerId ) && !( refLayerId == 0 && slice->getVPS()->getAvcBaseLayerFlag() ); 237 238 if( validILRPic ) 235 239 { 236 240 refWeightACDCParam = (wpACDCParam *)g_refWeightACDCParam; … … 251 255 Int64 refAC = refWeightACDCParam[comp].iAC; 252 256 #if O0194_WEIGHTED_PREDICTION_CGS 253 if (slice->getRefPic(eRefPicList, refIdxTemp)->isILR(slice->getLayerId()))257 if( validILRPic ) 254 258 { 255 259 refAC = ( refAC * currWeightACDCParam[comp].iSamples ) /refWeightACDCParam[comp].iSamples; 256 260 #if O0194_JOINT_US_BITSHIFT 257 refAC <<= (g_bitDepthYLayer[ 1]-g_bitDepthYLayer[0]);258 refDC <<= (g_bitDepthYLayer[ 1]-g_bitDepthYLayer[0]);261 refAC <<= (g_bitDepthYLayer[currLayerId]-g_bitDepthYLayer[refLayerId]); 262 refDC <<= (g_bitDepthYLayer[currLayerId]-g_bitDepthYLayer[refLayerId]); 259 263 #endif 260 264 } … … 266 270 Int offset = (Int)( ((currDC<<log2Denom) - ((Int64)weight * refDC) + (Int64)realOffset) >> realLog2Denom ); 267 271 #if O0194_WEIGHTED_PREDICTION_CGS 268 if (slice->getRefPic(eRefPicList, refIdxTemp)->isILR(slice->getLayerId())) 269 { 270 } 271 else 272 if( !validILRPic ) 272 273 { 273 274 dWeight = 1; … … 297 298 #if O0194_WEIGHTED_PREDICTION_CGS 298 299 // make sure the reference frames other than ILR are not using weighted prediction 299 if (!(slice->getRefPic(eRefPicList, refIdxTemp)->isILR(slice->getLayerId()))) 300 else 301 if( !validILRPic ) 300 302 { 301 303 continue;
Note: See TracChangeset for help on using the changeset viewer.