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_16x8.asm ----------
  12.  
  13. #include "AVS_IEF.inc"
  14.  
  15. //------------------------------------------------------------------------------
  16. // 2 sampler reads for 8x8 Y surface
  17. // 2 sampler read  for 8x8 U surface
  18. // 2 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.     // 1st 8x8 U sampling
  31.     mov  (1) rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Enable red channel
  32.     mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs    
  33.     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
  34.     // Return U in 4 GRFs
  35.  
  36.     // 1st 8x8 V sampling
  37.     mov  (1) rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Dummy instruction to avoid back-2-back send instructions
  38.     mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  39.     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
  40.     // Return V in 4 GRFs
  41.  
  42.     // 2nd 8x8 setup
  43.     #include "AVS_SetupSecondBlock.asm"
  44.  
  45.     // 2nd 8x8 Y sampling
  46.     mov  (1) rAVS_8x8_HDR.2:ud      nAVS_GREEN_CHANNEL_ONLY:ud   // Enable green channel
  47.     mov (16) mAVS_8x8_HDR.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  48.     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
  49.     // Return Y in 4 GRFs
  50.  
  51.     // 2nd 8x8 U sampling
  52.     mov  (1) rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Enable red channel
  53.     mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  54.     send (1) uwAVS_RESPONSE_2(4)<1>     mAVS_8x8_HDR_UV   udDUMMY_NULL      nSMPL_ENGINE        nAVS_MSG_DSC_1CH+nSI_SRC_U+nBI_CURRENT_SRC_U
  55.     // Return U in 4 GRFs
  56.        
  57.     mov (1) rAVS_8x8_HDR.2:ud      nAVS_RED_CHANNEL_ONLY:ud     // Dummy instruction just in order to avoid back-2-back send instructions!
  58.  
  59.     // 2nd 8x8 V sampling
  60.     mov (16) mAVS_8x8_HDR_UV.0:ud      rAVS_8x8_HDR.0<8;8,1>:ud    // Copy msg header and payload mirrors to MRFs
  61.     send (1) uwAVS_RESPONSE_2(8)<1>     mAVS_8x8_HDR_UV   udDUMMY_NULL      nSMPL_ENGINE        nAVS_MSG_DSC_1CH+nSI_SRC_V+nBI_CURRENT_SRC_V
  62.     // Return V in 4 GRFs
  63.  
  64. //------------------------------------------------------------------------------
  65. // Unpacking sampler reads to 4:4:4 internal planar
  66. //------------------------------------------------------------------------------
  67.     #include "PL3_AVS_IEF_Unpack_16x8.asm"
  68.    
  69.  
  70.