Ticket #233: intra_angular_prediction.txt

File intra_angular_prediction.txt, 2.0 KB (added by tkunlin, 10 years ago)
Line 
1The values of the prediction samples predSamples[ x, y ], with x, y = 0..nS-1 are derived by the following procedures.
2-       If intraPredOrder is less than 18
3        -       The reference pixel array refMain[ z ], with z=-nS..2*nS is specified as follows.
4                refMain[ z ] = p[ -1+z, -1 ], with z=0..nS              (8-36)
5                -       If intraPredAngle is less than 0,
6                        refMain[ z ] = p[ -1, -1+( ( z*invAngle+128 )>>8 ) ], with z=( nS*intraPredAngle ) >>5..-1      (8-37)
7                -       Otherwise,
8                        refMain[ z ] = p[ -1+z, -1 ], with z=nS+1..2*nS         (8-38)
9        -       The index variable iIdx and the multiplication factor iFact are derived by
10                iIdx = ( ( y + 1 )*intraPredAngle ) >> 5                (8-39)
11                iFact = ( ( y + 1 )*intraPredAngle ) && 31              (8-40)
12        -       Depending on the value of iFact, the following applies.
13                -       If iFact is not equal to 0, the value of the prediction samples predSamples[ x, y ] is derived by
14                        predSamples[ x, y ] = ( ( 32 - iFact )*refMain[ x+iIdx+1 ] + iFact*refMain[ x+iIdx+2] + 16 ) >> 5       (8-41)
15                -       Otherwise, the value of the prediction samples predSamples[ x, y ] is derived by
16                        predSamples[ x, y ] = refMain[ x+iIdx+1 ]       (8-42)
17-       Otherwise
18        -       The reference pixel array refMain[ z ], with z=-nS..2*nS is specified as follows.
19                refMain[ z ] = p[ -1, -1+z ], with z=0..nS              (8-43)
20                -       If intraPredAngle is less than 0,
21                        refMain[ z ] = p[ -1+( ( z*invAngle+128 )>>8 ), -1 ], with z=( nS*intraPredAngle ) >>5..-1      (8-44)
22                -       Otherwise,
23                        refMain[ z ] = p[ -1, -1+z ], with z=nS+1..2*nS         (8-45)
24        -       The index variable iIdx and the multiplication factor iFact are derived by
25                iIdx = ( ( x + 1 )*intraPredAngle ) >> 5                (8-46)
26                iFact = ( ( x + 1 )*intraPredAngle ) && 31              (8-47)
27        -       Depending on the value of iFact, the following applies.
28                -       If iFact is not equal to 0, the value of the prediction samples predSamples[ x, y ] is derived by
29                        predSamples[ x, y ] = ( ( 32 - iFact )*refMain[ y+iIdx+1 ] + iFact*refMain[ y+iIdx+2] + 16 ) >> 5       (8-48)
30                -       Otherwise, the value of the prediction samples predSamples[ x, y ] is derived by
31                        predSamples[ x, y ] = refMain[ y+iIdx+1 ]       (8-49)
32