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.  * Permission is hereby granted, free of charge, to any person obtaining a
  6.  * copy of this software and associated documentation files (the
  7.  * "Software"), to deal in the Software without restriction, including
  8.  * without limitation the rights to use, copy, modify, merge, publish,
  9.  * distribute, sub license, and/or sell copies of the Software, and to
  10.  * permit persons to whom the Software is furnished to do so, subject to
  11.  * the following conditions:
  12.  *
  13.  * The above copyright notice and this permission notice (including the
  14.  * next paragraph) shall be included in all copies or substantial portions
  15.  * of the Software.
  16.  *
  17.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  20.  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
  21.  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  22.  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  23.  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24.  *
  25.  * This file was originally licensed under the following license
  26.  *
  27.  *  Licensed under the Apache License, Version 2.0 (the "License");
  28.  *  you may not use this file except in compliance with the License.
  29.  *  You may obtain a copy of the License at
  30.  *
  31.  *      http://www.apache.org/licenses/LICENSE-2.0
  32.  *
  33.  *  Unless required by applicable law or agreed to in writing, software
  34.  *  distributed under the License is distributed on an "AS IS" BASIS,
  35.  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  36.  *  See the License for the specific language governing permissions and
  37.  *  limitations under the License.
  38.  *
  39.  */
  40.  
  41. // Module name: AVS_IEF.inc
  42.  
  43. #ifndef _AVS_INF_INC_
  44. #define _AVS_INF_INC_
  45.  
  46. #include "undefall.inc"             //Undefine the SRC and DEST sysmbols
  47.  
  48.         // Message Header
  49.         // m0.7         31:0    Debug
  50.         // m0.6         31:0    Debug
  51.         // m0.5         31:0    Ignored
  52.         // m0.4         31:0    Ignored
  53.         // m0.3         31:0    Ignored
  54.         // m0.2         31:16   Ignored
  55.         //              15      Alpha Write Channel Mask        enable=0, disable=1
  56.         //              14      Blue Write Channel Mask  (V)    
  57.         //              13      Green Write Channel Mask (Y)
  58.         //              12      Red Write Channel Mask   (U)
  59.         //              11:0    Ignored
  60.         // m0.1                 Ignored
  61.         // m0.0                 Ignored
  62.  
  63. #define mAVS_8x8_HDR   m0               // Message Header
  64. #define mAVS_PAYLOAD   m1               // Message Payload Header
  65.  
  66. #define mAVS_8x8_HDR_2   m2               // Message Header
  67. #define mAVS_PAYLOAD_2   m3               // Message Payload Header
  68.  
  69. #define mAVS_8x8_HDR_UV   m2               // Message Header
  70. #define mAVS_PAYLOAD_UV   m3               // Message Payload Header
  71.  
  72. #define rAVS_8x8_HDR   rMSGSRC          // Mirror of Message Header
  73. #define rAVS_PAYLOAD   r9               // Mirror of Message Payload Header
  74.        
  75.         // AVS payload
  76.         // m1.7                 Ignored
  77.         // m1.6                 Pixel 0 V Address       ---> ORIY (Y0)
  78.         // m1.5                 Delta V                 ---> Step Y
  79.         // m1.4                 Ignored
  80.         // m1.3                 Ignored
  81.         // m1.2                 Pixel 0 U Address       ---> ORIX (X0)
  82.         // m1.1                 U 2nd Derivative        ---> NLAS dx
  83.         // m1.0                 Delta U                 ---> Step X
  84.  
  85.         // Sampler Message Descriptor
  86.         // 31:29        Reserved                        000
  87.         // 28:25        Message length                  0010
  88.         // 24:20        Response length                 xxxxx   ---> 4GRFs for each enabled channel
  89.         // 19           Header Present                  1
  90.         // 18           MBZ                             0
  91.         // 17:16        SIMD Mode                       11      ---> SIMD64
  92.         // 15:12        Message Type                    0011    ---> sample_8x8
  93.         // 11:8         Sampler Index                   xxxx
  94.         // 7:0          Binding Table Index             xxxxxxxx
  95. #define nAVS_MSG_DSC_1CH        0x044BB000  
  96. #define nAVS_MSG_DSC_2CH        0x048BB000
  97. #define nAVS_MSG_DSC_3CH        0x04CBB000      
  98. #define nAVS_MSG_DSC_4CH        0x050BB000
  99.  
  100. #define nAVS_RED_CHANNEL_ONLY   0x0000E000      // Enable Red channel only
  101. #define nAVS_GREEN_CHANNEL_ONLY 0x0000D000      // Enable Green channel only
  102. #define nAVS_RED_BLUE_CHANNELS  0x0000A000      // Enable Red and Blue channels
  103. #define nAVS_RGB_CHANNELS       0x00008000      // Enable RGB(YUV) channels
  104. #define nAVS_ALL_CHANNELS       0x00000000      // Enable all channels (ARGB\AYUV)
  105.  
  106.        
  107.  
  108. .declare     ubAVS_RESPONSE  Base=REG(r,nTEMP8) ElementSize=1  SrcRegion=REGION(16,1) Type=ub
  109. .declare     uwAVS_RESPONSE  Base=REG(r,nTEMP8) ElementSize=2  SrcRegion=REGION(16,1) Type=uw
  110.  
  111. .declare     ubAVS_RESPONSE_2  Base=REG(r,nTEMP24) ElementSize=1  SrcRegion=REGION(16,1) Type=ub
  112. .declare     uwAVS_RESPONSE_2  Base=REG(r,nTEMP24) ElementSize=2  SrcRegion=REGION(16,1) Type=uw
  113.  
  114.  
  115. #if (nSRC_REGION==nREGION_2)
  116.     #define uwDEST_Y        uwBOT_Y
  117.     #define uwDEST_U        uwBOT_U
  118.     #define uwDEST_V        uwBOT_V
  119.  
  120.     #define ubDEST_Y        ubBOT_Y
  121.    
  122.     #undef  nSRC_REGION
  123.     #define nSRC_REGION nREGION_2
  124.  
  125. #else //(nSRC_REGION==nREGION_1)
  126.     #define uwDEST_Y        uwTOP_Y
  127.     #define uwDEST_U        uwTOP_U
  128.     #define uwDEST_V        uwTOP_V
  129.  
  130.     #define ubDEST_Y        ubTOP_Y
  131.    
  132.     #undef  nSRC_REGION
  133.     #define nSRC_REGION     nREGION_1
  134.  
  135. #endif
  136.  
  137.  
  138. #endif //_AVS_INF_INC_
  139.