Commit f4dbd560 authored by Frank Bossen's avatar Frank Bossen

Merge branch 'DQP-and-Indentation-Fixes' into 'master'

several fixes to JVET-L0428 related code additions, editorial fixes

See merge request jvet/VVCSoftware_VTM!143
parents fb4e1214 ec389267
...@@ -122,7 +122,7 @@ const TFilterCoeff g_intraGaussFilter[32][4] = { ...@@ -122,7 +122,7 @@ const TFilterCoeff g_intraGaussFilter[32][4] = {
{ 4, 18, 29, 13 }, { 4, 18, 29, 13 },
{ 3, 18, 29, 14 }, { 3, 18, 29, 14 },
{ 3, 17, 29, 15 }, { 3, 17, 29, 15 },
{ 3, 17, 29, 15 } { 3, 17, 29, 15 }
}; };
#endif #endif
...@@ -281,17 +281,17 @@ Pel IntraPrediction::xGetPredValDc( const CPelBuf &pSrc, const Size &dstSize ) ...@@ -281,17 +281,17 @@ Pel IntraPrediction::xGetPredValDc( const CPelBuf &pSrc, const Size &dstSize )
if ( width >= height ) if ( width >= height )
{ {
for( idx = 0; idx < width; idx++ ) for( idx = 0; idx < width; idx++ )
{ {
sum += pSrc.at( 1 + idx, 0 ); sum += pSrc.at( 1 + idx, 0 );
} }
} }
if ( width <= height ) if ( width <= height )
{
for( idx = 0; idx < height; idx++ )
{ {
sum += pSrc.at( 0, 1 + idx ); for( idx = 0; idx < height; idx++ )
} {
sum += pSrc.at( 0, 1 + idx );
}
} }
dcVal = (sum + divOffset) >> divShift; dcVal = (sum + divOffset) >> divShift;
...@@ -388,7 +388,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -388,7 +388,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
case(PLANAR_IDX): xPredIntraPlanar(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, *pu.cs->sps); break; case(PLANAR_IDX): xPredIntraPlanar(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, *pu.cs->sps); break;
case(DC_IDX): xPredIntraDc(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, channelType, false); break; case(DC_IDX): xPredIntraDc(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, channelType, false); break;
#if JVET_L0628_4TAP_INTRA #if JVET_L0628_4TAP_INTRA
case(2): case(2):
case(DIA_IDX): case(DIA_IDX):
case(VDIA_IDX): case(VDIA_IDX):
if (getWideAngle(iWidth, iHeight, uiDirMode) == static_cast<int>(uiDirMode)) // check if uiDirMode is not wide-angle if (getWideAngle(iWidth, iHeight, uiDirMode) == static_cast<int>(uiDirMode)) // check if uiDirMode is not wide-angle
...@@ -397,7 +397,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -397,7 +397,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
#if JVET_L0283_MULTI_REF_LINE #if JVET_L0283_MULTI_REF_LINE
, multiRefIdx , multiRefIdx
#endif #endif
, useFilteredPredSamples); , useFilteredPredSamples);
break; break;
} }
default: xPredIntraAng(CPelBuf(getPredictorPtr(compID, false), srcStride, srcHStride), piPred, channelType, uiDirMode, clpRng, *pu.cs->sps default: xPredIntraAng(CPelBuf(getPredictorPtr(compID, false), srcStride, srcHStride), piPred, channelType, uiDirMode, clpRng, *pu.cs->sps
...@@ -719,7 +719,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch ...@@ -719,7 +719,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
{ {
#if JVET_L0628_4TAP_INTRA #if JVET_L0628_4TAP_INTRA
auto width = int(pDst.width) +1; auto width = int(pDst.width) +1;
auto height = int(pDst.height)+1; auto height = int(pDst.height)+1;
#if JVET_L0283_MULTI_REF_LINE #if JVET_L0283_MULTI_REF_LINE
auto lastIdx = (bIsModeVer ? width : height) + multiRefIdx; auto lastIdx = (bIsModeVer ? width : height) + multiRefIdx;
#else #else
...@@ -1157,7 +1157,7 @@ void IntraPrediction::initIntraPatternChType(const CodingUnit &cu, const CompAre ...@@ -1157,7 +1157,7 @@ void IntraPrediction::initIntraPatternChType(const CodingUnit &cu, const CompAre
// ----- Step 2: filtered reference samples ----- // ----- Step 2: filtered reference samples -----
if( bFilterRefSamples ) if( bFilterRefSamples )
{ {
xFilterReferenceSamples( refBufUnfiltered, refBufFiltered, area, *cs.sps xFilterReferenceSamples( refBufUnfiltered, refBufFiltered, area, *cs.sps
#if JVET_L0283_MULTI_REF_LINE #if JVET_L0283_MULTI_REF_LINE
, cu.firstPU->multiRefIdx , cu.firstPU->multiRefIdx
#endif #endif
...@@ -1529,7 +1529,7 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf ...@@ -1529,7 +1529,7 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
ptrTmp = tmpLineBuf + (totalLeftUnits * unitHeight); ptrTmp = tmpLineBuf + (totalLeftUnits * unitHeight);
for( int i = 1; i <= predHSize; i++ ) { ptrDst[i*predStride] = ptrTmp[-i]; } for( int i = 1; i <= predHSize; i++ ) { ptrDst[i*predStride] = ptrTmp[-i]; }
#endif #endif
} }
#if JVET_L0283_MULTI_REF_LINE #if JVET_L0283_MULTI_REF_LINE
// padding of extended samples above right with the last sample // padding of extended samples above right with the last sample
...@@ -1549,7 +1549,7 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf ...@@ -1549,7 +1549,7 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
#endif #endif
} }
void IntraPrediction::xFilterReferenceSamples( const Pel* refBufUnfiltered, Pel* refBufFiltered, const CompArea &area, const SPS &sps void IntraPrediction::xFilterReferenceSamples( const Pel* refBufUnfiltered, Pel* refBufFiltered, const CompArea &area, const SPS &sps
#if JVET_L0283_MULTI_REF_LINE #if JVET_L0283_MULTI_REF_LINE
, int multiRefIdx , int multiRefIdx
#endif #endif
...@@ -1899,7 +1899,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom ...@@ -1899,7 +1899,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
#endif #endif
bLeftAvaillable = availlableUnit == iTUHeightInUnits; bLeftAvaillable = availlableUnit == iTUHeightInUnits;
availlableUnit = isAboveAvailable( isChroma( pu.chType ) ? cu : lumaCU, toChannelType( area.compID ), area.pos(), iAboveUnits, iUnitWidth, availlableUnit = isAboveAvailable( isChroma( pu.chType ) ? cu : lumaCU, toChannelType( area.compID ), area.pos(), iAboveUnits, iUnitWidth,
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
( bNeighborFlags + iLeftUnits + leftBelowUnits + 1 ) ); ( bNeighborFlags + iLeftUnits + leftBelowUnits + 1 ) );
...@@ -1958,7 +1958,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom ...@@ -1958,7 +1958,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
{ {
pDst[i] = ( piSrc[2 * i] * 2 + piSrc[2 * i - 1] + piSrc[2 * i + 1] + 2 ) >> 2; pDst[i] = ( piSrc[2 * i] * 2 + piSrc[2 * i - 1] + piSrc[2 * i + 1] + 2 ) >> 2;
} }
} }
else else
{ {
piSrc = pRecSrc0 - iRecStride2; piSrc = pRecSrc0 - iRecStride2;
...@@ -2103,7 +2103,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2103,7 +2103,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
bool aboveAvailable, leftAvailable; bool aboveAvailable, leftAvailable;
int availableUnit = int availableUnit =
isAboveAvailable(cu, CHANNEL_TYPE_CHROMA, posLT, aboveUnits, unitWidth, isAboveAvailable(cu, CHANNEL_TYPE_CHROMA, posLT, aboveUnits, unitWidth,
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
(neighborFlags + leftUnits + leftBelowUnits + 1)); (neighborFlags + leftUnits + leftBelowUnits + 1));
#else #else
...@@ -2112,7 +2112,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2112,7 +2112,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
aboveAvailable = availableUnit == tuWidthInUnits; aboveAvailable = availableUnit == tuWidthInUnits;
availableUnit = availableUnit =
isLeftAvailable(cu, CHANNEL_TYPE_CHROMA, posLT, leftUnits, unitHeight, isLeftAvailable(cu, CHANNEL_TYPE_CHROMA, posLT, leftUnits, unitHeight,
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
(neighborFlags + leftUnits + leftBelowUnits - 1)); (neighborFlags + leftUnits + leftBelowUnits - 1));
#else #else
...@@ -2158,7 +2158,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2158,7 +2158,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
unsigned internalBitDepth = sps.getBitDepth(CHANNEL_TYPE_CHROMA); unsigned internalBitDepth = sps.getBitDepth(CHANNEL_TYPE_CHROMA);
int minLuma[2] = { MAX_INT, 0 }; int minLuma[2] = { MAX_INT, 0 };
int maxLuma[2] = { -MAX_INT, 0 }; int maxLuma[2] = { -MAX_INT, 0 };
Pel *src = srcColor0 - srcStride; Pel *src = srcColor0 - srcStride;
...@@ -2242,7 +2242,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2242,7 +2242,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
} }
} }
if ((leftAvailable || aboveAvailable)) if (leftAvailable || aboveAvailable)
{ {
a = 0; a = 0;
iShift = 16; iShift = 16;
...@@ -2331,7 +2331,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2331,7 +2331,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
bool bAboveAvaillable, bLeftAvaillable; bool bAboveAvaillable, bLeftAvaillable;
int availlableUnit = isAboveAvailable( cu, CHANNEL_TYPE_CHROMA, posLT, iAboveUnits, iUnitWidth, int availlableUnit = isAboveAvailable( cu, CHANNEL_TYPE_CHROMA, posLT, iAboveUnits, iUnitWidth,
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
(bNeighborFlags + iLeftUnits + leftBelowUnits + 1 ) ); (bNeighborFlags + iLeftUnits + leftBelowUnits + 1 ) );
#else #else
...@@ -2339,7 +2339,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2339,7 +2339,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
#endif #endif
bAboveAvaillable = availlableUnit == iTUWidthInUnits; bAboveAvaillable = availlableUnit == iTUWidthInUnits;
availlableUnit = isLeftAvailable( cu, CHANNEL_TYPE_CHROMA, posLT, iLeftUnits, iUnitHeight, availlableUnit = isLeftAvailable( cu, CHANNEL_TYPE_CHROMA, posLT, iLeftUnits, iUnitHeight,
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
(bNeighborFlags + iLeftUnits + leftBelowUnits - 1 ) ); (bNeighborFlags + iLeftUnits + leftBelowUnits - 1 ) );
#else #else
...@@ -2361,7 +2361,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component ...@@ -2361,7 +2361,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
Pel *pSrcColor0, *pCurChroma0; Pel *pSrcColor0, *pCurChroma0;
int iSrcStride, iCurStride; int iSrcStride, iCurStride;
PelBuf Temp; PelBuf Temp;
#if JVET_L0338_MDLM #if JVET_L0338_MDLM
if ((curChromaMode == MDLM_L_IDX) || (curChromaMode == MDLM_T_IDX)) if ((curChromaMode == MDLM_L_IDX) || (curChromaMode == MDLM_T_IDX))
{ {
......
...@@ -2309,7 +2309,7 @@ public: ...@@ -2309,7 +2309,7 @@ public:
, maxBtSize { sps.getSpsNext().getMaxBTSizeI(), sps.getSpsNext().getMaxBTSize(), sps.getSpsNext().getMaxBTSizeIChroma() } , maxBtSize { sps.getSpsNext().getMaxBTSizeI(), sps.getSpsNext().getMaxBTSize(), sps.getSpsNext().getMaxBTSizeIChroma() }
, minTtSize { MIN_TT_SIZE, MIN_TT_SIZE_INTER, MIN_TT_SIZE_C } , minTtSize { MIN_TT_SIZE, MIN_TT_SIZE_INTER, MIN_TT_SIZE_C }
#if JVET_L0217_L0678_PARTITION_HIGHLEVEL_CONSTRAINT #if JVET_L0217_L0678_PARTITION_HIGHLEVEL_CONSTRAINT
, maxTtSize { sps.getSpsNext().getMaxTTSizeI(), sps.getSpsNext().getMaxTTSize(), sps.getSpsNext().getMaxTTSizeIChroma() } , maxTtSize { sps.getSpsNext().getMaxTTSizeI(), sps.getSpsNext().getMaxTTSize(), sps.getSpsNext().getMaxTTSizeIChroma() }
#else #else
, maxTtSize { MAX_TT_SIZE, MAX_TT_SIZE_INTER, MAX_TT_SIZE_C } , maxTtSize { MAX_TT_SIZE, MAX_TT_SIZE_INTER, MAX_TT_SIZE_C }
#endif #endif
......
...@@ -1155,7 +1155,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, ...@@ -1155,7 +1155,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
#endif #endif
} }
#endif #endif
mrgCtx.mvFieldNeighbours[cnt << 1].setMvField( miAbove.mv[0], miAbove.refIdx[0] ); mrgCtx.mvFieldNeighbours[cnt << 1].setMvField( miAbove.mv[0], miAbove.refIdx[0] );
if( slice.isInterB() ) if( slice.isInterB() )
{ {
...@@ -1219,7 +1219,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, ...@@ -1219,7 +1219,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
#endif #endif
} }
#endif #endif
mrgCtx.mvFieldNeighbours[cnt << 1].setMvField( miAboveRight.mv[0], miAboveRight.refIdx[0] ); mrgCtx.mvFieldNeighbours[cnt << 1].setMvField( miAboveRight.mv[0], miAboveRight.refIdx[0] );
if( slice.isInterB() ) if( slice.isInterB() )
{ {
......
...@@ -200,14 +200,14 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i ...@@ -200,14 +200,14 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
else else
{ {
isLast = coding_tree(cs, *partitioner, cuCtx); isLast = coding_tree(cs, *partitioner, cuCtx);
qps[CH_L] = cuCtx.qp; qps[CH_L] = cuCtx.qp;
if( !isLast && CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 ) if( !isLast && CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 )
{ {
CUCtx cuCtxChroma( qps[CH_C] ); CUCtx cuCtxChroma( qps[CH_C] );
partitioner->initCtu( area, CH_C, *cs.slice ); partitioner->initCtu( area, CH_C, *cs.slice );
isLast = coding_tree( cs, *partitioner, cuCtxChroma ); isLast = coding_tree( cs, *partitioner, cuCtxChroma );
qps[CH_C] = cuCtxChroma.qp; qps[CH_C] = cuCtxChroma.qp;
} }
} }
DTRACE_COND( ctuRsAddr == 0, g_trace_ctx, D_QP_PER_CTU, "\n%4d %2d", cs.picture->poc, cs.slice->getSliceQpBase() ); DTRACE_COND( ctuRsAddr == 0, g_trace_ctx, D_QP_PER_CTU, "\n%4d %2d", cs.picture->poc, cs.slice->getSliceQpBase() );
...@@ -580,13 +580,13 @@ bool CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU ...@@ -580,13 +580,13 @@ bool CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU
} }
#if JVET_L0428_DQP_SEP_TREE #if JVET_L0428_DQP_SEP_TREE
const Position chromaCentral(cu.chromaPos().offset(cu.chromaSize().width >> 1, cu.chromaSize().height >> 1)); if (pps.getUseDQP() && CS::isDualITree(cs) && isChroma(cu.chType))
const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, cu.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, cu.chromaFormat));
const CodingUnit* colLumaCu = cs.getCU(lumaRefPos, CHANNEL_TYPE_LUMA);
if (cu.cs->pps->getUseDQP() && CS::isDualITree(cs) && isChroma(cu.chType))
{ {
cuCtx.qp = colLumaCu->qp; const Position chromaCentral(cu.chromaPos().offset(cu.chromaSize().width >> 1, cu.chromaSize().height >> 1));
const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, cu.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, cu.chromaFormat));
const CodingUnit* colLumaCu = cs.getCU(lumaRefPos, CHANNEL_TYPE_LUMA);
if (colLumaCu) cuCtx.qp = colLumaCu->qp;
} }
#endif #endif
......
...@@ -186,15 +186,15 @@ void CABACWriter::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i ...@@ -186,15 +186,15 @@ void CABACWriter::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
} }
else else
{ {
coding_tree( cs, *partitioner, cuCtx ); coding_tree( cs, *partitioner, cuCtx );
qps[CH_L] = cuCtx.qp; qps[CH_L] = cuCtx.qp;
if( CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 ) if( CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 )
{ {
CUCtx cuCtxChroma( qps[CH_C] ); CUCtx cuCtxChroma( qps[CH_C] );
partitioner->initCtu( area, CH_C, *cs.slice ); partitioner->initCtu( area, CH_C, *cs.slice );
coding_tree( cs, *partitioner, cuCtxChroma ); coding_tree( cs, *partitioner, cuCtxChroma );
qps[CH_C] = cuCtxChroma.qp; qps[CH_C] = cuCtxChroma.qp;
} }
} }
delete partitioner; delete partitioner;
...@@ -2063,7 +2063,7 @@ void CABACWriter::transform_unit( const TransformUnit& tu, CUCtx& cuCtx, ChromaC ...@@ -2063,7 +2063,7 @@ void CABACWriter::transform_unit( const TransformUnit& tu, CUCtx& cuCtx, ChromaC
if( cu.cs->pps->getUseDQP() && !cuCtx.isDQPCoded ) if( cu.cs->pps->getUseDQP() && !cuCtx.isDQPCoded )
{ {
#if JVET_L0428_DQP_SEP_TREE #if JVET_L0428_DQP_SEP_TREE
if ((!CS::isDualITree(*tu.cs) || isLuma(tu.chType))) if (!CS::isDualITree(*tu.cs) || isLuma(tu.chType))
#endif #endif
{ {
cu_qp_delta(cu, cuCtx.qp, cu.qp); cu_qp_delta(cu, cuCtx.qp, cu.qp);
......
...@@ -705,7 +705,7 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par ...@@ -705,7 +705,7 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
EncTestMode currTestMode = m_modeCtrl->currTestMode(); EncTestMode currTestMode = m_modeCtrl->currTestMode();
#if JVET_L0428_DQP_SEP_TREE #if JVET_L0428_DQP_SEP_TREE
if (tempCS->pps->getUseDQP() && partitioner.chType == CHANNEL_TYPE_CHROMA) if (tempCS->pps->getUseDQP() && CS::isDualITree(*tempCS) && isChroma(partitioner.chType))
{ {
const Position chromaCentral(tempCS->area.Cb().chromaPos().offset(tempCS->area.Cb().chromaSize().width >> 1, tempCS->area.Cb().chromaSize().height >> 1)); const Position chromaCentral(tempCS->area.Cb().chromaPos().offset(tempCS->area.Cb().chromaSize().width >> 1, tempCS->area.Cb().chromaSize().height >> 1));
const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, tempCS->area.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, tempCS->area.chromaFormat)); const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, tempCS->area.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, tempCS->area.chromaFormat));
...@@ -713,11 +713,10 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par ...@@ -713,11 +713,10 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
const CodingUnit* colLumaCu = baseCS->getCU(lumaRefPos, CHANNEL_TYPE_LUMA); const CodingUnit* colLumaCu = baseCS->getCU(lumaRefPos, CHANNEL_TYPE_LUMA);
const TransformUnit* tu = baseCS->getTU(lumaRefPos, CHANNEL_TYPE_LUMA); const TransformUnit* tu = baseCS->getTU(lumaRefPos, CHANNEL_TYPE_LUMA);
if (tu) if (colLumaCu && tu)
{ {
currTestMode.qp = colLumaCu->qp; currTestMode.qp = colLumaCu->qp;
} }
} }
#endif #endif
...@@ -1603,7 +1602,7 @@ void EncCu::xCheckDQP( CodingStructure& cs, Partitioner& partitioner, bool bKeep ...@@ -1603,7 +1602,7 @@ void EncCu::xCheckDQP( CodingStructure& cs, Partitioner& partitioner, bool bKeep
} }
#if JVET_L0428_DQP_SEP_TREE #if JVET_L0428_DQP_SEP_TREE
if (partitioner.chType == CHANNEL_TYPE_CHROMA) if (CS::isDualITree(cs) && isChroma(partitioner.chType))
{ {
return; return;
} }
......
...@@ -949,13 +949,13 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru ...@@ -949,13 +949,13 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
if( m_pcEncCfg->getUseAdaptiveQP() ) if( m_pcEncCfg->getUseAdaptiveQP() )
{ {
#if JVET_L0428_DQP_SEP_TREE #if JVET_L0428_DQP_SEP_TREE
if (partitioner.chType == CHANNEL_TYPE_LUMA || !cs.slice->isIRAP()) if (!CS::isDualITree(cs) || isLuma(partitioner.chType))
#endif
{ {
baseQP = Clip3(-cs.sps->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, baseQP + xComputeDQP(cs, partitioner)); baseQP = Clip3(-cs.sps->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, baseQP + xComputeDQP(cs, partitioner));
} }
#endif
} }
int minQP = baseQP; int minQP = baseQP;
int maxQP = baseQP; int maxQP = baseQP;
...@@ -1292,7 +1292,7 @@ bool EncModeCtrlMTnoRQT::tryMode( const EncTestMode& encTestmode, const CodingSt ...@@ -1292,7 +1292,7 @@ bool EncModeCtrlMTnoRQT::tryMode( const EncTestMode& encTestmode, const CodingSt
CHECK( !slice.isIntra() && !cuECtx.bestTU, "No possible non-intra encoding for a P- or B-slice found" ); CHECK( !slice.isIntra() && !cuECtx.bestTU, "No possible non-intra encoding for a P- or B-slice found" );
if( !( slice.isIRAP() || bestMode.type == ETM_INTRA || if( !( slice.isIRAP() || bestMode.type == ETM_INTRA ||
( ( !m_pcEncCfg->getDisableIntraPUsInInterSlices() ) && !relatedCU.isInter && ( ( ( !m_pcEncCfg->getDisableIntraPUsInInterSlices() ) && !relatedCU.isInter && (
( cuECtx.bestTU->cbf[0] != 0 ) || ( cuECtx.bestTU->cbf[0] != 0 ) ||
( ( numComp > COMPONENT_Cb ) && cuECtx.bestTU->cbf[1] != 0 ) || ( ( numComp > COMPONENT_Cb ) && cuECtx.bestTU->cbf[1] != 0 ) ||
( ( numComp > COMPONENT_Cr ) && cuECtx.bestTU->cbf[2] != 0 ) // avoid very complex intra if it is unlikely ( ( numComp > COMPONENT_Cr ) && cuECtx.bestTU->cbf[2] != 0 ) // avoid very complex intra if it is unlikely
......
...@@ -1826,7 +1826,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner) ...@@ -1826,7 +1826,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner)
iRefEnd--; iRefEnd--;
} }
#endif #endif
for (int iRefIdxTemp = iRefStart; iRefIdxTemp <= iRefEnd; iRefIdxTemp++) for (int iRefIdxTemp = iRefStart; iRefIdxTemp <= iRefEnd; iRefIdxTemp++)
{ {
#if JVET_L0646_GBI #if JVET_L0646_GBI
if( m_pcEncCfg->getUseGBiFast() && (gbiIdx != GBI_DEFAULT) if( m_pcEncCfg->getUseGBiFast() && (gbiIdx != GBI_DEFAULT)
......
Markdown is supported
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