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 / load_Intra_Ref_UV.asm
1 /*\r
2  * Load all reference U/V samples from neighboring macroblocks\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 #if !defined(__LOAD_INTRA_REF_UV__)             // Make sure this is only included once\r
11 #define __LOAD_INTRA_REF_UV__\r
12 \r
13 // Module name: load_Intra_Ref_UV.asm\r
14 //\r
15 // Load all reference U/V samples from neighboring macroblocks\r
16 //\r
17 // Note: Since loading of U/V data always follows writing of Y, the message descriptor is manipulated\r
18 // to avoid recalculating due to frame/field variztions.\r
19 \r
20 // First load top 20x1 row U/V reference samples\r
21 // 4 from macroblock D (actually use 2), 16 from macroblock B\r
22 //\r
23     shr (1)     I_ORIY<1>:w             I_ORIY<0;1,0>:w 1:w             // Adjust I_ORIY for NV12 format\r
24     add (2)     MSGSRC.0<1>:d   I_ORIX<2;2,1>:w TOP_REF_OFFSET<2;2,1>:b {NoDDClr}       // Reference samples positioned at (-4, -1)\r
25     mov (1)     MSGSRC.2:ud             0x00000013:ud {NoDDChk}                 // Block width and height (20x1)\r
26 \r
27 //  Update message descriptor based on previous Y block write\r
28 //\r
29 #ifdef DEV_ILK\r
30     add (1)     MSGDSC  MSGDSC  RESP_LEN(1)+DWBRMSGDSC_RC+DESTUV-DWBWMSGDSC_WC-0x10000000-DESTY:ud  // Set message descriptor\r
31 #else\r
32     add (1)     MSGDSC  MSGDSC  RESP_LEN(1)+DWBRMSGDSC_RC+DESTUV-DWBWMSGDSC_WC-0x00800000-DESTY:ud  // Set message descriptor\r
33 #endif  // DEV_ILK\r
34 \r
35     send (8)    INTRA_REF_TOP_D(0)      MSGHDR  MSGSRC<8;8,1>:ud        DAPREAD MSGDSC\r
36 \r
37 // Then load left 4x8 reference samples (actually use 1x8 column)\r
38 //\r
39     add (1)     MSGSRC.1<1>:d   MSGSRC.1<0;1,0>:d       1:w {NoDDClr}   // Reference samples positioned next row\r
40     mov (1)     MSGSRC.2:ud             0x00070003:ud {NoDDChk}                 // Block width and height (4x8)\r
41     send (8)    INTRA_REF_LEFT_D(0)     MSGHDRUV        MSGSRC<8;8,1>:ud        DAPREAD MSGDSC\r
42 \r
43 // End of load_Intra_Ref_UV\r
44 #endif  // !defined(__LOAD_INTRA_REF_UV__)\r