Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * All Video Processing kernels |
||
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 | |||
11 | //---------- PL2_AVS_IEF_8x8.asm ---------- |
||
12 | |||
13 | #include "AVS_IEF.inc" |
||
14 | |||
15 | //------------------------------------------------------------------------------ |
||
16 | // 2 sampler reads for 8x8 Y each |
||
17 | // 1 sampler read for 8x8 U and 8x8 V (NV11\NV12 input surface) |
||
18 | //------------------------------------------------------------------------------ |
||
19 | |||
20 | // 1st 8x8 setup |
||
21 | #include "AVS_SetupFirstBlock.asm" |
||
22 | |||
23 | // Enable green channel only |
||
24 | mov (1) rAVS_8x8_HDR.2:ud nAVS_GREEN_CHANNEL_ONLY:ud |
||
25 | |||
26 | mov (16) mAVS_8x8_HDR.0:ud rAVS_8x8_HDR.0<8;8,1>:ud // Copy msg header and payload mirrors to MRFs |
||
27 | send (1) uwAVS_RESPONSE(0)<1> mAVS_8x8_HDR udDUMMY_NULL nSMPL_ENGINE nAVS_MSG_DSC_1CH+nSI_SRC_Y+nBI_CURRENT_SRC_Y |
||
28 | // Return Y in 4 GRFs |
||
29 | |||
30 | // 8x8 U and V sampling |
||
31 | // Enable red and blue channels |
||
32 | mov (1) rAVS_8x8_HDR.2:ud nAVS_RED_BLUE_CHANNELS:ud |
||
33 | |||
34 | // Calculate Chroma Step Size: |
||
35 | // for H direction: 16 Luma samples are covered by 8 Chroma samples. Thus Chroma_Step_X = 2 * Luma_Step_X |
||
36 | // for V direction: 8 Luma samples are covered by 8 Chroma samples. Thus Chroma_Step_Y = Luma_Step_Y |
||
37 | mul (1) rAVS_PAYLOAD.1:f fVIDEO_STEP_X:f 2.0:f // Step X for chroma |
||
38 | |||
39 | mov (16) mAVS_8x8_HDR_UV.0:ud rAVS_8x8_HDR.0<8;8,1>:ud // Copy msg header and payload mirrors to MRFs |
||
40 | send (1) uwAVS_RESPONSE(4)<1> mAVS_8x8_HDR_UV udDUMMY_NULL nSMPL_ENGINE nAVS_MSG_DSC_2CH+nSI_SRC_UV+nBI_CURRENT_SRC_UV |
||
41 | // Return U and V in 8 GRFs |
||
42 | |||
43 | // 2nd 8x8 setup |
||
44 | #include "AVS_SetupSecondBlock.asm" |
||
45 | |||
46 | // 2nd 8x8 Y sampling |
||
47 | // Enable green channel only |
||
48 | mov (1) rAVS_8x8_HDR.2:ud nAVS_GREEN_CHANNEL_ONLY:ud |
||
49 | |||
50 | mov (16) mAVS_8x8_HDR.0:ud rAVS_8x8_HDR.0<8;8,1>:ud // Copy msg header and payload mirrors to MRFs |
||
51 | send (1) uwAVS_RESPONSE_2(0)<1> mAVS_8x8_HDR udDUMMY_NULL nSMPL_ENGINE nAVS_MSG_DSC_1CH+nSI_SRC_Y+nBI_CURRENT_SRC_Y |
||
52 | |||
53 | //------------------------------------------------------------------------------ |
||
54 | // Unpacking sampler reads to 4:2:2 internal planar |
||
55 | //------------------------------------------------------------------------------ |
||
56 | #include "PL2_AVS_IEF_Unpack_8x8.asm"1>8;8,1>1>8;8,1>1>8;8,1>2010> |
||
57 |