From 625665bde60ce2f8c2c2e8887bfed5d9ad20343a Mon Sep 17 00:00:00 2001 From: "jiechen.cj" <jiechen.cj@alibaba-inc.com> Date: Fri, 8 Mar 2019 00:25:20 +0800 Subject: [PATCH] update source codes according to coordinator's comments --- source/Lib/CommonLib/UnitTools.cpp | 8 ++++---- source/Lib/EncoderLib/InterSearch.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 2c403ce44..3b35b3d29 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -5649,11 +5649,11 @@ bool CU::isGBiIdxCoded( const CodingUnit &cu ) #if JVET_M0111_WP_GBI WPScalingParam *wp0; WPScalingParam *wp1; - int iRefIdx0 = cu.firstPU->refIdx[REF_PIC_LIST_0]; - int iRefIdx1 = cu.firstPU->refIdx[REF_PIC_LIST_1]; + int refIdx0 = cu.firstPU->refIdx[REF_PIC_LIST_0]; + int refIdx1 = cu.firstPU->refIdx[REF_PIC_LIST_1]; - cu.cs->slice->getWpScaling(REF_PIC_LIST_0, iRefIdx0, wp0); - cu.cs->slice->getWpScaling(REF_PIC_LIST_1, iRefIdx1, wp1); + cu.cs->slice->getWpScaling(REF_PIC_LIST_0, refIdx0, wp0); + cu.cs->slice->getWpScaling(REF_PIC_LIST_1, refIdx1, wp1); if ((wp0[COMPONENT_Y].bPresentFlag || wp0[COMPONENT_Cb].bPresentFlag || wp0[COMPONENT_Cr].bPresentFlag || wp1[COMPONENT_Y].bPresentFlag || wp1[COMPONENT_Cb].bPresentFlag || wp1[COMPONENT_Cr].bPresentFlag) ) diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index 122d3368a..ae05681bb 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -1979,7 +1979,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner) #if JVET_M0111_WP_GBI WPScalingParam *wp0; WPScalingParam *wp1; - int try_bipred = 0; + int tryBipred = 0; #endif #if JVET_M0246_AFFINE_AMVR bool checkAffine = pu.cu->imv == 0 || pu.cu->slice->getSPS()->getAffineAmvrEnabledFlag(); @@ -2164,7 +2164,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner) bool doBiPred = true; #endif #if JVET_M0111_WP_GBI - try_bipred = 1; + tryBipred = 1; #endif cMvBi[0] = cMv[0]; cMvBi[1] = cMv[1]; @@ -2513,7 +2513,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner) uiBits [1] = bitsValidList1; uiCost [1] = costValidList1; #if JVET_M0111_WP_GBI - if (cu.cs->pps->getWPBiPred() == true && try_bipred && (gbiIdx != GBI_DEFAULT)) + if (cu.cs->pps->getWPBiPred() == true && tryBipred && (gbiIdx != GBI_DEFAULT)) { CHECK(iRefIdxBi[0]<0, "Invalid picture reference index"); CHECK(iRefIdxBi[1]<0, "Invalid picture reference index"); @@ -4243,7 +4243,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu, const bool affineAmvrEnabled = pu.cu->slice->getSPS()->getAffineAmvrEnabledFlag(); #endif #if JVET_M0111_WP_GBI - int try_bipred = 0; + int tryBipred = 0; WPScalingParam *wp0; WPScalingParam *wp1; #endif @@ -4669,7 +4669,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu, if ( slice.isInterB() && !PU::isBipredRestriction(pu) ) { #if JVET_M0111_WP_GBI - try_bipred = 1; + tryBipred = 1; #endif // Set as best list0 and list1 iRefIdxBi[0] = iRefIdx[0]; @@ -4934,7 +4934,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu, uiBits[1] = bitsValidList1; uiCost[1] = costValidList1; #if JVET_M0111_WP_GBI - if (pu.cs->pps->getWPBiPred() == true && try_bipred && (gbiIdx != GBI_DEFAULT)) + if (pu.cs->pps->getWPBiPred() == true && tryBipred && (gbiIdx != GBI_DEFAULT)) { CHECK(iRefIdxBi[0]<0, "Invalid picture reference index"); CHECK(iRefIdxBi[1]<0, "Invalid picture reference index"); -- GitLab