Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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. //---------- PL3_AVS_IEF_8x4.asm ----------
  12.  
  13. #include "AVS_IEF.inc"
  14.  
  15. //------------------------------------------------------------------------------
  16. // 2 sampler reads for 8x8 Y surface
  17. // 1 sampler read  for 8x8 U surface
  18. // 1 sampler read  for 8x8 V surface
  19. //------------------------------------------------------------------------------
  20.  
  21.     // 1st 8x8 setup
  22.     #include "AVS_SetupFirstBlock.asm"
  23.  
  24.     // 1st 8x8 Y sampling                                                      
  25.     mov (1) rAVS_8x8_HDR.2:ud       nAVS_GREEN_CHANNEL_ONLY:ud   // Enable green channel
  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 sampling ; Only 8x4 will be used
  31.     mov (1)  rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Enable red channel
  32.     mul (1)  rAVS_PAYLOAD.1:f       fVIDEO_STEP_X:f    2.0:f    // Calculate Step X for chroma
  33.     mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  34.     send (1) uwAVS_RESPONSE(4)<1>   mAVS_8x8_HDR_UV   udDUMMY_NULL      nSMPL_ENGINE        nAVS_MSG_DSC_1CH+nSI_SRC_U+nBI_CURRENT_SRC_U
  35.     // Return U in 4 GRFs
  36.  
  37.     // 8x8 V sampling ; Only 8x4 will be used
  38.     mov (1)  rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Dummy instruction just in order to avoid back-2-back send instructions!
  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(8)<1>   mAVS_8x8_HDR_UV   udDUMMY_NULL      nSMPL_ENGINE        nAVS_MSG_DSC_1CH+nSI_SRC_V+nBI_CURRENT_SRC_V
  41.     // Return V in 4 GRFs
  42.  
  43.    // 2nd 8x8 setup
  44.     #include "AVS_SetupSecondBlock.asm"
  45.  
  46.     // 2nd 8x8 Y sampling
  47.     mov (1)  rAVS_8x8_HDR.2:ud      nAVS_GREEN_CHANNEL_ONLY:ud   // Enable green channel
  48.     mov (1)  rAVS_PAYLOAD.1:f       fVIDEO_STEP_X:f             // Restore Step X for luma
  49.     mov (16) mAVS_8x8_HDR.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  50.     send (1) uwAVS_RESPONSE(12)<1>  mAVS_8x8_HDR   udDUMMY_NULL      nSMPL_ENGINE        nAVS_MSG_DSC_1CH+nSI_SRC_Y+nBI_CURRENT_SRC_Y
  51.     // Return Y in 4 GRFs
  52.  
  53. //------------------------------------------------------------------------------
  54. // Unpacking sampler reads to 4:2:0 internal planar
  55. //------------------------------------------------------------------------------
  56.     #include "PL3_AVS_IEF_Unpack_8x4.asm"
  57.    
  58.  
  59.                    
  60.  
  61.