1 /****************************************************************************** 2 * 3 * Copyright (C) 2018 The Android Open Source Project 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 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 /** 21 ******************************************************************************* 22 * @file 23 * ihevc_resi_trans.h 24 * 25 * @brief 26 * Functions declarations for residue and forward transform 27 * 28 * @author 29 * Ittiam 30 * 31 * @remarks 32 * None 33 * 34 ******************************************************************************* 35 */ 36 #ifndef _IHEVC_RESI_TRANS_H_ 37 #define _IHEVC_RESI_TRANS_H_ 38 39 typedef UWORD32 ihevc_resi_trans_4x4_ttype1_ft(UWORD8 *pu1_src, 40 UWORD8 *pu1_pred, 41 WORD32 *pi4_temp, 42 WORD16 *pi2_dst, 43 WORD32 src_strd, 44 WORD32 pred_strd, 45 WORD32 dst_strd_chr_flag); 46 47 typedef UWORD32 ihevc_hbd_resi_trans_4x4_ttype1_ft(UWORD16 *pu2_src, 48 UWORD16 *pu2_pred, 49 WORD32 *pi4_temp, 50 WORD16 *pi2_dst, 51 WORD32 src_strd, 52 WORD32 pred_strd, 53 WORD32 dst_strd_chr_flag, 54 UWORD8 bit_depth); 55 56 typedef UWORD32 ihevc_resi_trans_4x4_ft(UWORD8 *pu1_src, 57 UWORD8 *pu1_pred, 58 WORD32 *pi4_temp, 59 WORD16 *pi2_dst, 60 WORD32 src_strd, 61 WORD32 pred_strd, 62 WORD32 dst_strd_chr_flag); 63 64 typedef UWORD32 ihevc_hbd_resi_trans_4x4_ft 65 ( 66 UWORD16 *pu2_src, 67 UWORD16 *pu2_pred, 68 WORD32 *pi4_temp, 69 WORD16 *pi2_dst, 70 WORD32 src_strd, 71 WORD32 pred_strd, 72 WORD32 dst_strd_chr_flag, 73 UWORD8 bit_depth 74 ); 75 76 typedef UWORD32 ihevc_resi_trans_8x8_ft(UWORD8 *pu1_src, 77 UWORD8 *pu1_pred, 78 WORD32 *pi4_temp, 79 WORD16 *pi2_dst, 80 WORD32 src_strd, 81 WORD32 pred_strd, 82 WORD32 dst_strd_chr_flag); 83 84 typedef UWORD32 ihevc_hbd_resi_trans_8x8_ft 85 ( 86 UWORD16 *pu2_src, 87 UWORD16 *pu2_pred, 88 WORD32 *pi4_temp, 89 WORD16 *pi2_dst, 90 WORD32 src_strd, 91 WORD32 pred_strd, 92 WORD32 dst_strd_chr_flag, 93 UWORD8 bit_depth 94 ); 95 96 97 typedef UWORD32 ihevc_resi_trans_16x16_ft(UWORD8 *pu1_src, 98 UWORD8 *pu1_pred, 99 WORD32 *pi4_temp, 100 WORD16 *pi2_dst, 101 WORD32 src_strd, 102 WORD32 pred_strd, 103 WORD32 dst_strd_chr_flag); 104 105 typedef UWORD32 ihevc_hbd_resi_trans_16x16_ft(UWORD16 *pu2_src, 106 UWORD16 *pu2_pred, 107 WORD32 *pi4_temp, 108 WORD16 *pi2_dst, 109 WORD32 src_strd, 110 WORD32 pred_strd, 111 WORD32 dst_strd_chr_flag, 112 UWORD8 bit_depth); 113 114 typedef UWORD32 ihevc_resi_trans_32x32_ft(UWORD8 *pu1_src, 115 UWORD8 *pu1_pred, 116 WORD32 *pi4_temp, 117 WORD16 *pi2_dst, 118 WORD32 src_strd, 119 WORD32 pred_strd, 120 WORD32 dst_strd_chr_flag); 121 122 typedef UWORD32 ihevc_hbd_resi_trans_32x32_ft(UWORD16 *pu2_src, 123 UWORD16 *pu2_pred, 124 WORD32 *pi4_temp, 125 WORD16 *pi2_dst, 126 WORD32 src_strd, 127 WORD32 pred_strd, 128 WORD32 dst_strd_chr_flag, 129 UWORD8 bit_depth); 130 131 132 typedef void ihevc_resi_trans_4x4_16bit_ft(WORD16 *pi2_src, 133 UWORD8 *pu1_pred, 134 WORD16 *pi2_tmp, 135 WORD16 *pi2_dst, 136 WORD32 src_strd, 137 WORD32 pred_strd, 138 WORD32 dst_strd); 139 140 typedef void ihevc_resi_trans_8x8_16bit_ft(WORD16 *pi2_src, 141 UWORD8 *pu1_pred, 142 WORD16 *pi2_tmp, 143 WORD16 *pi2_dst, 144 WORD32 src_strd, 145 WORD32 pred_strd, 146 WORD32 dst_strd); 147 148 typedef void ihevc_resi_trans_16x16_16bit_ft(WORD16 *pi2_src, 149 UWORD8 *pu1_pred, 150 WORD16 *pi2_tmp, 151 WORD16 *pi2_dst, 152 WORD32 src_strd, 153 WORD32 pred_strd, 154 WORD32 dst_strd); 155 156 typedef void ihevc_resi_trans_32x32_16bit_ft(WORD16 *pi2_src, 157 UWORD8 *pu1_pred, 158 WORD16 *pi2_tmp, 159 WORD16 *pi2_dst, 160 WORD32 src_strd, 161 WORD32 pred_strd, 162 WORD32 dst_strd); 163 164 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1; 165 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4; 166 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8; 167 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16; 168 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32; 169 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit; 170 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit; 171 ihevc_resi_trans_16x16_16bit_ft ihevc_resi_trans_16x16_16bit; 172 ihevc_resi_trans_32x32_16bit_ft ihevc_resi_trans_32x32_16bit; 173 174 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_sse42; 175 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_sse42; 176 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_sse42; 177 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_sse42; 178 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_sse42; 179 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit_sse42; 180 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit_sse42; 181 ihevc_resi_trans_16x16_16bit_ft ihevc_resi_trans_16x16_16bit_sse42; 182 ihevc_resi_trans_32x32_16bit_ft ihevc_resi_trans_32x32_16bit_sse42; 183 184 185 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_avx; 186 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_avx; 187 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_avx; 188 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_avx; 189 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_avx; 190 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit_avx; 191 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit_avx; 192 193 #ifndef DISABLE_AVX2 194 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_avx2; 195 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_avx2; 196 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_avx2; 197 #endif 198 199 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1; 200 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4; 201 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8; 202 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16; 203 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32; 204 205 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1_sse42; 206 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4_sse42; 207 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_sse42; 208 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_sse42; 209 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_sse42; 210 211 212 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1_avx; 213 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4_avx; 214 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_avx; 215 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_avx; 216 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_avx; 217 218 /* AVX2 declarations */ 219 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_avx2; 220 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_avx2; 221 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_avx2; 222 223 /*A9 declarations*/ 224 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_a9q; 225 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_a9q; 226 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_a9q; 227 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_a9q; 228 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_a9q; 229 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_neon; 230 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_neon; 231 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_neon; 232 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_neon; 233 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_neon; 234 235 #endif /*_IHEVC_RESI_TRANS_H_*/ 236