les at half sample positions labelled b are derived by first calculating intermediate values denoted as b1 by applying the 6-tap filter to the nearest integer position samples in the horizontal direction. The samples at half sample positions labelled h are derived by first calculating intermediate values denoted as h1 by applying the 6-tap filter to the nearest integer position samples in the vertical direction: b1 = E-5*F+20*G+20*H-5I+J) - (8-241) h1 = (A-5*C+20*G+20*M-5*R+T) - (8-242) The final prediction values b and h are derived using b =Cliply((b1+16)>>5) = (8-243) h = Cliply((hj+16)>> 5) (8-244) The samples at half sample position labelled as j are derived by first calculating intermediate value denoted as j1 by applying the 6-tap filter to the intermediate values of the closest half sample positions in either the horizontal or vertical direction because these yield an equal result: j = cc - +20*h+20*m-5eeff, or (8-245) (8-246) where intermediate values denoted as aa, bb, gg, S1 and hh are derived by applying the 6-tap filter horizontally in the same manner as the derivation of b1 and intermediate values denoted as cc, dd, ee, m1 and ff are derived by applying the 6-tap filter vertically in the same manner as the derivation of h1. The final prediction value j are derived using =Clip1y((ji+512)>>] (8-247) The final prediction values S and m are derived from S1 and m1 in the same manner as the derivation of b and h, as given by s=Cliply((s1+16)>>5) = (8-248) m=Cliply((m1+16)>>5 = (8-249) The samples at quarter sample positions labelled as a, c, d, n, f, i, k, and q are derived by averaging with upward rounding of the two nearest samples at integer and half sample positions using =(G+b+1)>> (8-250) c=(H+b+1)>> (8-251) d=(G+h+1)>> (8-252) n=(M+h+1)>> (8-253) f=(b+j+1)>> (8-254) i=(h+j+1)>>1 (8-255) k=(j+m+1)>> (8-256) q=(j+s+1)>>) (8-257) The samples at quarter sample positions labelled as e, g, p, and r are derived by averaging with upward rounding of the two nearest samples at half sample positions in the di