This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components).
Unified · Split
| @@ -3550,8 +3550,9 @@ static void aacdec_init(AACContext *c) · 3549 unmodified lines | ||
| 3550 | 3550 | #endif |
| 3551 | 3551 | |
| 3552 | 3552 | #if !USE_FIXED |
| 3553 | − if(ARCH_MIPS) | |
| 3554 | − ff_aacdec_init_mips(c); | |
| 3553 | +#if ARCH_MIPS | |
| 3554 | + ff_aacdec_init_mips(c); | |
| 3555 | +#endif | |
| 3555 | 3556 | #endif /* !USE_FIXED */ |
| 3556 | 3557 | } |
| 3557 | 3558 | /** |
| @@ -1096,11 +1096,13 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) · 1095 unmodified lines | ||
| 1096 | 1096 | s->abs_pow34 = abs_pow34_v; |
| 1097 | 1097 | s->quant_bands = quantize_bands; |
| 1098 | 1098 | |
| 1099 | − if (ARCH_X86) | |
| 1100 | − ff_aac_dsp_init_x86(s); | |
| 1099 | +#if ARCH_X86 | |
| 1100 | + ff_aac_dsp_init_x86(s); | |
| 1101 | +#endif | |
| 1101 | 1102 | |
| 1102 | − if (HAVE_MIPSDSP) | |
| 1103 | − ff_aac_coder_init_mips(s); | |
| 1103 | +#if HAVE_MIPSDSP | |
| 1104 | + ff_aac_coder_init_mips(s); | |
| 1105 | +#endif | |
| 1104 | 1106 | |
| 1105 | 1107 | ff_af_queue_init(avctx, &s->afq); |
| 1106 | 1108 | ff_aac_tableinit(); |
| @@ -221,13 +221,14 @@ av_cold void AAC_RENAME(ff_psdsp_init)(PSDSPContext *s) · 220 unmodified lines | ||
| 221 | 221 | s->stereo_interpolate[1] = ps_stereo_interpolate_ipdopd_c; |
| 222 | 222 | |
| 223 | 223 | #if !USE_FIXED |
| 224 | − if (ARCH_ARM) | |
| 225 | − ff_psdsp_init_arm(s); | |
| 226 | − if (ARCH_AARCH64) | |
| 227 | − ff_psdsp_init_aarch64(s); | |
| 228 | − if (ARCH_MIPS) | |
| 229 | − ff_psdsp_init_mips(s); | |
| 230 | − if (ARCH_X86) | |
| 231 | − ff_psdsp_init_x86(s); | |
| 224 | +#if ARCH_ARM | |
| 225 | + ff_psdsp_init_arm(s); | |
| 226 | +#elif ARCH_AARCH64 | |
| 227 | + ff_psdsp_init_aarch64(s); | |
| 228 | +#elif ARCH_MIPS | |
| 229 | + ff_psdsp_init_mips(s); | |
| 230 | +#elif ARCH_X86 | |
| 231 | + ff_psdsp_init_x86(s); | |
| 232 | +#endif | |
| 232 | 233 | #endif /* !USE_FIXED */ |
| 233 | 234 | } |
| @@ -1573,7 +1573,8 @@ static void aacsbr_func_ptr_init(AACSBRContext *c) · 1572 unmodified lines | ||
| 1573 | 1573 | c->sbr_hf_inverse_filter = sbr_hf_inverse_filter; |
| 1574 | 1574 | |
| 1575 | 1575 | #if !USE_FIXED |
| 1576 | − if(ARCH_MIPS) | |
| 1577 | − ff_aacsbr_func_ptr_init_mips(c); | |
| 1576 | +#if ARCH_MIPS | |
| 1577 | + ff_aacsbr_func_ptr_init_mips(c); | |
| 1578 | +#endif | |
| 1578 | 1579 | #endif |
| 1579 | 1580 | } |
| @@ -363,8 +363,9 @@ void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix, · 362 unmodified lines | ||
| 363 | 363 | c->downmix = ac3_downmix_5_to_1_symmetric_c; |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | − if (ARCH_X86) | |
| 367 | − ff_ac3dsp_set_downmix_x86(c); | |
| 366 | +#if ARCH_X86 | |
| 367 | + ff_ac3dsp_set_downmix_x86(c); | |
| 368 | +#endif | |
| 368 | 369 | } |
| 369 | 370 | |
| 370 | 371 | if (c->downmix) |
| @@ -388,10 +389,11 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact) · 17 unmodified lines | ||
| 388 | 389 | c->downmix = NULL; |
| 389 | 390 | c->downmix_fixed = NULL; |
| 390 | 391 | |
| 391 | − if (ARCH_ARM) | |
| 392 | − ff_ac3dsp_init_arm(c, bit_exact); | |
| 393 | − if (ARCH_X86) | |
| 394 | − ff_ac3dsp_init_x86(c, bit_exact); | |
| 395 | − if (ARCH_MIPS) | |
| 396 | − ff_ac3dsp_init_mips(c, bit_exact); | |
| 392 | +#if ARCH_ARM | |
| 393 | + ff_ac3dsp_init_arm(c, bit_exact); | |
| 394 | +#elif ARCH_X86 | |
| 395 | + ff_ac3dsp_init_x86(c, bit_exact); | |
| 396 | +#elif ARCH_MIPS | |
| 397 | + ff_ac3dsp_init_mips(c, bit_exact); | |
| 398 | +#endif | |
| 397 | 399 | } |
| @@ -152,6 +152,7 @@ void ff_acelp_filter_init(ACELPFContext *c) · 151 unmodified lines | ||
| 152 | 152 | c->acelp_interpolatef = ff_acelp_interpolatef; |
| 153 | 153 | c->acelp_apply_order_2_transfer_function = ff_acelp_apply_order_2_transfer_function; |
| 154 | 154 | |
| 155 | − if(HAVE_MIPSFPU) | |
| 156 | − ff_acelp_filter_init_mips(c); | |
| 155 | +#if HAVE_MIPSFPU | |
| 156 | + ff_acelp_filter_init_mips(c); | |
| 157 | +#endif | |
| 157 | 158 | } |
| @@ -259,6 +259,7 @@ void ff_acelp_vectors_init(ACELPVContext *c) · 258 unmodified lines | ||
| 259 | 259 | { |
| 260 | 260 | c->weighted_vector_sumf = ff_weighted_vector_sumf; |
| 261 | 261 | |
| 262 | − if(HAVE_MIPSFPU) | |
| 263 | − ff_acelp_vectors_init_mips(c); | |
| 262 | +#if HAVE_MIPSFPU | |
| 263 | + ff_acelp_vectors_init_mips(c); | |
| 264 | +#endif | |
| 264 | 265 | } |
| @@ -58,6 +58,7 @@ av_cold void ff_alacdsp_init(ALACDSPContext *c) · 57 unmodified lines | ||
| 58 | 58 | c->append_extra_bits[0] = |
| 59 | 59 | c->append_extra_bits[1] = append_extra_bits; |
| 60 | 60 | |
| 61 | − if (ARCH_X86) | |
| 62 | − ff_alacdsp_init_x86(c); | |
| 61 | +#if ARCH_X86 | |
| 62 | + ff_alacdsp_init_x86(c); | |
| 63 | +#endif | |
| 63 | 64 | } |
| @@ -109,10 +109,11 @@ av_cold void ff_audiodsp_init(AudioDSPContext *c) · 108 unmodified lines | ||
| 109 | 109 | c->vector_clip_int32 = vector_clip_int32_c; |
| 110 | 110 | c->vector_clipf = vector_clipf_c; |
| 111 | 111 | |
| 112 | − if (ARCH_ARM) | |
| 113 | − ff_audiodsp_init_arm(c); | |
| 114 | − if (ARCH_PPC) | |
| 115 | − ff_audiodsp_init_ppc(c); | |
| 116 | − if (ARCH_X86) | |
| 117 | − ff_audiodsp_init_x86(c); | |
| 112 | +#if ARCH_ARM | |
| 113 | + ff_audiodsp_init_arm(c); | |
| 114 | +#elif ARCH_PPC | |
| 115 | + ff_audiodsp_init_ppc(c); | |
| 116 | +#elif ARCH_X86 | |
| 117 | + ff_audiodsp_init_x86(c); | |
| 118 | +#endif | |
| 118 | 119 | } |
| @@ -64,14 +64,15 @@ av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx) · 63 unmodified lines | ||
| 64 | 64 | c->fill_block_tab[0] = fill_block16_c; |
| 65 | 65 | c->fill_block_tab[1] = fill_block8_c; |
| 66 | 66 | |
| 67 | − if (ARCH_ALPHA) | |
| 68 | − ff_blockdsp_init_alpha(c); | |
| 69 | − if (ARCH_ARM) | |
| 70 | − ff_blockdsp_init_arm(c); | |
| 71 | − if (ARCH_PPC) | |
| 72 | − ff_blockdsp_init_ppc(c); | |
| 73 | − if (ARCH_X86) | |
| 74 | − ff_blockdsp_init_x86(c, avctx); | |
| 75 | − if (ARCH_MIPS) | |
| 76 | − ff_blockdsp_init_mips(c); | |
| 67 | +#if ARCH_ALPHA | |
| 68 | + ff_blockdsp_init_alpha(c); | |
| 69 | +#elif ARCH_ARM | |
| 70 | + ff_blockdsp_init_arm(c); | |
| 71 | +#elif ARCH_PPC | |
| 72 | + ff_blockdsp_init_ppc(c); | |
| 73 | +#elif ARCH_X86 | |
| 74 | + ff_blockdsp_init_x86(c, avctx); | |
| 75 | +#elif ARCH_MIPS | |
| 76 | + ff_blockdsp_init_mips(c); | |
| 77 | +#endif | |
| 77 | 78 | } |
| @@ -51,6 +51,7 @@ av_cold void ff_bswapdsp_init(BswapDSPContext *c) · 50 unmodified lines | ||
| 51 | 51 | c->bswap_buf = bswap_buf; |
| 52 | 52 | c->bswap16_buf = bswap16_buf; |
| 53 | 53 | |
| 54 | − if (ARCH_X86) | |
| 55 | − ff_bswapdsp_init_x86(c); | |
| 54 | +#if ARCH_X86 | |
| 55 | + ff_bswapdsp_init_x86(c); | |
| 56 | +#endif | |
| 56 | 57 | } |
| @@ -577,6 +577,7 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) { · 576 unmodified lines | ||
| 577 | 577 | c->cavs_idct8_add = cavs_idct8_add_c; |
| 578 | 578 | c->idct_perm = FF_IDCT_PERM_NONE; |
| 579 | 579 | |
| 580 | − if (ARCH_X86) | |
| 581 | − ff_cavsdsp_init_x86(c, avctx); | |
| 580 | +#if ARCH_X86 | |
| 581 | + ff_cavsdsp_init_x86(c, avctx); | |
| 582 | +#endif | |
| 582 | 583 | } |
| @@ -215,6 +215,7 @@ void ff_celp_filter_init(CELPFContext *c) · 214 unmodified lines | ||
| 215 | 215 | c->celp_lp_synthesis_filterf = ff_celp_lp_synthesis_filterf; |
| 216 | 216 | c->celp_lp_zero_synthesis_filterf = ff_celp_lp_zero_synthesis_filterf; |
| 217 | 217 | |
| 218 | − if(HAVE_MIPSFPU) | |
| 219 | − ff_celp_filter_init_mips(c); | |
| 218 | +#if HAVE_MIPSFPU | |
| 219 | + ff_celp_filter_init_mips(c); | |
| 220 | +#endif | |
| 220 | 221 | } |
| @@ -122,6 +122,7 @@ void ff_celp_math_init(CELPMContext *c) · 121 unmodified lines | ||
| 122 | 122 | { |
| 123 | 123 | c->dot_productf = ff_dot_productf; |
| 124 | 124 | |
| 125 | − if(HAVE_MIPSFPU) | |
| 126 | − ff_celp_math_init_mips(c); | |
| 125 | +#if HAVE_MIPSFPU | |
| 126 | + ff_celp_math_init_mips(c); | |
| 127 | +#endif | |
| 127 | 128 | } |
| @@ -112,6 +112,7 @@ av_cold void ff_cfhddsp_init(CFHDDSPContext *c, int depth, int bayer) · 111 unmodified lines | ||
| 112 | 112 | else |
| 113 | 113 | c->horiz_filter_clip = horiz_filter_clip; |
| 114 | 114 | |
| 115 | − if (ARCH_X86) | |
| 116 | − ff_cfhddsp_init_x86(c, depth, bayer); | |
| 115 | +#if ARCH_X86 | |
| 116 | + ff_cfhddsp_init_x86(c, depth, bayer); | |
| 117 | +#endif | |
| 117 | 118 | } |
| @@ -73,6 +73,7 @@ av_cold void ff_cfhdencdsp_init(CFHDEncDSPContext *c) · 72 unmodified lines | ||
| 73 | 73 | c->horiz_filter = horiz_filter; |
| 74 | 74 | c->vert_filter = vert_filter; |
| 75 | 75 | |
| 76 | − if (ARCH_X86) | |
| 77 | − ff_cfhdencdsp_init_x86(c); | |
| 76 | +#if ARCH_X86 | |
| 77 | + ff_cfhdencdsp_init_x86(c); | |
| 78 | +#endif | |
| 78 | 79 | } |
| @@ -485,6 +485,7 @@ av_cold void ff_dcadsp_init(DCADSPContext *s) · 484 unmodified lines | ||
| 485 | 485 | s->lbr_bank = lbr_bank_c; |
| 486 | 486 | s->lfe_iir = lfe_iir_c; |
| 487 | 487 | |
| 488 | − if (ARCH_X86) | |
| 489 | − ff_dcadsp_init_x86(s); | |
| 488 | +#if ARCH_X86 | |
| 489 | + ff_dcadsp_init_x86(s); | |
| 490 | +#endif | |
| 490 | 491 | } |
| @@ -214,8 +214,9 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) · 213 unmodified lines | ||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | s->dct32 = ff_dct32_float; |
| 217 | − if (ARCH_X86) | |
| 218 | − ff_dct_init_x86(s); | |
| 217 | +#if ARCH_X86 | |
| 218 | + ff_dct_init_x86(s); | |
| 219 | +#endif | |
| 219 | 220 | |
| 220 | 221 | return 0; |
| 221 | 222 | } |
| @@ -58,8 +58,10 @@ int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type, · 57 unmodified lines | ||
| 58 | 58 | return AVERROR_INVALIDDATA; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | − if (ARCH_X86 && bit_depth == 8) | |
| 61 | +#if ARCH_X86 | |
| 62 | + if (bit_depth == 8) | |
| 62 | 63 | ff_spatial_idwt_init_x86(d, type); |
| 64 | +#endif | |
| 63 | 65 | return 0; |
| 64 | 66 | } |
| 65 | 67 | |
| @@ -247,6 +247,7 @@ av_cold void ff_diracdsp_init(DiracDSPContext *c) · 246 unmodified lines | ||
| 247 | 247 | PIXFUNC(avg, 16); |
| 248 | 248 | PIXFUNC(avg, 32); |
| 249 | 249 | |
| 250 | − if (ARCH_X86) | |
| 251 | − ff_diracdsp_init_x86(c); | |
| 250 | +#if ARCH_X86 | |
| 251 | + ff_diracdsp_init_x86(c); | |
| 252 | +#endif | |
| 252 | 253 | } |
| @@ -445,8 +445,9 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) · 444 unmodified lines | ||
| 445 | 445 | ctx->block_width_l2 = 3; |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | − if (ARCH_X86) | |
| 449 | − ff_dnxhdenc_init_x86(ctx); | |
| 448 | +#if ARCH_X86 | |
| 449 | + ff_dnxhdenc_init_x86(ctx); | |
| 450 | +#endif | |
| 450 | 451 | |
| 451 | 452 | ctx->m.mb_height = (avctx->height + 15) / 16; |
| 452 | 453 | ctx->m.mb_width = (avctx->width + 15) / 16; |
| @@ -51,6 +51,7 @@ av_cold void ff_exrdsp_init(ExrDSPContext *c) · 50 unmodified lines | ||
| 51 | 51 | c->reorder_pixels = reorder_pixels_scalar; |
| 52 | 52 | c->predictor = predictor_scalar; |
| 53 | 53 | |
| 54 | − if (ARCH_X86) | |
| 55 | − ff_exrdsp_init_x86(c); | |
| 54 | +#if ARCH_X86 | |
| 55 | + ff_exrdsp_init_x86(c); | |
| 56 | +#endif | |
| 56 | 57 | } |
| @@ -25,7 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx) |
| 27 | 27 | { |
| 28 | − const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 28 | + av_unused const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 29 | 29 | |
| 30 | 30 | if (avctx->bits_per_raw_sample == 10 || avctx->bits_per_raw_sample == 9) { |
| 31 | 31 | c->fdct = ff_jpeg_fdct_islow_10; |
| @@ -43,8 +43,9 @@ av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx) · 11 unmodified lines | ||
| 43 | 43 | c->fdct248 = ff_fdct248_islow_8; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | − if (ARCH_PPC) | |
| 47 | − ff_fdctdsp_init_ppc(c, avctx, high_bit_depth); | |
| 48 | − if (ARCH_X86) | |
| 49 | − ff_fdctdsp_init_x86(c, avctx, high_bit_depth); | |
| 46 | +#if ARCH_PPC | |
| 47 | + ff_fdctdsp_init_ppc(c, avctx, high_bit_depth); | |
| 48 | +#elif ARCH_X86 | |
| 49 | + ff_fdctdsp_init_x86(c, avctx, high_bit_depth); | |
| 50 | +#endif | |
| 50 | 51 | } |
| @@ -227,11 +227,18 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) · 226 unmodified lines | ||
| 227 | 227 | #endif |
| 228 | 228 | |
| 229 | 229 | #if FFT_FLOAT |
| 230 | − if (ARCH_AARCH64) ff_fft_init_aarch64(s); | |
| 231 | − if (ARCH_ARM) ff_fft_init_arm(s); | |
| 232 | − if (ARCH_PPC) ff_fft_init_ppc(s); | |
| 233 | − if (ARCH_X86) ff_fft_init_x86(s); | |
| 234 | − if (HAVE_MIPSFPU) ff_fft_init_mips(s); | |
| 230 | +#if ARCH_AARCH64 | |
| 231 | + ff_fft_init_aarch64(s); | |
| 232 | +#elif ARCH_ARM | |
| 233 | + ff_fft_init_arm(s); | |
| 234 | +#elif ARCH_PPC | |
| 235 | + ff_fft_init_ppc(s); | |
| 236 | +#elif ARCH_X86 | |
| 237 | + ff_fft_init_x86(s); | |
| 238 | +#endif | |
| 239 | +#if HAVE_MIPSFPU | |
| 240 | + ff_fft_init_mips(s); | |
| 241 | +#endif | |
| 235 | 242 | for(j=4; j<=nbits; j++) { |
| 236 | 243 | ff_init_ff_cos_tabs(j); |
| 237 | 244 | } |
| @@ -124,8 +124,9 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int cha · 123 unmodified lines | ||
| 124 | 124 | break; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | − if (ARCH_ARM) | |
| 128 | − ff_flacdsp_init_arm(c, fmt, channels, bps); | |
| 129 | − if (ARCH_X86) | |
| 130 | − ff_flacdsp_init_x86(c, fmt, channels, bps); | |
| 127 | +#if ARCH_ARM | |
| 128 | + ff_flacdsp_init_arm(c, fmt, channels, bps); | |
| 129 | +#elif ARCH_X86 | |
| 130 | + ff_flacdsp_init_x86(c, fmt, channels, bps); | |
| 131 | +#endif | |
| 131 | 132 | } |
| @@ -56,14 +56,16 @@ av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx) · 55 unmodified lines | ||
| 56 | 56 | c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c; |
| 57 | 57 | c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c; |
| 58 | 58 | |
| 59 | − if (ARCH_AARCH64) | |
| 60 | − ff_fmt_convert_init_aarch64(c, avctx); | |
| 61 | − if (ARCH_ARM) | |
| 62 | − ff_fmt_convert_init_arm(c, avctx); | |
| 63 | − if (ARCH_PPC) | |
| 64 | − ff_fmt_convert_init_ppc(c, avctx); | |
| 65 | − if (ARCH_X86) | |
| 66 | − ff_fmt_convert_init_x86(c, avctx); | |
| 67 | − if (HAVE_MIPSFPU) | |
| 68 | − ff_fmt_convert_init_mips(c); | |
| 59 | +#if ARCH_AARCH64 | |
| 60 | + ff_fmt_convert_init_aarch64(c, avctx); | |
| 61 | +#elif ARCH_ARM | |
| 62 | + ff_fmt_convert_init_arm(c, avctx); | |
| 63 | +#elif ARCH_PPC | |
| 64 | + ff_fmt_convert_init_ppc(c, avctx); | |
| 65 | +#elif ARCH_X86 | |
| 66 | + ff_fmt_convert_init_x86(c, avctx); | |
| 67 | +#endif | |
| 68 | +#if HAVE_MIPSFPU | |
| 69 | + ff_fmt_convert_init_mips(c); | |
| 70 | +#endif | |
| 69 | 71 | } |
| @@ -69,8 +69,9 @@ av_cold void ff_g722dsp_init(G722DSPContext *c) · 68 unmodified lines | ||
| 69 | 69 | { |
| 70 | 70 | c->apply_qmf = g722_apply_qmf; |
| 71 | 71 | |
| 72 | − if (ARCH_ARM) | |
| 73 | − ff_g722dsp_init_arm(c); | |
| 74 | − if (ARCH_X86) | |
| 75 | − ff_g722dsp_init_x86(c); | |
| 72 | +#if ARCH_ARM | |
| 73 | + ff_g722dsp_init_arm(c); | |
| 74 | +#elif ARCH_X86 | |
| 75 | + ff_g722dsp_init_x86(c); | |
| 76 | +#endif | |
| 76 | 77 | } |
| @@ -119,8 +119,9 @@ av_cold void ff_h263dsp_init(H263DSPContext *ctx) · 118 unmodified lines | ||
| 119 | 119 | ctx->h263_h_loop_filter = h263_h_loop_filter_c; |
| 120 | 120 | ctx->h263_v_loop_filter = h263_v_loop_filter_c; |
| 121 | 121 | |
| 122 | − if (ARCH_X86) | |
| 123 | − ff_h263dsp_init_x86(ctx); | |
| 124 | − if (ARCH_MIPS) | |
| 125 | − ff_h263dsp_init_mips(ctx); | |
| 122 | +#if ARCH_X86 | |
| 123 | + ff_h263dsp_init_x86(ctx); | |
| 124 | +#elif ARCH_MIPS | |
| 125 | + ff_h263dsp_init_mips(ctx); | |
| 126 | +#endif | |
| 126 | 127 | } |
| @@ -46,16 +46,17 @@ av_cold void ff_h264chroma_init(H264ChromaContext *c, int bit_depth) · 45 unmodified lines | ||
| 46 | 46 | SET_CHROMA(8); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | − if (ARCH_AARCH64) | |
| 50 | − ff_h264chroma_init_aarch64(c, bit_depth); | |
| 51 | − if (ARCH_ARM) | |
| 52 | − ff_h264chroma_init_arm(c, bit_depth); | |
| 53 | − if (ARCH_PPC) | |
| 54 | − ff_h264chroma_init_ppc(c, bit_depth); | |
| 55 | − if (ARCH_X86) | |
| 56 | − ff_h264chroma_init_x86(c, bit_depth); | |
| 57 | − if (ARCH_MIPS) | |
| 58 | − ff_h264chroma_init_mips(c, bit_depth); | |
| 59 | − if (ARCH_LOONGARCH64) | |
| 60 | − ff_h264chroma_init_loongarch(c, bit_depth); | |
| 49 | +#if ARCH_AARCH64 | |
| 50 | + ff_h264chroma_init_aarch64(c, bit_depth); | |
| 51 | +#elif ARCH_ARM | |
| 52 | + ff_h264chroma_init_arm(c, bit_depth); | |
| 53 | +#elif ARCH_PPC | |
| 54 | + ff_h264chroma_init_ppc(c, bit_depth); | |
| 55 | +#elif ARCH_X86 | |
| 56 | + ff_h264chroma_init_x86(c, bit_depth); | |
| 57 | +#elif ARCH_MIPS | |
| 58 | + ff_h264chroma_init_mips(c, bit_depth); | |
| 59 | +#elif ARCH_LOONGARCH64 | |
| 60 | + ff_h264chroma_init_loongarch(c, bit_depth); | |
| 61 | +#endif | |
| 61 | 62 | } |
| @@ -152,10 +152,17 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, · 151 unmodified lines | ||
| 152 | 152 | } |
| 153 | 153 | c->startcode_find_candidate = ff_startcode_find_candidate_c; |
| 154 | 154 | |
| 155 | − if (ARCH_AARCH64) ff_h264dsp_init_aarch64(c, bit_depth, chroma_format_idc); | |
| 156 | − if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); | |
| 157 | − if (ARCH_PPC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); | |
| 158 | − if (ARCH_X86) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc); | |
| 159 | − if (ARCH_MIPS) ff_h264dsp_init_mips(c, bit_depth, chroma_format_idc); | |
| 160 | − if (ARCH_LOONGARCH) ff_h264dsp_init_loongarch(c, bit_depth, chroma_format_idc); | |
| 155 | +#if ARCH_AARCH64 | |
| 156 | + ff_h264dsp_init_aarch64(c, bit_depth, chroma_format_idc); | |
| 157 | +#elif ARCH_ARM | |
| 158 | + ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); | |
| 159 | +#elif ARCH_PPC | |
| 160 | + ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); | |
| 161 | +#elif ARCH_X86 | |
| 162 | + ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc); | |
| 163 | +#elif ARCH_MIPS | |
| 164 | + ff_h264dsp_init_mips(c, bit_depth, chroma_format_idc); | |
| 165 | +#elif ARCH_LOONGARCH | |
| 166 | + ff_h264dsp_init_loongarch(c, bit_depth, chroma_format_idc); | |
| 167 | +#endif | |
| 161 | 168 | } |
| @@ -588,14 +588,15 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 587 unmodified lines | ||
| 588 | 588 | break; |
| 589 | 589 | } |
| 590 | 590 | |
| 591 | − if (ARCH_AARCH64) | |
| 592 | − ff_h264_pred_init_aarch64(h, codec_id, bit_depth, chroma_format_idc); | |
| 593 | − if (ARCH_ARM) | |
| 594 | − ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc); | |
| 595 | − if (ARCH_X86) | |
| 596 | − ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc); | |
| 597 | − if (ARCH_MIPS) | |
| 598 | − ff_h264_pred_init_mips(h, codec_id, bit_depth, chroma_format_idc); | |
| 599 | − if (ARCH_LOONGARCH) | |
| 600 | − ff_h264_pred_init_loongarch(h, codec_id, bit_depth, chroma_format_idc); | |
| 591 | +#if ARCH_AARCH64 | |
| 592 | + ff_h264_pred_init_aarch64(h, codec_id, bit_depth, chroma_format_idc); | |
| 593 | +#elif ARCH_ARM | |
| 594 | + ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc); | |
| 595 | +#elif ARCH_X86 | |
| 596 | + ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc); | |
| 597 | +#elif ARCH_MIPS | |
| 598 | + ff_h264_pred_init_mips(h, codec_id, bit_depth, chroma_format_idc); | |
| 599 | +#elif ARCH_LOONGARCH | |
| 600 | + ff_h264_pred_init_loongarch(h, codec_id, bit_depth, chroma_format_idc); | |
| 601 | +#endif | |
| 601 | 602 | } |
| @@ -96,16 +96,17 @@ av_cold void ff_h264qpel_init(H264QpelContext *c, int bit_depth) · 95 unmodified lines | ||
| 96 | 96 | break; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | − if (ARCH_AARCH64) | |
| 100 | − ff_h264qpel_init_aarch64(c, bit_depth); | |
| 101 | − if (ARCH_ARM) | |
| 102 | − ff_h264qpel_init_arm(c, bit_depth); | |
| 103 | − if (ARCH_PPC) | |
| 104 | − ff_h264qpel_init_ppc(c, bit_depth); | |
| 105 | − if (ARCH_X86) | |
| 106 | − ff_h264qpel_init_x86(c, bit_depth); | |
| 107 | − if (ARCH_MIPS) | |
| 108 | − ff_h264qpel_init_mips(c, bit_depth); | |
| 109 | − if (ARCH_LOONGARCH64) | |
| 110 | − ff_h264qpel_init_loongarch(c, bit_depth); | |
| 99 | +#if ARCH_AARCH64 | |
| 100 | + ff_h264qpel_init_aarch64(c, bit_depth); | |
| 101 | +#elif ARCH_ARM | |
| 102 | + ff_h264qpel_init_arm(c, bit_depth); | |
| 103 | +#elif ARCH_PPC | |
| 104 | + ff_h264qpel_init_ppc(c, bit_depth); | |
| 105 | +#elif ARCH_X86 | |
| 106 | + ff_h264qpel_init_x86(c, bit_depth); | |
| 107 | +#elif ARCH_MIPS | |
| 108 | + ff_h264qpel_init_mips(c, bit_depth); | |
| 109 | +#elif ARCH_LOONGARCH64 | |
| 110 | + ff_h264qpel_init_loongarch(c, bit_depth); | |
| 111 | +#endif | |
| 111 | 112 | } |
| @@ -257,16 +257,17 @@ int i = 0; · 256 unmodified lines | ||
| 257 | 257 | break; |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | − if (ARCH_AARCH64) | |
| 261 | − ff_hevc_dsp_init_aarch64(hevcdsp, bit_depth); | |
| 262 | − if (ARCH_ARM) | |
| 263 | − ff_hevc_dsp_init_arm(hevcdsp, bit_depth); | |
| 264 | − if (ARCH_PPC) | |
| 265 | − ff_hevc_dsp_init_ppc(hevcdsp, bit_depth); | |
| 266 | − if (ARCH_X86) | |
| 267 | − ff_hevc_dsp_init_x86(hevcdsp, bit_depth); | |
| 268 | − if (ARCH_MIPS) | |
| 269 | − ff_hevc_dsp_init_mips(hevcdsp, bit_depth); | |
| 270 | − if (ARCH_LOONGARCH) | |
| 271 | − ff_hevc_dsp_init_loongarch(hevcdsp, bit_depth); | |
| 260 | +#if ARCH_AARCH64 | |
| 261 | + ff_hevc_dsp_init_aarch64(hevcdsp, bit_depth); | |
| 262 | +#elif ARCH_ARM | |
| 263 | + ff_hevc_dsp_init_arm(hevcdsp, bit_depth); | |
| 264 | +#elif ARCH_PPC | |
| 265 | + ff_hevc_dsp_init_ppc(hevcdsp, bit_depth); | |
| 266 | +#elif ARCH_X86 | |
| 267 | + ff_hevc_dsp_init_x86(hevcdsp, bit_depth); | |
| 268 | +#elif ARCH_MIPS | |
| 269 | + ff_hevc_dsp_init_mips(hevcdsp, bit_depth); | |
| 270 | +#elif ARCH_LOONGARCH | |
| 271 | + ff_hevc_dsp_init_loongarch(hevcdsp, bit_depth); | |
| 272 | +#endif | |
| 272 | 273 | } |
| @@ -75,6 +75,7 @@ void ff_hevc_pred_init(HEVCPredContext *hpc, int bit_depth) · 74 unmodified lines | ||
| 75 | 75 | break; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | − if (ARCH_MIPS) | |
| 79 | − ff_hevc_pred_init_mips(hpc, bit_depth); | |
| 78 | +#if ARCH_MIPS | |
| 79 | + ff_hevc_pred_init_mips(hpc, bit_depth); | |
| 80 | +#endif | |
| 80 | 81 | } |
| @@ -355,18 +355,19 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags) · 354 unmodified lines | ||
| 355 | 355 | hpel_funcs(avg, [3], 2); |
| 356 | 356 | hpel_funcs(avg_no_rnd,, 16); |
| 357 | 357 | |
| 358 | − if (ARCH_AARCH64) | |
| 359 | − ff_hpeldsp_init_aarch64(c, flags); | |
| 360 | − if (ARCH_ALPHA) | |
| 361 | − ff_hpeldsp_init_alpha(c, flags); | |
| 362 | − if (ARCH_ARM) | |
| 363 | − ff_hpeldsp_init_arm(c, flags); | |
| 364 | − if (ARCH_PPC) | |
| 365 | − ff_hpeldsp_init_ppc(c, flags); | |
| 366 | − if (ARCH_X86) | |
| 367 | − ff_hpeldsp_init_x86(c, flags); | |
| 368 | − if (ARCH_MIPS) | |
| 369 | − ff_hpeldsp_init_mips(c, flags); | |
| 370 | − if (ARCH_LOONGARCH64) | |
| 371 | − ff_hpeldsp_init_loongarch(c, flags); | |
| 358 | +#if ARCH_AARCH64 | |
| 359 | + ff_hpeldsp_init_aarch64(c, flags); | |
| 360 | +#elif ARCH_ALPHA | |
| 361 | + ff_hpeldsp_init_alpha(c, flags); | |
| 362 | +#elif ARCH_ARM | |
| 363 | + ff_hpeldsp_init_arm(c, flags); | |
| 364 | +#elif ARCH_PPC | |
| 365 | + ff_hpeldsp_init_ppc(c, flags); | |
| 366 | +#elif ARCH_X86 | |
| 367 | + ff_hpeldsp_init_x86(c, flags); | |
| 368 | +#elif ARCH_MIPS | |
| 369 | + ff_hpeldsp_init_mips(c, flags); | |
| 370 | +#elif ARCH_LOONGARCH64 | |
| 371 | + ff_hpeldsp_init_loongarch(c, flags); | |
| 372 | +#endif | |
| 372 | 373 | } |
| @@ -86,6 +86,7 @@ av_cold void ff_huffyuvdsp_init(HuffYUVDSPContext *c, enum AVPixelFormat pix_fmt · 85 unmodified lines | ||
| 86 | 86 | c->add_hfyu_median_pred_int16 = add_hfyu_median_pred_int16_c; |
| 87 | 87 | c->add_hfyu_left_pred_bgr32 = add_hfyu_left_pred_bgr32_c; |
| 88 | 88 | |
| 89 | − if (ARCH_X86) | |
| 90 | − ff_huffyuvdsp_init_x86(c, pix_fmt); | |
| 89 | +#if ARCH_X86 | |
| 90 | + ff_huffyuvdsp_init_x86(c, pix_fmt); | |
| 91 | +#endif | |
| 91 | 92 | } |
| @@ -73,6 +73,7 @@ av_cold void ff_huffyuvencdsp_init(HuffYUVEncDSPContext *c, AVCodecContext *avct · 72 unmodified lines | ||
| 73 | 73 | c->diff_int16 = diff_int16_c; |
| 74 | 74 | c->sub_hfyu_median_pred_int16 = sub_hfyu_median_pred_int16_c; |
| 75 | 75 | |
| 76 | − if (ARCH_X86) | |
| 77 | − ff_huffyuvencdsp_init_x86(c, avctx); | |
| 76 | +#if ARCH_X86 | |
| 77 | + ff_huffyuvencdsp_init_x86(c, avctx); | |
| 78 | +#endif | |
| 78 | 79 | } |
| @@ -53,10 +53,11 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, · 52 unmodified lines | ||
| 53 | 53 | { |
| 54 | 54 | int i; |
| 55 | 55 | |
| 56 | − if (ARCH_X86) | |
| 57 | − if (ff_init_scantable_permutation_x86(idct_permutation, | |
| 58 | − perm_type)) | |
| 59 | − return; | |
| 56 | +#if ARCH_X86 | |
| 57 | + if (ff_init_scantable_permutation_x86(idct_permutation, | |
| 58 | + perm_type)) | |
| 59 | + return; | |
| 60 | +#endif | |
| 60 | 61 | |
| 61 | 62 | switch (perm_type) { |
| 62 | 63 | case FF_IDCT_PERM_NONE: |
| @@ -238,7 +239,7 @@ static void ff_jref_idct1_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block · 175 unmodified lines | ||
| 238 | 239 | |
| 239 | 240 | av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx) |
| 240 | 241 | { |
| 241 | − const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 242 | + av_unused const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 242 | 243 | |
| 243 | 244 | if (avctx->lowres==1) { |
| 244 | 245 | c->idct_put = ff_jref_idct4_put; |
| @@ -303,20 +304,21 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx) · 58 unmodified lines | ||
| 303 | 304 | if (CONFIG_MPEG4_DECODER && avctx->idct_algo == FF_IDCT_XVID) |
| 304 | 305 | ff_xvid_idct_init(c, avctx); |
| 305 | 306 | |
| 306 | − if (ARCH_AARCH64) | |
| 307 | − ff_idctdsp_init_aarch64(c, avctx, high_bit_depth); | |
| 308 | − if (ARCH_ALPHA) | |
| 309 | − ff_idctdsp_init_alpha(c, avctx, high_bit_depth); | |
| 310 | − if (ARCH_ARM) | |
| 311 | − ff_idctdsp_init_arm(c, avctx, high_bit_depth); | |
| 312 | − if (ARCH_PPC) | |
| 313 | − ff_idctdsp_init_ppc(c, avctx, high_bit_depth); | |
| 314 | − if (ARCH_X86) | |
| 315 | − ff_idctdsp_init_x86(c, avctx, high_bit_depth); | |
| 316 | − if (ARCH_MIPS) | |
| 317 | − ff_idctdsp_init_mips(c, avctx, high_bit_depth); | |
| 318 | − if (ARCH_LOONGARCH) | |
| 319 | − ff_idctdsp_init_loongarch(c, avctx, high_bit_depth); | |
| 307 | +#if ARCH_AARCH64 | |
| 308 | + ff_idctdsp_init_aarch64(c, avctx, high_bit_depth); | |
| 309 | +#elif ARCH_ALPHA | |
| 310 | + ff_idctdsp_init_alpha(c, avctx, high_bit_depth); | |
| 311 | +#elif ARCH_ARM | |
| 312 | + ff_idctdsp_init_arm(c, avctx, high_bit_depth); | |
| 313 | +#elif ARCH_PPC | |
| 314 | + ff_idctdsp_init_ppc(c, avctx, high_bit_depth); | |
| 315 | +#elif ARCH_X86 | |
| 316 | + ff_idctdsp_init_x86(c, avctx, high_bit_depth); | |
| 317 | +#elif ARCH_MIPS | |
| 318 | + ff_idctdsp_init_mips(c, avctx, high_bit_depth); | |
| 319 | +#elif ARCH_LOONGARCH | |
| 320 | + ff_idctdsp_init_loongarch(c, avctx, high_bit_depth); | |
| 321 | +#endif | |
| 320 | 322 | |
| 321 | 323 | ff_init_scantable_permutation(c->idct_permutation, |
| 322 | 324 | c->perm_type); |
| @@ -330,6 +330,7 @@ av_cold void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffsp) · 329 unmodified lines | ||
| 330 | 330 | void ff_iir_filter_init(FFIIRFilterContext *f) { |
| 331 | 331 | f->filter_flt = iir_filter_flt; |
| 332 | 332 | |
| 333 | − if (HAVE_MIPSFPU) | |
| 334 | − ff_iir_filter_init_mips(f); | |
| 333 | +#if HAVE_MIPSFPU | |
| 334 | + ff_iir_filter_init_mips(f); | |
| 335 | +#endif | |
| 335 | 336 | } |
| @@ -96,6 +96,7 @@ av_cold void ff_jpeg2000dsp_init(Jpeg2000DSPContext *c) · 95 unmodified lines | ||
| 96 | 96 | c->mct_decode[FF_DWT53] = rct_int; |
| 97 | 97 | c->mct_decode[FF_DWT97_INT] = ict_int; |
| 98 | 98 | |
| 99 | − if (ARCH_X86) | |
| 100 | − ff_jpeg2000dsp_init_x86(c); | |
| 99 | +#if ARCH_X86 | |
| 100 | + ff_jpeg2000dsp_init_x86(c); | |
| 101 | +#endif | |
| 101 | 102 | } |
| @@ -59,10 +59,11 @@ av_cold void ff_llauddsp_init(LLAudDSPContext *c) · 58 unmodified lines | ||
| 59 | 59 | c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c; |
| 60 | 60 | c->scalarproduct_and_madd_int32 = scalarproduct_and_madd_int32_c; |
| 61 | 61 | |
| 62 | − if (ARCH_ARM) | |
| 63 | − ff_llauddsp_init_arm(c); | |
| 64 | − if (ARCH_PPC) | |
| 65 | − ff_llauddsp_init_ppc(c); | |
| 66 | − if (ARCH_X86) | |
| 67 | − ff_llauddsp_init_x86(c); | |
| 62 | +#if ARCH_ARM | |
| 63 | + ff_llauddsp_init_arm(c); | |
| 64 | +#elif ARCH_PPC | |
| 65 | + ff_llauddsp_init_ppc(c); | |
| 66 | +#elif ARCH_X86 | |
| 67 | + ff_llauddsp_init_x86(c); | |
| 68 | +#endif | |
| 68 | 69 | } |
| @@ -119,8 +119,9 @@ void ff_llviddsp_init(LLVidDSPContext *c) · 118 unmodified lines | ||
| 119 | 119 | c->add_left_pred_int16 = add_left_pred_int16_c; |
| 120 | 120 | c->add_gradient_pred = add_gradient_pred_c; |
| 121 | 121 | |
| 122 | − if (ARCH_PPC) | |
| 123 | − ff_llviddsp_init_ppc(c); | |
| 124 | − if (ARCH_X86) | |
| 125 | − ff_llviddsp_init_x86(c); | |
| 122 | +#if ARCH_PPC | |
| 123 | + ff_llviddsp_init_ppc(c); | |
| 124 | +#elif ARCH_X86 | |
| 125 | + ff_llviddsp_init_x86(c); | |
| 126 | +#endif | |
| 126 | 127 | } |
| @@ -94,6 +94,7 @@ av_cold void ff_llvidencdsp_init(LLVidEncDSPContext *c) · 93 unmodified lines | ||
| 94 | 94 | c->sub_median_pred = sub_median_pred_c; |
| 95 | 95 | c->sub_left_predict = sub_left_predict_c; |
| 96 | 96 | |
| 97 | − if (ARCH_X86) | |
| 98 | − ff_llvidencdsp_init_x86(c); | |
| 97 | +#if ARCH_X86 | |
| 98 | + ff_llvidencdsp_init_x86(c); | |
| 99 | +#endif | |
| 99 | 100 | } |
| @@ -314,8 +314,9 @@ av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order, · 313 unmodified lines | ||
| 314 | 314 | s->lpc_apply_welch_window = lpc_apply_welch_window_c; |
| 315 | 315 | s->lpc_compute_autocorr = lpc_compute_autocorr_c; |
| 316 | 316 | |
| 317 | − if (ARCH_X86) | |
| 318 | − ff_lpc_init_x86(s); | |
| 317 | +#if ARCH_X86 | |
| 318 | + ff_lpc_init_x86(s); | |
| 319 | +#endif | |
| 319 | 320 | |
| 320 | 321 | return 0; |
| 321 | 322 | } |
| @@ -317,8 +317,9 @@ av_cold int ff_mdct15_init(MDCT15Context **ps, int inverse, int N, double scale) · 316 unmodified lines | ||
| 317 | 317 | s->exptab[20].im *= -1; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | − if (ARCH_X86) | |
| 321 | − ff_mdct15_init_x86(s); | |
| 320 | +#if ARCH_X86 | |
| 321 | + ff_mdct15_init_x86(s); | |
| 322 | +#endif | |
| 322 | 323 | |
| 323 | 324 | *ps = s; |
| 324 | 325 | |
| @@ -1061,16 +1061,17 @@ av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx) · 1060 unmodified lines | ||
| 1061 | 1061 | ff_dsputil_init_dwt(c); |
| 1062 | 1062 | #endif |
| 1063 | 1063 | |
| 1064 | − if (ARCH_ALPHA) | |
| 1065 | − ff_me_cmp_init_alpha(c, avctx); | |
| 1066 | − if (ARCH_ARM) | |
| 1067 | − ff_me_cmp_init_arm(c, avctx); | |
| 1068 | − if (ARCH_PPC) | |
| 1069 | − ff_me_cmp_init_ppc(c, avctx); | |
| 1070 | − if (ARCH_X86) | |
| 1071 | − ff_me_cmp_init_x86(c, avctx); | |
| 1072 | − if (ARCH_MIPS) | |
| 1073 | − ff_me_cmp_init_mips(c, avctx); | |
| 1064 | +#if ARCH_ALPHA | |
| 1065 | + ff_me_cmp_init_alpha(c, avctx); | |
| 1066 | +#elif ARCH_ARM | |
| 1067 | + ff_me_cmp_init_arm(c, avctx); | |
| 1068 | +#elif ARCH_PPC | |
| 1069 | + ff_me_cmp_init_ppc(c, avctx); | |
| 1070 | +#elif ARCH_X86 | |
| 1071 | + ff_me_cmp_init_x86(c, avctx); | |
| 1072 | +#elif ARCH_MIPS | |
| 1073 | + ff_me_cmp_init_mips(c, avctx); | |
| 1074 | +#endif | |
| 1074 | 1075 | |
| 1075 | 1076 | c->median_sad[0] = pix_median_abs16_c; |
| 1076 | 1077 | c->median_sad[1] = pix_median_abs8_c; |
| @@ -131,8 +131,9 @@ av_cold void ff_mlpdsp_init(MLPDSPContext *c) · 130 unmodified lines | ||
| 131 | 131 | c->mlp_rematrix_channel = ff_mlp_rematrix_channel; |
| 132 | 132 | c->mlp_select_pack_output = mlp_select_pack_output; |
| 133 | 133 | c->mlp_pack_output = ff_mlp_pack_output; |
| 134 | − if (ARCH_ARM) | |
| 135 | − ff_mlpdsp_init_arm(c); | |
| 136 | − if (ARCH_X86) | |
| 137 | − ff_mlpdsp_init_x86(c); | |
| 134 | +#if ARCH_ARM | |
| 135 | + ff_mlpdsp_init_arm(c); | |
| 136 | +#elif ARCH_X86 | |
| 137 | + ff_mlpdsp_init_x86(c); | |
| 138 | +#endif | |
| 138 | 139 | } |
| @@ -74,8 +74,9 @@ static av_cold void mpadsp_init_tabs(void) · 73 unmodified lines | ||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | − if (ARCH_X86) | |
| 78 | − ff_mpadsp_init_x86_tabs(); | |
| 77 | +#if ARCH_X86 | |
| 78 | + ff_mpadsp_init_x86_tabs(); | |
| 79 | +#endif | |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | av_cold void ff_mpadsp_init(MPADSPContext *s) |
| @@ -94,10 +95,19 @@ av_cold void ff_mpadsp_init(MPADSPContext *s) · 12 unmodified lines | ||
| 94 | 95 | s->imdct36_blocks_float = ff_imdct36_blocks_float; |
| 95 | 96 | s->imdct36_blocks_fixed = ff_imdct36_blocks_fixed; |
| 96 | 97 | |
| 97 | − if (ARCH_AARCH64) ff_mpadsp_init_aarch64(s); | |
| 98 | − if (ARCH_ARM) ff_mpadsp_init_arm(s); | |
| 99 | − if (ARCH_PPC) ff_mpadsp_init_ppc(s); | |
| 100 | − if (ARCH_X86) ff_mpadsp_init_x86(s); | |
| 101 | − if (HAVE_MIPSFPU) ff_mpadsp_init_mipsfpu(s); | |
| 102 | − if (HAVE_MIPSDSP) ff_mpadsp_init_mipsdsp(s); | |
| 98 | +#if ARCH_AARCH64 | |
| 99 | + ff_mpadsp_init_aarch64(s); | |
| 100 | +#elif ARCH_ARM | |
| 101 | + ff_mpadsp_init_arm(s); | |
| 102 | +#elif ARCH_PPC | |
| 103 | + ff_mpadsp_init_ppc(s); | |
| 104 | +#elif ARCH_X86 | |
| 105 | + ff_mpadsp_init_x86(s); | |
| 106 | +#endif | |
| 107 | +#if HAVE_MIPSFPU | |
| 108 | + ff_mpadsp_init_mipsfpu(s); | |
| 109 | +#endif | |
| 110 | +#if HAVE_MIPSDSP | |
| 111 | + ff_mpadsp_init_mipsdsp(s); | |
| 112 | +#endif | |
| 103 | 113 | } |
| @@ -309,19 +309,21 @@ static av_cold int dct_init(MpegEncContext *s) · 308 unmodified lines | ||
| 309 | 309 | s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact; |
| 310 | 310 | s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c; |
| 311 | 311 | |
| 312 | − if (HAVE_INTRINSICS_NEON) | |
| 313 | − ff_mpv_common_init_neon(s); | |
| 314 | − | |
| 315 | − if (ARCH_ALPHA) | |
| 316 | − ff_mpv_common_init_axp(s); | |
| 317 | − if (ARCH_ARM) | |
| 318 | − ff_mpv_common_init_arm(s); | |
| 319 | − if (ARCH_PPC) | |
| 320 | − ff_mpv_common_init_ppc(s); | |
| 321 | − if (ARCH_X86) | |
| 322 | − ff_mpv_common_init_x86(s); | |
| 323 | − if (ARCH_MIPS) | |
| 324 | − ff_mpv_common_init_mips(s); | |
| 312 | +#if HAVE_INTRINSICS_NEON | |
| 313 | + ff_mpv_common_init_neon(s); | |
| 314 | +#endif | |
| 315 | + | |
| 316 | +#if ARCH_ALPHA | |
| 317 | + ff_mpv_common_init_axp(s); | |
| 318 | +#elif ARCH_ARM | |
| 319 | + ff_mpv_common_init_arm(s); | |
| 320 | +#elif ARCH_PPC | |
| 321 | + ff_mpv_common_init_ppc(s); | |
| 322 | +#elif ARCH_X86 | |
| 323 | + ff_mpv_common_init_x86(s); | |
| 324 | +#elif ARCH_MIPS | |
| 325 | + ff_mpv_common_init_mips(s); | |
| 326 | +#endif | |
| 325 | 327 | |
| 326 | 328 | return 0; |
| 327 | 329 | } |
| @@ -290,8 +290,9 @@ static void mpv_encode_defaults(MpegEncContext *s) · 289 unmodified lines | ||
| 290 | 290 | |
| 291 | 291 | av_cold int ff_dct_encode_init(MpegEncContext *s) |
| 292 | 292 | { |
| 293 | − if (ARCH_X86) | |
| 294 | − ff_dct_encode_init_x86(s); | |
| 293 | +#if ARCH_X86 | |
| 294 | + ff_dct_encode_init_x86(s); | |
| 295 | +#endif | |
| 295 | 296 | |
| 296 | 297 | if (CONFIG_H263_ENCODER) |
| 297 | 298 | ff_h263dsp_init(&s->h263dsp); |
| @@ -112,8 +112,9 @@ av_cold void ff_mpegvideodsp_init(MpegVideoDSPContext *c) · 111 unmodified lines | ||
| 112 | 112 | c->gmc1 = gmc1_c; |
| 113 | 113 | c->gmc = ff_gmc_c; |
| 114 | 114 | |
| 115 | − if (ARCH_PPC) | |
| 116 | − ff_mpegvideodsp_init_ppc(c); | |
| 117 | − if (ARCH_X86) | |
| 118 | − ff_mpegvideodsp_init_x86(c); | |
| 115 | +#if ARCH_PPC | |
| 116 | + ff_mpegvideodsp_init_ppc(c); | |
| 117 | +#elif ARCH_X86 | |
| 118 | + ff_mpegvideodsp_init_x86(c); | |
| 119 | +#endif | |
| 119 | 120 | } |
| @@ -245,12 +245,13 @@ av_cold void ff_mpegvideoencdsp_init(MpegvideoEncDSPContext *c, · 244 unmodified lines | ||
| 245 | 245 | |
| 246 | 246 | c->draw_edges = draw_edges_8_c; |
| 247 | 247 | |
| 248 | − if (ARCH_ARM) | |
| 249 | − ff_mpegvideoencdsp_init_arm(c, avctx); | |
| 250 | − if (ARCH_PPC) | |
| 251 | − ff_mpegvideoencdsp_init_ppc(c, avctx); | |
| 252 | − if (ARCH_X86) | |
| 253 | − ff_mpegvideoencdsp_init_x86(c, avctx); | |
| 254 | − if (ARCH_MIPS) | |
| 255 | − ff_mpegvideoencdsp_init_mips(c, avctx); | |
| 248 | +#if ARCH_ARM | |
| 249 | + ff_mpegvideoencdsp_init_arm(c, avctx); | |
| 250 | +#elif ARCH_PPC | |
| 251 | + ff_mpegvideoencdsp_init_ppc(c, avctx); | |
| 252 | +#elif ARCH_X86 | |
| 253 | + ff_mpegvideoencdsp_init_x86(c, avctx); | |
| 254 | +#elif ARCH_MIPS | |
| 255 | + ff_mpegvideoencdsp_init_mips(c, avctx); | |
| 256 | +#endif | |
| 256 | 257 | } |
| @@ -905,8 +905,9 @@ int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode) · 904 unmodified lines | ||
| 905 | 905 | s->pvq_search = ppp_pvq_search_c; |
| 906 | 906 | s->quant_band = encode ? pvq_encode_band : pvq_decode_band; |
| 907 | 907 | |
| 908 | − if (CONFIG_OPUS_ENCODER && ARCH_X86) | |
| 909 | − ff_celt_pvq_init_x86(s); | |
| 908 | +#if CONFIG_OPUS_ENCODER && ARCH_X86 | |
| 909 | + ff_celt_pvq_init_x86(s); | |
| 910 | +#endif | |
| 910 | 911 | |
| 911 | 912 | *pvq = s; |
| 912 | 913 | |
| @@ -56,9 +56,9 @@ av_cold void ff_opus_dsp_init(OpusDSP *ctx) · 55 unmodified lines | ||
| 56 | 56 | ctx->postfilter = postfilter_c; |
| 57 | 57 | ctx->deemphasis = deemphasis_c; |
| 58 | 58 | |
| 59 | − if (ARCH_X86) | |
| 60 | − ff_opus_dsp_init_x86(ctx); | |
| 61 | − | |
| 62 | − if (ARCH_AARCH64) | |
| 63 | − ff_opus_dsp_init_aarch64(ctx); | |
| 59 | +#if ARCH_AARCH64 | |
| 60 | + ff_opus_dsp_init_aarch64(ctx); | |
| 61 | +#elif ARCH_X86 | |
| 62 | + ff_opus_dsp_init_x86(ctx); | |
| 63 | +#endif | |
| 64 | 64 | } |
| @@ -80,7 +80,7 @@ static void diff_pixels_c(int16_t *av_restrict block, const uint8_t *s1, · 79 unmodified lines | ||
| 80 | 80 | |
| 81 | 81 | av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx) |
| 82 | 82 | { |
| 83 | − const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 83 | + av_unused const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; | |
| 84 | 84 | |
| 85 | 85 | c->diff_pixels_unaligned = |
| 86 | 86 | c->diff_pixels = diff_pixels_c; |
| @@ -101,16 +101,17 @@ av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx) · 14 unmodified lines | ||
| 101 | 101 | break; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | − if (ARCH_AARCH64) | |
| 105 | − ff_pixblockdsp_init_aarch64(c, avctx, high_bit_depth); | |
| 106 | − if (ARCH_ALPHA) | |
| 107 | − ff_pixblockdsp_init_alpha(c, avctx, high_bit_depth); | |
| 108 | − if (ARCH_ARM) | |
| 109 | − ff_pixblockdsp_init_arm(c, avctx, high_bit_depth); | |
| 110 | − if (ARCH_PPC) | |
| 111 | − ff_pixblockdsp_init_ppc(c, avctx, high_bit_depth); | |
| 112 | − if (ARCH_X86) | |
| 113 | − ff_pixblockdsp_init_x86(c, avctx, high_bit_depth); | |
| 114 | − if (ARCH_MIPS) | |
| 115 | − ff_pixblockdsp_init_mips(c, avctx, high_bit_depth); | |
| 104 | +#if ARCH_AARCH64 | |
| 105 | + ff_pixblockdsp_init_aarch64(c, avctx, high_bit_depth); | |
| 106 | +#elif ARCH_ALPHA | |
| 107 | + ff_pixblockdsp_init_alpha(c, avctx, high_bit_depth); | |
| 108 | +#elif ARCH_ARM | |
| 109 | + ff_pixblockdsp_init_arm(c, avctx, high_bit_depth); | |
| 110 | +#elif ARCH_PPC | |
| 111 | + ff_pixblockdsp_init_ppc(c, avctx, high_bit_depth); | |
| 112 | +#elif ARCH_X86 | |
| 113 | + ff_pixblockdsp_init_x86(c, avctx, high_bit_depth); | |
| 114 | +#elif ARCH_MIPS | |
| 115 | + ff_pixblockdsp_init_mips(c, avctx, high_bit_depth); | |
| 116 | +#endif | |
| 116 | 117 | } |
| @@ -45,6 +45,7 @@ av_cold void ff_pngdsp_init(PNGDSPContext *dsp) · 44 unmodified lines | ||
| 45 | 45 | dsp->add_bytes_l2 = add_bytes_l2_c; |
| 46 | 46 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction; |
| 47 | 47 | |
| 48 | − if (ARCH_X86) | |
| 49 | − ff_pngdsp_init_x86(dsp); | |
| 48 | +#if ARCH_X86 | |
| 49 | + ff_pngdsp_init_x86(dsp); | |
| 50 | +#endif | |
| 50 | 51 | } |
| @@ -88,8 +88,9 @@ av_cold int ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx) · 87 unmodified lines | ||
| 88 | 88 | return AVERROR_BUG; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | − if (ARCH_X86) | |
| 92 | − ff_proresdsp_init_x86(dsp, avctx); | |
| 91 | +#if ARCH_X86 | |
| 92 | + ff_proresdsp_init_x86(dsp, avctx); | |
| 93 | +#endif | |
| 93 | 94 | |
| 94 | 95 | ff_init_scantable_permutation(dsp->idct_permutation, |
| 95 | 96 | dsp->idct_permutation_type); |
| @@ -810,8 +810,9 @@ av_cold void ff_qpeldsp_init(QpelDSPContext *c) · 809 unmodified lines | ||
| 810 | 810 | dspfunc(avg_qpel, 0, 16); |
| 811 | 811 | dspfunc(avg_qpel, 1, 8); |
| 812 | 812 | |
| 813 | − if (ARCH_X86) | |
| 814 | − ff_qpeldsp_init_x86(c); | |
| 815 | − if (ARCH_MIPS) | |
| 816 | − ff_qpeldsp_init_mips(c); | |
| 813 | +#if ARCH_X86 | |
| 814 | + ff_qpeldsp_init_x86(c); | |
| 815 | +#elif ARCH_MIPS | |
| 816 | + ff_qpeldsp_init_mips(c); | |
| 817 | +#endif | |
| 817 | 818 | } |
| @@ -107,7 +107,9 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans) · 106 unmodified lines | ||
| 107 | 107 | s->tsin = ff_cos_tabs[nbits] + (n >> 2); |
| 108 | 108 | s->rdft_calc = rdft_calc_c; |
| 109 | 109 | |
| 110 | − if (ARCH_ARM) ff_rdft_init_arm(s); | |
| 110 | +#if ARCH_ARM | |
| 111 | + ff_rdft_init_arm(s); | |
| 112 | +#endif | |
| 111 | 113 | |
| 112 | 114 | return 0; |
| 113 | 115 | } |
| @@ -136,8 +136,9 @@ av_cold void ff_rv34dsp_init(RV34DSPContext *c) · 135 unmodified lines | ||
| 136 | 136 | c->rv34_idct_add = rv34_idct_add_c; |
| 137 | 137 | c->rv34_idct_dc_add = rv34_idct_dc_add_c; |
| 138 | 138 | |
| 139 | − if (ARCH_ARM) | |
| 140 | − ff_rv34dsp_init_arm(c); | |
| 141 | − if (ARCH_X86) | |
| 142 | − ff_rv34dsp_init_x86(c); | |
| 139 | +#if ARCH_ARM | |
| 140 | + ff_rv34dsp_init_arm(c); | |
| 141 | +#elif ARCH_X86 | |
| 142 | + ff_rv34dsp_init_x86(c); | |
| 143 | +#endif | |
| 143 | 144 | } |
| @@ -705,10 +705,11 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c) · 704 unmodified lines | ||
| 705 | 705 | c->rv40_loop_filter_strength[0] = rv40_h_loop_filter_strength; |
| 706 | 706 | c->rv40_loop_filter_strength[1] = rv40_v_loop_filter_strength; |
| 707 | 707 | |
| 708 | − if (ARCH_AARCH64) | |
| 709 | − ff_rv40dsp_init_aarch64(c); | |
| 710 | − if (ARCH_ARM) | |
| 711 | − ff_rv40dsp_init_arm(c); | |
| 712 | − if (ARCH_X86) | |
| 713 | − ff_rv40dsp_init_x86(c); | |
| 708 | +#if ARCH_AARCH64 | |
| 709 | + ff_rv40dsp_init_aarch64(c); | |
| 710 | +#elif ARCH_ARM | |
| 711 | + ff_rv40dsp_init_arm(c); | |
| 712 | +#elif ARCH_X86 | |
| 713 | + ff_rv40dsp_init_x86(c); | |
| 714 | +#endif | |
| 714 | 715 | } |
| @@ -380,8 +380,9 @@ av_cold void ff_sbcdsp_init(SBCDSPContext *s) · 379 unmodified lines | ||
| 380 | 380 | s->sbc_calc_scalefactors = sbc_calc_scalefactors; |
| 381 | 381 | s->sbc_calc_scalefactors_j = sbc_calc_scalefactors_j; |
| 382 | 382 | |
| 383 | − if (ARCH_ARM) | |
| 384 | − ff_sbcdsp_init_arm(s); | |
| 385 | − if (ARCH_X86) | |
| 386 | − ff_sbcdsp_init_x86(s); | |
| 383 | +#if ARCH_ARM | |
| 384 | + ff_sbcdsp_init_arm(s); | |
| 385 | +#elif ARCH_X86 | |
| 386 | + ff_sbcdsp_init_x86(s); | |
| 387 | +#endif | |
| 387 | 388 | } |
| @@ -92,13 +92,14 @@ av_cold void AAC_RENAME(ff_sbrdsp_init)(SBRDSPContext *s) · 91 unmodified lines | ||
| 92 | 92 | s->hf_apply_noise[3] = sbr_hf_apply_noise_3; |
| 93 | 93 | |
| 94 | 94 | #if !USE_FIXED |
| 95 | − if (ARCH_ARM) | |
| 96 | − ff_sbrdsp_init_arm(s); | |
| 97 | − if (ARCH_AARCH64) | |
| 98 | − ff_sbrdsp_init_aarch64(s); | |
| 99 | − if (ARCH_X86) | |
| 100 | − ff_sbrdsp_init_x86(s); | |
| 101 | − if (ARCH_MIPS) | |
| 102 | − ff_sbrdsp_init_mips(s); | |
| 95 | +#if ARCH_ARM | |
| 96 | + ff_sbrdsp_init_arm(s); | |
| 97 | +#elif ARCH_AARCH64 | |
| 98 | + ff_sbrdsp_init_aarch64(s); | |
| 99 | +#elif ARCH_X86 | |
| 100 | + ff_sbrdsp_init_x86(s); | |
| 101 | +#elif ARCH_MIPS | |
| 102 | + ff_sbrdsp_init_mips(s); | |
| 103 | +#endif | |
| 103 | 104 | #endif /* !USE_FIXED */ |
| 104 | 105 | } |
| @@ -853,8 +853,9 @@ av_cold void ff_dwt_init(SnowDWTContext *c) · 852 unmodified lines | ||
| 853 | 853 | c->horizontal_compose97i = snow_horizontal_compose97i; |
| 854 | 854 | c->inner_add_yblock = ff_snow_inner_add_yblock; |
| 855 | 855 | |
| 856 | − if (HAVE_MMX) | |
| 857 | − ff_dwt_init_x86(c); | |
| 856 | +#if ARCH_X86 && HAVE_MMX | |
| 857 | + ff_dwt_init_x86(c); | |
| 858 | +#endif | |
| 858 | 859 | } |
| 859 | 860 | |
| 860 | 861 | |
| @@ -568,10 +568,11 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) · 567 unmodified lines | ||
| 568 | 568 | return AVERROR(ENOMEM); |
| 569 | 569 | } |
| 570 | 570 | |
| 571 | − if (ARCH_PPC) | |
| 572 | − ff_svq1enc_init_ppc(s); | |
| 573 | − if (ARCH_X86) | |
| 574 | − ff_svq1enc_init_x86(s); | |
| 571 | +#if ARCH_PPC | |
| 572 | + ff_svq1enc_init_ppc(s); | |
| 573 | +#elif ARCH_X86 | |
| 574 | + ff_svq1enc_init_x86(s); | |
| 575 | +#endif | |
| 575 | 576 | |
| 576 | 577 | ff_h263_encode_init(&s->m); // mv_penalty |
| 577 | 578 | |
| @@ -175,10 +175,11 @@ av_cold void ff_synth_filter_init(SynthFilterContext *c) · 174 unmodified lines | ||
| 175 | 175 | c->synth_filter_fixed = synth_filter_fixed; |
| 176 | 176 | c->synth_filter_fixed_64 = synth_filter_fixed_64; |
| 177 | 177 | |
| 178 | − if (ARCH_AARCH64) | |
| 179 | − ff_synth_filter_init_aarch64(c); | |
| 180 | − if (ARCH_ARM) | |
| 181 | − ff_synth_filter_init_arm(c); | |
| 182 | − if (ARCH_X86) | |
| 183 | − ff_synth_filter_init_x86(c); | |
| 178 | +#if ARCH_AARCH64 | |
| 179 | + ff_synth_filter_init_aarch64(c); | |
| 180 | +#elif ARCH_ARM | |
| 181 | + ff_synth_filter_init_arm(c); | |
| 182 | +#elif ARCH_X86 | |
| 183 | + ff_synth_filter_init_x86(c); | |
| 184 | +#endif | |
| 184 | 185 | } |
| @@ -77,6 +77,7 @@ av_cold void ff_takdsp_init(TAKDSPContext *c) · 76 unmodified lines | ||
| 77 | 77 | c->decorrelate_sm = decorrelate_sm; |
| 78 | 78 | c->decorrelate_sf = decorrelate_sf; |
| 79 | 79 | |
| 80 | − if (ARCH_X86) | |
| 81 | − ff_takdsp_init_x86(c); | |
| 80 | +#if ARCH_X86 | |
| 81 | + ff_takdsp_init_x86(c); | |
| 82 | +#endif | |
| 82 | 83 | } |
| @@ -56,6 +56,7 @@ av_cold void ff_ttadsp_init(TTADSPContext *c) · 55 unmodified lines | ||
| 56 | 56 | { |
| 57 | 57 | c->filter_process = tta_filter_process_c; |
| 58 | 58 | |
| 59 | − if (ARCH_X86) | |
| 60 | − ff_ttadsp_init_x86(c); | |
| 59 | +#if ARCH_X86 | |
| 60 | + ff_ttadsp_init_x86(c); | |
| 61 | +#endif | |
| 61 | 62 | } |
| @@ -54,6 +54,7 @@ av_cold void ff_ttaencdsp_init(TTAEncDSPContext *c) · 53 unmodified lines | ||
| 54 | 54 | { |
| 55 | 55 | c->filter_process = ttaenc_filter_process_c; |
| 56 | 56 | |
| 57 | − if (ARCH_X86) | |
| 58 | − ff_ttaencdsp_init_x86(c); | |
| 57 | +#if ARCH_X86 | |
| 58 | + ff_ttaencdsp_init_x86(c); | |
| 59 | +#endif | |
| 59 | 60 | } |
| @@ -77,6 +77,7 @@ av_cold void ff_utvideodsp_init(UTVideoDSPContext *c) · 76 unmodified lines | ||
| 77 | 77 | c->restore_rgb_planes = restore_rgb_planes_c; |
| 78 | 78 | c->restore_rgb_planes10 = restore_rgb_planes10_c; |
| 79 | 79 | |
| 80 | − if (ARCH_X86) | |
| 81 | − ff_utvideodsp_init_x86(c); | |
| 80 | +#if ARCH_X86 | |
| 81 | + ff_utvideodsp_init_x86(c); | |
| 82 | +#endif | |
| 82 | 83 | } |
| @@ -54,8 +54,9 @@ static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u, · 53 unmodified lines | ||
| 54 | 54 | static av_unused av_cold void ff_v210dec_init(V210DecContext *s) |
| 55 | 55 | { |
| 56 | 56 | s->unpack_frame = v210_planar_unpack_c; |
| 57 | − if (ARCH_X86) | |
| 58 | − ff_v210_x86_init(s); | |
| 57 | +#if ARCH_X86 | |
| 58 | + ff_v210_x86_init(s); | |
| 59 | +#endif | |
| 59 | 60 | } |
| 60 | 61 | |
| 61 | 62 | #endif /* AVCODEC_V210DEC_INIT_H */ |
| @@ -83,8 +83,9 @@ static av_cold av_unused void ff_v210enc_init(V210EncContext *s) · 82 unmodified lines | ||
| 83 | 83 | s->sample_factor_8 = 2; |
| 84 | 84 | s->sample_factor_10 = 1; |
| 85 | 85 | |
| 86 | − if (ARCH_X86) | |
| 87 | − ff_v210enc_init_x86(s); | |
| 86 | +#if ARCH_X86 | |
| 87 | + ff_v210enc_init_x86(s); | |
| 88 | +#endif | |
| 88 | 89 | } |
| 89 | 90 | |
| 90 | 91 | #endif /* AVCODEC_V210ENC_INIT_H */ |
| @@ -1033,16 +1033,17 @@ av_cold void ff_vc1dsp_init(VC1DSPContext *dsp) · 1032 unmodified lines | ||
| 1033 | 1033 | dsp->startcode_find_candidate = ff_startcode_find_candidate_c; |
| 1034 | 1034 | dsp->vc1_unescape_buffer = vc1_unescape_buffer; |
| 1035 | 1035 | |
| 1036 | − if (ARCH_AARCH64) | |
| 1037 | − ff_vc1dsp_init_aarch64(dsp); | |
| 1038 | − if (ARCH_ARM) | |
| 1039 | − ff_vc1dsp_init_arm(dsp); | |
| 1040 | − if (ARCH_PPC) | |
| 1041 | − ff_vc1dsp_init_ppc(dsp); | |
| 1042 | − if (ARCH_X86) | |
| 1043 | − ff_vc1dsp_init_x86(dsp); | |
| 1044 | − if (ARCH_MIPS) | |
| 1045 | − ff_vc1dsp_init_mips(dsp); | |
| 1046 | − if (ARCH_LOONGARCH) | |
| 1047 | − ff_vc1dsp_init_loongarch(dsp); | |
| 1036 | +#if ARCH_AARCH64 | |
| 1037 | + ff_vc1dsp_init_aarch64(dsp); | |
| 1038 | +#elif ARCH_ARM | |
| 1039 | + ff_vc1dsp_init_arm(dsp); | |
| 1040 | +#elif ARCH_PPC | |
| 1041 | + ff_vc1dsp_init_ppc(dsp); | |
| 1042 | +#elif ARCH_X86 | |
| 1043 | + ff_vc1dsp_init_x86(dsp); | |
| 1044 | +#elif ARCH_MIPS | |
| 1045 | + ff_vc1dsp_init_mips(dsp); | |
| 1046 | +#elif ARCH_LOONGARCH | |
| 1047 | + ff_vc1dsp_init_loongarch(dsp); | |
| 1048 | +#endif | |
| 1048 | 1049 | } |
| @@ -45,16 +45,17 @@ av_cold void ff_videodsp_init(VideoDSPContext *ctx, int bpc) · 44 unmodified lines | ||
| 45 | 45 | ctx->emulated_edge_mc = ff_emulated_edge_mc_16; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | − if (ARCH_AARCH64) | |
| 49 | − ff_videodsp_init_aarch64(ctx, bpc); | |
| 50 | − if (ARCH_ARM) | |
| 51 | − ff_videodsp_init_arm(ctx, bpc); | |
| 52 | − if (ARCH_PPC) | |
| 53 | − ff_videodsp_init_ppc(ctx, bpc); | |
| 54 | − if (ARCH_X86) | |
| 55 | − ff_videodsp_init_x86(ctx, bpc); | |
| 56 | − if (ARCH_MIPS) | |
| 57 | − ff_videodsp_init_mips(ctx, bpc); | |
| 58 | − if (ARCH_LOONGARCH64) | |
| 59 | − ff_videodsp_init_loongarch(ctx, bpc); | |
| 48 | +#if ARCH_AARCH64 | |
| 49 | + ff_videodsp_init_aarch64(ctx, bpc); | |
| 50 | +#elif ARCH_ARM | |
| 51 | + ff_videodsp_init_arm(ctx, bpc); | |
| 52 | +#elif ARCH_PPC | |
| 53 | + ff_videodsp_init_ppc(ctx, bpc); | |
| 54 | +#elif ARCH_X86 | |
| 55 | + ff_videodsp_init_x86(ctx, bpc); | |
| 56 | +#elif ARCH_MIPS | |
| 57 | + ff_videodsp_init_mips(ctx, bpc); | |
| 58 | +#elif ARCH_LOONGARCH64 | |
| 59 | + ff_videodsp_init_loongarch(ctx, bpc); | |
| 60 | +#endif | |
| 60 | 61 | } |
| @@ -25,12 +25,13 @@ av_cold void ff_vorbisdsp_init(VorbisDSPContext *dsp) · 24 unmodified lines | ||
| 25 | 25 | { |
| 26 | 26 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling; |
| 27 | 27 | |
| 28 | − if (ARCH_AARCH64) | |
| 29 | − ff_vorbisdsp_init_aarch64(dsp); | |
| 30 | − if (ARCH_ARM) | |
| 31 | − ff_vorbisdsp_init_arm(dsp); | |
| 32 | − if (ARCH_PPC) | |
| 33 | − ff_vorbisdsp_init_ppc(dsp); | |
| 34 | − if (ARCH_X86) | |
| 35 | − ff_vorbisdsp_init_x86(dsp); | |
| 28 | +#if ARCH_AARCH64 | |
| 29 | + ff_vorbisdsp_init_aarch64(dsp); | |
| 30 | +#elif ARCH_ARM | |
| 31 | + ff_vorbisdsp_init_arm(dsp); | |
| 32 | +#elif ARCH_PPC | |
| 33 | + ff_vorbisdsp_init_ppc(dsp); | |
| 34 | +#elif ARCH_X86 | |
| 35 | + ff_vorbisdsp_init_x86(dsp); | |
| 36 | +#endif | |
| 36 | 37 | } |
| @@ -455,14 +455,15 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags) · 454 unmodified lines | ||
| 455 | 455 | c->v_loop_filter = c->v_loop_filter_unaligned = vp3_v_loop_filter_8_c; |
| 456 | 456 | c->h_loop_filter = c->h_loop_filter_unaligned = vp3_h_loop_filter_8_c; |
| 457 | 457 | |
| 458 | − if (ARCH_ARM) | |
| 459 | − ff_vp3dsp_init_arm(c, flags); | |
| 460 | − if (ARCH_PPC) | |
| 461 | − ff_vp3dsp_init_ppc(c, flags); | |
| 462 | − if (ARCH_X86) | |
| 463 | − ff_vp3dsp_init_x86(c, flags); | |
| 464 | − if (ARCH_MIPS) | |
| 465 | − ff_vp3dsp_init_mips(c, flags); | |
| 458 | +#if ARCH_ARM | |
| 459 | + ff_vp3dsp_init_arm(c, flags); | |
| 460 | +#elif ARCH_PPC | |
| 461 | + ff_vp3dsp_init_ppc(c, flags); | |
| 462 | +#elif ARCH_X86 | |
| 463 | + ff_vp3dsp_init_x86(c, flags); | |
| 464 | +#elif ARCH_MIPS | |
| 465 | + ff_vp3dsp_init_mips(c, flags); | |
| 466 | +#endif | |
| 466 | 467 | } |
| 467 | 468 | |
| 468 | 469 | /* |
| @@ -77,9 +77,10 @@ av_cold void ff_vp6dsp_init(VP56DSPContext *s) · 76 unmodified lines | ||
| 77 | 77 | { |
| 78 | 78 | s->vp6_filter_diag4 = ff_vp6_filter_diag4_c; |
| 79 | 79 | |
| 80 | − if (ARCH_ARM) | |
| 81 | − ff_vp6dsp_init_arm(s); | |
| 82 | − if (ARCH_X86) | |
| 83 | − ff_vp6dsp_init_x86(s); | |
| 80 | +#if ARCH_ARM | |
| 81 | + ff_vp6dsp_init_arm(s); | |
| 82 | +#elif ARCH_X86 | |
| 83 | + ff_vp6dsp_init_x86(s); | |
| 84 | +#endif | |
| 84 | 85 | } |
| 85 | 86 | #endif /* CONFIG_VP6_DECODER */ |
| @@ -675,14 +675,15 @@ av_cold void ff_vp78dsp_init(VP8DSPContext *dsp) · 674 unmodified lines | ||
| 675 | 675 | VP78_BILINEAR_MC_FUNC(1, 8); |
| 676 | 676 | VP78_BILINEAR_MC_FUNC(2, 4); |
| 677 | 677 | |
| 678 | − if (ARCH_AARCH64) | |
| 679 | − ff_vp78dsp_init_aarch64(dsp); | |
| 680 | − if (ARCH_ARM) | |
| 681 | − ff_vp78dsp_init_arm(dsp); | |
| 682 | − if (ARCH_PPC) | |
| 683 | − ff_vp78dsp_init_ppc(dsp); | |
| 684 | − if (ARCH_X86) | |
| 685 | − ff_vp78dsp_init_x86(dsp); | |
| 678 | +#if ARCH_AARCH64 | |
| 679 | + ff_vp78dsp_init_aarch64(dsp); | |
| 680 | +#elif ARCH_ARM | |
| 681 | + ff_vp78dsp_init_arm(dsp); | |
| 682 | +#elif ARCH_PPC | |
| 683 | + ff_vp78dsp_init_ppc(dsp); | |
| 684 | +#elif ARCH_X86 | |
| 685 | + ff_vp78dsp_init_x86(dsp); | |
| 686 | +#endif | |
| 686 | 687 | } |
| 687 | 688 | |
| 688 | 689 | #if CONFIG_VP7_DECODER |
| @@ -737,15 +738,16 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp) · 48 unmodified lines | ||
| 737 | 738 | dsp->vp8_v_loop_filter_simple = vp8_v_loop_filter_simple_c; |
| 738 | 739 | dsp->vp8_h_loop_filter_simple = vp8_h_loop_filter_simple_c; |
| 739 | 740 | |
| 740 | − if (ARCH_AARCH64) | |
| 741 | − ff_vp8dsp_init_aarch64(dsp); | |
| 742 | − if (ARCH_ARM) | |
| 743 | − ff_vp8dsp_init_arm(dsp); | |
| 744 | − if (ARCH_X86) | |
| 745 | − ff_vp8dsp_init_x86(dsp); | |
| 746 | − if (ARCH_MIPS) | |
| 747 | − ff_vp8dsp_init_mips(dsp); | |
| 748 | − if (ARCH_LOONGARCH) | |
| 749 | − ff_vp8dsp_init_loongarch(dsp); | |
| 741 | +#if ARCH_AARCH64 | |
| 742 | + ff_vp8dsp_init_aarch64(dsp); | |
| 743 | +#elif ARCH_ARM | |
| 744 | + ff_vp8dsp_init_arm(dsp); | |
| 745 | +#elif ARCH_X86 | |
| 746 | + ff_vp8dsp_init_x86(dsp); | |
| 747 | +#elif ARCH_MIPS | |
| 748 | + ff_vp8dsp_init_mips(dsp); | |
| 749 | +#elif ARCH_LOONGARCH | |
| 750 | + ff_vp8dsp_init_loongarch(dsp); | |
| 751 | +#endif | |
| 750 | 752 | } |
| 751 | 753 | #endif /* CONFIG_VP8_DECODER */ |
| @@ -96,9 +96,15 @@ av_cold void ff_vp9dsp_init(VP9DSPContext *dsp, int bpp, int bitexact) · 95 unmodified lines | ||
| 96 | 96 | ff_vp9dsp_init_12(dsp); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | − if (ARCH_AARCH64) ff_vp9dsp_init_aarch64(dsp, bpp); | |
| 100 | − if (ARCH_ARM) ff_vp9dsp_init_arm(dsp, bpp); | |
| 101 | − if (ARCH_X86) ff_vp9dsp_init_x86(dsp, bpp, bitexact); | |
| 102 | − if (ARCH_MIPS) ff_vp9dsp_init_mips(dsp, bpp); | |
| 103 | − if (ARCH_LOONGARCH) ff_vp9dsp_init_loongarch(dsp, bpp); | |
| 99 | +#if ARCH_AARCH64 | |
| 100 | + ff_vp9dsp_init_aarch64(dsp, bpp); | |
| 101 | +#elif ARCH_ARM | |
| 102 | + ff_vp9dsp_init_arm(dsp, bpp); | |
| 103 | +#elif ARCH_X86 | |
| 104 | + ff_vp9dsp_init_x86(dsp, bpp, bitexact); | |
| 105 | +#elif ARCH_MIPS | |
| 106 | + ff_vp9dsp_init_mips(dsp, bpp); | |
| 107 | +#elif ARCH_LOONGARCH | |
| 108 | + ff_vp9dsp_init_loongarch(dsp, bpp); | |
| 109 | +#endif | |
| 104 | 110 | } |
| @@ -264,6 +264,7 @@ av_cold void ff_wmv2dsp_init(WMV2DSPContext *c) · 263 unmodified lines | ||
| 264 | 264 | c->put_mspel_pixels_tab[6] = put_mspel8_mc22_c; |
| 265 | 265 | c->put_mspel_pixels_tab[7] = put_mspel8_mc32_c; |
| 266 | 266 | |
| 267 | − if (ARCH_MIPS) | |
| 268 | − ff_wmv2dsp_init_mips(c); | |
| 267 | +#if ARCH_MIPS | |
| 268 | + ff_wmv2dsp_init_mips(c); | |
| 269 | +#endif | |
| 269 | 270 | } |
| @@ -89,13 +89,15 @@ av_cold void ff_mdct15_init_x86(MDCT15Context *s) · 88 unmodified lines | ||
| 89 | 89 | if (EXTERNAL_SSE3(cpu_flags)) |
| 90 | 90 | s->postreindex = ff_mdct15_postreindex_sse3; |
| 91 | 91 | |
| 92 | − if (ARCH_X86_64 && EXTERNAL_AVX(cpu_flags)) { | |
| 92 | +#if ARCH_X86_64 | |
| 93 | + if (EXTERNAL_AVX(cpu_flags)) { | |
| 93 | 94 | s->fft15 = ff_fft15_avx; |
| 94 | 95 | adjust_twiddles = 1; |
| 95 | 96 | } |
| 96 | 97 | |
| 97 | − if (ARCH_X86_64 && EXTERNAL_AVX2_FAST(cpu_flags)) | |
| 98 | + if (EXTERNAL_AVX2_FAST(cpu_flags)) | |
| 98 | 99 | s->postreindex = ff_mdct15_postreindex_avx2; |
| 100 | +#endif | |
| 99 | 101 | |
| 100 | 102 | if (adjust_twiddles) |
| 101 | 103 | perm_twiddles(s); |
| @@ -346,10 +346,11 @@ av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx) · 345 unmodified lines | ||
| 346 | 346 | c->perm_type = FF_IDCT_PERM_NONE; |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | − if (ARCH_X86) | |
| 350 | − ff_xvid_idct_init_x86(c, avctx, high_bit_depth); | |
| 351 | − if (ARCH_MIPS) | |
| 352 | − ff_xvid_idct_init_mips(c, avctx, high_bit_depth); | |
| 349 | +#if ARCH_X86 | |
| 350 | + ff_xvid_idct_init_x86(c, avctx, high_bit_depth); | |
| 351 | +#elif ARCH_MIPS | |
| 352 | + ff_xvid_idct_init_mips(c, avctx, high_bit_depth); | |
| 353 | +#endif | |
| 353 | 354 | |
| 354 | 355 | ff_init_scantable_permutation(c->idct_permutation, c->perm_type); |
| 355 | 356 | } |
| @@ -74,8 +74,9 @@ static av_unused void ff_afir_init(AudioFIRDSPContext *dsp) · 73 unmodified lines | ||
| 74 | 74 | dsp->fcmul_add = fcmul_add_c; |
| 75 | 75 | dsp->dcmul_add = dcmul_add_c; |
| 76 | 76 | |
| 77 | − if (ARCH_X86) | |
| 78 | − ff_afir_init_x86(dsp); | |
| 77 | +#if ARCH_X86 | |
| 78 | + ff_afir_init_x86(dsp); | |
| 79 | +#endif | |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | #endif /* AVFILTER_AFIRDSP_H */ |
| @@ -118,8 +118,9 @@ void ff_anlmdn_init(AudioNLMDNDSPContext *dsp) · 117 unmodified lines | ||
| 118 | 118 | dsp->compute_distance_ssd = compute_distance_ssd_c; |
| 119 | 119 | dsp->compute_cache = compute_cache_c; |
| 120 | 120 | |
| 121 | − if (ARCH_X86) | |
| 122 | − ff_anlmdn_init_x86(dsp); | |
| 121 | +#if ARCH_X86 | |
| 122 | + ff_anlmdn_init_x86(dsp); | |
| 123 | +#endif | |
| 123 | 124 | } |
| 124 | 125 | |
| 125 | 126 | static int config_filter(AVFilterContext *ctx) |
| @@ -238,8 +238,9 @@ static av_cold void volume_init(VolumeContext *vol) · 237 unmodified lines | ||
| 238 | 238 | break; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | − if (ARCH_X86) | |
| 242 | − ff_volume_init_x86(vol); | |
| 241 | +#if ARCH_X86 | |
| 242 | + ff_volume_init_x86(vol); | |
| 243 | +#endif | |
| 243 | 244 | } |
| 244 | 245 | |
| 245 | 246 | static int set_volume(AVFilterContext *ctx) |
| @@ -1418,8 +1418,9 @@ static int config_output(AVFilterLink *outlink) · 1417 unmodified lines | ||
| 1418 | 1418 | s->update_sono = update_sono_yuv; |
| 1419 | 1419 | } |
| 1420 | 1420 | |
| 1421 | − if (ARCH_X86) | |
| 1422 | − ff_showcqt_init_x86(s); | |
| 1421 | +#if ARCH_X86 | |
| 1422 | + ff_showcqt_init_x86(s); | |
| 1423 | +#endif | |
| 1423 | 1424 | |
| 1424 | 1425 | if ((ret = init_cqt(s)) < 0) |
| 1425 | 1426 | return ret; |
| @@ -143,6 +143,7 @@ void ff_colorspacedsp_init(ColorSpaceDSPContext *dsp) · 142 unmodified lines | ||
| 143 | 143 | |
| 144 | 144 | dsp->multiply3x3 = multiply3x3_c; |
| 145 | 145 | |
| 146 | − if (ARCH_X86) | |
| 147 | − ff_colorspacedsp_x86_init(dsp); | |
| 146 | +#if ARCH_X86 | |
| 147 | + ff_colorspacedsp_x86_init(dsp); | |
| 148 | +#endif | |
| 148 | 149 | } |
| @@ -59,8 +59,9 @@ void ff_scene_sad_c(SCENE_SAD_PARAMS) · 58 unmodified lines | ||
| 59 | 59 | ff_scene_sad_fn ff_scene_sad_get_fn(int depth) |
| 60 | 60 | { |
| 61 | 61 | ff_scene_sad_fn sad = NULL; |
| 62 | − if (ARCH_X86) | |
| 63 | − sad = ff_scene_sad_get_fn_x86(depth); | |
| 62 | +#if ARCH_X86 | |
| 63 | + sad = ff_scene_sad_get_fn_x86(depth); | |
| 64 | +#endif | |
| 64 | 65 | if (!sad) { |
| 65 | 66 | if (depth == 8) |
| 66 | 67 | sad = ff_scene_sad_c; |
| @@ -433,8 +433,9 @@ static int config_input(AVFilterLink *inlink) · 432 unmodified lines | ||
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | − if (ARCH_X86) | |
| 437 | − ff_atadenoise_init_x86(&s->dsp, depth, s->algorithm, s->sigma); | |
| 436 | +#if ARCH_X86 | |
| 437 | + ff_atadenoise_init_x86(&s->dsp, depth, s->algorithm, s->sigma); | |
| 438 | +#endif | |
| 438 | 439 | |
| 439 | 440 | return 0; |
| 440 | 441 | } |
| @@ -194,8 +194,9 @@ static av_unused void ff_blend_init(FilterParams *param, int depth) · 193 unmodified lines | ||
| 194 | 194 | param->blend = depth > 8 ? depth > 16 ? blend_copybottom_32 : blend_copybottom_16 : blend_copybottom_8; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | − if (ARCH_X86) | |
| 198 | − ff_blend_init_x86(param, depth); | |
| 197 | +#if ARCH_X86 | |
| 198 | + ff_blend_init_x86(param, depth); | |
| 199 | +#endif | |
| 199 | 200 | } |
| 200 | 201 | |
| 201 | 202 | #endif /* AVFILTER_BLEND_INIT_H */ |
| @@ -350,8 +350,9 @@ static int config_props(AVFilterLink *link) · 349 unmodified lines | ||
| 350 | 350 | s->filter_edge = filter_edge; |
| 351 | 351 | } |
| 352 | 352 | |
| 353 | − if (ARCH_X86) | |
| 354 | − ff_bwdif_init_x86(s); | |
| 353 | +#if ARCH_X86 | |
| 354 | + ff_bwdif_init_x86(s); | |
| 355 | +#endif | |
| 355 | 356 | |
| 356 | 357 | return 0; |
| 357 | 358 | } |
| @@ -123,8 +123,9 @@ void ff_eq_init_x86(EQContext *eq); · 122 unmodified lines | ||
| 123 | 123 | static av_unused void ff_eq_init(EQContext *eq) |
| 124 | 124 | { |
| 125 | 125 | eq->process = process_c; |
| 126 | − if (ARCH_X86) | |
| 127 | − ff_eq_init_x86(eq); | |
| 126 | +#if ARCH_X86 | |
| 127 | + ff_eq_init_x86(eq); | |
| 128 | +#endif | |
| 128 | 129 | } |
| 129 | 130 | |
| 130 | 131 | #endif /* AVFILTER_EQ_H */ |
| @@ -264,8 +264,9 @@ void ff_framerate_init(FrameRateContext *s) · 263 unmodified lines | ||
| 264 | 264 | s->blend_factor_max = 1 << BLEND_FACTOR_DEPTH(16); |
| 265 | 265 | s->blend = blend_frames16_c; |
| 266 | 266 | } |
| 267 | − if (ARCH_X86) | |
| 268 | − ff_framerate_init_x86(s); | |
| 267 | +#if ARCH_X86 | |
| 268 | + ff_framerate_init_x86(s); | |
| 269 | +#endif | |
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | static int config_input(AVFilterLink *inlink) |
| @@ -525,8 +525,9 @@ static int config_input(AVFilterLink *inlink) · 524 unmodified lines | ||
| 525 | 525 | fspp->row_idct = row_idct_c; |
| 526 | 526 | fspp->row_fdct = row_fdct_c; |
| 527 | 527 | |
| 528 | − if (ARCH_X86) | |
| 529 | − ff_fspp_init_x86(fspp); | |
| 528 | +#if ARCH_X86 | |
| 529 | + ff_fspp_init_x86(fspp); | |
| 530 | +#endif | |
| 530 | 531 | |
| 531 | 532 | return 0; |
| 532 | 533 | } |
| @@ -115,8 +115,9 @@ static av_unused void ff_gblur_init(GBlurContext *s) · 114 unmodified lines | ||
| 115 | 115 | s->horiz_slice = horiz_slice_c; |
| 116 | 116 | s->verti_slice = verti_slice_c; |
| 117 | 117 | s->postscale_slice = postscale_c; |
| 118 | − if (ARCH_X86) | |
| 119 | − ff_gblur_init_x86(s); | |
| 118 | +#if ARCH_X86 | |
| 119 | + ff_gblur_init_x86(s); | |
| 120 | +#endif | |
| 120 | 121 | } |
| 121 | 122 | |
| 122 | 123 | #endif /* AVFILTER_GBLUR_INIT_H */ |
| @@ -131,8 +131,9 @@ static av_cold int init(AVFilterContext *ctx) · 130 unmodified lines | ||
| 131 | 131 | s->blur_line = ff_gradfun_blur_line_c; |
| 132 | 132 | s->filter_line = ff_gradfun_filter_line_c; |
| 133 | 133 | |
| 134 | − if (ARCH_X86) | |
| 135 | − ff_gradfun_init_x86(s); | |
| 134 | +#if ARCH_X86 | |
| 135 | + ff_gradfun_init_x86(s); | |
| 136 | +#endif | |
| 136 | 137 | |
| 137 | 138 | av_log(ctx, AV_LOG_VERBOSE, "threshold:%.2f radius:%d\n", s->strength, s->radius); |
| 138 | 139 | |
| @@ -101,8 +101,9 @@ static av_unused int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) · 100 unmodified lines | ||
| 101 | 101 | return AVERROR_BUG; |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | − if (ARCH_X86) | |
| 105 | − ff_hflip_init_x86(s, step, nb_planes); | |
| 104 | +#if ARCH_X86 | |
| 105 | + ff_hflip_init_x86(s, step, nb_planes); | |
| 106 | +#endif | |
| 106 | 107 | |
| 107 | 108 | return 0; |
| 108 | 109 | } |
| @@ -278,8 +278,9 @@ static int config_input(AVFilterLink *inlink) · 277 unmodified lines | ||
| 278 | 278 | |
| 279 | 279 | calc_coefs(ctx); |
| 280 | 280 | |
| 281 | − if (ARCH_X86) | |
| 282 | − ff_hqdn3d_init_x86(s); | |
| 281 | +#if ARCH_X86 | |
| 282 | + ff_hqdn3d_init_x86(s); | |
| 283 | +#endif | |
| 283 | 284 | |
| 284 | 285 | return 0; |
| 285 | 286 | } |
| @@ -276,8 +276,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) · 275 unmodified lines | ||
| 276 | 276 | idet->csp = av_pix_fmt_desc_get(link->format); |
| 277 | 277 | if (idet->csp->comp[0].depth > 8){ |
| 278 | 278 | idet->filter_line = (ff_idet_filter_func)ff_idet_filter_line_c_16bit; |
| 279 | − if (ARCH_X86) | |
| 280 | − ff_idet_init_x86(idet, 1); | |
| 279 | +#if ARCH_X86 | |
| 280 | + ff_idet_init_x86(idet, 1); | |
| 281 | +#endif | |
| 281 | 282 | } |
| 282 | 283 | |
| 283 | 284 | if (idet->analyze_interlaced_flag) { |
| @@ -408,8 +409,9 @@ static av_cold int init(AVFilterContext *ctx) · 124 unmodified lines | ||
| 408 | 409 | |
| 409 | 410 | idet->filter_line = ff_idet_filter_line_c; |
| 410 | 411 | |
| 411 | − if (ARCH_X86) | |
| 412 | − ff_idet_init_x86(idet, 0); | |
| 412 | +#if ARCH_X86 | |
| 413 | + ff_idet_init_x86(idet, 0); | |
| 414 | +#endif | |
| 413 | 415 | |
| 414 | 416 | return 0; |
| 415 | 417 | } |
| @@ -141,8 +141,9 @@ static int config_input(AVFilterLink *inlink) · 140 unmodified lines | ||
| 141 | 141 | s->dsp.limiter = limiter16; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | − if (ARCH_X86) | |
| 145 | − ff_limiter_init_x86(&s->dsp, desc->comp[0].depth); | |
| 144 | +#if ARCH_X86 | |
| 145 | + ff_limiter_init_x86(&s->dsp, desc->comp[0].depth); | |
| 146 | +#endif | |
| 146 | 147 | |
| 147 | 148 | return 0; |
| 148 | 149 | } |
| @@ -1150,9 +1150,9 @@ static int config_input(AVFilterLink *inlink) · 1149 unmodified lines | ||
| 1150 | 1150 | av_assert0(0); |
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | − if (ARCH_X86) { | |
| 1154 | − ff_lut3d_init_x86(lut3d, desc); | |
| 1155 | − } | |
| 1153 | +#if ARCH_X86 | |
| 1154 | + ff_lut3d_init_x86(lut3d, desc); | |
| 1155 | +#endif | |
| 1156 | 1156 | |
| 1157 | 1157 | return 0; |
| 1158 | 1158 | } |
| @@ -209,8 +209,9 @@ static int config_input(AVFilterLink *inlink) · 208 unmodified lines | ||
| 209 | 209 | else |
| 210 | 210 | s->dsp.maskedclamp = maskedclamp16; |
| 211 | 211 | |
| 212 | − if (ARCH_X86) | |
| 213 | − ff_maskedclamp_init_x86(&s->dsp, s->depth); | |
| 212 | +#if ARCH_X86 | |
| 213 | + ff_maskedclamp_init_x86(&s->dsp, s->depth); | |
| 214 | +#endif | |
| 214 | 215 | |
| 215 | 216 | return 0; |
| 216 | 217 | } |
| @@ -202,8 +202,9 @@ static int config_input(AVFilterLink *inlink) · 201 unmodified lines | ||
| 202 | 202 | else |
| 203 | 203 | s->maskedmerge = maskedmerge32; |
| 204 | 204 | |
| 205 | − if (ARCH_X86) | |
| 206 | − ff_maskedmerge_init_x86(s); | |
| 205 | +#if ARCH_X86 | |
| 206 | + ff_maskedmerge_init_x86(s); | |
| 207 | +#endif | |
| 207 | 208 | |
| 208 | 209 | return 0; |
| 209 | 210 | } |
| @@ -129,11 +129,11 @@ static av_unused void ff_nlmeans_init(NLMeansDSPContext *dsp) · 128 unmodified lines | ||
| 129 | 129 | dsp->compute_safe_ssd_integral_image = compute_safe_ssd_integral_image_c; |
| 130 | 130 | dsp->compute_weights_line = compute_weights_line_c; |
| 131 | 131 | |
| 132 | − if (ARCH_AARCH64) | |
| 133 | − ff_nlmeans_init_aarch64(dsp); | |
| 134 | − | |
| 135 | − if (ARCH_X86) | |
| 136 | − ff_nlmeans_init_x86(dsp); | |
| 132 | +#if ARCH_AARCH64 | |
| 133 | + ff_nlmeans_init_aarch64(dsp); | |
| 134 | +#elif ARCH_X86 | |
| 135 | + ff_nlmeans_init_x86(dsp); | |
| 136 | +#endif | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | #endif /* AVFILTER_NLMEANS_INIT_H */ |
| @@ -305,8 +305,9 @@ static av_cold int init(AVFilterContext *ctx) · 304 unmodified lines | ||
| 305 | 305 | n->line_noise = ff_line_noise_c; |
| 306 | 306 | n->line_noise_avg = ff_line_noise_avg_c; |
| 307 | 307 | |
| 308 | − if (ARCH_X86) | |
| 309 | − ff_noise_init_x86(n); | |
| 308 | +#if ARCH_X86 | |
| 309 | + ff_noise_init_x86(n); | |
| 310 | +#endif | |
| 310 | 311 | |
| 311 | 312 | return 0; |
| 312 | 313 | } |
| @@ -984,9 +984,10 @@ static int config_input_main(AVFilterLink *inlink) · 983 unmodified lines | ||
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | end: |
| 987 | − if (ARCH_X86) | |
| 988 | − ff_overlay_init_x86(s, s->format, inlink->format, | |
| 989 | − s->alpha_format, s->main_has_alpha); | |
| 987 | +#if ARCH_X86 | |
| 988 | + ff_overlay_init_x86(s, s->format, inlink->format, | |
| 989 | + s->alpha_format, s->main_has_alpha); | |
| 990 | +#endif | |
| 990 | 991 | |
| 991 | 992 | return 0; |
| 992 | 993 | } |
| @@ -301,8 +301,9 @@ static int config_input(AVFilterLink *inlink) · 300 unmodified lines | ||
| 301 | 301 | |
| 302 | 302 | pp7->dctB = dctB_c; |
| 303 | 303 | |
| 304 | − if (ARCH_X86) | |
| 305 | − ff_pp7_init_x86(pp7); | |
| 304 | +#if ARCH_X86 | |
| 305 | + ff_pp7_init_x86(pp7); | |
| 306 | +#endif | |
| 306 | 307 | |
| 307 | 308 | return 0; |
| 308 | 309 | } |
| @@ -354,8 +354,9 @@ static int config_input_ref(AVFilterLink *inlink) · 353 unmodified lines | ||
| 354 | 354 | s->average_max = lrint(average_max); |
| 355 | 355 | |
| 356 | 356 | s->dsp.sse_line = desc->comp[0].depth > 8 ? sse_line_16bit : sse_line_8bit; |
| 357 | − if (ARCH_X86) | |
| 358 | − ff_psnr_init_x86(&s->dsp, desc->comp[0].depth); | |
| 357 | +#if ARCH_X86 | |
| 358 | + ff_psnr_init_x86(&s->dsp, desc->comp[0].depth); | |
| 359 | +#endif | |
| 359 | 360 | |
| 360 | 361 | s->score = av_calloc(s->nb_threads, sizeof(*s->score)); |
| 361 | 362 | if (!s->score) |
| @@ -207,8 +207,9 @@ static int config_input(AVFilterLink *inlink) · 206 unmodified lines | ||
| 207 | 207 | s->comb = comb_c; |
| 208 | 208 | s->var = var_c; |
| 209 | 209 | |
| 210 | − if (ARCH_X86) | |
| 211 | − ff_pullup_init_x86(s); | |
| 210 | +#if ARCH_X86 | |
| 211 | + ff_pullup_init_x86(s); | |
| 212 | +#endif | |
| 212 | 213 | return 0; |
| 213 | 214 | } |
| 214 | 215 | |
| @@ -501,8 +501,9 @@ static int config_input(AVFilterLink *inlink) · 500 unmodified lines | ||
| 501 | 501 | } |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | − if (ARCH_X86) | |
| 505 | − ff_removegrain_init_x86(s); | |
| 504 | +#if ARCH_X86 | |
| 505 | + ff_removegrain_init_x86(s); | |
| 506 | +#endif | |
| 506 | 507 | |
| 507 | 508 | return 0; |
| 508 | 509 | } |
| @@ -343,8 +343,9 @@ static int config_input(AVFilterLink *inlink) · 342 unmodified lines | ||
| 343 | 343 | av_opt_set_int(s->dct, "bits_per_sample", bps, 0); |
| 344 | 344 | avcodec_dct_init(s->dct); |
| 345 | 345 | |
| 346 | − if (ARCH_X86) | |
| 347 | − ff_spp_init_x86(s); | |
| 346 | +#if ARCH_X86 | |
| 347 | + ff_spp_init_x86(s); | |
| 348 | +#endif | |
| 348 | 349 | |
| 349 | 350 | s->hsub = desc->log2_chroma_w; |
| 350 | 351 | s->vsub = desc->log2_chroma_h; |
| @@ -478,8 +478,9 @@ static int config_input_ref(AVFilterLink *inlink) · 477 unmodified lines | ||
| 478 | 478 | s->ssim_plane = desc->comp[0].depth > 8 ? ssim_plane_16bit : ssim_plane; |
| 479 | 479 | s->dsp.ssim_4x4_line = ssim_4x4xn_8bit; |
| 480 | 480 | s->dsp.ssim_end_line = ssim_endn_8bit; |
| 481 | − if (ARCH_X86) | |
| 482 | − ff_ssim_init_x86(&s->dsp); | |
| 481 | +#if ARCH_X86 | |
| 482 | + ff_ssim_init_x86(&s->dsp); | |
| 483 | +#endif | |
| 483 | 484 | |
| 484 | 485 | s->score = av_calloc(s->nb_threads, sizeof(*s->score)); |
| 485 | 486 | if (!s->score) |
| @@ -591,8 +591,9 @@ static int config_output(AVFilterLink *outlink) · 590 unmodified lines | ||
| 591 | 591 | s->vsub = desc->log2_chroma_h; |
| 592 | 592 | |
| 593 | 593 | s->dsp.anaglyph = anaglyph; |
| 594 | − if (ARCH_X86) | |
| 595 | − ff_stereo3d_init_x86(&s->dsp); | |
| 594 | +#if ARCH_X86 | |
| 595 | + ff_stereo3d_init_x86(&s->dsp); | |
| 596 | +#endif | |
| 596 | 597 | |
| 597 | 598 | return 0; |
| 598 | 599 | } |
| @@ -84,8 +84,9 @@ static av_unused void ff_threshold_init(ThresholdContext *s) · 83 unmodified lines | ||
| 84 | 84 | s->bpc = 2; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | − if (ARCH_X86) | |
| 88 | − ff_threshold_init_x86(s); | |
| 87 | +#if ARCH_X86 | |
| 88 | + ff_threshold_init_x86(s); | |
| 89 | +#endif | |
| 89 | 90 | } |
| 90 | 91 | |
| 91 | 92 | #endif /* AVFILTER_THRESHOLD_INIT_H */ |
| @@ -269,15 +269,17 @@ static int config_out_props(AVFilterLink *outlink) · 268 unmodified lines | ||
| 269 | 269 | tinterlace->lowpass_line = lowpass_line_complex_c_16; |
| 270 | 270 | else |
| 271 | 271 | tinterlace->lowpass_line = lowpass_line_complex_c; |
| 272 | − if (ARCH_X86) | |
| 273 | − ff_tinterlace_init_x86(tinterlace); | |
| 272 | +#if ARCH_X86 | |
| 273 | + ff_tinterlace_init_x86(tinterlace); | |
| 274 | +#endif | |
| 274 | 275 | } else if (tinterlace->flags & TINTERLACE_FLAG_VLPF) { |
| 275 | 276 | if (tinterlace->csp->comp[0].depth > 8) |
| 276 | 277 | tinterlace->lowpass_line = lowpass_line_c_16; |
| 277 | 278 | else |
| 278 | 279 | tinterlace->lowpass_line = lowpass_line_c; |
| 279 | − if (ARCH_X86) | |
| 280 | − ff_tinterlace_init_x86(tinterlace); | |
| 280 | +#if ARCH_X86 | |
| 281 | + ff_tinterlace_init_x86(tinterlace); | |
| 282 | +#endif | |
| 281 | 283 | } |
| 282 | 284 | |
| 283 | 285 | av_log(ctx, AV_LOG_VERBOSE, "mode:%d filter:%s h:%d -> h:%d\n", tinterlace->mode, |
| @@ -235,13 +235,13 @@ static int config_props_output(AVFilterLink *outlink) · 234 unmodified lines | ||
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | − if (ARCH_X86) { | |
| 239 | − for (int i = 0; i < 4; i++) { | |
| 240 | − TransVtable *v = &s->vtables[i]; | |
| 238 | +#if ARCH_X86 | |
| 239 | + for (int i = 0; i < 4; i++) { | |
| 240 | + TransVtable *v = &s->vtables[i]; | |
| 241 | 241 | |
| 242 | − ff_transpose_init_x86(v, s->pixsteps[i]); | |
| 243 | − } | |
| 242 | + ff_transpose_init_x86(v, s->pixsteps[i]); | |
| 244 | 243 | } |
| 244 | +#endif | |
| 245 | 245 | |
| 246 | 246 | av_log(ctx, AV_LOG_VERBOSE, |
| 247 | 247 | "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n", |
| @@ -389,8 +389,9 @@ void ff_v360_init(V360Context *s, int depth) · 388 unmodified lines | ||
| 389 | 389 | break; |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | − if (ARCH_X86) | |
| 393 | − ff_v360_init_x86(s, depth); | |
| 392 | +#if ARCH_X86 | |
| 393 | + ff_v360_init_x86(s, depth); | |
| 394 | +#endif | |
| 394 | 395 | } |
| 395 | 396 | |
| 396 | 397 | /** |
| @@ -317,8 +317,9 @@ static int config_input(AVFilterLink *inlink) · 316 unmodified lines | ||
| 317 | 317 | s->dsp.filter_scale = filter16_scale; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | − if (ARCH_X86) | |
| 321 | − ff_w3fdif_init_x86(&s->dsp, depth); | |
| 320 | +#if ARCH_X86 | |
| 321 | + ff_w3fdif_init_x86(&s->dsp, depth); | |
| 322 | +#endif | |
| 322 | 323 | |
| 323 | 324 | return 0; |
| 324 | 325 | } |
| @@ -311,8 +311,9 @@ static int config_output(AVFilterLink *outlink) · 310 unmodified lines | ||
| 311 | 311 | s->filter_edges = filter_edges; |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | − if (ARCH_X86) | |
| 315 | − ff_yadif_init_x86(s); | |
| 314 | +#if ARCH_X86 | |
| 315 | + ff_yadif_init_x86(s); | |
| 316 | +#endif | |
| 316 | 317 | |
| 317 | 318 | return 0; |
| 318 | 319 | } |
| @@ -54,18 +54,19 @@ static atomic_int cpu_count = ATOMIC_VAR_INIT(-1); · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | static int get_cpu_flags(void) |
| 56 | 56 | { |
| 57 | − if (ARCH_MIPS) | |
| 58 | − return ff_get_cpu_flags_mips(); | |
| 59 | − if (ARCH_AARCH64) | |
| 60 | − return ff_get_cpu_flags_aarch64(); | |
| 61 | − if (ARCH_ARM) | |
| 62 | − return ff_get_cpu_flags_arm(); | |
| 63 | − if (ARCH_PPC) | |
| 64 | − return ff_get_cpu_flags_ppc(); | |
| 65 | − if (ARCH_X86) | |
| 66 | − return ff_get_cpu_flags_x86(); | |
| 67 | − if (ARCH_LOONGARCH) | |
| 68 | − return ff_get_cpu_flags_loongarch(); | |
| 57 | +#if ARCH_MIPS | |
| 58 | + return ff_get_cpu_flags_mips(); | |
| 59 | +#elif ARCH_AARCH64 | |
| 60 | + return ff_get_cpu_flags_aarch64(); | |
| 61 | +#elif ARCH_ARM | |
| 62 | + return ff_get_cpu_flags_arm(); | |
| 63 | +#elif ARCH_PPC | |
| 64 | + return ff_get_cpu_flags_ppc(); | |
| 65 | +#elif ARCH_X86 | |
| 66 | + return ff_get_cpu_flags_x86(); | |
| 67 | +#elif ARCH_LOONGARCH | |
| 68 | + return ff_get_cpu_flags_loongarch(); | |
| 69 | +#endif | |
| 69 | 70 | return 0; |
| 70 | 71 | } |
| 71 | 72 | |
| @@ -252,18 +253,19 @@ void av_cpu_force_count(int count) · 180 unmodified lines | ||
| 252 | 253 | |
| 253 | 254 | size_t av_cpu_max_align(void) |
| 254 | 255 | { |
| 255 | − if (ARCH_MIPS) | |
| 256 | − return ff_get_cpu_max_align_mips(); | |
| 257 | − if (ARCH_AARCH64) | |
| 258 | − return ff_get_cpu_max_align_aarch64(); | |
| 259 | − if (ARCH_ARM) | |
| 260 | − return ff_get_cpu_max_align_arm(); | |
| 261 | − if (ARCH_PPC) | |
| 262 | − return ff_get_cpu_max_align_ppc(); | |
| 263 | − if (ARCH_X86) | |
| 264 | − return ff_get_cpu_max_align_x86(); | |
| 265 | − if (ARCH_LOONGARCH) | |
| 266 | − return ff_get_cpu_max_align_loongarch(); | |
| 256 | +#if ARCH_MIPS | |
| 257 | + return ff_get_cpu_max_align_mips(); | |
| 258 | +#elif ARCH_AARCH64 | |
| 259 | + return ff_get_cpu_max_align_aarch64(); | |
| 260 | +#elif ARCH_ARM | |
| 261 | + return ff_get_cpu_max_align_arm(); | |
| 262 | +#elif ARCH_PPC | |
| 263 | + return ff_get_cpu_max_align_ppc(); | |
| 264 | +#elif ARCH_X86 | |
| 265 | + return ff_get_cpu_max_align_x86(); | |
| 266 | +#elif ARCH_LOONGARCH | |
| 267 | + return ff_get_cpu_max_align_loongarch(); | |
| 268 | +#endif | |
| 267 | 269 | |
| 268 | 270 | return 8; |
| 269 | 271 | } |
| @@ -162,8 +162,9 @@ AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact) · 161 unmodified lines | ||
| 162 | 162 | fdsp->butterflies_fixed = butterflies_fixed_c; |
| 163 | 163 | fdsp->scalarproduct_fixed = scalarproduct_fixed_c; |
| 164 | 164 | |
| 165 | − if (ARCH_X86) | |
| 166 | − ff_fixed_dsp_init_x86(fdsp); | |
| 165 | +#if ARCH_X86 | |
| 166 | + ff_fixed_dsp_init_x86(fdsp); | |
| 167 | +#endif | |
| 167 | 168 | |
| 168 | 169 | return fdsp; |
| 169 | 170 | } |
| @@ -150,15 +150,16 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact) · 149 unmodified lines | ||
| 150 | 150 | fdsp->butterflies_float = butterflies_float_c; |
| 151 | 151 | fdsp->scalarproduct_float = avpriv_scalarproduct_float_c; |
| 152 | 152 | |
| 153 | − if (ARCH_AARCH64) | |
| 154 | − ff_float_dsp_init_aarch64(fdsp); | |
| 155 | − if (ARCH_ARM) | |
| 156 | − ff_float_dsp_init_arm(fdsp); | |
| 157 | − if (ARCH_PPC) | |
| 158 | − ff_float_dsp_init_ppc(fdsp, bit_exact); | |
| 159 | − if (ARCH_X86) | |
| 160 | − ff_float_dsp_init_x86(fdsp); | |
| 161 | − if (ARCH_MIPS) | |
| 162 | − ff_float_dsp_init_mips(fdsp); | |
| 153 | +#if ARCH_AARCH64 | |
| 154 | + ff_float_dsp_init_aarch64(fdsp); | |
| 155 | +#elif ARCH_ARM | |
| 156 | + ff_float_dsp_init_arm(fdsp); | |
| 157 | +#elif ARCH_PPC | |
| 158 | + ff_float_dsp_init_ppc(fdsp, bit_exact); | |
| 159 | +#elif ARCH_X86 | |
| 160 | + ff_float_dsp_init_x86(fdsp); | |
| 161 | +#elif ARCH_MIPS | |
| 162 | + ff_float_dsp_init_mips(fdsp); | |
| 163 | +#endif | |
| 163 | 164 | return fdsp; |
| 164 | 165 | } |
| @@ -117,6 +117,7 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count) · 116 unmodified lines | ||
| 117 | 117 | m->indep_count = indep_count; |
| 118 | 118 | m->update_lls = update_lls; |
| 119 | 119 | m->evaluate_lls = evaluate_lls; |
| 120 | − if (ARCH_X86) | |
| 121 | − ff_init_lls_x86(m); | |
| 120 | +#if ARCH_X86 | |
| 121 | + ff_init_lls_x86(m); | |
| 122 | +#endif | |
| 122 | 123 | } |
| @@ -176,9 +176,13 @@ AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, · 175 unmodified lines | ||
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | − if(HAVE_X86ASM && HAVE_MMX) swri_audio_convert_init_x86(ctx, out_fmt, in_fmt, channels); | |
| 180 | − if(ARCH_ARM) swri_audio_convert_init_arm(ctx, out_fmt, in_fmt, channels); | |
| 181 | − if(ARCH_AARCH64) swri_audio_convert_init_aarch64(ctx, out_fmt, in_fmt, channels); | |
| 179 | +#if ARCH_X86 && HAVE_X86ASM && HAVE_MMX | |
| 180 | + swri_audio_convert_init_x86(ctx, out_fmt, in_fmt, channels); | |
| 181 | +#elif ARCH_ARM | |
| 182 | + swri_audio_convert_init_arm(ctx, out_fmt, in_fmt, channels); | |
| 183 | +#elif ARCH_AARCH64 | |
| 184 | + swri_audio_convert_init_aarch64(ctx, out_fmt, in_fmt, channels); | |
| 185 | +#endif | |
| 182 | 186 | |
| 183 | 187 | return ctx; |
| 184 | 188 | } |
| @@ -565,8 +565,9 @@ av_cold int swri_rematrix_init(SwrContext *s){ · 564 unmodified lines | ||
| 565 | 565 | s->matrix_ch[i][0]= ch_in; |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | − if(HAVE_X86ASM && HAVE_MMX) | |
| 569 | − return swri_rematrix_init_x86(s); | |
| 568 | +#if ARCH_X86 && HAVE_X86ASM && HAVE_MMX | |
| 569 | + return swri_rematrix_init_x86(s); | |
| 570 | +#endif | |
| 570 | 571 | |
| 571 | 572 | return 0; |
| 572 | 573 | } |
| @@ -68,7 +68,11 @@ void swri_resample_dsp_init(ResampleContext *c) · 67 unmodified lines | ||
| 68 | 68 | break; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | − if (ARCH_X86) swri_resample_dsp_x86_init(c); | |
| 72 | − else if (ARCH_ARM) swri_resample_dsp_arm_init(c); | |
| 73 | − else if (ARCH_AARCH64) swri_resample_dsp_aarch64_init(c); | |
| 71 | +#if ARCH_X86 | |
| 72 | + swri_resample_dsp_x86_init(c); | |
| 73 | +#elif ARCH_ARM | |
| 74 | + swri_resample_dsp_arm_init(c); | |
| 75 | +#elif ARCH_AARCH64 | |
| 76 | + swri_resample_dsp_aarch64_init(c); | |
| 77 | +#endif | |
| 74 | 78 | } |
| @@ -137,10 +137,11 @@ void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, · 136 unmodified lines | ||
| 137 | 137 | av_cold void ff_sws_rgb2rgb_init(void) |
| 138 | 138 | { |
| 139 | 139 | rgb2rgb_init_c(); |
| 140 | − if (ARCH_AARCH64) | |
| 141 | − rgb2rgb_init_aarch64(); | |
| 142 | − if (ARCH_X86) | |
| 143 | − rgb2rgb_init_x86(); | |
| 140 | +#if ARCH_AARCH64 | |
| 141 | + rgb2rgb_init_aarch64(); | |
| 142 | +#elif ARCH_X86 | |
| 143 | + rgb2rgb_init_x86(); | |
| 144 | +#endif | |
| 144 | 145 | } |
| 145 | 146 | |
| 146 | 147 | void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size) |
| @@ -590,14 +590,15 @@ void ff_sws_init_scale(SwsContext *c) · 589 unmodified lines | ||
| 590 | 590 | { |
| 591 | 591 | sws_init_swscale(c); |
| 592 | 592 | |
| 593 | − if (ARCH_PPC) | |
| 594 | − ff_sws_init_swscale_ppc(c); | |
| 595 | − if (ARCH_X86) | |
| 596 | − ff_sws_init_swscale_x86(c); | |
| 597 | − if (ARCH_AARCH64) | |
| 598 | − ff_sws_init_swscale_aarch64(c); | |
| 599 | − if (ARCH_ARM) | |
| 600 | − ff_sws_init_swscale_arm(c); | |
| 593 | +#if ARCH_PPC | |
| 594 | + ff_sws_init_swscale_ppc(c); | |
| 595 | +#elif ARCH_X86 | |
| 596 | + ff_sws_init_swscale_x86(c); | |
| 597 | +#elif ARCH_AARCH64 | |
| 598 | + ff_sws_init_swscale_aarch64(c); | |
| 599 | +#elif ARCH_ARM | |
| 600 | + ff_sws_init_swscale_arm(c); | |
| 601 | +#endif | |
| 601 | 602 | } |
| 602 | 603 | |
| 603 | 604 | static void reset_ptr(const uint8_t *src[], enum AVPixelFormat format) |
| @@ -2222,12 +2222,13 @@ void ff_get_unscaled_swscale(SwsContext *c) · 2221 unmodified lines | ||
| 2222 | 2222 | c->convert_unscaled = planarCopyWrapper; |
| 2223 | 2223 | } |
| 2224 | 2224 | |
| 2225 | − if (ARCH_PPC) | |
| 2226 | − ff_get_unscaled_swscale_ppc(c); | |
| 2227 | − if (ARCH_ARM) | |
| 2228 | − ff_get_unscaled_swscale_arm(c); | |
| 2229 | − if (ARCH_AARCH64) | |
| 2230 | − ff_get_unscaled_swscale_aarch64(c); | |
| 2225 | +#if ARCH_PPC | |
| 2226 | + ff_get_unscaled_swscale_ppc(c); | |
| 2227 | +#elif ARCH_ARM | |
| 2228 | + ff_get_unscaled_swscale_arm(c); | |
| 2229 | +#elif ARCH_AARCH64 | |
| 2230 | + ff_get_unscaled_swscale_aarch64(c); | |
| 2231 | +#endif | |
| 2231 | 2232 | } |
| 2232 | 2233 | |
| 2233 | 2234 | /* Convert the palette to the same packed 32-bit format as the palette */ |
| @@ -1044,9 +1044,10 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], · 1043 unmodified lines | ||
| 1044 | 1044 | contrast, saturation); |
| 1045 | 1045 | // FIXME factorize |
| 1046 | 1046 | |
| 1047 | − if (ARCH_PPC) | |
| 1048 | − ff_yuv2rgb_init_tables_ppc(c, inv_table, brightness, | |
| 1049 | − contrast, saturation); | |
| 1047 | +#if ARCH_PPC | |
| 1048 | + ff_yuv2rgb_init_tables_ppc(c, inv_table, brightness, | |
| 1049 | + contrast, saturation); | |
| 1050 | +#endif | |
| 1050 | 1051 | } |
| 1051 | 1052 | |
| 1052 | 1053 | fill_rgb2yuv_table(c, table, dstRange); |
| @@ -679,10 +679,11 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c) · 678 unmodified lines | ||
| 679 | 679 | { |
| 680 | 680 | SwsFunc t = NULL; |
| 681 | 681 | |
| 682 | − if (ARCH_PPC) | |
| 683 | − t = ff_yuv2rgb_init_ppc(c); | |
| 684 | − if (ARCH_X86) | |
| 685 | − t = ff_yuv2rgb_init_x86(c); | |
| 682 | +#if ARCH_PPC | |
| 683 | + t = ff_yuv2rgb_init_ppc(c); | |
| 684 | +#elif ARCH_X86 | |
| 685 | + t = ff_yuv2rgb_init_x86(c); | |
| 686 | +#endif | |
| 686 | 687 | |
| 687 | 688 | if (t) |
| 688 | 689 | return t; |