Changeset 1479 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder


Ignore:
Timestamp:
12 Oct 2015, 18:26:07 (9 years ago)
Author:
seregin
Message:

port rev 4611

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1475 r1479  
    14081408    assert(pic.getChromaFormat() != CHROMA_400);
    14091409    const Int hs = pic.getComponentScaleX(ComponentID(COMPONENT_Cb));
     1410    const Int maxOutputValue = (1 << bitDepth) - 1;
    14101411
    14111412    for( Int y = 0; y < iHeight; y++ )
     
    14221423        Int YUVMat_0 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[0], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[0]);
    14231424        Int YUVLutB_0 = applyColourRemappingInfoLut1D(YUVMat_0, postLut[0], postLutInputPrecision);
    1424         YUVOut[COMPONENT_Y][x] = (YUVLutB_0 + scaleOut_round) >> scaleShiftOut_neg; // scaling output
     1425        YUVOut[COMPONENT_Y][x] = std::min(maxOutputValue, (YUVLutB_0 + scaleOut_round) >> scaleShiftOut_neg);
    14251426
    14261427        if( computeChroma )
     
    14281429          Int YUVMat_1 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[1], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[1]);
    14291430          Int YUVLutB_1 = applyColourRemappingInfoLut1D(YUVMat_1, postLut[1], postLutInputPrecision);
    1430           YUVOut[COMPONENT_Cb][xc] = (YUVLutB_1 + scaleOut_round) >> scaleShiftOut_neg; // scaling output
     1431          YUVOut[COMPONENT_Cb][xc] = std::min(maxOutputValue, (YUVLutB_1 + scaleOut_round) >> scaleShiftOut_neg);
    14311432
    14321433          Int YUVMat_2 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[2], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[2]);
    14331434          Int YUVLutB_2 = applyColourRemappingInfoLut1D(YUVMat_2, postLut[2], postLutInputPrecision);
    1434           YUVOut[COMPONENT_Cr][xc] = (YUVLutB_2 + scaleOut_round) >> scaleShiftOut_neg; // scaling output
     1435          YUVOut[COMPONENT_Cr][xc] = std::min(maxOutputValue, (YUVLutB_2 + scaleOut_round) >> scaleShiftOut_neg);
    14351436        }
    14361437      }
Note: See TracChangeset for help on using the changeset viewer.