- Timestamp:
- 16 Nov 2013, 03:39:23 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h
r485 r488 46 46 #if SVC_EXTENSION 47 47 #define O0194_DIFFERENT_BITDEPTH_EL_BL 1 ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled) 48 #if O0194_DIFFERENT_BITDEPTH_EL_BL 48 49 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift 50 #endif 49 51 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediciton for color gamut scalability 50 52 #define MFM_ENCCONSTRAINT 1 ///< JCTVC-O0216: Encoder constraint for motion field mapping -
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.