| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (c) 2004-2005 Michael Niedermayer, Loren Merritt | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "libavutil/attributes.h" | ||
| 22 | #include "libavutil/cpu.h" | ||
| 23 | #include "libavutil/x86/asm.h" | ||
| 24 | #include "libavutil/x86/cpu.h" | ||
| 25 | #include "libavcodec/h264dsp.h" | ||
| 26 | |||
| 27 | /***********************************/ | ||
| 28 | /* IDCT */ | ||
| 29 | #define IDCT_ADD_FUNC(NUM, DEPTH, OPT) \ | ||
| 30 | void ff_h264_idct ## NUM ## _add_ ## DEPTH ## _ ## OPT(uint8_t *dst, \ | ||
| 31 | int16_t *block, \ | ||
| 32 | int stride); | ||
| 33 | |||
| 34 | IDCT_ADD_FUNC(, 8, sse2) | ||
| 35 | IDCT_ADD_FUNC(, 8, avx) | ||
| 36 | IDCT_ADD_FUNC(, 10, sse2) | ||
| 37 | IDCT_ADD_FUNC(_dc, 8, sse2) | ||
| 38 | IDCT_ADD_FUNC(_dc, 8, avx) | ||
| 39 | IDCT_ADD_FUNC(_dc, 10, mmxext) | ||
| 40 | IDCT_ADD_FUNC(8_dc, 8, mmxext) | ||
| 41 | IDCT_ADD_FUNC(8_dc, 10, sse2) | ||
| 42 | IDCT_ADD_FUNC(8, 8, sse2) | ||
| 43 | IDCT_ADD_FUNC(8, 10, sse2) | ||
| 44 | IDCT_ADD_FUNC(, 10, avx) | ||
| 45 | IDCT_ADD_FUNC(8_dc, 10, avx) | ||
| 46 | IDCT_ADD_FUNC(8, 10, avx) | ||
| 47 | |||
| 48 | |||
| 49 | #define IDCT_ADD_REP_FUNC(NUM, REP, DEPTH, OPT) \ | ||
| 50 | void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ | ||
| 51 | (uint8_t *dst, const int *block_offset, \ | ||
| 52 | int16_t *block, int stride, const uint8_t nnzc[5 * 8]); | ||
| 53 | |||
| 54 | IDCT_ADD_REP_FUNC(8, 4, 8, sse2) | ||
| 55 | IDCT_ADD_REP_FUNC(8, 4, 10, sse2) | ||
| 56 | IDCT_ADD_REP_FUNC(8, 4, 10, avx) | ||
| 57 | IDCT_ADD_REP_FUNC(, 16, 8, sse2) | ||
| 58 | IDCT_ADD_REP_FUNC(, 16, 10, sse2) | ||
| 59 | IDCT_ADD_REP_FUNC(, 16intra, 8, sse2) | ||
| 60 | IDCT_ADD_REP_FUNC(, 16intra, 10, sse2) | ||
| 61 | IDCT_ADD_REP_FUNC(, 16, 10, avx) | ||
| 62 | IDCT_ADD_REP_FUNC(, 16intra, 10, avx) | ||
| 63 | |||
| 64 | |||
| 65 | #define IDCT_ADD_REP_FUNC2(NUM, REP, DEPTH, OPT) \ | ||
| 66 | void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ | ||
| 67 | (uint8_t **dst, const int *block_offset, \ | ||
| 68 | int16_t *block, int stride, const uint8_t nnzc[15 * 8]); | ||
| 69 | |||
| 70 | IDCT_ADD_REP_FUNC2(, 8, 8, sse2) | ||
| 71 | IDCT_ADD_REP_FUNC2(, 8, 10, sse2) | ||
| 72 | IDCT_ADD_REP_FUNC2(, 8, 10, avx) | ||
| 73 | |||
| 74 | IDCT_ADD_REP_FUNC2(, 8_422, 8, mmx) | ||
| 75 | |||
| 76 | IDCT_ADD_REP_FUNC2(, 8_422, 10, sse2) | ||
| 77 | IDCT_ADD_REP_FUNC2(, 8_422, 10, avx) | ||
| 78 | |||
| 79 | void ff_h264_luma_dc_dequant_idct_sse2(int16_t *output, int16_t *input, int qmul); | ||
| 80 | |||
| 81 | /***********************************/ | ||
| 82 | /* deblocking */ | ||
| 83 | |||
| 84 | void ff_h264_loop_filter_strength_mmxext(int16_t bS[2][4][4], uint8_t nnz[40], | ||
| 85 | int8_t ref[2][40], | ||
| 86 | int16_t mv[2][40][2], | ||
| 87 | int bidir, int edges, int step, | ||
| 88 | int mask_mv0, int mask_mv1, int field); | ||
| 89 | |||
| 90 | #define LF_FUNC(DIR, TYPE, DEPTH, OPT) \ | ||
| 91 | void ff_deblock_ ## DIR ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT(uint8_t *pix, \ | ||
| 92 | ptrdiff_t stride, \ | ||
| 93 | int alpha, \ | ||
| 94 | int beta, \ | ||
| 95 | int8_t *tc0); | ||
| 96 | #define LF_IFUNC(DIR, TYPE, DEPTH, OPT) \ | ||
| 97 | void ff_deblock_ ## DIR ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT(uint8_t *pix, \ | ||
| 98 | ptrdiff_t stride, \ | ||
| 99 | int alpha, \ | ||
| 100 | int beta); | ||
| 101 | |||
| 102 | #define LF_FUNCS(type, depth) \ | ||
| 103 | LF_FUNC(h, luma, depth, sse2) \ | ||
| 104 | LF_IFUNC(h, luma_intra, depth, sse2) \ | ||
| 105 | LF_FUNC(v, luma, depth, sse2) \ | ||
| 106 | LF_IFUNC(v, luma_intra, depth, sse2) \ | ||
| 107 | LF_FUNC(h, chroma, depth, sse2) \ | ||
| 108 | LF_IFUNC(h, chroma_intra, depth, sse2) \ | ||
| 109 | LF_FUNC(h, chroma422, depth, sse2) \ | ||
| 110 | LF_IFUNC(h, chroma422_intra, depth, sse2) \ | ||
| 111 | LF_FUNC(v, chroma, depth, sse2) \ | ||
| 112 | LF_IFUNC(v, chroma_intra, depth, sse2) \ | ||
| 113 | LF_FUNC(h, luma, depth, avx) \ | ||
| 114 | LF_IFUNC(h, luma_intra, depth, avx) \ | ||
| 115 | LF_FUNC(v, luma, depth, avx) \ | ||
| 116 | LF_IFUNC(v, luma_intra, depth, avx) \ | ||
| 117 | LF_FUNC(h, chroma, depth, avx) \ | ||
| 118 | LF_IFUNC(h, chroma_intra, depth, avx) \ | ||
| 119 | LF_FUNC(h, chroma422, depth, avx) \ | ||
| 120 | LF_IFUNC(h, chroma422_intra, depth, avx) \ | ||
| 121 | LF_FUNC(v, chroma, depth, avx) \ | ||
| 122 | LF_IFUNC(v, chroma_intra, depth, avx) | ||
| 123 | |||
| 124 | LF_FUNC(h, luma_mbaff, 8, sse2) | ||
| 125 | LF_FUNC(h, luma_mbaff, 8, avx) | ||
| 126 | |||
| 127 | LF_FUNCS(uint8_t, 8) | ||
| 128 | LF_FUNCS(uint16_t, 10) | ||
| 129 | |||
| 130 | LF_FUNC(v, luma, 10, mmxext) | ||
| 131 | LF_FUNC(h, luma, 10, mmxext) | ||
| 132 | LF_IFUNC(v, luma_intra, 10, mmxext) | ||
| 133 | LF_IFUNC(h, luma_intra, 10, mmxext) | ||
| 134 | |||
| 135 | /***********************************/ | ||
| 136 | /* weighted prediction */ | ||
| 137 | |||
| 138 | #define H264_WEIGHT(W, OPT) \ | ||
| 139 | void ff_h264_weight_ ## W ## _ ## OPT(uint8_t *dst, ptrdiff_t stride, \ | ||
| 140 | int height, int log2_denom, \ | ||
| 141 | int weight, int offset); | ||
| 142 | |||
| 143 | #define H264_BIWEIGHT(W, OPT) \ | ||
| 144 | void ff_h264_biweight_ ## W ## _ ## OPT(uint8_t *dst, uint8_t *src, \ | ||
| 145 | ptrdiff_t stride, int height, \ | ||
| 146 | int log2_denom, int weightd, \ | ||
| 147 | int weights, int offset); | ||
| 148 | |||
| 149 | #define H264_BIWEIGHT_MMX(W) \ | ||
| 150 | H264_WEIGHT(W, mmxext) \ | ||
| 151 | H264_BIWEIGHT(W, mmxext) | ||
| 152 | |||
| 153 | #define H264_BIWEIGHT_SSE(W) \ | ||
| 154 | H264_WEIGHT(W, sse2) \ | ||
| 155 | H264_BIWEIGHT(W, sse2) \ | ||
| 156 | H264_BIWEIGHT(W, ssse3) | ||
| 157 | |||
| 158 | H264_BIWEIGHT_SSE(16) | ||
| 159 | H264_BIWEIGHT_SSE(8) | ||
| 160 | H264_BIWEIGHT_MMX(4) | ||
| 161 | |||
| 162 | #define H264_WEIGHT_10(W, DEPTH, OPT) \ | ||
| 163 | void ff_h264_weight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \ | ||
| 164 | ptrdiff_t stride, \ | ||
| 165 | int height, \ | ||
| 166 | int log2_denom, \ | ||
| 167 | int weight, \ | ||
| 168 | int offset); | ||
| 169 | |||
| 170 | #define H264_BIWEIGHT_10(W, DEPTH, OPT) \ | ||
| 171 | void ff_h264_biweight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \ | ||
| 172 | uint8_t *src, \ | ||
| 173 | ptrdiff_t stride, \ | ||
| 174 | int height, \ | ||
| 175 | int log2_denom, \ | ||
| 176 | int weightd, \ | ||
| 177 | int weights, \ | ||
| 178 | int offset); | ||
| 179 | |||
| 180 | #define H264_BIWEIGHT_10_SSE(W, DEPTH) \ | ||
| 181 | H264_WEIGHT_10(W, DEPTH, sse2) \ | ||
| 182 | H264_WEIGHT_10(W, DEPTH, sse4) \ | ||
| 183 | H264_BIWEIGHT_10(W, DEPTH, sse2) \ | ||
| 184 | H264_BIWEIGHT_10(W, DEPTH, sse4) | ||
| 185 | |||
| 186 | H264_BIWEIGHT_10_SSE(16, 10) | ||
| 187 | H264_BIWEIGHT_10_SSE(8, 10) | ||
| 188 | H264_BIWEIGHT_10_SSE(4, 10) | ||
| 189 | |||
| 190 | 1433 | av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, | |
| 191 | const int chroma_format_idc) | ||
| 192 | { | ||
| 193 | 1433 | int cpu_flags = av_get_cpu_flags(); | |
| 194 | |||
| 195 |
4/4✓ Branch 0 taken 497 times.
✓ Branch 1 taken 936 times.
✓ Branch 2 taken 418 times.
✓ Branch 3 taken 79 times.
|
1433 | if (EXTERNAL_MMXEXT(cpu_flags) && chroma_format_idc <= 1) |
| 196 | 418 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; | |
| 197 | |||
| 198 |
2/2✓ Branch 0 taken 1125 times.
✓ Branch 1 taken 308 times.
|
1433 | if (bit_depth == 8) { |
| 199 |
2/2✓ Branch 0 taken 276 times.
✓ Branch 1 taken 849 times.
|
1125 | if (EXTERNAL_MMX(cpu_flags)) { |
| 200 |
2/2✓ Branch 0 taken 33 times.
✓ Branch 1 taken 243 times.
|
276 | if (chroma_format_idc <= 1) { |
| 201 | } else { | ||
| 202 | 33 | c->h264_idct_add8 = ff_h264_idct_add8_422_8_mmx; | |
| 203 | } | ||
| 204 | } | ||
| 205 |
2/2✓ Branch 0 taken 269 times.
✓ Branch 1 taken 856 times.
|
1125 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 206 | 269 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; | |
| 207 | |||
| 208 | 269 | c->weight_h264_pixels_tab[2] = ff_h264_weight_4_mmxext; | |
| 209 | |||
| 210 | 269 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmxext; | |
| 211 | } | ||
| 212 |
2/2✓ Branch 0 taken 255 times.
✓ Branch 1 taken 870 times.
|
1125 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 213 | 255 | c->h264_idct8_add = ff_h264_idct8_add_8_sse2; | |
| 214 | |||
| 215 | 255 | c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; | |
| 216 | 255 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2; | |
| 217 |
2/2✓ Branch 0 taken 228 times.
✓ Branch 1 taken 27 times.
|
255 | if (chroma_format_idc <= 1) |
| 218 | 228 | c->h264_idct_add8 = ff_h264_idct_add8_8_sse2; | |
| 219 | 255 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2; | |
| 220 | 255 | c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2; | |
| 221 | |||
| 222 | 255 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_sse2; | |
| 223 | 255 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_sse2; | |
| 224 | |||
| 225 | 255 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_sse2; | |
| 226 | 255 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_sse2; | |
| 227 | |||
| 228 | 255 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_sse2; | |
| 229 | 255 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_sse2; | |
| 230 | 255 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2; | |
| 231 | 255 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_sse2; | |
| 232 | |||
| 233 | #if ARCH_X86_64 | ||
| 234 | 255 | c->h264_h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_sse2; | |
| 235 | #endif | ||
| 236 | |||
| 237 | 255 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_sse2; | |
| 238 | 255 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_sse2; | |
| 239 |
2/2✓ Branch 0 taken 228 times.
✓ Branch 1 taken 27 times.
|
255 | if (chroma_format_idc <= 1) { |
| 240 | 228 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_sse2; | |
| 241 | 228 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_sse2; | |
| 242 | } else { | ||
| 243 | 27 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_sse2; | |
| 244 | 27 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_sse2; | |
| 245 | } | ||
| 246 | |||
| 247 | 255 | c->h264_idct_add = ff_h264_idct_add_8_sse2; | |
| 248 | 255 | c->h264_idct_dc_add = ff_h264_idct_dc_add_8_sse2; | |
| 249 | } | ||
| 250 |
2/2✓ Branch 0 taken 241 times.
✓ Branch 1 taken 884 times.
|
1125 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 251 | 241 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3; | |
| 252 | 241 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3; | |
| 253 | } | ||
| 254 |
2/2✓ Branch 0 taken 206 times.
✓ Branch 1 taken 919 times.
|
1125 | if (EXTERNAL_AVX(cpu_flags)) { |
| 255 | 206 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx; | |
| 256 | 206 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx; | |
| 257 | 206 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_avx; | |
| 258 | 206 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_avx; | |
| 259 | #if ARCH_X86_64 | ||
| 260 | 206 | c->h264_h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_avx; | |
| 261 | #endif | ||
| 262 | |||
| 263 | 206 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_avx; | |
| 264 | 206 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_avx; | |
| 265 |
2/2✓ Branch 0 taken 193 times.
✓ Branch 1 taken 13 times.
|
206 | if (chroma_format_idc <= 1) { |
| 266 | 193 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_avx; | |
| 267 | 193 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_avx; | |
| 268 | } else { | ||
| 269 | 13 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_avx; | |
| 270 | 13 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_avx; | |
| 271 | } | ||
| 272 | |||
| 273 | 206 | c->h264_idct_add = ff_h264_idct_add_8_avx; | |
| 274 | 206 | c->h264_idct_dc_add = ff_h264_idct_dc_add_8_avx; | |
| 275 | } | ||
| 276 |
2/2✓ Branch 0 taken 149 times.
✓ Branch 1 taken 159 times.
|
308 | } else if (bit_depth == 10) { |
| 277 |
2/2✓ Branch 0 taken 96 times.
✓ Branch 1 taken 53 times.
|
149 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 278 | #if ARCH_X86_32 && !HAVE_ALIGNED_STACK | ||
| 279 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_10_mmxext; | ||
| 280 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_10_mmxext; | ||
| 281 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_mmxext; | ||
| 282 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_mmxext; | ||
| 283 | #endif /* ARCH_X86_32 && !HAVE_ALIGNED_STACK */ | ||
| 284 | 96 | c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmxext; | |
| 285 | } | ||
| 286 |
2/2✓ Branch 0 taken 82 times.
✓ Branch 1 taken 67 times.
|
149 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 287 | 82 | c->h264_idct_add = ff_h264_idct_add_10_sse2; | |
| 288 | 82 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; | |
| 289 | |||
| 290 | 82 | c->h264_idct_add16 = ff_h264_idct_add16_10_sse2; | |
| 291 |
2/2✓ Branch 0 taken 62 times.
✓ Branch 1 taken 20 times.
|
82 | if (chroma_format_idc <= 1) { |
| 292 | 62 | c->h264_idct_add8 = ff_h264_idct_add8_10_sse2; | |
| 293 | } else { | ||
| 294 | 20 | c->h264_idct_add8 = ff_h264_idct_add8_422_10_sse2; | |
| 295 | } | ||
| 296 | 82 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_sse2; | |
| 297 | #if HAVE_ALIGNED_STACK | ||
| 298 | 82 | c->h264_idct8_add = ff_h264_idct8_add_10_sse2; | |
| 299 | 82 | c->h264_idct8_add4 = ff_h264_idct8_add4_10_sse2; | |
| 300 | #endif /* HAVE_ALIGNED_STACK */ | ||
| 301 | |||
| 302 | 82 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse2; | |
| 303 | 82 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse2; | |
| 304 | 82 | c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse2; | |
| 305 | |||
| 306 | 82 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse2; | |
| 307 | 82 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse2; | |
| 308 | 82 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse2; | |
| 309 | |||
| 310 | 82 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_sse2; | |
| 311 | 82 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_sse2; | |
| 312 |
2/2✓ Branch 0 taken 62 times.
✓ Branch 1 taken 20 times.
|
82 | if (chroma_format_idc <= 1) { |
| 313 | 62 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_10_sse2; | |
| 314 | } else { | ||
| 315 | 20 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_10_sse2; | |
| 316 | } | ||
| 317 | #if HAVE_ALIGNED_STACK | ||
| 318 | 82 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_10_sse2; | |
| 319 | 82 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_10_sse2; | |
| 320 | 82 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_sse2; | |
| 321 | 82 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; | |
| 322 | #endif /* HAVE_ALIGNED_STACK */ | ||
| 323 | } | ||
| 324 |
2/2✓ Branch 0 taken 61 times.
✓ Branch 1 taken 88 times.
|
149 | if (EXTERNAL_SSE4(cpu_flags)) { |
| 325 | 61 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4; | |
| 326 | 61 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4; | |
| 327 | 61 | c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse4; | |
| 328 | |||
| 329 | 61 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse4; | |
| 330 | 61 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4; | |
| 331 | 61 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4; | |
| 332 | } | ||
| 333 |
2/2✓ Branch 0 taken 33 times.
✓ Branch 1 taken 116 times.
|
149 | if (EXTERNAL_AVX(cpu_flags)) { |
| 334 | 33 | c->h264_idct_dc_add = | |
| 335 | 33 | c->h264_idct_add = ff_h264_idct_add_10_avx; | |
| 336 | 33 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; | |
| 337 | |||
| 338 | 33 | c->h264_idct_add16 = ff_h264_idct_add16_10_avx; | |
| 339 |
2/2✓ Branch 0 taken 27 times.
✓ Branch 1 taken 6 times.
|
33 | if (chroma_format_idc <= 1) { |
| 340 | 27 | c->h264_idct_add8 = ff_h264_idct_add8_10_avx; | |
| 341 | } else { | ||
| 342 | 6 | c->h264_idct_add8 = ff_h264_idct_add8_422_10_avx; | |
| 343 | } | ||
| 344 | 33 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_avx; | |
| 345 | #if HAVE_ALIGNED_STACK | ||
| 346 | 33 | c->h264_idct8_add = ff_h264_idct8_add_10_avx; | |
| 347 | 33 | c->h264_idct8_add4 = ff_h264_idct8_add4_10_avx; | |
| 348 | #endif /* HAVE_ALIGNED_STACK */ | ||
| 349 | |||
| 350 | 33 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_avx; | |
| 351 | 33 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_avx; | |
| 352 |
2/2✓ Branch 0 taken 27 times.
✓ Branch 1 taken 6 times.
|
33 | if (chroma_format_idc <= 1) { |
| 353 | 27 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_10_avx; | |
| 354 | } else { | ||
| 355 | 6 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_10_avx; | |
| 356 | } | ||
| 357 | #if HAVE_ALIGNED_STACK | ||
| 358 | 33 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_10_avx; | |
| 359 | 33 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_10_avx; | |
| 360 | 33 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_avx; | |
| 361 | 33 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_avx; | |
| 362 | #endif /* HAVE_ALIGNED_STACK */ | ||
| 363 | } | ||
| 364 | } | ||
| 365 | 1433 | } | |
| 366 |