OSDN Git Service

i965_drv_video: add support for H264 on Clarkdale/Arrandale
[android-x86/hardware-intel-common-libva.git] / i965_drv_video / shaders / h264 / mc / loadRef_Y_16x9.asm
1 /*\r
2  * Load reference 16x9 area for luma 4x4 MC\r
3  * Copyright © <2010>, Intel Corporation.\r
4  *\r
5  * This program is licensed under the terms and conditions of the\r
6  * Eclipse Public License (EPL), version 1.0.  The full text of the EPL is at\r
7  * http://www.opensource.org/licenses/eclipse-1.0.php.\r
8  *\r
9  */\r
10 // Kernel name: LoadRef_Y_16x9.asm\r
11 //\r
12 // Load reference 16x9 area for luma 4x4 MC\r
13 \r
14 \r
15 //#if !defined(__LOADREF_Y_16x9__)              // Make sure this is only included once\r
16 //#define __LOADREF_Y_16x9__\r
17 \r
18 #if 1\r
19 \r
20         // Compute integer and fractional components of MV\r
21     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w  //{NoDDClr}\r
22     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w  //{NoDDChk}\r
23  \r
24     // Check whether MVY is integer\r
25         or.z.f0.1 (8) null:w                    gMVY_FRAC<0;1,0>:w                              0:w\r
26            \r
27         // Set message descriptor\r
28         (f0.1) add (1)  pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(2):ud\r
29         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(5):ud\r
30 \r
31         // Compute top-left corner position to be loaded\r
32         // TODO: sel\r
33     (-f0.1) add (2)     gMSGSRC.0<1>:d  gMVX_INT<2;2,1>:w                               -0x02:d //{NoDDClr}\r
34     (-f0.1) mov (1)     gMSGSRC.2:ud    0x00080008:ud                                                   //{NoDDChk}\r
35     (f0.1) add (1)      gMSGSRC.0<1>:d  gMVX_INT<0;1,0>:w                               -0x02:d //{NoDDClr}\r
36         (f0.1) mov (1)  gMSGSRC.1<1>:d  gMVY_INT<0;1,0>:w                                               //{NoDDChk,NoDDClr}\r
37     (f0.1) mov (1)      gMSGSRC.2:ud    0x00030008:ud                                                   //{NoDDChk}\r
38 \r
39     // Read 16x9 pixels\r
40     send (8)    gudREF(0)<1>        mMSGHDRY                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud\r
41 \r
42 #else\r
43 \r
44         // Compute integer and fractional components of MV\r
45     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w {NoDDClr} //\r
46     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w {NoDDChk} //\r
47 \r
48         // Set message descriptor\r
49         add (1)         pMSGDSC:ud                      gMSGDSC_R:ud                                    RESP_LEN(5):ud\r
50     \r
51         // Compute top-left corner position to be loaded \r
52     add (2)             gMSGSRC.0<1>:d          gMVX_INT<2;2,1>:w                               -0x02:d {NoDDClr} //\r
53     mov (1)             gMSGSRC.2:ud            0x00080008:ud                                                   {NoDDChk} //\r
54 \r
55     // Read 16x9 pixels\r
56     send (8)    gudREF(0)<1>        mMSGHDRY                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud\r
57 \r
58 #endif\r
59 \r
60         \r
61 //#endif        // !defined(__LOADREF_Y_16x9__)\r