Ticket #516: weighted_pred_bug.patch
File weighted_pred_bug.patch, 1.2 KB (added by bheng, 12 years ago) |
---|
-
Lib/TLibCommon/TComPrediction.cpp
523 523 } 524 524 else 525 525 { 526 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() ) 526 if ( ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType() == P_SLICE ) || 527 ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() && pcCU->getSlice()->getSliceType() == B_SLICE ) ) 527 528 { 528 529 xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true ); 529 530 } … … 534 535 } 535 536 } 536 537 537 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() )538 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() && pcCU->getSlice()->getSliceType() == B_SLICE ) 538 539 { 539 540 xWeightedPredictionBi( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred ); 541 } 542 else if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType() == P_SLICE ) 543 { 544 xWeightedPredictionUni( pcCU, &m_acYuvPred[0], uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, rpcYuvPred, iPartIdx ); 540 545 } 541 546 else 542 547 {