Commit 6b23ac24 authored by Yin Zhao's avatar Yin Zhao
Browse files

remove unnecessary changes compared with 9fc63d26

parent f87ca473
......@@ -142,10 +142,7 @@ unsigned DeriveCtx::CtxModeConsFlag( const CodingStructure& cs, Partitioner& par
const unsigned curSliceIdx = cs.slice->getIndependentSliceIdx();
const unsigned curTileIdx = cs.picture->brickMap->getBrickIdxRsMap( partitioner.currArea().lumaPos() );
// get left depth
const CodingUnit* cuLeft = cs.getCURestricted( pos.offset( -1, 0 ), pos, curSliceIdx, curTileIdx, partitioner.chType );
// get above depth
const CodingUnit* cuAbove = cs.getCURestricted( pos.offset( 0, -1 ), pos, curSliceIdx, curTileIdx, partitioner.chType );
unsigned ctxId = ((cuAbove && cuAbove->predMode == MODE_INTRA) || (cuLeft && cuLeft->predMode == MODE_INTRA)) ? 1 : 0;
......
......@@ -1843,14 +1843,14 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
const SPS& sps = *(cu.cs->sps);
TransformUnit& tu = *cu.firstTU;
int curPLTidx = 0;
//================================================================================
cu.lastPLTSize[compBegin] = cu.cs->prevPLT.curPLTSize[compBegin];
// clause 7.3.8.6
if (cu.lastPLTSize[compBegin])
{
xDecodePLTPredIndicator(cu, MAXPLTSIZE, compBegin);
}
//--------------------------------------------------------------------------------
for (int idx = 0; idx < cu.lastPLTSize[compBegin]; idx++)
{
if (cu.reuseflag[compBegin][idx])
......@@ -1862,14 +1862,14 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
curPLTidx++;
}
}
// void prediction_unit ( pu, mrgCtx );
uint32_t recievedPLTnum = 0;
// void merge_flag ( pu );
if (curPLTidx < MAXPLTSIZE)
{
recievedPLTnum = exp_golomb_eqprob(0);
}
// void merge_data ( pu, mrgCtx );
cu.curPLTSize[compBegin] = curPLTidx + recievedPLTnum;
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
......@@ -1894,7 +1894,7 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
PelBuf curPLTIdx = tu.getcurPLTIdx(compBegin);
uint32_t height = cu.block(compBegin).height;
uint32_t width = cu.block(compBegin).width;
// void merge_idx ( pu );
int numCopyIndexRuns = -1;
bool lastRunType = 0;
uint32_t numIndices = 0;
......@@ -1921,7 +1921,7 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
{
cu.useRotation[compBegin] = false;
}
// void inter_pred_idc ( pu );
if (cu.useEscape[compBegin] && cu.cs->pps->getUseDQP() && !cuCtx.isDQPCoded)
{
#if JVET_O0050_LOCAL_DUAL_TREE
......@@ -1951,8 +1951,8 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
cuCtx.isChromaQpAdjCoded = true;
}
}
// void ref_idx ( pu, refList );
// void mvp_flag ( pu, refList );
m_scanOrder = g_scanOrder[SCAN_UNGROUPED][(cu.useRotation[compBegin]) ? SCAN_TRAV_VER : SCAN_TRAV_HOR][gp_sizeIdxInfo->idxFrom(width)][gp_sizeIdxInfo->idxFrom(height)];
uint32_t strPos = 0;
uint32_t endPos = height * width;
......@@ -1962,7 +1962,7 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
uint32_t posx = m_scanOrder[strPos].x;
uint32_t posyprev = strPos == 0 ? 0 : m_scanOrder[strPos - 1].y;
uint32_t posxprev = strPos == 0 ? 0 : m_scanOrder[strPos - 1].x;
//================================================================================
if (indexMaxSize > 1)
{
if (((posy == 0) && !cu.useRotation[compBegin]) || ((posx == 0) && cu.useRotation[compBegin]))
......
......@@ -1718,7 +1718,7 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
PelBuf curPLTIdx = tu.getcurPLTIdx(compBegin);
uint32_t height = cu.block(compBegin).height;
uint32_t width = cu.block(compBegin).width;
//================================================================================
m_scanOrder = g_scanOrder[SCAN_UNGROUPED][(cu.useRotation[compBegin]) ? SCAN_TRAV_VER : SCAN_TRAV_HOR][gp_sizeIdxInfo->idxFrom(width)][gp_sizeIdxInfo->idxFrom(height)];
uint32_t total = height * width;
int lastRunPos = -1;
......@@ -1762,7 +1762,7 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
{
assert(!cu.useRotation[compBegin]);
}
// clause 7.3.8.6
if (cu.useEscape[compBegin] && cu.cs->pps->getUseDQP() && !cuCtx.isDQPCoded)
{
if (!CS::isDualITree(*tu.cs) || isLuma(tu.chType))
......@@ -1784,7 +1784,7 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
cuCtx.isChromaQpAdjCoded = true;
}
}
//--------------------------------------------------------------------------------
uint32_t strPos = 0;
uint32_t endPos = height * width;
auto parsedIdxEnd = parsedIdx.end();
......@@ -1795,11 +1795,11 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
uint32_t posx = m_scanOrder[strPos].x;
uint32_t posyprev = strPos == 0 ? 0 : m_scanOrder[strPos - 1].y;
uint32_t posxprev = strPos == 0 ? 0 : m_scanOrder[strPos - 1].x;
// void prediction_unit ( pu );
if (indexMaxSize > 1)
{
if (((posy == 0) && !cu.useRotation[compBegin]) || ((posx == 0) && cu.useRotation[compBegin]))
// void merge_flag ( pu );
{
assert(runType.at(posx, posy) == PLT_RUN_INDEX);
}
......@@ -1815,7 +1815,7 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
}
}
}
// void merge_idx ( pu );
Pel curLevel = 0;
if (runType.at(posx, posy) == PLT_RUN_INDEX)
{
......@@ -1828,7 +1828,7 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
curLevel = 0;
}
}
// void inter_pred_idc ( pu );
if (indexMaxSize > 1)
{
if (lastRunPos != strPos)
......@@ -1836,13 +1836,13 @@ void CABACWriter::cu_palette_info(const CodingUnit& cu, ComponentID compBegin, u
numIndices -= (runType.at(posx, posy) == PLT_RUN_INDEX);
cu_run_val(runLength.at(posx, posy) - 1, (PLTRunMode)runType.at(posx, posy), curLevel, endPos - strPos - numIndices - 1 - lastRunType);
}
// void ref_idx ( pu, refList );
}
// void mvp_flag ( pu, refList );
strPos += (runLength.at(posx, posy));
}
assert(strPos == endPos);
//================================================================================
uint32_t scaleX = getComponentScaleX(COMPONENT_Cb, sps.getChromaFormatIdc());
uint32_t scaleY = getComponentScaleY(COMPONENT_Cb, sps.getChromaFormatIdc());
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
......
......@@ -1870,7 +1870,7 @@ void EncCu::xCheckRDCostIntra( CodingStructure *&tempCS, CodingStructure *&bestC
if( isLuma( partitioner.chType ) )
{
#if JVET_O0502_ISP_CLEANUP
//the Intra SubPartitions mode uses the value of the best cost so far (luma if it is the fast version) to avoid test non-necessary lines
//ISP uses the value of the best cost so far (luma if it is the fast version) to avoid test non-necessary subpartitions
#if JVET_O0050_LOCAL_DUAL_TREE
double bestCostSoFar = partitioner.isSepTree(*tempCS) ? m_modeCtrl->getBestCostWithoutSplitFlags() : bestCU && bestCU->predMode == MODE_INTRA ? bestCS->lumaCost : bestCS->cost;
if (partitioner.isSepTree(*tempCS) && encTestMode.maxCostAllowed < bestCostSoFar)
......@@ -2076,7 +2076,7 @@ void EncCu::xCheckRDCostIntra( CodingStructure *&tempCS, CodingStructure *&bestC
}
#if JVET_O0502_ISP_CLEANUP
//we decide to skip the second emt pass or not according to the ISP results
//we decide to skip the non-DCT-II transforms and LFNST according to the ISP results
if ((endMtsFlag > 0 || endLfnstIdx > 0) && cu.ispMode && !mtsFlag && !lfnstIdx && tempCS->slice->isIntra() && m_pcEncCfg->getUseFastISP())
#else
//we decide to skip the second emt pass or not according to the ISP results
......@@ -4162,7 +4162,7 @@ bool EncCu::xCheckRDCostInterIMV( CodingStructure *&tempCS, CodingStructure *&be
int iIMV = int( ( encTestMode.opts & ETO_IMV ) >> ETO_IMV_SHIFT );
m_pcInterSearch->setAffineModeSelected(false);
#if JVET_O0057_ALTHPELIF
// Only int-Pel, 4-Pel and fast 4-Pel allowed
// Only Half-Pel, int-Pel, 4-Pel and fast 4-Pel allowed
CHECK(iIMV < 1 || iIMV > 4, "Unsupported IMV Mode");
const bool testAltHpelFilter = iIMV == 4;
#else
......
......@@ -8169,3 +8169,4 @@ bool InterSearch::searchBv(PredictionUnit& pu, int xPos, int yPos, int width, in
}
#endif
//! \}
\ No newline at end of file
......@@ -358,7 +358,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
if( testISP )
{
#if JVET_O0502_ISP_CLEANUP
//variables for the full RD list without MRL modes
//reset the variables used for the tests
m_ispCandListHor.clear();
m_ispCandListVer.clear();
m_regIntraRDListWithCosts.clear();
......@@ -622,7 +622,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
if ( testISP )
{
#if JVET_O0502_ISP_CLEANUP
//we save the list with no mrl modes to keep only the Hadamard selected modes (no mpms)
// we save the regular intra modes list
m_ispCandListHor = uiRdModeList;
#else
//we save the list with no mrl modes to keep only the Hadamard selected modes (no mpms)
......@@ -683,7 +683,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
#if JVET_O0925_MIP_SIMPLIFICATIONS
if (LFNSTSaveFlag && testMip && !allowLfnstWithMip(cu.firstPU->lumaSize())) // save a different set for the next run
{
//*** Derive MIP candidates using Hadamard
// save found best modes
m_uiSavedRdModeListLFNST = uiRdModeList;
m_dSavedModeCostLFNST = CandCostList;
// PBINTRA fast
......@@ -799,7 +799,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
if ( testISP )
{
#if JVET_O0502_ISP_CLEANUP
//we add the ISP MPMs to the list without mrl modes
// we add the MPMs to the list that contains only regular intra modes
for (int j = 0; j < numCand; j++)
{
bool mostProbableModeIncluded = false;
......@@ -1026,7 +1026,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
if ( testISP )
{
#if JVET_O0502_ISP_CLEANUP
//we create a single full RD list that includes all intra modes using regular intra, MRL and ISP
// we reserve positions for ISP in the common full RD list
const int maxNumRDModesISP = 16;
for (int i = 0; i < maxNumRDModesISP; i++)
uiRdModeList.push_back(ModeInfo(false, 0, INTRA_SUBPARTITIONS_RESERVED, 0));
......@@ -1779,7 +1779,7 @@ void IntraSearch::PLTSearch(CodingStructure &cs, Partitioner& partitioner, Compo
//derive palette
derivePLTLossy(cs, partitioner, compBegin, numComp);
reorderPLT(cs, partitioner, compBegin, numComp);
// -------------------------------------------------------------------------------------------------------------------
//calculate palette index
preCalcPLTIndex(cs, partitioner, compBegin, numComp);
//derive run
......@@ -1800,7 +1800,7 @@ void IntraSearch::PLTSearch(CodingStructure &cs, Partitioner& partitioner, Compo
{
if (curPLTIdx.at(x, y) == cu.curPLTSize[compBegin])
{
// Intra search
}
else
{
......
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