﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1252	Mismatched coordinates in transform_unit()	jackh		"In O1005, the following passage appears in transform_unit:


{{{
else if( blkIdx = = 3 ) {
   for( tIdx = 0; tIdx < ( ChromaArrayType = = 2 ? 2 : 1 ); tIdx++ )
      if( cbf_cb[ xBase ][ yBase ][ trafoDepth ] )
         residual_coding( xBase, yBase + ( tIdx << log2TrafoSize ), log2TrafoSize, 1 )
   for( tIdx = 0; tIdx < ( ChromaArrayType = = 2 ? 2 : 1 ); tIdx++ )
      if( cbf_cr[ xBase ][ yBase ][ trafoDepth ] )
         residual_coding( xBase, yBase + ( tIdx << log2TrafoSize ), log2TrafoSize, 2 )
}
}}}

In P1005, this has been changed to:

{{{
else if( blkIdx = = 3 ) {
   for( tIdx = 0; tIdx < ( ChromaArrayType = = 2 ? 2 : 1 ); tIdx++ )
      if( cbf_cb[ xBase ][ yBase + ( tIdx << log2TrafoSizeC ) ][ trafoDepth ] )
         residual_coding( xBase, yBase + ( tIdx << log2TrafoSize ), log2TrafoSize, 1 )
   for( tIdx = 0; tIdx < ( ChromaArrayType = = 2 ? 2 : 1 ); tIdx++ )
      if( cbf_cr[ xBase ][ yBase + ( tIdx << log2TrafoSizeC ) ][ trafoDepth ] )
         residual_coding( xBase, yBase + ( tIdx << log2TrafoSize ), log2TrafoSize, 2 )
}
}}}

i.e. the 4:2:2 y offsets in the cbf_xx y indices have been changed to chroma coordinates rather than luma coordinates. As this is being done in the block which executes on a 4x4 luma block, log2TrafoSizeC=1. So for instance, in a 4x4 luma block with its origin at 4,4, this would end up accessing {{{cbf_cb[0][2]}}} instead of {{{cbf_cb[0][4]}}}. As this location will never have been filled in, this seems broken - I think the P1005 version was correct."	defect	closed	minor	RExt D7	RExt text	RExt D6 (P1005) v1	fixed		davidf joel teruhiko jct-vc@…
