Commit bbd0a9a5 authored by Takeshi Tsukuba's avatar Takeshi Tsukuba Committed by Xiang Li

fix#1029: encoder/decoder mismatch when RDOQOff

parent 9429d13d
......@@ -1003,8 +1003,12 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
const uint32_t lfnstIdx = tu.cu->lfnstIdx;
const int maxNumberOfCoeffs = lfnstIdx > 0 ? ((( uiWidth == 4 && uiHeight == 4 ) || ( uiWidth == 8 && uiHeight == 8) ) ? 8 : 16) : piQCoef.area();
memset( piQCoef.buf, 0, sizeof(TCoeff) * piQCoef.area() );
for (int uiBlockPos = 0; uiBlockPos < maxNumberOfCoeffs; uiBlockPos++ )
const ScanElement* scan = g_scanOrder[SCAN_GROUPED_4x4][SCAN_DIAG][gp_sizeIdxInfo->idxFrom(uiWidth)][gp_sizeIdxInfo->idxFrom(uiHeight)];
for (int uiScanPos = 0; uiScanPos < maxNumberOfCoeffs; uiScanPos++)
{
const int uiBlockPos = scan[uiScanPos].idx;
const TCoeff iLevel = piCoef.buf[uiBlockPos];
const TCoeff iSign = (iLevel < 0 ? -1: 1);
......
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