Changeset 1479 in SHVCSoftware
- Timestamp:
- 12 Oct 2015, 18:26:07 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1475 r1479 1408 1408 assert(pic.getChromaFormat() != CHROMA_400); 1409 1409 const Int hs = pic.getComponentScaleX(ComponentID(COMPONENT_Cb)); 1410 const Int maxOutputValue = (1 << bitDepth) - 1; 1410 1411 1411 1412 for( Int y = 0; y < iHeight; y++ ) … … 1422 1423 Int YUVMat_0 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[0], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[0]); 1423 1424 Int YUVLutB_0 = applyColourRemappingInfoLut1D(YUVMat_0, postLut[0], postLutInputPrecision); 1424 YUVOut[COMPONENT_Y][x] = (YUVLutB_0 + scaleOut_round) >> scaleShiftOut_neg; // scaling output1425 YUVOut[COMPONENT_Y][x] = std::min(maxOutputValue, (YUVLutB_0 + scaleOut_round) >> scaleShiftOut_neg); 1425 1426 1426 1427 if( computeChroma ) … … 1428 1429 Int YUVMat_1 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[1], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[1]); 1429 1430 Int YUVLutB_1 = applyColourRemappingInfoLut1D(YUVMat_1, postLut[1], postLutInputPrecision); 1430 YUVOut[COMPONENT_Cb][xc] = (YUVLutB_1 + scaleOut_round) >> scaleShiftOut_neg; // scaling output1431 YUVOut[COMPONENT_Cb][xc] = std::min(maxOutputValue, (YUVLutB_1 + scaleOut_round) >> scaleShiftOut_neg); 1431 1432 1432 1433 Int YUVMat_2 = applyColourRemappingInfoMatrix(criSEI.m_colourRemapCoeffs[2], postOffsetShift, YUVPre_0, YUVPre_1, YUVPre_2, matrixOutputOffset[2]); 1433 1434 Int YUVLutB_2 = applyColourRemappingInfoLut1D(YUVMat_2, postLut[2], postLutInputPrecision); 1434 YUVOut[COMPONENT_Cr][xc] = (YUVLutB_2 + scaleOut_round) >> scaleShiftOut_neg; // scaling output1435 YUVOut[COMPONENT_Cr][xc] = std::min(maxOutputValue, (YUVLutB_2 + scaleOut_round) >> scaleShiftOut_neg); 1435 1436 } 1436 1437 } -
branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.cpp
r1475 r1479 541 541 readTokenValueAndValidate(seiColourRemappingInfo->m_colourRemapBitDepth, failed, fic, "colour_remap_bit_depth", Int(8), Int(16) ); 542 542 543 const Int maximumInputValue = (1 <<seiColourRemappingInfo->m_colourRemapInputBitDepth)-1;544 const Int maximumRemappedValue = (1 <<seiColourRemappingInfo->m_colourRemapBitDepth)-1;543 const Int maximumInputValue = (1 << (((seiColourRemappingInfo->m_colourRemapInputBitDepth + 7) >> 3) << 3)) - 1; 544 const Int maximumRemappedValue = (1 << (((seiColourRemappingInfo->m_colourRemapBitDepth + 7) >> 3) << 3)) - 1; 545 545 546 546 for( Int c=0 ; c<3 ; c++ )
Note: See TracChangeset for help on using the changeset viewer.