Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * Interpolation kernel for chrominance 2x2 motion compensation |
||
3 | * Copyright © <2010>, Intel Corporation. |
||
4 | * |
||
5 | * This program is licensed under the terms and conditions of the |
||
6 | * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at |
||
7 | * http://www.opensource.org/licenses/eclipse-1.0.php. |
||
8 | * |
||
9 | */ |
||
10 | // Kernel name: Interpolate_C_2x2.asm |
||
11 | // |
||
12 | // Interpolation kernel for chrominance 2x2 motion compensation |
||
13 | // |
||
14 | // $Revision: 8 $ |
||
15 | // $Date: 10/09/06 4:00p $ |
||
16 | // |
||
17 | |||
18 | |||
19 | //#if !defined(__Interpolate_C_2x2__) // Make sure this is only included once |
||
20 | //#define __Interpolate_C_2x2__ |
||
21 | |||
22 | |||
23 | // (8-xFrac) and (8-yFrac) |
||
24 | add (2) gW0<1>:w gMVX_FRACC<2;2,1>:w -0x08:w |
||
25 | |||
26 | // Compute the GRF address of the starting position of the reference area |
||
27 | mov (1) pREF0:w nOFFSET_REFC:w {NoDDClr} |
||
28 | mov (1) pRESULT:uw gpINTPC:uw {NoDDChk} |
||
29 | |||
30 | // gCOEFA = (8-xFrac)*(8-yFrac) |
||
31 | // gCOEFB = xFrac*(8-yFrac) |
||
32 | // gCOEFC = (8-xFrac)*yFrac |
||
33 | // gCOEFD = xFrac*yFrac |
||
34 | mul (1) gCOEFD:w gMVX_FRACC:w gMVY_FRACC:w {NoDDClr} |
||
35 | mul (1) gCOEFA:w -gW0:w -gW1:uw {NoDDClr,NoDDChk} |
||
36 | mul (1) gCOEFB:w gMVX_FRACC:w -gW1:uw {NoDDClr,NoDDChk} |
||
37 | mul (1) gCOEFC:w -gW0:w gMVY_FRACC:w {NoDDChk} |
||
38 | |||
39 | // (8-xFrac)*(8-yFrac)*A |
||
40 | // --------------------- |
||
41 | mul (8) acc0<1>:uw r[pREF0,0]<8;4,1>:ub gCOEFA:uw |
||
42 | |||
43 | // xFrac*(8-yFrac)*B |
||
44 | // ------------------- |
||
45 | mac (8) acc0<1>:uw r[pREF0,2]<8;4,1>:ub gCOEFB:uw |
||
46 | |||
47 | // (8-xFrac)*yFrac*C |
||
48 | // ------------------- |
||
49 | mac (8) acc0<1>:uw r[pREF0,8]<8;4,1>:ub gCOEFC:uw |
||
50 | |||
51 | // xFrac*yFrac*D |
||
52 | // ----------------- |
||
53 | mac (8) gwINTERIM_BUF2(0)<1> r[pREF0,10]<8;4,1>:ub gCOEFD:uw |
||
54 | mov (4) r[pRESULT]<1>:uw gwINTERIM_BUF2(0)<4;4,1> {NoDDClr} |
||
55 | mov (4) r[pRESULT,16]<1>:uw gwINTERIM_BUF2(0,4)<4;4,1> {NoDDChk} |
||
56 | |||
57 | //#endif // !defined(__Interpolate_C_2x2__)4;4,1>1>4;4,1>1>8;4,1>1>8;4,1>1>8;4,1>1>8;4,1>1>2;2,1>1>2010> |