﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1097	Mismatch spec/VTM in PDPC process (8.4.5.2.14)	audrey.turquin		"In VTM, in IntraPrediction.cpp, in function xPredIntraAng, there is the following code :


{{{
  if( intraPredAngle == 0 )  // pure vertical or pure horizontal                                                                                                                                                                             
  {                                                                                                                                                                                                                                          
    for( int y = 0; y < height; y++ )                                                                                                                                                                                                        
    {                                                                                                                                                                                                                                        
      for( int x = 0; x < width; x++ )                                                                                                                                                                                                       
      {                                                                                                                                                                                                                                      
        pDsty[x] = refMain[x + 1];                                                                                                                                                                                                           
      }                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                             
      if (m_ipaParam.applyPDPC)                                                                                                                                                                                                              
      {                                                                                                                                                                                                                                      
        const int scale   = (floorLog2(width) + floorLog2(height) - 2) >> 2;                                                                                                                                                                 
        const Pel topLeft = refMain[0];                                                                                                                                                                                                      
        const Pel left    = refSide[1 + y];                                                                                                                                                                                                  
        for (int x = 0; x < std::min(3 << scale, width); x++)                                                                                                                                                                                
        {                                                                                                                                                                                                                                    
          const int wL  = 32 >> (2 * x >> scale);                                                                                                                                                                                            
          const Pel val = pDsty[x];                                                                                                                                                                                                          
          pDsty[x]      = ClipPel(val + ((wL * (left - topLeft) + 32) >> 6), clpRng);                                                                                                                                                        
        }                                                                                                                                                                                                                                    
      }                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                             
      pDsty += dstStride;                                                                                                                                                                                                                    
    }                                                                                                                                                                                                                                        
  }

}}}

But in the loop

{{{
for (int x = 0; x < std::min(3 << scale, width); x++)
}}}

the condition ""min(3 << scale, width)"" is not present in the specification text (section 8.4.5.2.14, case where predModeIntra is equal to INTRA_ANGULAR18 or INTRA_ANGULAR50).
According to the specification, x should be between 0 and nTbW - 1."	defect	closed	minor		VTM		invalid		ksuehring XiangLi fbossen jvet@…
