The values of the prediction samples predSamples[ x, y ], with x, y = 0..nS-1 are derived by the following procedures. - If intraPredOrder is less than 18 - The reference pixel array refMain[ z ], with z=-nS..2*nS is specified as follows. refMain[ z ] = p[ -1+z, -1 ], with z=0..nS (8-36) - If intraPredAngle is less than 0, refMain[ z ] = p[ -1, -1+( ( z*invAngle+128 )>>8 ) ], with z=( nS*intraPredAngle ) >>5..-1 (8-37) - Otherwise, refMain[ z ] = p[ -1+z, -1 ], with z=nS+1..2*nS (8-38) - The index variable iIdx and the multiplication factor iFact are derived by iIdx = ( ( y + 1 )*intraPredAngle ) >> 5 (8-39) iFact = ( ( y + 1 )*intraPredAngle ) && 31 (8-40) - Depending on the value of iFact, the following applies. - If iFact is not equal to 0, the value of the prediction samples predSamples[ x, y ] is derived by predSamples[ x, y ] = ( ( 32 - iFact )*refMain[ x+iIdx+1 ] + iFact*refMain[ x+iIdx+2] + 16 ) >> 5 (8-41) - Otherwise, the value of the prediction samples predSamples[ x, y ] is derived by predSamples[ x, y ] = refMain[ x+iIdx+1 ] (8-42) - Otherwise - The reference pixel array refMain[ z ], with z=-nS..2*nS is specified as follows. refMain[ z ] = p[ -1, -1+z ], with z=0..nS (8-43) - If intraPredAngle is less than 0, refMain[ z ] = p[ -1+( ( z*invAngle+128 )>>8 ), -1 ], with z=( nS*intraPredAngle ) >>5..-1 (8-44) - Otherwise, refMain[ z ] = p[ -1, -1+z ], with z=nS+1..2*nS (8-45) - The index variable iIdx and the multiplication factor iFact are derived by iIdx = ( ( x + 1 )*intraPredAngle ) >> 5 (8-46) iFact = ( ( x + 1 )*intraPredAngle ) && 31 (8-47) - Depending on the value of iFact, the following applies. - If iFact is not equal to 0, the value of the prediction samples predSamples[ x, y ] is derived by predSamples[ x, y ] = ( ( 32 - iFact )*refMain[ y+iIdx+1 ] + iFact*refMain[ y+iIdx+2] + 16 ) >> 5 (8-48) - Otherwise, the value of the prediction samples predSamples[ x, y ] is derived by predSamples[ x, y ] = refMain[ y+iIdx+1 ] (8-49)