Commit 35652168 authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'fix178' into 'master'

Fix #178 Avoid referencing encoder parameter in low level MC function

See merge request jvet/VVCSoftware_VTM!290
parents 25f06c56 03016af7
......@@ -439,12 +439,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
pu.cu->lumaSize(),
sps);
#if JVET_M0823_MMVD_ENCOPT
int numOfPass = (pu.mmvdMergeFlag && pu.mmvdEncOptMode) ? 1 : (std::min((int)pcYuvPred.bufs.size(), m_maxCompIDToPred + 1));
for (uint32_t comp = COMPONENT_Y; comp < numOfPass; comp++)
#else
for( uint32_t comp = COMPONENT_Y; comp < pcYuvPred.bufs.size() && comp <= m_maxCompIDToPred; comp++ )
#endif
{
const ComponentID compID = ComponentID( comp );
if (compID == COMPONENT_Y && !luma)
......@@ -1334,7 +1329,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
)
{
// dual tree handling for IBC as the only ref
if (!luma || !chroma)
if ((!luma || !chroma) && eRefPicList == REF_PIC_LIST_0)
{
if (!luma && chroma)
{
......
......@@ -2370,10 +2370,12 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&
distParam.cur = singleMergeTempBuffer->Y();
#if JVET_M0823_MMVD_ENCOPT
pu.mmvdEncOptMode = (refineStep > 2 ? 2 : 1);
#endif
m_pcInterSearch->motionCompensation(pu, *singleMergeTempBuffer);
#if JVET_M0823_MMVD_ENCOPT
CHECK(!pu.mmvdMergeFlag, "MMVD merge should be set");
// Don't do chroma MC here
m_pcInterSearch->motionCompensation(pu, *singleMergeTempBuffer, REF_PIC_LIST_X, true, false);
pu.mmvdEncOptMode = 0;
#else
m_pcInterSearch->motionCompensation(pu, *singleMergeTempBuffer);
#endif
#if JVET_M0147_DMVR // store the refined MV
pu.mvRefine = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment