﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
132	Mismatch between specification and software in the order of syntax elements for intra prediction	vdrugeon		"I believe that there is a mismatch between software and specification text regarding the order of syntax elements in the bitstream for intra prediction.

In VVC Draft 3 v4, the pcm information is placed before the reference line information:
        if( CuPredMode[ x0 ][ y0 ]  = =  MODE_INTRA ) {
                if( pcm_enabled_flag  &&
                        cbWidth >= MinIpcmCbSizeY  &&  cbWidth <= MaxIpcmCbSizeY &&
                        cbHeight >= MinIpcmCbSizeY  &&  cbHeight <= MaxIpcmCbSizeY )
                        pcm_flag[ x0 ][ y0 ]
                if( pcm_flag[ x0 ][ y0 ] ) {
                        while( !byte_aligned( ) )
                pcm_alignment_zero_bit
                        pcm_sample( cbWidth, cbHeight, treeType)
                } else {
                if( treeType = = SINGLE_TREE  | |  treeType = = DUAL_TREE_LUMA ) {
                        if( ( y0 % CtbSizeY )  >  0 )
                                intra_luma_ref_idx[ x0 ][ y0 ]
                        if (intra_luma_ref_idx[ x0 ][ y0 ] = = 0)
                        intra_luma_mpm_flag[ x0 ][ y0 ]
                        if( intra_luma_mpm_flag[ x0 ][ y0 ] )
                                intra_luma_mpm_idx[ x0 ][ y0 ]
                        else
                                intra_luma_mpm_remainder[ x0 ][ y0 ]
                }
                if( treeType = = SINGLE_TREE  | |  treeType = = DUAL_TREE_CHROMA )
                        intra_chroma_pred_mode[ x0 ][ y0 ]
                }
        } else { /* MODE_INTER */

However, in VTM-3.0, it seems that the reference line information is placed before the pcm information (source code from function bool CABACReader::coding_unit( CodingUnit &cu, Partitioner &partitioner, CUCtx& cuCtx )):
#if JVET_L0283_MULTI_REF_LINE                                                                                                                                               
  extend_ref_line( cu );                                                                                                                                                    
#endif                                                                                                                                                                      
                                                                                                                                                                            
  // pcm samples                                                                                                                                                            
  if( CU::isIntra(cu) && cu.partSize == SIZE_2Nx2N )                                                                                                                        
  {                                                                                                                                                                         
    pcm_flag( cu );                                                                                                                                                         
    if( cu.ipcm )                                                                                                                                                           
    {                                                                                                                                                                       
      TransformUnit& tu = cs.addTU( cu, partitioner.chType );                                                                                                               
      pcm_samples( tu );                                                                                                                                                    
      return end_of_ctu( cu, cuCtx );                                                                                                                                       
    }                                                                                                                                                                       
  }                                                                                                                                                                         
                                                                                                                                                                            
  // prediction data ( intra prediction modes / reference indexes + motion vectors )                                                                                        
  cu_pred_data( cu );                                                                                                                                                       

"	defect	closed	minor		VTM	VTM-3.0	fixed		ksuehring bbross XiangLi fbossen jvet@…
