~gma500/+junk/emgd160

« back to all changes in this revision

Viewing changes to libva1/i965_drv_video/shaders/post_processing/Core_Kernels/PL2_AVS_IEF_8x4.asm

  • Committer: Luca Forina
  • Date: 2011-05-01 16:47:59 UTC
  • Revision ID: luca.forina@gmail.com-20110501164759-rginv47wl82d5o4q
added libva1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_8x4.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
    //Only 8x4 wil be used  
 
33
    mov (1) rAVS_8x8_HDR.2:ud  nAVS_RED_BLUE_CHANNELS:ud                   
 
34
 
 
35
    // Calculate Chroma Step Size:
 
36
    // for H direction: 16 Luma samples are covered by 8 Chroma samples. Thus Chroma_Step_X = 2 * Luma_Step_X 
 
37
    // for V direction: 8  Luma samples are covered by 8 Chroma samples. Thus Chroma_Step_Y = Luma_Step_Y
 
38
    mul  (1)  rAVS_PAYLOAD.1:f      fVIDEO_STEP_X:f    2.0:f             // Step X for chroma
 
39
 
 
40
    mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
 
41
    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
 
42
    // Return U and V in 8 GRFs
 
43
 
 
44
    // 2nd 8x8 setup
 
45
    #include "AVS_SetupSecondBlock.asm"
 
46
 
 
47
    // 2nd 8x8 Y sampling
 
48
    // Enable green channel only
 
49
    mov (1) rAVS_8x8_HDR.2:ud      nAVS_GREEN_CHANNEL_ONLY:ud                           
 
50
 
 
51
    mov (16) mAVS_8x8_HDR.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
 
52
    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 
 
53
 
 
54
//------------------------------------------------------------------------------
 
55
// Unpacking sampler reads to 4:2:0 internal planar 
 
56
//------------------------------------------------------------------------------
 
57
    #include "PL2_AVS_IEF_Unpack_8x4.asm"
 
58