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_intra_pred.h 22 * 23 * @brief 24 * Declarations for the fucntions defined in ihevc_intra_pred_filters 25 * 26 * @author 27 * Mamatha 28 * 29 * 30 * @remarks 31 * None 32 * 33 ******************************************************************************* 34 */ 35 36 #ifndef IHEVC_INTRA_PRED_H_ 37 #define IHEVC_INTRA_PRED_H_ 38 39 40 /*****************************************************************************/ 41 /* Macro definitions */ 42 /*****************************************************************************/ 43 #define look_up_trailing_zeros(x) (0 == (x) ? 8 : CTZ(x)) 44 45 /*****************************************************************************/ 46 /* Function Declarations */ 47 /*****************************************************************************/ 48 typedef void ihevc_intra_pred_luma_planar_ft( 49 UWORD8 *pu1_ref, 50 WORD32 src_strd, 51 UWORD8 *pu1_dst, 52 WORD32 dst_strd, 53 WORD32 nt, 54 WORD32 mode); 55 56 57 58 typedef void ihevc_intra_pred_luma_dc_ft( 59 UWORD8 *pu1_ref, 60 WORD32 src_strd, 61 UWORD8 *pu1_dst, 62 WORD32 dst_strd, 63 WORD32 nt, 64 WORD32 mode); 65 66 typedef void ihevc_intra_pred_luma_horz_ft( 67 UWORD8 *pu1_ref, 68 WORD32 src_strd, 69 UWORD8 *pu1_dst, 70 WORD32 dst_strd, 71 WORD32 nt, 72 WORD32 mode); 73 74 75 typedef void ihevc_intra_pred_luma_ver_ft( 76 UWORD8 *pu1_ref, 77 WORD32 src_strd, 78 UWORD8 *pu1_dst, 79 WORD32 dst_strd, 80 WORD32 nt, 81 WORD32 mode); 82 83 84 typedef void ihevc_intra_pred_luma_mode2_ft( 85 UWORD8 *pu1_ref, 86 WORD32 src_strd, 87 UWORD8 *pu1_dst, 88 WORD32 dst_strd, 89 WORD32 nt, 90 WORD32 mode); 91 92 93 typedef void ihevc_intra_pred_luma_mode_18_34_ft( 94 UWORD8 *pu1_ref, 95 WORD32 src_strd, 96 UWORD8 *pu1_dst, 97 WORD32 dst_strd, 98 WORD32 nt, 99 WORD32 mode); 100 101 102 typedef void ihevc_intra_pred_luma_mode_3_to_9_ft( 103 UWORD8 *pu1_ref, 104 WORD32 src_strd, 105 UWORD8 *pu1_dst, 106 WORD32 dst_strd, 107 WORD32 nt, 108 WORD32 mode); 109 110 111 typedef void ihevc_intra_pred_luma_mode_11_to_17_ft( 112 UWORD8 *pu1_ref, 113 WORD32 src_strd, 114 UWORD8 *pu1_dst, 115 WORD32 dst_strd, 116 WORD32 nt, 117 WORD32 mode); 118 119 120 typedef void ihevc_intra_pred_luma_mode_19_to_25_ft( 121 UWORD8 *pu1_ref, 122 WORD32 src_strd, 123 UWORD8 *pu1_dst, 124 WORD32 dst_strd, 125 WORD32 nt, 126 WORD32 mode); 127 128 129 typedef void ihevc_intra_pred_luma_mode_27_to_33_ft( 130 UWORD8 *pu1_ref, 131 WORD32 src_strd, 132 UWORD8 *pu1_dst, 133 WORD32 dst_strd, 134 WORD32 nt, 135 WORD32 mode); 136 137 typedef void ihevc_intra_pred_luma_ref_substitution_ft(UWORD8 *pu1_top_left, 138 UWORD8 *pu1_top, 139 UWORD8 *pu1_left, 140 WORD32 src_strd, 141 WORD32 nt, 142 WORD32 nbr_flags, 143 UWORD8 *pu1_dst, 144 WORD32 dst_strd); 145 146 147 typedef void ihevc_intra_pred_luma_ref_subst_all_avlble_ft(UWORD8 *pu1_top_left, 148 UWORD8 *pu1_top, 149 UWORD8 *pu1_left, 150 WORD32 src_strd, 151 WORD32 nt, 152 WORD32 nbr_flags, 153 UWORD8 *pu1_dst, 154 WORD32 dst_strd); 155 156 typedef void ihevc_intra_pred_ref_filtering_ft(UWORD8 *pu1_src, 157 WORD32 nt, 158 UWORD8 *pu1_dst, 159 WORD32 mode, 160 WORD32 strong_intra_smoothing_enable_flag); 161 162 typedef void ihevc_hbd_intra_pred_luma_planar_ft( 163 UWORD16 *pu2_ref, 164 WORD32 src_strd, 165 UWORD16 *pu2_dst, 166 WORD32 dst_strd, 167 WORD32 nt, 168 WORD32 mode, 169 UWORD8 bit_depth); 170 171 172 typedef void ihevc_hbd_intra_pred_luma_dc_ft( 173 UWORD16 *pu2_ref, 174 WORD32 src_strd, 175 UWORD16 *pu2_dst, 176 WORD32 dst_strd, 177 WORD32 nt, 178 WORD32 mode, 179 UWORD8 bit_depth); 180 181 182 typedef void ihevc_hbd_intra_pred_luma_horz_ft( 183 UWORD16 *pu2_ref, 184 WORD32 src_strd, 185 UWORD16 *pu2_dst, 186 WORD32 dst_strd, 187 WORD32 nt, 188 WORD32 mode, 189 UWORD8 bit_depth); 190 191 192 typedef void ihevc_hbd_intra_pred_luma_ver_ft( 193 UWORD16 *pu2_ref, 194 WORD32 src_strd, 195 UWORD16 *pu2_dst, 196 WORD32 dst_strd, 197 WORD32 nt, 198 WORD32 mode, 199 UWORD8 bit_depth); 200 201 202 typedef void ihevc_hbd_intra_pred_luma_mode2_ft( 203 UWORD16 *pu2_ref, 204 WORD32 src_strd, 205 UWORD16 *pu2_dst, 206 WORD32 dst_strd, 207 WORD32 nt, 208 WORD32 mode, 209 UWORD8 bit_depth); 210 211 212 typedef void ihevc_hbd_intra_pred_luma_mode_18_34_ft( 213 UWORD16 *pu2_ref, 214 WORD32 src_strd, 215 UWORD16 *pu2_dst, 216 WORD32 dst_strd, 217 WORD32 nt, 218 WORD32 mode, 219 UWORD8 bit_depth); 220 221 222 typedef void ihevc_hbd_intra_pred_luma_mode_3_to_9_ft( 223 UWORD16 *pu2_ref, 224 WORD32 src_strd, 225 UWORD16 *pu2_dst, 226 WORD32 dst_strd, 227 WORD32 nt, 228 WORD32 mode, 229 UWORD8 bit_depth); 230 231 232 typedef void ihevc_hbd_intra_pred_luma_mode_11_to_17_ft( 233 UWORD16 *pu2_ref, 234 WORD32 src_strd, 235 UWORD16 *pu2_dst, 236 WORD32 dst_strd, 237 WORD32 nt, 238 WORD32 mode, 239 UWORD8 bit_depth); 240 241 typedef void ihevc_hbd_intra_pred_luma_mode_19_to_25_ft( 242 UWORD16 *pu2_ref, 243 WORD32 src_strd, 244 UWORD16 *pu2_dst, 245 WORD32 dst_strd, 246 WORD32 nt, 247 WORD32 mode, 248 UWORD8 bit_depth); 249 250 251 252 typedef void ihevc_hbd_intra_pred_luma_mode_27_to_33_ft( 253 UWORD16 *pu2_ref, 254 WORD32 src_strd, 255 UWORD16 *pu2_dst, 256 WORD32 dst_strd, 257 WORD32 nt, 258 WORD32 mode, 259 UWORD8 bit_depth); 260 261 typedef void ihevc_hbd_intra_pred_luma_ref_substitution_ft(UWORD16 *pu2_top_left, 262 UWORD16 *pu2_top, 263 UWORD16 *pu2_left, 264 WORD32 src_strd, 265 WORD32 nt, 266 WORD32 nbr_flags, 267 UWORD16 *pu2_dst, 268 WORD32 dst_strd, 269 UWORD8 bit_depth); 270 271 272 273 typedef void ihevc_hbd_intra_pred_ref_filtering_ft(UWORD16 *pu2_src, 274 WORD32 nt, 275 UWORD16 *pu2_dst, 276 WORD32 mode, 277 WORD32 strong_intra_smoothing_enable_flag, 278 UWORD8 bit_depth); 279 280 /* C function declarations */ 281 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar; 282 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc; 283 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz; 284 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver; 285 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2; 286 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34; 287 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9; 288 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17; 289 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25; 290 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33; 291 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution; 292 ihevc_intra_pred_luma_ref_subst_all_avlble_ft ihevc_intra_pred_luma_ref_subst_all_avlble; 293 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering; 294 295 ihevc_hbd_intra_pred_luma_planar_ft ihevc_hbd_intra_pred_luma_planar; 296 ihevc_hbd_intra_pred_luma_dc_ft ihevc_hbd_intra_pred_luma_dc; 297 ihevc_hbd_intra_pred_luma_horz_ft ihevc_hbd_intra_pred_luma_horz; 298 ihevc_hbd_intra_pred_luma_ver_ft ihevc_hbd_intra_pred_luma_ver; 299 ihevc_hbd_intra_pred_luma_mode2_ft ihevc_hbd_intra_pred_luma_mode2; 300 ihevc_hbd_intra_pred_luma_mode_18_34_ft ihevc_hbd_intra_pred_luma_mode_18_34; 301 ihevc_hbd_intra_pred_luma_mode_3_to_9_ft ihevc_hbd_intra_pred_luma_mode_3_to_9; 302 ihevc_hbd_intra_pred_luma_mode_11_to_17_ft ihevc_hbd_intra_pred_luma_mode_11_to_17; 303 ihevc_hbd_intra_pred_luma_mode_19_to_25_ft ihevc_hbd_intra_pred_luma_mode_19_to_25; 304 ihevc_hbd_intra_pred_luma_mode_27_to_33_ft ihevc_hbd_intra_pred_luma_mode_27_to_33; 305 ihevc_hbd_intra_pred_luma_ref_substitution_ft ihevc_hbd_intra_pred_luma_ref_substitution; 306 ihevc_hbd_intra_pred_ref_filtering_ft ihevc_hbd_intra_pred_ref_filtering; 307 308 309 /* A9Q function declarations */ 310 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar_a9q; 311 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_a9q; 312 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_a9q; 313 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_a9q; 314 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2_a9q; 315 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_a9q; 316 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_a9q; 317 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_a9q; 318 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_a9q; 319 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_a9q; 320 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution_a9q; 321 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_a9q; 322 323 /* A9 A function declarations */ 324 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar_a9a; 325 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_a9a; 326 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_a9a; 327 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_a9a; 328 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2_a9a; 329 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_a9a; 330 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_a9a; 331 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_a9a; 332 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_a9a; 333 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_a9a; 334 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution_a9a; 335 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_a9a; 336 337 /* NEONINTR function declarations */ 338 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar_neonintr; 339 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_neonintr; 340 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_neonintr; 341 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_neonintr; 342 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2_neonintr; 343 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_neonintr; 344 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_neonintr; 345 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_neonintr; 346 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_neonintr; 347 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_neonintr; 348 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution_neonintr; 349 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_neonintr; 350 351 /* SSSE31 function declarations */ 352 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar_ssse3; 353 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_ssse3; 354 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_ssse3; 355 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_ssse3; 356 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2_ssse3; 357 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_ssse3; 358 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_ssse3; 359 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_ssse3; 360 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_ssse3; 361 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_ssse3; 362 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution_ssse3; 363 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_ssse3; 364 365 /* SSE42 function declarations */ 366 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_sse42; 367 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_sse42; 368 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_sse42; 369 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_sse42; 370 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_sse42; 371 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_sse42; 372 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_sse42; 373 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_sse42; 374 ihevc_hbd_intra_pred_luma_planar_ft ihevc_hbd_intra_pred_luma_planar_sse42; 375 ihevc_hbd_intra_pred_luma_dc_ft ihevc_hbd_intra_pred_luma_dc_sse42; 376 ihevc_hbd_intra_pred_luma_horz_ft ihevc_hbd_intra_pred_luma_horz_sse42; 377 ihevc_hbd_intra_pred_luma_ver_ft ihevc_hbd_intra_pred_luma_ver_sse42; 378 ihevc_hbd_intra_pred_luma_mode2_ft ihevc_hbd_intra_pred_luma_mode2_sse42; 379 ihevc_hbd_intra_pred_luma_mode_18_34_ft ihevc_hbd_intra_pred_luma_mode_18_34_sse42; 380 ihevc_hbd_intra_pred_luma_mode_3_to_9_ft ihevc_hbd_intra_pred_luma_mode_3_to_9_sse42; 381 ihevc_hbd_intra_pred_luma_mode_11_to_17_ft ihevc_hbd_intra_pred_luma_mode_11_to_17_sse42; 382 ihevc_hbd_intra_pred_luma_mode_19_to_25_ft ihevc_hbd_intra_pred_luma_mode_19_to_25_sse42; 383 ihevc_hbd_intra_pred_luma_mode_27_to_33_ft ihevc_hbd_intra_pred_luma_mode_27_to_33_sse42; 384 ihevc_hbd_intra_pred_luma_ref_substitution_ft ihevc_hbd_intra_pred_luma_ref_substitution_sse42; 385 ihevc_hbd_intra_pred_ref_filtering_ft ihevc_hbd_intra_pred_ref_filtering_sse42; 386 387 /* AVX function declaration*/ 388 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_avx; 389 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_avx; 390 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_avx; 391 392 ihevc_hbd_intra_pred_luma_dc_ft ihevc_hbd_intra_pred_luma_dc_avx; 393 ihevc_hbd_intra_pred_luma_mode_18_34_ft ihevc_hbd_intra_pred_luma_mode_18_34_avx; 394 ihevc_hbd_intra_pred_luma_ver_ft ihevc_hbd_intra_pred_luma_ver_avx; 395 ihevc_hbd_intra_pred_ref_filtering_ft ihevc_hbd_intra_pred_ref_filtering_avx; 396 397 /* armv8 function declarations */ 398 ihevc_intra_pred_luma_planar_ft ihevc_intra_pred_luma_planar_av8; 399 ihevc_intra_pred_luma_dc_ft ihevc_intra_pred_luma_dc_av8; 400 ihevc_intra_pred_luma_horz_ft ihevc_intra_pred_luma_horz_av8; 401 ihevc_intra_pred_luma_ver_ft ihevc_intra_pred_luma_ver_av8; 402 ihevc_intra_pred_luma_mode2_ft ihevc_intra_pred_luma_mode2_av8; 403 ihevc_intra_pred_luma_mode_18_34_ft ihevc_intra_pred_luma_mode_18_34_av8; 404 ihevc_intra_pred_luma_mode_3_to_9_ft ihevc_intra_pred_luma_mode_3_to_9_av8; 405 ihevc_intra_pred_luma_mode_11_to_17_ft ihevc_intra_pred_luma_mode_11_to_17_av8; 406 ihevc_intra_pred_luma_mode_19_to_25_ft ihevc_intra_pred_luma_mode_19_to_25_av8; 407 ihevc_intra_pred_luma_mode_27_to_33_ft ihevc_intra_pred_luma_mode_27_to_33_av8; 408 ihevc_intra_pred_luma_ref_substitution_ft ihevc_intra_pred_luma_ref_substitution_av8; 409 ihevc_intra_pred_ref_filtering_ft ihevc_intra_pred_ref_filtering_av8; 410 #endif /* IHEVC_INTRA_PRED_H_ */ 411