﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1337	incorrect address calculation in ACT	libin		"When SCM_R0147_RGB_YUV_RD_ENC (missing one _ after SCM, otherwise, all the following words will be underlined) is defined, the reconstructed pixels will be converted into the second color space (e.g. YCgCo) and stored for future use. In the current implementation, the pixels after color conversion will be stored in pcTmpYuvPred first, and then be copied into the picture buffer.
However, the pcTmpYuvPred always has the width==64 and height==64, not the actual CU size. The width and height of pcTmpYuvPred will be used to calculate the pixel address. Thus, incorrect width and height may lead to incorrect address calculation (for boundary non-full CTU).

It is suggested to replace the following lines in TEncCu::xCopyYuv2Pic()
      TComYuv* pcTmpYuvPred = m_pcPredSearch->getTmpYuvPred();
      for( UInt ch = 0; ch < MAX_NUM_COMPONENT; ch++ )
        m_ppcRecoYuvBest[uiSrcDepth]->copyPartToPartComponentMxN( ComponentID(ch), pcTmpYuvPred, cuCompRect);
      pcTmpYuvPred->DefaultConvertPix( cuCompRect.x0, cuCompRect.y0, cuCompRect.width );  
      pcTmpYuvPred->copyToPicYuv( rpcPic->getPicYuvCSC(), uiCUAddr, uiAbsPartIdx, uiDepth - uiSrcDepth, uiPartIdx);
with
      for( UInt ch = 0; ch < MAX_NUM_COMPONENT; ch++ )
        m_ppcRecoYuvBest[uiSrcDepth]->copyPartToPartComponentMxN( ComponentID(ch), m_ppcRecoYuvTemp[uiSrcDepth], cuCompRect);
      m_ppcRecoYuvTemp[uiSrcDepth]->DefaultConvertPix( cuCompRect.x0, cuCompRect.y0, cuCompRect.width );
      m_ppcRecoYuvTemp[uiSrcDepth]->copyToPicYuv( rpcPic->getPicYuvCSC(), uiCUAddr, uiAbsPartIdx, uiDepth - uiSrcDepth, uiPartIdx);"	defect	closed	minor	HM+SCC-3.0	HM SCC	SCC-2.0 (RExt-8.0)	fixed		jct-vc@…
