Home | History | Annotate | Download | only in common
      1 /******************************************************************************
      2 *
      3 * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
      4 *
      5 * Licensed under the Apache License, Version 2.0 (the "License");
      6 * you may not use this file except in compliance with the License.
      7 * You may obtain a copy of the License at:
      8 *
      9 * http://www.apache.org/licenses/LICENSE-2.0
     10 *
     11 * Unless required by applicable law or agreed to in writing, software
     12 * distributed under the License is distributed on an "AS IS" BASIS,
     13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14 * See the License for the specific language governing permissions and
     15 * limitations under the License.
     16 *
     17 ******************************************************************************/
     18 /**
     19 *******************************************************************************
     20 * @file
     21 *  ihevc_trans_tables.c
     22 *
     23 * @brief
     24 *  Contains tables used for forward and inverse  transform
     25 *
     26 * @author
     27 *  100470
     28 *
     29 * @par List of Tables:
     30 * g_ihevc_iquant_scales
     31 * g_ihevc_iquant_intr_scales
     32 * g_ihevc_quant_scales
     33 * g_ai4_ihevc_trans_4_ttype1
     34 * g_ai4_ihevc_trans_4_ttype0
     35 * g_ai2_ihevc_trans_dst_4
     36 * g_ai4_ihevc_trans_dst_intr_4
     37 * g_ai2_ihevc_trans_4
     38 * g_ai2_ihevc_trans_4_transpose
     39 * g_ai4_ihevc_trans_4_intr
     40 * g_ai2_ihevc_trans_4_intr
     41 * g_ai2_ihevc_trans_8
     42 * g_ai2_ihevc_trans_8_transpose
     43 * g_ai4_ihevc_trans_8_intr
     44 * g_ai2_ihevc_trans_8_intr
     45 * g_ai4_ihevc_trans_intr_even_8
     46 * g_ai4_ihevc_trans_intr_odd_8
     47 * g_ai2_ihevc_trans_16
     48 * g_ai2_ihevc_trans_16_transpose
     49 * g_ai2_ihevc_trans_32_intr_8
     50 * g_ai4_ihevc_trans_16_even
     51 * g_ai4_ihevc_trans_16_odd
     52 * g_ai2_ihevc_trans_32_transpose
     53 * g_ai2_ihevc_trans_32
     54 * g_ai2_ihevc_trans_32_intr_16
     55 * g_ai2_ihevc_trans_16_intr_odd
     56 * g_ai2_ihevc_trans_16_intr_even
     57 * g_ai2_ihevc_trans_32_intr_even
     58 * g_ai2_ihevc_trans_32_intr_odd
     59 * g_ai2_ihevc_trans_16_even_packed
     60 * g_ai2_ihevc_trans_32_intr_packed
     61 * g_ai2_ihevc_trans_32_intr_odd_packed
     62 * g_ai2_ihevc_trans_16_even
     63 * g_ai2_ihevc_trans_16_odd
     64 * g_ai2_ihevc_trans_intr_even_8
     65 * g_ai2_ihevc_trans_intr_odd_8
     66 * g_ai2_ihevc_trans_intr_4
     67 * IHEVCE_CHROMA_SHUFFLEMASK_HBD
     68 * g_ai4_ihevc_trans_8_intr_avx2
     69 * g_ai2_ihevc_trans_8_intr_avx2
     70 * g_ai2_ihevc_trans_32_intr_8_avx2
     71 * g_ai2_ihevc_trans_32_intr_16_avx2
     72 * g_ai2_ihevc_trans_16_intr_odd_avx2
     73 * g_ai2_ihevc_trans_16_intr_even_avx2
     74 
     75 *
     76 * @remarks
     77 *  None
     78 *
     79 *******************************************************************************
     80 */
     81 
     82 #include "ihevc_typedefs.h"
     83 #include "ihevc_macros.h"
     84 
     85 #include "ihevc_platform_macros.h"
     86 #include "ihevc_func_selector.h"
     87 #include "ihevc_macros.h"
     88 #include "ihevc_trans_tables.h"
     89 #include "ihevc_defs.h"
     90 
     91 const WORD32 g_ihevc_iquant_scales[6] =
     92 {
     93     40, 45, 51, 57, 64, 72
     94 };
     95 
     96 const WORD16 g_ihevc_iquant_intr_scales[6][8] =
     97 {
     98     { 40, 40, 40, 40, 40, 40, 40, 40 },
     99     { 45, 45, 45, 45, 45, 45, 45, 45 },
    100     { 51, 51, 51, 51, 51, 51, 51, 51 },
    101     { 57, 57, 57, 57, 57, 57, 57, 57 },
    102     { 64, 64, 64, 64, 64, 64, 64, 64 },
    103     { 72, 72, 72, 72, 72, 72, 72, 72 }
    104 };
    105 
    106 const WORD32 g_ihevc_quant_scales[6] =
    107 {
    108     26214, 23302, 20560, 18396, 16384, 14564
    109 };
    110 
    111 //DST coeffs
    112 const WORD32 g_ai4_ihevc_trans_4_ttype1[3][4] =
    113 {
    114     { 55, 55, 55, 55 },
    115     { 29, 29, 29, 29 },
    116     { 74, 74, 74, 74 }
    117 };
    118 
    119 //DCT coeffs
    120 const WORD32 g_ai4_ihevc_trans_4_ttype0[3][4] =
    121 {
    122     { 36, 36, 36, 36 },
    123     { 64, 64, 64, 64 },
    124     { 83, 83, 83, 83 }
    125 };
    126 
    127 const WORD16 g_ai2_ihevc_trans_dst_4[4][4] =
    128 {
    129     { 29, 55, 74, 84 },
    130     { 74, 74, 0, -74 },
    131     { 84, -29, -74, 55 },
    132     { 55, -84, 74, -29 }
    133 };
    134 
    135 const WORD32 g_ai4_ihevc_trans_dst_intr_4[3][4] =
    136 { /* 4*32 = 128 bit */
    137     { 29, 29, 29, 29 },
    138     { 55, 55, 55, 55 },
    139     { 74, 74, 74, 74 }
    140 };
    141 
    142 const WORD16 g_ai2_ihevc_trans_4[4][4] =
    143 {
    144     { 64,  64,  64,  64 },
    145     { 83,  36, -36, -83 },
    146     { 64, -64, -64,  64 },
    147     { 36, -83,  83, -36 }
    148 };
    149 
    150 const WORD16 g_ai2_ihevc_trans_4_transpose[4][4] =
    151 {
    152     { 64,  83,  64,  36 },
    153     { 64,  36, -64, -83 },
    154     { 64, -36, -64,  83 },
    155     { 64, -83,  64, -36 }
    156 };
    157 
    158 const WORD32 g_ai4_ihevc_trans_4_intr[3][4] =
    159 { /* 4*32 = 128 bit */
    160     { 64, 64, 64, 64 },
    161     { 83, 83, 83, 83 },
    162     { 36, 36, 36, 36 }
    163 };
    164 
    165 const WORD16 g_ai2_ihevc_trans_4_intr[8] = { 64, 64, 83, 36, 64, -64, 36, -83 };
    166 
    167 
    168 const WORD16 g_ai2_ihevc_trans_8[8][8] =
    169 {
    170     { 64,  64,  64,  64,  64,  64,  64,  64 },
    171     { 89,  75,  50,  18, -18, -50, -75, -89 },
    172     { 83,  36, -36, -83, -83, -36,  36,  83 },
    173     { 75, -18, -89, -50,  50,  89,  18, -75 },
    174     { 64, -64, -64,  64,  64, -64, -64,  64 },
    175     { 50, -89,  18,  75, -75, -18,  89, -50 },
    176     { 36, -83,  83, -36, -36,  83, -83,  36 },
    177     { 18, -50,  75, -89,  89, -75,  50, -18 }
    178 };
    179 
    180 /* Used by itrans_recon_8x8 */
    181 const WORD16 g_ai2_ihevc_trans_8_transpose[8][8] =
    182 {
    183     { 64,  89,  83,  75,  64,  50,  36,  18 },
    184     { 64,  75,  36, -18, -64, -89, -83, -50 },
    185     { 64,  50, -36, -89, -64,  18,  83,  75 },
    186     { 64,  18, -83, -50,  64,  75, -36, -89 },
    187     { 64, -18, -83,  50,  64, -75, -36,  89 },
    188     { 64, -50, -36,  89, -64, -18,  83, -75 },
    189     { 64, -75,  36,  18, -64,  89, -83,  50 },
    190     { 64, -89,  83, -75,  64, -50,  36, -18 }
    191 };
    192 
    193 const WORD32 g_ai4_ihevc_trans_8_intr[7][4] =
    194 { /* 4*32 = 128 bit */
    195     { 64, 64, 64, 64 },
    196     { 83, 83, 83, 83 },
    197     { 36, 36, 36, 36 },
    198     { 75, 75, 75, 75 },
    199     { 18, 18, 18, 18 },
    200     { 89, 89, 89, 89 },
    201     { 50, 50, 50, 50 },
    202 };
    203 
    204 
    205 const WORD16 g_ai2_ihevc_trans_8_intr[8][8] =
    206 { /* 4*32 = 128 bit */
    207     { 64,  64,  64,  64,  64,  64,  64,  64 },
    208     { 89,  75,  18,  50,  89,  75,  18,  50 },
    209     { 83,  36,  83,  36,  83,  36,  83,  36 },
    210     { 75, -18, -50, -89,  75, -18, -50, -89 },
    211     { 64, -64,  64, -64,  64, -64,  64, -64 },
    212     { 50, -89,  75,  18,  50, -89,  75,  18 },
    213     { 36, -83,  36, -83,  36, -83,  36, -83 },
    214     { 18, -50, -89,  75,  18, -50, -89,  75 }
    215 };
    216 
    217 
    218 const WORD32 g_ai4_ihevc_trans_intr_even_8[3][4] =
    219 {
    220     { 64, 64, 64, 64 },
    221     { 83, 83, 83, 83 },
    222     { 36, 36, 36, 36 },
    223 };
    224 
    225 const WORD32 g_ai4_ihevc_trans_intr_odd_8[4][4] =
    226 {
    227     { 89, 89, 89, 89 },
    228     { 75, 75, 75, 75 },
    229     { 50, 50, 50, 50 },
    230     { 18, 18, 18, 18 }
    231 };
    232 
    233 const WORD16 g_ai2_ihevc_trans_16[16][16] =
    234 {
    235     { 64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64 },
    236     { 90,  87,  80,  70,  57,  43,  25,   9,  -9, -25, -43, -57, -70, -80, -87, -90 },
    237     { 89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89 },
    238     { 87,  57,   9, -43, -80, -90, -70, -25,  25,  70,  90,  80,  43,  -9, -57, -87 },
    239     { 83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83 },
    240     { 80,   9, -70, -87, -25,  57,  90,  43, -43, -90, -57,  25,  87,  70,  -9, -80 },
    241     { 75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75 },
    242     { 70, -43, -87,   9,  90,  25, -80, -57,  57,  80, -25, -90,  -9,  87,  43, -70 },
    243     { 64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64 },
    244     { 57, -80, -25,  90,  -9, -87,  43,  70, -70, -43,  87,   9, -90,  25,  80, -57 },
    245     { 50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50 },
    246     { 43, -90,  57,  25, -87,  70,   9, -80,  80,  -9, -70,  87, -25, -57,  90, -43 },
    247     { 36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36 },
    248     { 25, -70,  90, -80,  43,   9, -57,  87, -87,  57,  -9, -43,  80, -90,  70, -25 },
    249     { 18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18 },
    250     {  9, -25,  43, -57,  70, -80,  87, -90,  90, -87,  80, -70,  57, -43,  25,  -9 }
    251 };
    252 
    253 const WORD16 g_ai2_ihevc_trans_16_transpose[1][16] =
    254 {
    255     { 64, 90, 89, 87, 83, 80, 75, 70, 64, 57, 50, 43, 36, 25, 18, 9 }
    256 };
    257 
    258 const WORD32 g_ai2_ihevc_trans_32_intr_8[8][4] =
    259 { /* 4*32 = 128 bit */
    260     { 90, 90, 90, 90 },
    261     { 87, 87, 87, 87 },
    262     { 80, 80, 80, 80 },
    263     { 70, 70, 70, 70 },
    264     { 57, 57, 57, 57 },
    265     { 43, 43, 43, 43 },
    266     { 25, 25, 25, 25 },
    267     {  9,  9,  9,  9 }
    268 };
    269 
    270 const WORD32 g_ai4_ihevc_trans_16_even[7][4] =
    271 {
    272     { 64, 64, 64, 64 },
    273     { 89, 89, 89, 89 },
    274     { 75, 75, 75, 75 },
    275     { 83, 83, 83, 83 },
    276     { 36, 36, 36, 36 },
    277     { 18, 18, 18, 18 },
    278     { 50, 50, 50, 50 },
    279 };
    280 
    281 const WORD32 g_ai4_ihevc_trans_16_odd[8][4] =
    282 {
    283     { 90, 90, 90, 90 },
    284     { 87, 87, 87, 87 },
    285     { 80, 80, 80, 80 },
    286     { 70, 70, 70, 70 },
    287     { 57, 57, 57, 57 },
    288     { 43, 43, 43, 43 },
    289     { 25, 25, 25, 25 },
    290     { 9,  9,  9,  9  }
    291 };
    292 
    293 const WORD16 g_ai2_ihevc_trans_32_transpose[1][32] =
    294 {
    295     { 64, 90, 90, 90, 89, 88, 87, 85, 83, 82, 80, 78, 75, 73, 70, 67, 64, 61, 57, 54, 50, 46, 43, 38, 36, 31, 25, 22, 18, 13, 9, 4 }
    296 };
    297 const WORD16 g_ai2_ihevc_trans_32[32][32] =
    298 {
    299     { 64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64 },
    300     { 90,  90,  88,  85,  82,  78,  73,  67,  61,  54,  46,  38,  31,  22,  13,   4,  -4, -13, -22, -31, -38, -46, -54, -61, -67, -73, -78, -82, -85, -88, -90, -90 },
    301     { 90,  87,  80,  70,  57,  43,  25,   9,  -9, -25, -43, -57, -70, -80, -87, -90, -90, -87, -80, -70, -57, -43, -25,  -9,   9,  25,  43,  57,  70,  80,  87,  90 },
    302     { 90,  82,  67,  46,  22,  -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13,  13,  38,  61,  78,  88,  90,  85,  73,  54,  31,   4, -22, -46, -67, -82, -90 },
    303     { 89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89,  89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89 },
    304     { 88,  67,  31, -13, -54, -82, -90, -78, -46,  -4,  38,  73,  90,  85,  61,  22, -22, -61, -85, -90, -73, -38,   4,  46,  78,  90,  82,  54,  13, -31, -67, -88 },
    305     { 87,  57,   9, -43, -80, -90, -70, -25,  25,  70,  90,  80,  43,  -9, -57, -87, -87, -57,  -9,  43,  80,  90,  70,  25, -25, -70, -90, -80, -43,   9,  57,  87 },
    306     { 85,  46, -13, -67, -90, -73, -22,  38,  82,  88,  54,  -4, -61, -90, -78, -31,  31,  78,  90,  61,   4, -54, -88, -82, -38,  22,  73,  90,  67,  13, -46, -85 },
    307     { 83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83 },
    308     { 82,  22, -54, -90, -61,  13,  78,  85,  31, -46, -90, -67,   4,  73,  88,  38, -38, -88, -73,  -4,  67,  90,  46, -31, -85, -78, -13,  61,  90,  54, -22, -82 },
    309     { 80,   9, -70, -87, -25,  57,  90,  43, -43, -90, -57,  25,  87,  70,  -9, -80, -80,  -9,  70,  87,  25, -57, -90, -43,  43,  90,  57, -25, -87, -70,   9,  80 },
    310     { 78,  -4, -82, -73,  13,  85,  67, -22, -88, -61,  31,  90,  54, -38, -90, -46,  46,  90,  38, -54, -90, -31,  61,  88,  22, -67, -85, -13,  73,  82,   4, -78 },
    311     { 75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75,  75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75 },
    312     { 73, -31, -90, -22,  78,  67, -38, -90, -13,  82,  61, -46, -88,  -4,  85,  54, -54, -85,   4,  88,  46, -61, -82,  13,  90,  38, -67, -78,  22,  90,  31, -73 },
    313     { 70, -43, -87,   9,  90,  25, -80, -57,  57,  80, -25, -90,  -9,  87,  43, -70, -70,  43,  87,  -9, -90, -25,  80,  57, -57, -80,  25,  90,   9, -87, -43,  70 },
    314     { 67, -54, -78,  38,  85, -22, -90,   4,  90,  13, -88, -31,  82,  46, -73, -61,  61,  73, -46, -82,  31,  88, -13, -90,  -4,  90,  22, -85, -38,  78,  54, -67 },
    315     { 64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64 },
    316     { 61, -73, -46,  82,  31, -88, -13,  90,  -4, -90,  22,  85, -38, -78,  54,  67, -67, -54,  78,  38, -85, -22,  90,   4, -90,  13,  88, -31, -82,  46,  73, -61 },
    317     { 57, -80, -25,  90,  -9, -87,  43,  70, -70, -43,  87,   9, -90,  25,  80, -57, -57,  80,  25, -90,   9,  87, -43, -70,  70,  43, -87,  -9,  90, -25, -80,  57 },
    318     { 54, -85,  -4,  88, -46, -61,  82,  13, -90,  38,  67, -78, -22,  90, -31, -73,  73,  31, -90,  22,  78, -67, -38,  90, -13, -82,  61,  46, -88,   4,  85, -54 },
    319     { 50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50,  50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50 },
    320     { 46, -90,  38,  54, -90,  31,  61, -88,  22,  67, -85,  13,  73, -82,   4,  78, -78,  -4,  82, -73, -13,  85, -67, -22,  88, -61, -31,  90, -54, -38,  90, -46 },
    321     { 43, -90,  57,  25, -87,  70,   9, -80,  80,  -9, -70,  87, -25, -57,  90, -43, -43,  90, -57, -25,  87, -70,  -9,  80, -80,   9,  70, -87,  25,  57, -90,  43 },
    322     { 38, -88,  73,  -4, -67,  90, -46, -31,  85, -78,  13,  61, -90,  54,  22, -82,  82, -22, -54,  90, -61, -13,  78, -85,  31,  46, -90,  67,   4, -73,  88, -38 },
    323     { 36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36 },
    324     { 31, -78,  90, -61,   4,  54, -88,  82, -38, -22,  73, -90,  67, -13, -46,  85, -85,  46,  13, -67,  90, -73,  22,  38, -82,  88, -54,  -4,  61, -90,  78, -31 },
    325     { 25, -70,  90, -80,  43,   9, -57,  87, -87,  57,  -9, -43,  80, -90,  70, -25, -25,  70, -90,  80, -43,  -9,  57, -87,  87, -57,   9,  43, -80,  90, -70,  25 },
    326     { 22, -61,  85, -90,  73, -38,  -4,  46, -78,  90, -82,  54, -13, -31,  67, -88,  88, -67,  31,  13, -54,  82, -90,  78, -46,   4,  38, -73,  90, -85,  61, -22 },
    327     { 18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18,  18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18 },
    328     { 13, -38,  61, -78,  88, -90,  85, -73,  54, -31,   4,  22, -46,  67, -82,  90, -90,  82, -67,  46, -22,  -4,  31, -54,  73, -85,  90, -88,  78, -61,  38, -13 },
    329     {  9, -25,  43, -57,  70, -80,  87, -90,  90, -87,  80, -70,  57, -43,  25,  -9,  -9,  25, -43,  57, -70,  80, -87,  90, -90,  87, -80,  70, -57,  43, -25,   9 },
    330     {  4, -13,  22, -31,  38, -46,  54, -61,  67, -73,  78, -82,  85, -88,  90, -90,  90, -90,  88, -85,  82, -78,  73, -67,  61, -54,  46, -38,  31, -22,  13,  -4 }
    331 };
    332 
    333 
    334 
    335 const WORD32 g_ai2_ihevc_trans_32_intr_16[15][4] =
    336 { /* 4*32 = 128 bit */
    337     { 90, 90, 90, 90 },
    338     { 88, 88, 88, 88 },
    339     { 85, 85, 85, 85 },
    340     { 82, 82, 82, 82 },
    341     { 78, 78, 78, 78 },
    342     { 73, 73, 73, 73 },
    343     { 67, 67, 67, 67 },
    344     { 61, 61, 61, 61 },
    345     { 54, 54, 54, 54 },
    346     { 46, 46, 46, 46 },
    347     { 38, 38, 38, 38 },
    348     { 31, 31, 31, 31 },
    349     { 22, 22, 22, 22 },
    350     { 13, 13, 13, 13 },
    351     { 4,  4,  4,  4  }
    352 };
    353 
    354 const WORD16 g_ai2_ihevc_trans_16_intr_odd[32][8] =
    355 {
    356     {  90,  87,  90,  87,  90,  87,  90,  87 },
    357     {  70,  80,  70,  80,  70,  80,  70,  80 },
    358     {  57,  43,  57,  43,  57,  43,  57,  43 },
    359     {   9,  25,   9,  25,   9,  25,   9,  25 },
    360     {  87,  57,  87,  57,  87,  57,  87,  57 },
    361     { -43,   9, -43,   9, -43,   9, -43,   9 },
    362     { -80, -90, -80, -90, -80, -90, -80, -90 },
    363     { -25, -70, -25, -70, -25, -70, -25, -70 },
    364     {  80,   9,  80,   9,  80,   9,  80,   9 },
    365     { -87, -70, -87, -70, -87, -70, -87, -70 },
    366     { -25,  57, -25,  57, -25,  57, -25,  57 },
    367     {  43,  90,  43,  90,  43,  90,  43,  90 },
    368     {  70, -43,  70, -43,  70, -43,  70, -43 },
    369     {   9, -87,   9, -87,   9, -87,   9, -87 },
    370     {  90,  25,  90,  25,  90,  25,  90,  25 },
    371     { -57, -80, -57, -80, -57, -80, -57, -80 },
    372     {  57, -80,  57, -80,  57, -80,  57, -80 },
    373     {  90, -25,  90, -25,  90, -25,  90, -25 },
    374     {  -9, -87,  -9, -87,  -9, -87,  -9, -87 },
    375     {  70,  43,  70,  43,  70,  43,  70,  43 },
    376     {  43, -90,  43, -90,  43, -90,  43, -90 },
    377     {  25,  57,  25,  57,  25,  57,  25,  57 },
    378     { -87,  70, -87,  70, -87,  70, -87,  70 },
    379     { -80,   9, -80,   9, -80,   9, -80,   9 },
    380     {  25, -70,  25, -70,  25, -70,  25, -70 },
    381     { -80,  90, -80,  90, -80,  90, -80,  90 },
    382     {  43,   9,  43,   9,  43,   9,  43,   9 },
    383     {  87, -57,  87, -57,  87, -57,  87, -57 },
    384     {   9, -25,   9, -25,   9, -25,   9, -25 },
    385     { -57,  43, -57,  43, -57,  43, -57,  43 },
    386     {  70, -80,  70, -80,  70, -80,  70, -80 },
    387     { -90,  87, -90,  87, -90,  87, -90,  87 }
    388 };
    389 
    390 const WORD16 g_ai2_ihevc_trans_16_intr_even[12][8] =
    391 {
    392     {  64,  64,  64,  64,  64,  64,  64,  64 },
    393     {  89,  75,  89,  75,  89,  75,  89,  75 },
    394     {  18,  50,  18,  50,  18,  50,  18,  50 },
    395     {  83,  36,  83,  36,  83,  36,  83,  36 },
    396     {  75, -18,  75, -18,  75, -18,  75, -18 },
    397     { -50, -89, -50, -89, -50, -89, -50, -89 },
    398     {  64, -64,  64, -64,  64, -64,  64, -64 },
    399     {  50, -89,  50, -89,  50, -89,  50, -89 },
    400     {  75,  18,  75,  18,  75,  18,  75,  18 },
    401     {  36, -83,  36, -83,  36, -83,  36, -83 },
    402     {  18, -50,  18, -50,  18, -50,  18, -50 },
    403     { -89,  75, -89,  75, -89,  75, -89,  75 }
    404 };
    405 
    406 
    407 const WORD16 g_ai2_ihevc_trans_32_intr_even[22][8] =
    408 {
    409     {  64,  64,  64,  64,  83,  36,  83,  36 },
    410     {  64, -64,  64, -64,  36, -83,  36, -83 },
    411     {  89,  18,  89,  18,  75,  50,  75,  50 },
    412     {  75, -50,  75, -50, -18, -89, -18, -89 },
    413     {  50,  75,  50,  75, -89,  18, -89,  18 },
    414     {  18, -89,  18, -89, -50,  75, -50,  75 },
    415 
    416     {  90,  70,  90,  70,  87,  80,  87,  80 },
    417     {   9,  57,   9,  57,  25,  43,  25,  43 },
    418     {  87, -43,  87, -43,  57,   9,  57,   9 },
    419     { -25, -80, -25, -80, -70, -90, -70, -90 },
    420     {  80, -87,  80, -87,   9, -70,   9, -70 },
    421     {  43, -25,  43, -25,  90,  57,  90,  57 },
    422     {  70,   9,  70,   9, -43, -87, -43, -87 },
    423     { -57,  90, -57,  90, -80,  25, -80,  25 },
    424     {  57,  90,  57,  90, -80, -25, -80, -25 },
    425     {  70,  -9,  70,  -9,  43, -87,  43, -87 },
    426     {  43,  25,  43,  25, -90,  57, -90,  57 },
    427     { -80, -87, -80, -87,   9,  70,   9,  70 },
    428     {  25, -80,  25, -80, -70,  90, -70,  90 },
    429     {  87,  43,  87,  43, -57,   9, -57,   9 },
    430     {   9, -57,   9, -57, -25,  43, -25,  43 },
    431     { -90,  70, -90,  70,  87, -80,  87, -80 }
    432 };
    433 
    434 
    435 const WORD16 g_ai2_ihevc_trans_32_intr_odd[32][16] =
    436 {
    437     {  90,  85,  90,  85,  90,  88,  90,  88,  61,  82,  61,  82, -73, -46, -73, -46 },
    438     {  67,  82,  67,  82,  73,  78,  73,  78,  90,  31,  90,  31, -13, -88, -13, -88 },
    439     {  61,  38,  61,  38,  54,  46,  54,  46,  -4,  85,  -4,  85, -90,  22, -90,  22 },
    440     {   4,  31,   4,  31,  13,  22,  13,  22,  67, -38,  67, -38,  54, -78,  54, -78 },
    441 
    442     {  90,  46,  90,  46,  82,  67,  82,  67,  54,  88,  54,  88, -85,  -4, -85,  -4 },
    443     { -54,  22, -54,  22, -31,  -4, -31,  -4,  13, -46,  13, -46,  82, -61,  82, -61 },
    444     { -73, -88, -73, -88, -85, -90, -85, -90, -90, -78, -90, -78,  38,  67,  38,  67 },
    445     { -13, -78, -13, -78, -38, -61, -38, -61, -73, -22, -73, -22, -31,  90, -31,  90 },
    446 
    447     {  88, -13,  88, -13,  67,  31,  67,  31,  46,  54,  46,  54, -90,  38, -90,  38 },
    448     { -78, -54, -78, -54, -90, -82, -90, -82, -88, -90, -88, -90,  61,  31,  61,  31 },
    449     { -46,  73, -46,  73,  -4,  38,  -4,  38,  22,  13,  22,  13,  67, -85,  67, -85 },
    450     {  22,  90,  22,  90,  61,  85,  61,  85,  78,  73,  78,  73,   4, -82,   4, -82 },
    451 
    452     {  85, -67,  85, -67,  46, -13,  46, -13,  38,  -4,  38,  -4, -88,  73, -88,  73 },
    453     {  38, -90,  38, -90, -22, -73, -22, -73, -31, -67, -31, -67, -46,  90, -46,  90 },
    454     {  82,  -4,  82,  -4,  88,  54,  88,  54,  85,  61,  85,  61, -78,  13, -78,  13 },
    455     { -31, -61, -31, -61, -78, -90, -78, -90, -82, -90, -82, -90,  22,  54,  22,  54 },
    456 
    457     {  82, -90,  82, -90,  22, -54,  22, -54,  31, -61,  31, -61, -78,  90, -78,  90 },
    458     {  85, -61,  85, -61,  78,  13,  78,  13,  82,   4,  82,   4, -88,  54, -88,  54 },
    459     {  31, -67,  31, -67, -46, -90, -46, -90, -38, -90, -38, -90, -22,  73, -22,  73 },
    460     {  38,   4,  38,   4,  88,  73,  88,  73,  85,  67,  85,  67, -46, -13, -46, -13 },
    461 
    462     {  78, -73,  78, -73,  -4, -82,  -4, -82,  22, -90,  22, -90, -61,  85, -61,  85 },
    463     { -22,  13, -22,  13,  67,  85,  67,  85,  46,  73,  46,  73,  -4, -38,  -4, -38 },
    464     { -88,  90, -88,  90, -61,  31, -61,  31, -78,  54, -78,  54,  90, -82,  90, -82 },
    465     { -46,  54, -46,  54, -90, -38, -90, -38, -88, -13, -88, -13,  67, -31,  67, -31 },
    466 
    467     {  73, -22,  73, -22, -31, -90, -31, -90,  13, -78,  13, -78, -38,  61, -38,  61 },
    468     { -90,  78, -90,  78, -38,  67, -38,  67, -73,  88, -73,  88,  85, -90,  85, -90 },
    469     { -13, -46, -13, -46,  82,  61,  82,  61,  54,  22,  54,  22, -31,   4, -31,   4 },
    470     {  54, -88,  54, -88,  85,  -4,  85,  -4,  90, -46,  90, -46, -82,  67, -82,  67 },
    471 
    472     {  67,  38,  67,  38, -54, -78, -54, -78,   4, -31,   4, -31, -13,  22, -13,  22 },
    473     {   4,  85,   4,  85, -90, -22, -90, -22, -61,  38, -61,  38,  54, -46,  54, -46 },
    474     {  90, -31,  90, -31,  13, -88,  13, -88,  67, -82,  67, -82, -73,  78, -73,  78 },
    475     { -61,  82, -61,  82, -73,  46, -73,  46, -90,  85, -90,  85,  90, -88,  90, -88 }
    476 
    477 };
    478 
    479 
    480 /*Tables for itrans_recon functions*/
    481 const WORD16 g_ai2_ihevc_trans_16_even_packed[12][8] =
    482 {
    483     {  83,  36,  83,  36,  83,  36,  83,  36 },
    484 
    485     {  36, -83,  36, -83,  36, -83,  36, -83 },
    486 
    487     {  64,  64,  64,  64,  64,  64,  64,  64 },
    488 
    489     {  64, -64,  64, -64,  64, -64,  64, -64 },
    490 
    491     {  89,  75,  89,  75,  89,  75,  89,  75 },
    492 
    493     {  50,  18,  50,  18,  50,  18,  50,  18 },
    494 
    495     {  75, -18,  75, -18,  75, -18,  75, -18 },
    496 
    497     {  89,  50,  89,  50,  89,  50,  89,  50 },
    498 
    499     {  50, -89,  50, -89,  50, -89,  50, -89 },
    500 
    501     {  18,  75,  18,  75,  18,  75,  18,  75 },
    502 
    503     {  18, -50,  18, -50,  18, -50,  18, -50 },
    504 
    505     {  75, -89,  75, -89,  75, -89,  75, -89 },
    506 
    507 
    508 };
    509 
    510 const WORD16 g_ai2_ihevc_trans_32_intr_packed[32][8] =
    511 {
    512     {  90,  87,  90,  87,  90,  87,  90,  87 },
    513 
    514     {  80,  70,  80,  70,  80,  70,  80,  70 },
    515 
    516     {  57,  43,  57,  43,  57,  43,  57,  43 },
    517 
    518     {  25,   9,  25,   9,  25,   9,  25,   9 },
    519 
    520     {  87,  57,  87,  57,  87,  57,  87,  57 },
    521 
    522     {   9, -43,   9, -43,   9, -43,   9, -43 },
    523 
    524     {  80,  90,  80,  90,  80,  90,  80,  90 },
    525 
    526     {  70,  25,  70,  25,  70,  25,  70,  25 },
    527 
    528     {  80,   9,  80,   9,  80,   9,  80,   9 },
    529 
    530     {  70,  87,  70,  87,  70,  87,  70,  87 },
    531 
    532     { -25,  57, -25,  57, -25,  57, -25,  57 },
    533 
    534     {  90,  43,  90,  43,  90,  43,  90,  43 },
    535 
    536     {  70, -43,  70, -43,  70, -43,  70, -43 },
    537 
    538     { -87,   9, -87,   9, -87,   9, -87,   9 },
    539 
    540     {  90,  25,  90,  25,  90,  25,  90,  25 },
    541 
    542     {  80,  57,  80,  57,  80,  57,  80,  57 },
    543 
    544     {  57, -80,  57, -80,  57, -80,  57, -80 },
    545 
    546     { -25,  90, -25,  90, -25,  90, -25,  90 },
    547 
    548     {   9,  87,   9,  87,   9,  87,   9,  87 },
    549 
    550     {  43,  70,  43,  70,  43,  70,  43,  70 },
    551 
    552     {  43, -90,  43, -90,  43, -90,  43, -90 },
    553 
    554     {  57,  25,  57,  25,  57,  25,  57,  25 },
    555 
    556     { -87,  70, -87,  70, -87,  70, -87,  70 },
    557 
    558     {   9, -80,   9, -80,   9, -80,   9, -80 },
    559 
    560     {  25, -70,  25, -70,  25, -70,  25, -70 },
    561 
    562     {  90, -80,  90, -80,  90, -80,  90, -80 },
    563 
    564     {  43,   9,  43,   9,  43,   9,  43,   9 },
    565 
    566     { -57,  87, -57,  87, -57,  87, -57,  87 },
    567 
    568     {   9, -25,   9, -25,   9, -25,   9, -25 },
    569 
    570     {  43, -57,  43, -57,  43, -57,  43, -57 },
    571 
    572     {  70, -80,  70, -80,  70, -80,  70, -80 },
    573 
    574     {  87, -90,  87, -90,  87, -90,  87, -90 },
    575 
    576 };
    577 
    578 const WORD16 g_ai2_ihevc_trans_32_intr_odd_packed[128][8] =
    579 {
    580     /*o0*/
    581     {  90,  90,  90,  90,  90,  90,  90,  90 },
    582     {  88,  85,  88,  85,  88,  85,  88,  85 },
    583     {  82,  78,  82,  78,  82,  78,  82,  78 },
    584     {  73,  67,  73,  67,  73,  67,  73,  67 },
    585     {  61,  54,  61,  54,  61,  54,  61,  54 },
    586     {  46,  38,  46,  38,  46,  38,  46,  38 },
    587     {  31,  22,  31,  22,  31,  22,  31,  22 },
    588     {  13,   4,  13,   4,  13,   4,  13,   4 },
    589 
    590     /*o1*/
    591 
    592     {  90,  82,  90,  82,  90,  82,  90,  82 },
    593     {  67,  46,  67,  46,  67,  46,  67,  46 },
    594     { -22,   4, -22,   4, -22,   4, -22,   4 },
    595     {  31,  54,  31,  54,  31,  54,  31,  54 },
    596     {  73,  85,  73,  85,  73,  85,  73,  85 },
    597     {  90,  88,  90,  88,  90,  88,  90,  88 },
    598     {  78,  61,  78,  61,  78,  61,  78,  61 },
    599     {  38,  13,  38,  13,  38,  13,  38,  13 },
    600 
    601     /*o2*/
    602     {  88,  67,  88,  67,  88,  67,  88,  67 },
    603     { -31,  13, -31,  13, -31,  13, -31,  13 },
    604     {  54,  82,  54,  82,  54,  82,  54,  82 },
    605     {  90,  78,  90,  78,  90,  78,  90,  78 },
    606     {  46,   4,  46,   4,  46,   4,  46,   4 },
    607     {  38,  73,  38,  73,  38,  73,  38,  73 },
    608     {  90,  85,  90,  85,  90,  85,  90,  85 },
    609     {  61,  22,  61,  22,  61,  22,  61,  22 },
    610 
    611     /*o3*/
    612     {  85,  46,  85,  46,  85,  46,  85,  46 },
    613     {  13,  67,  13,  67,  13,  67,  13,  67 },
    614     {  90,  73,  90,  73,  90,  73,  90,  73 },
    615     {  22, -38,  22, -38,  22, -38,  22, -38 },
    616     {  82,  88,  82,  88,  82,  88,  82,  88 },
    617     { -54,   4, -54,   4, -54,   4, -54,   4 },
    618     {  61,  90,  61,  90,  61,  90,  61,  90 },
    619     {  78,  31,  78,  31,  78,  31,  78,  31 },
    620 
    621     /*o4*/
    622     { -82, -22, -82, -22, -82, -22, -82, -22 },
    623     {  54,  90,  54,  90,  54,  90,  54,  90 },
    624     {  61, -13,  61, -13,  61, -13,  61, -13 },
    625     { -78, -85, -78, -85, -78, -85, -78, -85 },
    626     { -31,  46, -31,  46, -31,  46, -31,  46 },
    627     {  90,  67,  90,  67,  90,  67,  90,  67 },
    628     {  -4, -73,  -4, -73,  -4, -73,  -4, -73 },
    629     { -88, -38, -88, -38, -88, -38, -88, -38 },
    630 
    631     /*o5*/
    632     { -78,   4, -78,   4, -78,   4, -78,   4 },
    633     {  82,  73,  82,  73,  82,  73,  82,  73 },
    634     { -13, -85, -13, -85, -13, -85, -13, -85 },
    635     { -67,  22, -67,  22, -67,  22, -67,  22 },
    636     {  88,  61,  88,  61,  88,  61,  88,  61 },
    637     { -31, -90, -31, -90, -31, -90, -31, -90 },
    638     { -54,  38, -54,  38, -54,  38, -54,  38 },
    639     {  90,  46,  90,  46,  90,  46,  90,  46 },
    640 
    641     /*o6*/
    642     { -73,  31, -73,  31, -73,  31, -73,  31 },
    643     {  90,  22,  90,  22,  90,  22,  90,  22 },
    644     { -78, -67, -78, -67, -78, -67, -78, -67 },
    645     {  38,  90,  38,  90,  38,  90,  38,  90 },
    646     {  13, -82,  13, -82,  13, -82,  13, -82 },
    647     { -61,  46, -61,  46, -61,  46, -61,  46 },
    648     {  88,   4,  88,   4,  88,   4,  88,   4 },
    649     { -85, -54, -85, -54, -85, -54, -85, -54 },
    650 
    651     /*o7*/
    652     { -67,  54, -67,  54, -67,  54, -67,  54 },
    653     {  78, -38,  78, -38,  78, -38,  78, -38 },
    654     { -85,  22, -85,  22, -85,  22, -85,  22 },
    655     {  90,  -4,  90,  -4,  90,  -4,  90,  -4 },
    656     { -90, -13, -90, -13, -90, -13, -90, -13 },
    657     {  88,  31,  88,  31,  88,  31,  88,  31 },
    658     { -82, -46, -82, -46, -82, -46, -82, -46 },
    659     {  73,  61,  73,  61,  73,  61,  73,  61 },
    660 
    661     /*o8*/
    662     { -61,  73, -61,  73, -61,  73, -61,  73 },
    663     {  46, -82,  46, -82,  46, -82,  46, -82 },
    664     { -31,  88, -31,  88, -31,  88, -31,  88 },
    665     {  13, -90,  13, -90,  13, -90,  13, -90 },
    666     {   4,  90,   4,  90,   4,  90,   4,  90 },
    667     { -22, -85, -22, -85, -22, -85, -22, -85 },
    668     {  38,  78,  38,  78,  38,  78,  38,  78 },
    669     { -54, -67, -54, -67, -54, -67, -54, -67 },
    670 
    671     /*o9*/
    672     { -54,  85, -54,  85, -54,  85, -54,  85 },
    673     {   4, -88,   4, -88,   4, -88,   4, -88 },
    674     {  46,  61,  46,  61,  46,  61,  46,  61 },
    675     { -82, -13, -82, -13, -82, -13, -82, -13 },
    676     {  90, -38,  90, -38,  90, -38,  90, -38 },
    677     { -67,  78, -67,  78, -67,  78, -67,  78 },
    678     {  22, -90,  22, -90,  22, -90,  22, -90 },
    679     {  31,  73,  31,  73,  31,  73,  31,  73 },
    680 
    681     /*o10*/
    682     { -46,  90, -46,  90, -46,  90, -46,  90 },
    683     { -38, -54, -38, -54, -38, -54, -38, -54 },
    684     {  90, -31,  90, -31,  90, -31,  90, -31 },
    685     { -61,  88, -61,  88, -61,  88, -61,  88 },
    686     { -22, -67, -22, -67, -22, -67, -22, -67 },
    687     {  85, -13,  85, -13,  85, -13,  85, -13 },
    688     { -73,  82, -73,  82, -73,  82, -73,  82 },
    689     {  -4, -78,  -4, -78,  -4, -78,  -4, -78 },
    690 
    691     /*o11*/
    692     { -38,  88, -38,  88, -38,  88, -38,  88 },
    693     { -73,   4, -73,   4, -73,   4, -73,   4 },
    694     {  67, -90,  67, -90,  67, -90,  67, -90 },
    695     {  46,  31,  46,  31,  46,  31,  46,  31 },
    696     { -85,  78, -85,  78, -85,  78, -85,  78 },
    697     { -13, -61, -13, -61, -13, -61, -13, -61 },
    698     {  90, -54,  90, -54,  90, -54,  90, -54 },
    699     { -22,  82, -22,  82, -22,  82, -22,  82 },
    700 
    701 
    702     /*012*/
    703     { -31,  78, -31,  78, -31,  78, -31,  78 },
    704     { -90,  61, -90,  61, -90,  61, -90,  61 },
    705     {  -4, -54,  -4, -54,  -4, -54,  -4, -54 },
    706     {  88, -82,  88, -82,  88, -82,  88, -82 },
    707     {  38,  22,  38,  22,  38,  22,  38,  22 },
    708     { -73,  90, -73,  90, -73,  90, -73,  90 },
    709     { -67,  13, -67,  13, -67,  13, -67,  13 },
    710     {  46, -85,  46, -85,  46, -85,  46, -85 },
    711 
    712     /*o13*/
    713     { -22,  61, -22,  61, -22,  61, -22,  61 },
    714     { -85,  90, -85,  90, -85,  90, -85,  90 },
    715     { -73,  38, -73,  38, -73,  38, -73,  38 },
    716     {   4, -46,   4, -46,   4, -46,   4, -46 },
    717     {  78, -90,  78, -90,  78, -90,  78, -90 },
    718     {  82, -54,  82, -54,  82, -54,  82, -54 },
    719     {  13,  31,  13,  31,  13,  31,  13,  31 },
    720     { -67,  88, -67,  88, -67,  88, -67,  88 },
    721 
    722     /*o14*/
    723     { -13,  38, -13,  38, -13,  38, -13,  38 },
    724     { -61,  78, -61,  78, -61,  78, -61,  78 },
    725     { -88,  90, -88,  90, -88,  90, -88,  90 },
    726     { -85,  73, -85,  73, -85,  73, -85,  73 },
    727     { -54,  31, -54,  31, -54,  31, -54,  31 },
    728     {  -4, -22,  -4, -22,  -4, -22,  -4, -22 },
    729     {  46, -67,  46, -67,  46, -67,  46, -67 },
    730     {  82, -90,  82, -90,  82, -90,  82, -90 },
    731 
    732     /*o15*/
    733     {  -4,  13,  -4,  13,  -4,  13,  -4,  13 },
    734     { -22,  31, -22,  31, -22,  31, -22,  31 },
    735     { -38,  46, -38,  46, -38,  46, -38,  46 },
    736     { -54,  61, -54,  61, -54,  61, -54,  61 },
    737     { -67,  73, -67,  73, -67,  73, -67,  73 },
    738     { -78,  82, -78,  82, -78,  82, -78,  82 },
    739     { -85,  88, -85,  88, -85,  88, -85,  88 },
    740     { -90,  90, -90,  90, -90,  90, -90,  90 },
    741 
    742 };
    743 const WORD16 g_ai2_ihevc_trans_16_even[12][8] =
    744 {
    745     {  64,  64,  64,  64,  64,  64,  64,  64 },
    746     {  64, -64,  64, -64,  64, -64,  64, -64 },
    747     {  89,  75,  89,  75,  89,  75,  89,  75 },
    748     {  75, -18,  75, -18,  75, -18,  75, -18 },
    749     {  50,  18,  50,  18,  50,  18,  50,  18 },
    750     {  89,  50,  89,  50,  89,  50,  89,  50 },
    751     {  83,  36,  83,  36,  83,  36,  83,  36 },
    752     {  36, -83,  36, -83,  36, -83,  36, -83 },
    753     {  50, -89,  50, -89,  50, -89,  50, -89 },
    754     {  18, -50,  18, -50,  18, -50,  18, -50 },
    755     {  18,  75,  18,  75,  18,  75,  18,  75 },
    756     {  75, -89,  75, -89,  75, -89,  75, -89 },
    757 };
    758 const WORD16 g_ai2_ihevc_trans_16_odd[32][8] =
    759 {
    760     {  90,  87,  90,  87,  90,  87,  90,  87 },
    761     {  80,  70,  80,  70,  80,  70,  80,  70 },
    762     {  57,  43,  57,  43,  57,  43,  57,  43 },
    763     {  25,   9,  25,   9,  25,   9,  25,   9 },
    764     {  87,  57,  87,  57,  87,  57,  87,  57 },
    765     {   9, -43,   9, -43,   9, -43,   9, -43 },
    766     {  80,  90,  80,  90,  80,  90,  80,  90 },
    767     {  70,  25,  70,  25,  70,  25,  70,  25 },
    768     {  80,   9,  80,   9,  80,   9,  80,   9 },
    769     {  70,  87,  70,  87,  70,  87,  70,  87 },
    770     {  25, -57,  25, -57,  25, -57,  25, -57 },
    771     {  90,  43,  90,  43,  90,  43,  90,  43 },
    772     {  70, -43,  70, -43,  70, -43,  70, -43 },
    773     {  87,  -9,  87,  -9,  87,  -9,  87,  -9 },
    774     {  90,  25,  90,  25,  90,  25,  90,  25 },
    775     {  80,  57,  80,  57,  80,  57,  80,  57 },
    776     {  57, -80,  57, -80,  57, -80,  57, -80 },
    777     {  25, -90,  25, -90,  25, -90,  25, -90 },
    778     {   9,  87,   9,  87,   9,  87,   9,  87 },
    779     {  43,  70,  43,  70,  43,  70,  43,  70 },
    780     {  43, -90,  43, -90,  43, -90,  43, -90 },
    781     {  57,  25,  57,  25,  57,  25,  57,  25 },
    782     {  87, -70,  87, -70,  87, -70,  87, -70 },
    783     {   9, -80,   9, -80,   9, -80,   9, -80 },
    784     {  25, -70,  25, -70,  25, -70,  25, -70 },
    785     {  90, -80,  90, -80,  90, -80,  90, -80 },
    786     {  43,   9,  43,   9,  43,   9,  43,   9 },
    787     {  57, -87,  57, -87,  57, -87,  57, -87 },
    788     {   9, -25,   9, -25,   9, -25,   9, -25 },
    789     {  43, -57,  43, -57,  43, -57,  43, -57 },
    790     {  70, -80,  70, -80,  70, -80,  70, -80 },
    791     {  87, -90,  87, -90,  87, -90,  87, -90 },
    792 };
    793 const WORD16 g_ai2_ihevc_trans_intr_even_8[4][8] =
    794 {
    795     {  64,  64,  64,  64,  64,  64,  64,  64 },
    796     {  36, -83,  36, -83,  36, -83,  36, -83 },
    797     {  83,  36,  83,  36,  83,  36,  83,  36 },
    798     {  64, -64,  64, -64,  64, -64,  64, -64 }
    799 };
    800 const WORD16 g_ai2_ihevc_trans_intr_odd_8[8][8] =
    801 {
    802     {  89,  75,  89,  75,  89,  75,  89,  75 },
    803     {  50,  18,  50,  18,  50,  18,  50,  18 },
    804     {  75, -18,  75, -18,  75, -18,  75, -18 },
    805     {  89,  50,  89,  50,  89,  50,  89,  50 },
    806     {  50, -89,  50, -89,  50, -89,  50, -89 },
    807     {  18,  75,  18,  75,  18,  75,  18,  75 },
    808     {  18, -50,  18, -50,  18, -50,  18, -50 },
    809     {  75, -89,  75, -89,  75, -89,  75, -89 },
    810 };
    811 const WORD16 g_ai2_ihevc_trans_intr_4[4][8] =
    812 {
    813     {  83,  36,  83,  36,  83,  36,  83,  36 },
    814     {  36, -83,  36, -83,  36, -83,  36, -83 },
    815     {  64,  64,  64,  64,  64,  64,  64,  64 },
    816     {  64, -64,  64, -64,  64, -64,  64, -64 }
    817 };
    818 
    819 const UWORD8 IHEVCE_CHROMA_SHUFFLEMASK_HBD[8] = { 0x00, 0x01, 0x04, 0x05,
    820     0x08, 0x09, 0x0C, 0x0D };
    821 #ifndef DISABLE_AVX2
    822 const WORD32 g_ai4_ihevc_trans_8_intr_avx2[7][8] =
    823 { /* 4*32 = 128 bit */
    824     {  64,  64,  64,  64,  64,  64,  64,  64 },
    825     {  83,  83,  83,  83,  83,  83,  83,  83 },
    826     {  36,  36,  36,  36,  36,  36,  36,  36 },
    827     {  75,  75,  75,  75,  75,  75,  75,  75 },
    828     {  18,  18,  18,  18,  18,  18,  18,  18 },
    829     {  89,  89,  89,  89,  89,  89,  89,  89 },
    830     {  50,  50,  50,  50,  50,  50,  50,  50 },
    831 };
    832 const WORD16 g_ai2_ihevc_trans_8_intr_avx2[8][16] =
    833 { /* 4*32 = 128 bit */
    834     {  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64 },
    835     {  89,  75,  18,  50,  89,  75,  18,  50,  89,  75,  18,  50,  89,  75,  18,  50 },
    836     {  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36 },
    837     {  75, -18, -50, -89,  75, -18, -50, -89,  75, -18, -50, -89,  75, -18, -50, -89 },
    838     {  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64 },
    839     {  50, -89,  75,  18,  50, -89,  75,  18,  50, -89,  75,  18,  50, -89,  75,  18 },
    840     {  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83 },
    841     {  18, -50, -89,  75,  18, -50, -89,  75,  18, -50, -89,  75,  18, -50, -89,  75 }
    842 };
    843 
    844 const WORD32 g_ai2_ihevc_trans_32_intr_8_avx2[8][8] =
    845 { /* 4*32 = 128 bit */
    846     { 90, 90, 90, 90, 90, 90, 90, 90 },
    847     { 87, 87, 87, 87, 87, 87, 87, 87 },
    848     { 80, 80, 80, 80, 80, 80, 80, 80 },
    849     { 70, 70, 70, 70, 70, 70, 70, 70 },
    850     { 57, 57, 57, 57, 57, 57, 57, 57 },
    851     { 43, 43, 43, 43, 43, 43, 43, 43 },
    852     { 25, 25, 25, 25, 25, 25, 25, 25 },
    853     {  9,  9,  9,  9,  9,  9,  9,  9 }
    854 };
    855 const WORD32 g_ai2_ihevc_trans_32_intr_16_avx2[15][8] =
    856 { /* 4*32 = 128 bit */
    857     { 90, 90, 90, 90, 90, 90, 90, 90, },
    858     { 88, 88, 88, 88, 88, 88, 88, 88, },
    859     { 85, 85, 85, 85, 85, 85, 85, 85, },
    860     { 82, 82, 82, 82, 82, 82, 82, 82, },
    861     { 78, 78, 78, 78, 78, 78, 78, 78, },
    862     { 73, 73, 73, 73, 73, 73, 73, 73, },
    863     { 67, 67, 67, 67, 67, 67, 67, 67, },
    864     { 61, 61, 61, 61, 61, 61, 61, 61, },
    865     { 54, 54, 54, 54, 54, 54, 54, 54, },
    866     { 46, 46, 46, 46, 46, 46, 46, 46, },
    867     { 38, 38, 38, 38, 38, 38, 38, 38, },
    868     { 31, 31, 31, 31, 31, 31, 31, 31, },
    869     { 22, 22, 22, 22, 22, 22, 22, 22, },
    870     { 13, 13, 13, 13, 13, 13, 13, 13, },
    871     { 4,  4,  4,  4,  4,  4,  4,  4,  }
    872 };
    873 const WORD16 g_ai2_ihevc_trans_16_intr_odd_avx2[32][16] =
    874 {
    875     {  90,  87,  90,  87,  90,  87,  90,  87,  90,  87,  90,  87,  90,  87,  90,  87 },
    876     {  70,  80,  70,  80,  70,  80,  70,  80,  70,  80,  70,  80,  70,  80,  70,  80 },
    877     {  57,  43,  57,  43,  57,  43,  57,  43,  57,  43,  57,  43,  57,  43,  57,  43 },
    878     {   9,  25,   9,  25,   9,  25,   9,  25,   9,  25,   9,  25,   9,  25,   9,  25 },
    879     {  87,  57,  87,  57,  87,  57,  87,  57,  87,  57,  87,  57,  87,  57,  87,  57 },
    880     { -43,   9, -43,   9, -43,   9, -43,   9, -43,   9, -43,   9, -43,   9, -43,   9 },
    881     { -80, -90, -80, -90, -80, -90, -80, -90, -80, -90, -80, -90, -80, -90, -80, -90 },
    882     { -25, -70, -25, -70, -25, -70, -25, -70, -25, -70, -25, -70, -25, -70, -25, -70 },
    883     {  80,   9,  80,   9,  80,   9,  80,   9,  80,   9,  80,   9,  80,   9,  80,   9 },
    884     { -87, -70, -87, -70, -87, -70, -87, -70, -87, -70, -87, -70, -87, -70, -87, -70 },
    885     { -25,  57, -25,  57, -25,  57, -25,  57, -25,  57, -25,  57, -25,  57, -25,  57 },
    886     {  43,  90,  43,  90,  43,  90,  43,  90,  43,  90,  43,  90,  43,  90,  43,  90 },
    887     {  70, -43,  70, -43,  70, -43,  70, -43,  70, -43,  70, -43,  70, -43,  70, -43 },
    888     {   9, -87,   9, -87,   9, -87,   9, -87,   9, -87,   9, -87,   9, -87,   9, -87 },
    889     {  90,  25,  90,  25,  90,  25,  90,  25,  90,  25,  90,  25,  90,  25,  90,  25 },
    890     { -57, -80, -57, -80, -57, -80, -57, -80, -57, -80, -57, -80, -57, -80, -57, -80 },
    891     {  57, -80,  57, -80,  57, -80,  57, -80,  57, -80,  57, -80,  57, -80,  57, -80 },
    892     {  90, -25,  90, -25,  90, -25,  90, -25,  90, -25,  90, -25,  90, -25,  90, -25 },
    893     {  -9, -87,  -9, -87,  -9, -87,  -9, -87,  -9, -87,  -9, -87,  -9, -87,  -9, -87 },
    894     {  70,  43,  70,  43,  70,  43,  70,  43,  70,  43,  70,  43,  70,  43,  70,  43 },
    895     {  43, -90,  43, -90,  43, -90,  43, -90,  43, -90,  43, -90,  43, -90,  43, -90 },
    896     {  25,  57,  25,  57,  25,  57,  25,  57,  25,  57,  25,  57,  25,  57,  25,  57 },
    897     { -87,  70, -87,  70, -87,  70, -87,  70, -87,  70, -87,  70, -87,  70, -87,  70 },
    898     { -80,   9, -80,   9, -80,   9, -80,   9, -80,   9, -80,   9, -80,   9, -80,   9 },
    899     {  25, -70,  25, -70,  25, -70,  25, -70,  25, -70,  25, -70,  25, -70,  25, -70 },
    900     { -80,  90, -80,  90, -80,  90, -80,  90, -80,  90, -80,  90, -80,  90, -80,  90 },
    901     {  43,   9,  43,   9,  43,   9,  43,   9,  43,   9,  43,   9,  43,   9,  43,   9 },
    902     {  87, -57,  87, -57,  87, -57,  87, -57,  87, -57,  87, -57,  87, -57,  87, -57 },
    903     {   9, -25,   9, -25,   9, -25,   9, -25,   9, -25,   9, -25,   9, -25,   9, -25 },
    904     { -57,  43, -57,  43, -57,  43, -57,  43, -57,  43, -57,  43, -57,  43, -57,  43 },
    905     {  70, -80,  70, -80,  70, -80,  70, -80,  70, -80,  70, -80,  70, -80,  70, -80 },
    906     { -90,  87, -90,  87, -90,  87, -90,  87, -90,  87, -90,  87, -90,  87, -90,  87 }
    907 };
    908 
    909 const WORD16 g_ai2_ihevc_trans_16_intr_even_avx2[12][16] =
    910 {
    911     {  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64 },
    912     {  89,  75,  89,  75,  89,  75,  89,  75,  89,  75,  89,  75,  89,  75,  89,  75 },
    913     {  18,  50,  18,  50,  18,  50,  18,  50,  18,  50,  18,  50,  18,  50,  18,  50 },
    914     {  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36,  83,  36 },
    915     {  75, -18,  75, -18,  75, -18,  75, -18,  75, -18,  75, -18,  75, -18,  75, -18 },
    916     { -50, -89, -50, -89, -50, -89, -50, -89, -50, -89, -50, -89, -50, -89, -50, -89 },
    917     {  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64,  64, -64 },
    918     {  50, -89,  50, -89,  50, -89,  50, -89,  50, -89,  50, -89,  50, -89,  50, -89 },
    919     {  75,  18,  75,  18,  75,  18,  75,  18,  75,  18,  75,  18,  75,  18,  75,  18 },
    920     {  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83,  36, -83 },
    921     {  18, -50,  18, -50,  18, -50,  18, -50,  18, -50,  18, -50,  18, -50,  18, -50 },
    922     { -89,  75, -89,  75, -89,  75, -89,  75, -89,  75, -89,  75, -89,  75, -89,  75 }
    923 };
    924 
    925 
    926 #endif
    927