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, 46 CHROMA_PLANE_ID_T e_chroma_plane); 47 48 typedef UWORD32 ihevc_hbd_resi_trans_4x4_ttype1_ft(UWORD16 *pu2_src, 49 UWORD16 *pu2_pred, 50 WORD32 *pi4_temp, 51 WORD16 *pi2_dst, 52 WORD32 src_strd, 53 WORD32 pred_strd, 54 WORD32 dst_strd, 55 CHROMA_PLANE_ID_T e_chroma_plane, 56 UWORD8 bit_depth); 57 58 typedef UWORD32 ihevc_resi_trans_4x4_ft(UWORD8 *pu1_src, 59 UWORD8 *pu1_pred, 60 WORD32 *pi4_temp, 61 WORD16 *pi2_dst, 62 WORD32 src_strd, 63 WORD32 pred_strd, 64 WORD32 dst_strd, 65 CHROMA_PLANE_ID_T e_chroma_plane); 66 67 typedef UWORD32 ihevc_hbd_resi_trans_4x4_ft 68 ( 69 UWORD16 *pu2_src, 70 UWORD16 *pu2_pred, 71 WORD32 *pi4_temp, 72 WORD16 *pi2_dst, 73 WORD32 src_strd, 74 WORD32 pred_strd, 75 WORD32 dst_strd_chr_flag, 76 UWORD8 bit_depth 77 ); 78 79 typedef UWORD32 ihevc_resi_trans_8x8_ft(UWORD8 *pu1_src, 80 UWORD8 *pu1_pred, 81 WORD32 *pi4_temp, 82 WORD16 *pi2_dst, 83 WORD32 src_strd, 84 WORD32 pred_strd, 85 WORD32 dst_strd, 86 CHROMA_PLANE_ID_T e_chroma_plane); 87 88 typedef UWORD32 ihevc_hbd_resi_trans_8x8_ft 89 ( 90 UWORD16 *pu2_src, 91 UWORD16 *pu2_pred, 92 WORD32 *pi4_temp, 93 WORD16 *pi2_dst, 94 WORD32 src_strd, 95 WORD32 pred_strd, 96 WORD32 dst_strd_chr_flag, 97 UWORD8 bit_depth 98 ); 99 100 101 typedef UWORD32 ihevc_resi_trans_16x16_ft(UWORD8 *pu1_src, 102 UWORD8 *pu1_pred, 103 WORD32 *pi4_temp, 104 WORD16 *pi2_dst, 105 WORD32 src_strd, 106 WORD32 pred_strd, 107 WORD32 dst_strd, 108 CHROMA_PLANE_ID_T e_chroma_plane); 109 110 typedef UWORD32 ihevc_hbd_resi_trans_16x16_ft(UWORD16 *pu2_src, 111 UWORD16 *pu2_pred, 112 WORD32 *pi4_temp, 113 WORD16 *pi2_dst, 114 WORD32 src_strd, 115 WORD32 pred_strd, 116 WORD32 dst_strd, 117 CHROMA_PLANE_ID_T e_chroma_plane, 118 UWORD8 bit_depth); 119 120 typedef UWORD32 ihevc_resi_trans_32x32_ft(UWORD8 *pu1_src, 121 UWORD8 *pu1_pred, 122 WORD32 *pi4_temp, 123 WORD16 *pi2_dst, 124 WORD32 src_strd, 125 WORD32 pred_strd, 126 WORD32 dst_strd, 127 CHROMA_PLANE_ID_T e_chroma_plane); 128 129 typedef UWORD32 ihevc_hbd_resi_trans_32x32_ft(UWORD16 *pu2_src, 130 UWORD16 *pu2_pred, 131 WORD32 *pi4_temp, 132 WORD16 *pi2_dst, 133 WORD32 src_strd, 134 WORD32 pred_strd, 135 WORD32 dst_strd, 136 CHROMA_PLANE_ID_T e_chroma_plane, 137 UWORD8 bit_depth); 138 139 140 typedef void ihevc_resi_trans_4x4_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_8x8_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_16x16_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 typedef void ihevc_resi_trans_32x32_16bit_ft(WORD16 *pi2_src, 165 UWORD8 *pu1_pred, 166 WORD16 *pi2_tmp, 167 WORD16 *pi2_dst, 168 WORD32 src_strd, 169 WORD32 pred_strd, 170 WORD32 dst_strd); 171 172 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1; 173 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4; 174 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8; 175 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16; 176 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32; 177 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit; 178 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit; 179 ihevc_resi_trans_16x16_16bit_ft ihevc_resi_trans_16x16_16bit; 180 ihevc_resi_trans_32x32_16bit_ft ihevc_resi_trans_32x32_16bit; 181 182 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_sse42; 183 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_sse42; 184 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_sse42; 185 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_sse42; 186 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_sse42; 187 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit_sse42; 188 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit_sse42; 189 ihevc_resi_trans_16x16_16bit_ft ihevc_resi_trans_16x16_16bit_sse42; 190 ihevc_resi_trans_32x32_16bit_ft ihevc_resi_trans_32x32_16bit_sse42; 191 192 193 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_avx; 194 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_avx; 195 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_avx; 196 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_avx; 197 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_avx; 198 ihevc_resi_trans_4x4_16bit_ft ihevc_resi_trans_4x4_16bit_avx; 199 ihevc_resi_trans_8x8_16bit_ft ihevc_resi_trans_8x8_16bit_avx; 200 201 #ifndef DISABLE_AVX2 202 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_avx2; 203 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_avx2; 204 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_avx2; 205 #endif 206 207 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1; 208 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4; 209 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8; 210 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16; 211 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32; 212 213 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1_sse42; 214 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4_sse42; 215 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_sse42; 216 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_sse42; 217 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_sse42; 218 219 220 ihevc_hbd_resi_trans_4x4_ttype1_ft ihevc_hbd_resi_trans_4x4_ttype1_avx; 221 ihevc_hbd_resi_trans_4x4_ft ihevc_hbd_resi_trans_4x4_avx; 222 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_avx; 223 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_avx; 224 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_avx; 225 226 /* AVX2 declarations */ 227 ihevc_hbd_resi_trans_8x8_ft ihevc_hbd_resi_trans_8x8_avx2; 228 ihevc_hbd_resi_trans_16x16_ft ihevc_hbd_resi_trans_16x16_avx2; 229 ihevc_hbd_resi_trans_32x32_ft ihevc_hbd_resi_trans_32x32_avx2; 230 231 /*A9 declarations*/ 232 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_a9q; 233 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_a9q; 234 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_a9q; 235 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_a9q; 236 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_a9q; 237 ihevc_resi_trans_4x4_ft ihevc_resi_trans_4x4_neon; 238 ihevc_resi_trans_4x4_ttype1_ft ihevc_resi_trans_4x4_ttype1_neon; 239 ihevc_resi_trans_8x8_ft ihevc_resi_trans_8x8_neon; 240 ihevc_resi_trans_16x16_ft ihevc_resi_trans_16x16_neon; 241 ihevc_resi_trans_32x32_ft ihevc_resi_trans_32x32_neon; 242 243 #endif /*_IHEVC_RESI_TRANS_H_*/ 244