Unified · Split
| @@ -449,9 +449,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi · 448 unmodified lines | |||
| 449 | av_cold void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags) | 449 | av_cold void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags) |
| 450 | { | 450 | { |
| 451 | #if HAVE_ALTIVEC | 451 | #if HAVE_ALTIVEC |
| 452 | int mm_flags = av_get_cpu_flags(); | 452 | if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { |
| 453 | |||
| 454 | if (mm_flags & AV_CPU_FLAG_ALTIVEC) { | ||
| 455 | c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec; | 453 | c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec; |
| 456 | c->avg_pixels_tab[1][0] = avg_pixels8_altivec; | 454 | c->avg_pixels_tab[1][0] = avg_pixels8_altivec; |
| 457 | c->avg_pixels_tab[1][3] = avg_pixels8_xy2_altivec; | 455 | c->avg_pixels_tab[1][3] = avg_pixels8_xy2_altivec; |
| @@ -180,46 +180,46 @@ static void ac3_downmix_sse(float **samples, float (*matrix)[2], · 179 unmodified lines | |||
| 180 | 180 | ||
| 181 | av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact) | 181 | av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact) |
| 182 | { | 182 | { |
| 183 | int mm_flags = av_get_cpu_flags(); | 183 | int cpu_flags = av_get_cpu_flags(); |
| 184 | 184 | ||
| 185 | if (EXTERNAL_MMX(mm_flags)) { | 185 | if (EXTERNAL_MMX(cpu_flags)) { |
| 186 | c->ac3_exponent_min = ff_ac3_exponent_min_mmx; | 186 | c->ac3_exponent_min = ff_ac3_exponent_min_mmx; |
| 187 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx; | 187 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx; |
| 188 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx; | 188 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx; |
| 189 | c->ac3_rshift_int32 = ff_ac3_rshift_int32_mmx; | 189 | c->ac3_rshift_int32 = ff_ac3_rshift_int32_mmx; |
| 190 | } | 190 | } |
| 191 | if (EXTERNAL_AMD3DNOW(mm_flags)) { | 191 | if (EXTERNAL_AMD3DNOW(cpu_flags)) { |
| 192 | if (!bit_exact) { | 192 | if (!bit_exact) { |
| 193 | c->float_to_fixed24 = ff_float_to_fixed24_3dnow; | 193 | c->float_to_fixed24 = ff_float_to_fixed24_3dnow; |
| 194 | } | 194 | } |
| 195 | } | 195 | } |
| 196 | if (EXTERNAL_MMXEXT(mm_flags)) { | 196 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 197 | c->ac3_exponent_min = ff_ac3_exponent_min_mmxext; | 197 | c->ac3_exponent_min = ff_ac3_exponent_min_mmxext; |
| 198 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmxext; | 198 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmxext; |
| 199 | } | 199 | } |
| 200 | if (EXTERNAL_SSE(mm_flags)) { | 200 | if (EXTERNAL_SSE(cpu_flags)) { |
| 201 | c->float_to_fixed24 = ff_float_to_fixed24_sse; | 201 | c->float_to_fixed24 = ff_float_to_fixed24_sse; |
| 202 | } | 202 | } |
| 203 | if (EXTERNAL_SSE2(mm_flags)) { | 203 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 204 | c->ac3_exponent_min = ff_ac3_exponent_min_sse2; | 204 | c->ac3_exponent_min = ff_ac3_exponent_min_sse2; |
| 205 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2; | 205 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2; |
| 206 | c->float_to_fixed24 = ff_float_to_fixed24_sse2; | 206 | c->float_to_fixed24 = ff_float_to_fixed24_sse2; |
| 207 | c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2; | 207 | c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2; |
| 208 | c->extract_exponents = ff_ac3_extract_exponents_sse2; | 208 | c->extract_exponents = ff_ac3_extract_exponents_sse2; |
| 209 | if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | 209 | if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { |
| 210 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2; | 210 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2; |
| 211 | c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2; | 211 | c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2; |
| 212 | } | 212 | } |
| 213 | } | 213 | } |
| 214 | if (EXTERNAL_SSSE3(mm_flags)) { | 214 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 215 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3; | 215 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3; |
| 216 | if (!(mm_flags & AV_CPU_FLAG_ATOM)) { | 216 | if (!(cpu_flags & AV_CPU_FLAG_ATOM)) { |
| 217 | c->extract_exponents = ff_ac3_extract_exponents_ssse3; | 217 | c->extract_exponents = ff_ac3_extract_exponents_ssse3; |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | #if HAVE_SSE_INLINE && HAVE_7REGS | 221 | #if HAVE_SSE_INLINE && HAVE_7REGS |
| 222 | if (INLINE_SSE(mm_flags)) { | 222 | if (INLINE_SSE(cpu_flags)) { |
| 223 | c->downmix = ac3_downmix_sse; | 223 | c->downmix = ac3_downmix_sse; |
| 224 | } | 224 | } |
| 225 | #endif | 225 | #endif |
| @@ -542,17 +542,17 @@ static av_cold void cavsdsp_init_3dnow(CAVSDSPContext *c, · 541 unmodified lines | |||
| 542 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx) | 542 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx) |
| 543 | { | 543 | { |
| 544 | #if HAVE_MMX_INLINE | 544 | #if HAVE_MMX_INLINE |
| 545 | int mm_flags = av_get_cpu_flags(); | 545 | int cpu_flags = av_get_cpu_flags(); |
| 546 | 546 | ||
| 547 | if (mm_flags & AV_CPU_FLAG_MMX) | 547 | if (cpu_flags & AV_CPU_FLAG_MMX) |
| 548 | cavsdsp_init_mmx(c, avctx); | 548 | cavsdsp_init_mmx(c, avctx); |
| 549 | #endif /* HAVE_MMX_INLINE */ | 549 | #endif /* HAVE_MMX_INLINE */ |
| 550 | #if HAVE_MMXEXT_INLINE | 550 | #if HAVE_MMXEXT_INLINE |
| 551 | if (mm_flags & AV_CPU_FLAG_MMXEXT) | 551 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) |
| 552 | cavsdsp_init_mmxext(c, avctx); | 552 | cavsdsp_init_mmxext(c, avctx); |
| 553 | #endif /* HAVE_MMXEXT_INLINE */ | 553 | #endif /* HAVE_MMXEXT_INLINE */ |
| 554 | #if HAVE_AMD3DNOW_INLINE | 554 | #if HAVE_AMD3DNOW_INLINE |
| 555 | if (mm_flags & AV_CPU_FLAG_3DNOW) | 555 | if (cpu_flags & AV_CPU_FLAG_3DNOW) |
| 556 | cavsdsp_init_3dnow(c, avctx); | 556 | cavsdsp_init_3dnow(c, avctx); |
| 557 | #endif /* HAVE_AMD3DNOW_INLINE */ | 557 | #endif /* HAVE_AMD3DNOW_INLINE */ |
| 558 | } | 558 | } |
| @@ -529,7 +529,7 @@ QPEL_OP(put_no_rnd_, _no_rnd_, mmxext) · 528 unmodified lines | |||
| 529 | } while (0) | 529 | } while (0) |
| 530 | 530 | ||
| 531 | static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, | 531 | static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, |
| 532 | int mm_flags) | 532 | int cpu_flags) |
| 533 | { | 533 | { |
| 534 | #if HAVE_MMX_INLINE | 534 | #if HAVE_MMX_INLINE |
| 535 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 535 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| @@ -575,7 +575,7 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, · 39 unmodified lines | |||
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, | 577 | static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, |
| 578 | int mm_flags) | 578 | int cpu_flags) |
| 579 | { | 579 | { |
| 580 | #if HAVE_MMXEXT_INLINE | 580 | #if HAVE_MMXEXT_INLINE |
| 581 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 581 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| @@ -597,7 +597,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, · 15 unmodified lines | |||
| 597 | SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); | 597 | SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); |
| 598 | 598 | ||
| 599 | /* slower than cmov version on AMD */ | 599 | /* slower than cmov version on AMD */ |
| 600 | if (!(mm_flags & AV_CPU_FLAG_3DNOW)) | 600 | if (!(cpu_flags & AV_CPU_FLAG_3DNOW)) |
| 601 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmxext; | 601 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmxext; |
| 602 | 602 | ||
| 603 | c->scalarproduct_int16 = ff_scalarproduct_int16_mmxext; | 603 | c->scalarproduct_int16 = ff_scalarproduct_int16_mmxext; |
| @@ -612,7 +612,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, · 8 unmodified lines | |||
| 612 | } | 612 | } |
| 613 | 613 | ||
| 614 | static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, | 614 | static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, |
| 615 | int mm_flags) | 615 | int cpu_flags) |
| 616 | { | 616 | { |
| 617 | #if HAVE_SSE_INLINE | 617 | #if HAVE_SSE_INLINE |
| 618 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 618 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| @@ -630,7 +630,7 @@ static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, · 11 unmodified lines | |||
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, | 632 | static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, |
| 633 | int mm_flags) | 633 | int cpu_flags) |
| 634 | { | 634 | { |
| 635 | #if HAVE_SSE2_INLINE | 635 | #if HAVE_SSE2_INLINE |
| 636 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 636 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| @@ -646,14 +646,14 @@ static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, · 9 unmodified lines | |||
| 646 | #if HAVE_SSE2_EXTERNAL | 646 | #if HAVE_SSE2_EXTERNAL |
| 647 | c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; | 647 | c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; |
| 648 | c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; | 648 | c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; |
| 649 | if (mm_flags & AV_CPU_FLAG_ATOM) { | 649 | if (cpu_flags & AV_CPU_FLAG_ATOM) { |
| 650 | c->vector_clip_int32 = ff_vector_clip_int32_int_sse2; | 650 | c->vector_clip_int32 = ff_vector_clip_int32_int_sse2; |
| 651 | } else { | 651 | } else { |
| 652 | c->vector_clip_int32 = ff_vector_clip_int32_sse2; | 652 | c->vector_clip_int32 = ff_vector_clip_int32_sse2; |
| 653 | } | 653 | } |
| 654 | if (avctx->flags & CODEC_FLAG_BITEXACT) { | 654 | if (avctx->flags & CODEC_FLAG_BITEXACT) { |
| 655 | c->apply_window_int16 = ff_apply_window_int16_sse2; | 655 | c->apply_window_int16 = ff_apply_window_int16_sse2; |
| 656 | } else if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | 656 | } else if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { |
| 657 | c->apply_window_int16 = ff_apply_window_int16_round_sse2; | 657 | c->apply_window_int16 = ff_apply_window_int16_round_sse2; |
| 658 | } | 658 | } |
| 659 | c->bswap_buf = ff_bswap32_buf_sse2; | 659 | c->bswap_buf = ff_bswap32_buf_sse2; |
| @@ -661,25 +661,25 @@ static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, · 1 unmodified line | |||
| 661 | } | 661 | } |
| 662 | 662 | ||
| 663 | static av_cold void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx, | 663 | static av_cold void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx, |
| 664 | int mm_flags) | 664 | int cpu_flags) |
| 665 | { | 665 | { |
| 666 | #if HAVE_SSSE3_EXTERNAL | 666 | #if HAVE_SSSE3_EXTERNAL |
| 667 | c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_ssse3; | 667 | c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_ssse3; |
| 668 | if (mm_flags & AV_CPU_FLAG_SSE4) // not really sse4, just slow on Conroe | 668 | if (cpu_flags & AV_CPU_FLAG_SSE4) // not really SSE4, just slow on Conroe |
| 669 | c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; | 669 | c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; |
| 670 | 670 | ||
| 671 | if (mm_flags & AV_CPU_FLAG_ATOM) | 671 | if (cpu_flags & AV_CPU_FLAG_ATOM) |
| 672 | c->apply_window_int16 = ff_apply_window_int16_ssse3_atom; | 672 | c->apply_window_int16 = ff_apply_window_int16_ssse3_atom; |
| 673 | else | 673 | else |
| 674 | c->apply_window_int16 = ff_apply_window_int16_ssse3; | 674 | c->apply_window_int16 = ff_apply_window_int16_ssse3; |
| 675 | if (!(mm_flags & (AV_CPU_FLAG_SSE42|AV_CPU_FLAG_3DNOW))) // cachesplit | 675 | if (!(cpu_flags & (AV_CPU_FLAG_SSE42 | AV_CPU_FLAG_3DNOW))) // cachesplit |
| 676 | c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; | 676 | c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; |
| 677 | c->bswap_buf = ff_bswap32_buf_ssse3; | 677 | c->bswap_buf = ff_bswap32_buf_ssse3; |
| 678 | #endif /* HAVE_SSSE3_EXTERNAL */ | 678 | #endif /* HAVE_SSSE3_EXTERNAL */ |
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | static av_cold void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx, | 681 | static av_cold void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx, |
| 682 | int mm_flags) | 682 | int cpu_flags) |
| 683 | { | 683 | { |
| 684 | #if HAVE_SSE4_EXTERNAL | 684 | #if HAVE_SSE4_EXTERNAL |
| 685 | c->vector_clip_int32 = ff_vector_clip_int32_sse4; | 685 | c->vector_clip_int32 = ff_vector_clip_int32_sse4; |
| @@ -688,30 +688,30 @@ static av_cold void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx, · 2 unmodified lines | |||
| 688 | 688 | ||
| 689 | av_cold void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) | 689 | av_cold void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) |
| 690 | { | 690 | { |
| 691 | int mm_flags = av_get_cpu_flags(); | 691 | int cpu_flags = av_get_cpu_flags(); |
| 692 | 692 | ||
| 693 | #if HAVE_7REGS && HAVE_INLINE_ASM | 693 | #if HAVE_7REGS && HAVE_INLINE_ASM |
| 694 | if (mm_flags & AV_CPU_FLAG_CMOV) | 694 | if (cpu_flags & AV_CPU_FLAG_CMOV) |
| 695 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_cmov; | 695 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_cmov; |
| 696 | #endif | 696 | #endif |
| 697 | 697 | ||
| 698 | if (mm_flags & AV_CPU_FLAG_MMX) | 698 | if (cpu_flags & AV_CPU_FLAG_MMX) |
| 699 | dsputil_init_mmx(c, avctx, mm_flags); | 699 | dsputil_init_mmx(c, avctx, cpu_flags); |
| 700 | 700 | ||
| 701 | if (mm_flags & AV_CPU_FLAG_MMXEXT) | 701 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) |
| 702 | dsputil_init_mmxext(c, avctx, mm_flags); | 702 | dsputil_init_mmxext(c, avctx, cpu_flags); |
| 703 | 703 | ||
| 704 | if (mm_flags & AV_CPU_FLAG_SSE) | 704 | if (cpu_flags & AV_CPU_FLAG_SSE) |
| 705 | dsputil_init_sse(c, avctx, mm_flags); | 705 | dsputil_init_sse(c, avctx, cpu_flags); |
| 706 | 706 | ||
| 707 | if (mm_flags & AV_CPU_FLAG_SSE2) | 707 | if (cpu_flags & AV_CPU_FLAG_SSE2) |
| 708 | dsputil_init_sse2(c, avctx, mm_flags); | 708 | dsputil_init_sse2(c, avctx, cpu_flags); |
| 709 | 709 | ||
| 710 | if (mm_flags & AV_CPU_FLAG_SSSE3) | 710 | if (cpu_flags & AV_CPU_FLAG_SSSE3) |
| 711 | dsputil_init_ssse3(c, avctx, mm_flags); | 711 | dsputil_init_ssse3(c, avctx, cpu_flags); |
| 712 | 712 | ||
| 713 | if (mm_flags & AV_CPU_FLAG_SSE4) | 713 | if (cpu_flags & AV_CPU_FLAG_SSE4) |
| 714 | dsputil_init_sse4(c, avctx, mm_flags); | 714 | dsputil_init_sse4(c, avctx, cpu_flags); |
| 715 | 715 | ||
| 716 | if (CONFIG_ENCODERS) | 716 | if (CONFIG_ENCODERS) |
| 717 | ff_dsputilenc_init_mmx(c, avctx); | 717 | ff_dsputilenc_init_mmx(c, avctx); |
| @@ -945,12 +945,12 @@ hadamard_func(ssse3) · 944 unmodified lines | |||
| 945 | 945 | ||
| 946 | av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) | 946 | av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) |
| 947 | { | 947 | { |
| 948 | int mm_flags = av_get_cpu_flags(); | 948 | int cpu_flags = av_get_cpu_flags(); |
| 949 | 949 | ||
| 950 | #if HAVE_YASM | 950 | #if HAVE_YASM |
| 951 | int bit_depth = avctx->bits_per_raw_sample; | 951 | int bit_depth = avctx->bits_per_raw_sample; |
| 952 | 952 | ||
| 953 | if (EXTERNAL_MMX(mm_flags)) { | 953 | if (EXTERNAL_MMX(cpu_flags)) { |
| 954 | if (bit_depth <= 8) | 954 | if (bit_depth <= 8) |
| 955 | c->get_pixels = ff_get_pixels_mmx; | 955 | c->get_pixels = ff_get_pixels_mmx; |
| 956 | c->diff_pixels = ff_diff_pixels_mmx; | 956 | c->diff_pixels = ff_diff_pixels_mmx; |
| @@ -958,19 +958,19 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 1 unmodified line | |||
| 958 | 958 | ||
| 959 | c->pix_norm1 = ff_pix_norm1_mmx; | 959 | c->pix_norm1 = ff_pix_norm1_mmx; |
| 960 | } | 960 | } |
| 961 | if (EXTERNAL_SSE2(mm_flags)) | 961 | if (EXTERNAL_SSE2(cpu_flags)) |
| 962 | if (bit_depth <= 8) | 962 | if (bit_depth <= 8) |
| 963 | c->get_pixels = ff_get_pixels_sse2; | 963 | c->get_pixels = ff_get_pixels_sse2; |
| 964 | #endif /* HAVE_YASM */ | 964 | #endif /* HAVE_YASM */ |
| 965 | 965 | ||
| 966 | #if HAVE_INLINE_ASM | 966 | #if HAVE_INLINE_ASM |
| 967 | if (mm_flags & AV_CPU_FLAG_MMX) { | 967 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 968 | const int dct_algo = avctx->dct_algo; | 968 | const int dct_algo = avctx->dct_algo; |
| 969 | if (avctx->bits_per_raw_sample <= 8 && | 969 | if (avctx->bits_per_raw_sample <= 8 && |
| 970 | (dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX)) { | 970 | (dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX)) { |
| 971 | if(mm_flags & AV_CPU_FLAG_SSE2){ | 971 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 972 | c->fdct = ff_fdct_sse2; | 972 | c->fdct = ff_fdct_sse2; |
| 973 | } else if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 973 | } else if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 974 | c->fdct = ff_fdct_mmxext; | 974 | c->fdct = ff_fdct_mmxext; |
| 975 | }else{ | 975 | }else{ |
| 976 | c->fdct = ff_fdct_mmx; | 976 | c->fdct = ff_fdct_mmx; |
| @@ -998,7 +998,7 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 21 unmodified lines | |||
| 998 | 998 | ||
| 999 | c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx; | 999 | c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx; |
| 1000 | 1000 | ||
| 1001 | if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 1001 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 1002 | c->sum_abs_dctelem = sum_abs_dctelem_mmxext; | 1002 | c->sum_abs_dctelem = sum_abs_dctelem_mmxext; |
| 1003 | c->vsad[4] = vsad_intra16_mmxext; | 1003 | c->vsad[4] = vsad_intra16_mmxext; |
| 1004 | 1004 | ||
| @@ -1009,12 +1009,12 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 4 unmodified lines | |||
| 1009 | c->sub_hfyu_median_prediction = sub_hfyu_median_prediction_mmxext; | 1009 | c->sub_hfyu_median_prediction = sub_hfyu_median_prediction_mmxext; |
| 1010 | } | 1010 | } |
| 1011 | 1011 | ||
| 1012 | if(mm_flags & AV_CPU_FLAG_SSE2){ | 1012 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 1013 | c->sum_abs_dctelem= sum_abs_dctelem_sse2; | 1013 | c->sum_abs_dctelem= sum_abs_dctelem_sse2; |
| 1014 | } | 1014 | } |
| 1015 | 1015 | ||
| 1016 | #if HAVE_SSSE3_INLINE | 1016 | #if HAVE_SSSE3_INLINE |
| 1017 | if(mm_flags & AV_CPU_FLAG_SSSE3){ | 1017 | if (cpu_flags & AV_CPU_FLAG_SSSE3) { |
| 1018 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 1018 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 1019 | c->try_8x8basis= try_8x8basis_ssse3; | 1019 | c->try_8x8basis= try_8x8basis_ssse3; |
| 1020 | } | 1020 | } |
| @@ -1023,7 +1023,7 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 2 unmodified lines | |||
| 1023 | } | 1023 | } |
| 1024 | #endif | 1024 | #endif |
| 1025 | 1025 | ||
| 1026 | if(mm_flags & AV_CPU_FLAG_3DNOW){ | 1026 | if (cpu_flags & AV_CPU_FLAG_3DNOW) { |
| 1027 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 1027 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 1028 | c->try_8x8basis= try_8x8basis_3dnow; | 1028 | c->try_8x8basis= try_8x8basis_3dnow; |
| 1029 | } | 1029 | } |
| @@ -1032,16 +1032,16 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 2 unmodified lines | |||
| 1032 | } | 1032 | } |
| 1033 | #endif /* HAVE_INLINE_ASM */ | 1033 | #endif /* HAVE_INLINE_ASM */ |
| 1034 | 1034 | ||
| 1035 | if (EXTERNAL_MMX(mm_flags)) { | 1035 | if (EXTERNAL_MMX(cpu_flags)) { |
| 1036 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmx; | 1036 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmx; |
| 1037 | c->hadamard8_diff[1] = ff_hadamard8_diff_mmx; | 1037 | c->hadamard8_diff[1] = ff_hadamard8_diff_mmx; |
| 1038 | 1038 | ||
| 1039 | if (EXTERNAL_MMXEXT(mm_flags)) { | 1039 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 1040 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmxext; | 1040 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmxext; |
| 1041 | c->hadamard8_diff[1] = ff_hadamard8_diff_mmxext; | 1041 | c->hadamard8_diff[1] = ff_hadamard8_diff_mmxext; |
| 1042 | } | 1042 | } |
| 1043 | 1043 | ||
| 1044 | if (EXTERNAL_SSE2(mm_flags)) { | 1044 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 1045 | c->sse[0] = ff_sse16_sse2; | 1045 | c->sse[0] = ff_sse16_sse2; |
| 1046 | 1046 | ||
| 1047 | #if HAVE_ALIGNED_STACK | 1047 | #if HAVE_ALIGNED_STACK |
| @@ -1050,7 +1050,7 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 2 unmodified lines | |||
| 1050 | #endif | 1050 | #endif |
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | if (EXTERNAL_SSSE3(mm_flags) && HAVE_ALIGNED_STACK) { | 1053 | if (EXTERNAL_SSSE3(cpu_flags) && HAVE_ALIGNED_STACK) { |
| 1054 | c->hadamard8_diff[0] = ff_hadamard8_diff16_ssse3; | 1054 | c->hadamard8_diff[0] = ff_hadamard8_diff16_ssse3; |
| 1055 | c->hadamard8_diff[1] = ff_hadamard8_diff_ssse3; | 1055 | c->hadamard8_diff[1] = ff_hadamard8_diff_ssse3; |
| 1056 | } | 1056 | } |
| @@ -23,22 +23,23 @@ · 22 unmodified lines | |||
| 23 | 23 | ||
| 24 | av_cold void ff_fft_init_x86(FFTContext *s) | 24 | av_cold void ff_fft_init_x86(FFTContext *s) |
| 25 | { | 25 | { |
| 26 | int has_vectors = av_get_cpu_flags(); | 26 | int cpu_flags = av_get_cpu_flags(); |
| 27 | |||
| 27 | #if ARCH_X86_32 | 28 | #if ARCH_X86_32 |
| 28 | if (EXTERNAL_AMD3DNOW(has_vectors)) { | 29 | if (EXTERNAL_AMD3DNOW(cpu_flags)) { |
| 29 | /* 3DNow! for K6-2/3 */ | 30 | /* 3DNow! for K6-2/3 */ |
| 30 | s->imdct_calc = ff_imdct_calc_3dnow; | 31 | s->imdct_calc = ff_imdct_calc_3dnow; |
| 31 | s->imdct_half = ff_imdct_half_3dnow; | 32 | s->imdct_half = ff_imdct_half_3dnow; |
| 32 | s->fft_calc = ff_fft_calc_3dnow; | 33 | s->fft_calc = ff_fft_calc_3dnow; |
| 33 | } | 34 | } |
| 34 | if (EXTERNAL_AMD3DNOWEXT(has_vectors)) { | 35 | if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { |
| 35 | /* 3DNowEx for K7 */ | 36 | /* 3DNowEx for K7 */ |
| 36 | s->imdct_calc = ff_imdct_calc_3dnowext; | 37 | s->imdct_calc = ff_imdct_calc_3dnowext; |
| 37 | s->imdct_half = ff_imdct_half_3dnowext; | 38 | s->imdct_half = ff_imdct_half_3dnowext; |
| 38 | s->fft_calc = ff_fft_calc_3dnowext; | 39 | s->fft_calc = ff_fft_calc_3dnowext; |
| 39 | } | 40 | } |
| 40 | #endif | 41 | #endif |
| 41 | if (EXTERNAL_SSE(has_vectors)) { | 42 | if (EXTERNAL_SSE(cpu_flags)) { |
| 42 | /* SSE for P3/P4/K8 */ | 43 | /* SSE for P3/P4/K8 */ |
| 43 | s->imdct_calc = ff_imdct_calc_sse; | 44 | s->imdct_calc = ff_imdct_calc_sse; |
| 44 | s->imdct_half = ff_imdct_half_sse; | 45 | s->imdct_half = ff_imdct_half_sse; |
| @@ -46,7 +47,7 @@ av_cold void ff_fft_init_x86(FFTContext *s) · 1 unmodified line | |||
| 46 | s->fft_calc = ff_fft_calc_sse; | 47 | s->fft_calc = ff_fft_calc_sse; |
| 47 | s->fft_permutation = FF_FFT_PERM_SWAP_LSBS; | 48 | s->fft_permutation = FF_FFT_PERM_SWAP_LSBS; |
| 48 | } | 49 | } |
| 49 | if (EXTERNAL_AVX(has_vectors) && s->nbits >= 5) { | 50 | if (EXTERNAL_AVX(cpu_flags) && s->nbits >= 5) { |
| 50 | /* AVX for SB */ | 51 | /* AVX for SB */ |
| 51 | s->imdct_half = ff_imdct_half_avx; | 52 | s->imdct_half = ff_imdct_half_avx; |
| 52 | s->fft_calc = ff_fft_calc_avx; | 53 | s->fft_calc = ff_fft_calc_avx; |
| @@ -57,12 +58,13 @@ av_cold void ff_fft_init_x86(FFTContext *s) · 4 unmodified lines | |||
| 57 | #if CONFIG_DCT | 58 | #if CONFIG_DCT |
| 58 | av_cold void ff_dct_init_x86(DCTContext *s) | 59 | av_cold void ff_dct_init_x86(DCTContext *s) |
| 59 | { | 60 | { |
| 60 | int has_vectors = av_get_cpu_flags(); | 61 | int cpu_flags = av_get_cpu_flags(); |
| 61 | if (EXTERNAL_SSE(has_vectors)) | 62 | |
| 63 | if (EXTERNAL_SSE(cpu_flags)) | ||
| 62 | s->dct32 = ff_dct32_float_sse; | 64 | s->dct32 = ff_dct32_float_sse; |
| 63 | if (EXTERNAL_SSE2(has_vectors)) | 65 | if (EXTERNAL_SSE2(cpu_flags)) |
| 64 | s->dct32 = ff_dct32_float_sse2; | 66 | s->dct32 = ff_dct32_float_sse2; |
| 65 | if (EXTERNAL_AVX(has_vectors)) | 67 | if (EXTERNAL_AVX(cpu_flags)) |
| 66 | s->dct32 = ff_dct32_float_avx; | 68 | s->dct32 = ff_dct32_float_avx; |
| 67 | } | 69 | } |
| 68 | #endif | 70 | #endif |
| @@ -116,29 +116,29 @@ static void float_interleave_sse(float *dst, const float **src, · 115 unmodified lines | |||
| 116 | av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) | 116 | av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) |
| 117 | { | 117 | { |
| 118 | #if HAVE_YASM | 118 | #if HAVE_YASM |
| 119 | int mm_flags = av_get_cpu_flags(); | 119 | int cpu_flags = av_get_cpu_flags(); |
| 120 | 120 | ||
| 121 | if (EXTERNAL_MMX(mm_flags)) { | 121 | if (EXTERNAL_MMX(cpu_flags)) { |
| 122 | c->float_interleave = float_interleave_mmx; | 122 | c->float_interleave = float_interleave_mmx; |
| 123 | 123 | ||
| 124 | if (EXTERNAL_AMD3DNOW(mm_flags)) { | 124 | if (EXTERNAL_AMD3DNOW(cpu_flags)) { |
| 125 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 125 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 126 | c->float_to_int16 = ff_float_to_int16_3dnow; | 126 | c->float_to_int16 = ff_float_to_int16_3dnow; |
| 127 | c->float_to_int16_interleave = float_to_int16_interleave_3dnow; | 127 | c->float_to_int16_interleave = float_to_int16_interleave_3dnow; |
| 128 | } | 128 | } |
| 129 | } | 129 | } |
| 130 | if (EXTERNAL_AMD3DNOWEXT(mm_flags)) { | 130 | if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { |
| 131 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 131 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 132 | c->float_to_int16_interleave = float_to_int16_interleave_3dnowext; | 132 | c->float_to_int16_interleave = float_to_int16_interleave_3dnowext; |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | if (EXTERNAL_SSE(mm_flags)) { | 135 | if (EXTERNAL_SSE(cpu_flags)) { |
| 136 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; | 136 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; |
| 137 | c->float_to_int16 = ff_float_to_int16_sse; | 137 | c->float_to_int16 = ff_float_to_int16_sse; |
| 138 | c->float_to_int16_interleave = float_to_int16_interleave_sse; | 138 | c->float_to_int16_interleave = float_to_int16_interleave_sse; |
| 139 | c->float_interleave = float_interleave_sse; | 139 | c->float_interleave = float_interleave_sse; |
| 140 | } | 140 | } |
| 141 | if (EXTERNAL_SSE2(mm_flags)) { | 141 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 142 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; | 142 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; |
| 143 | c->float_to_int16 = ff_float_to_int16_sse2; | 143 | c->float_to_int16 = ff_float_to_int16_sse2; |
| 144 | c->float_to_int16_interleave = float_to_int16_interleave_sse2; | 144 | c->float_to_int16_interleave = float_to_int16_interleave_sse2; |
| @@ -185,10 +185,10 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 184 unmodified lines | |||
| 185 | const int bit_depth, | 185 | const int bit_depth, |
| 186 | const int chroma_format_idc) | 186 | const int chroma_format_idc) |
| 187 | { | 187 | { |
| 188 | int mm_flags = av_get_cpu_flags(); | 188 | int cpu_flags = av_get_cpu_flags(); |
| 189 | 189 | ||
| 190 | if (bit_depth == 8) { | 190 | if (bit_depth == 8) { |
| 191 | if (EXTERNAL_MMX(mm_flags)) { | 191 | if (EXTERNAL_MMX(cpu_flags)) { |
| 192 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx; | 192 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx; |
| 193 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx; | 193 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx; |
| 194 | if (chroma_format_idc == 1) { | 194 | if (chroma_format_idc == 1) { |
| @@ -203,7 +203,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 8 unmodified lines | |||
| 203 | if (chroma_format_idc == 1) | 203 | if (chroma_format_idc == 1) |
| 204 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx; | 204 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx; |
| 205 | if (codec_id == AV_CODEC_ID_SVQ3) { | 205 | if (codec_id == AV_CODEC_ID_SVQ3) { |
| 206 | if (mm_flags & AV_CPU_FLAG_CMOV) | 206 | if (cpu_flags & AV_CPU_FLAG_CMOV) |
| 207 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx; | 207 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx; |
| 208 | } else if (codec_id == AV_CODEC_ID_RV40) { | 208 | } else if (codec_id == AV_CODEC_ID_RV40) { |
| 209 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_mmx; | 209 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_mmx; |
| @@ -213,7 +213,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 3 unmodified lines | |||
| 213 | } | 213 | } |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | if (EXTERNAL_MMXEXT(mm_flags)) { | 216 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 217 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext; | 217 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext; |
| 218 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext; | 218 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext; |
| 219 | if (chroma_format_idc == 1) | 219 | if (chroma_format_idc == 1) |
| @@ -265,11 +265,11 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 45 unmodified lines | |||
| 265 | } | 265 | } |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | if (EXTERNAL_SSE(mm_flags)) { | 268 | if (EXTERNAL_SSE(cpu_flags)) { |
| 269 | h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_8_sse; | 269 | h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_8_sse; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | if (EXTERNAL_SSE2(mm_flags)) { | 272 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 273 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_sse2; | 273 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_sse2; |
| 274 | h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_sse2; | 274 | h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_sse2; |
| 275 | h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_sse2; | 275 | h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_sse2; |
| @@ -292,7 +292,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 16 unmodified lines | |||
| 292 | } | 292 | } |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | if (EXTERNAL_SSSE3(mm_flags)) { | 295 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 296 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3; | 296 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3; |
| 297 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3; | 297 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3; |
| 298 | if (chroma_format_idc == 1) | 298 | if (chroma_format_idc == 1) |
| @@ -323,7 +323,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 24 unmodified lines | |||
| 323 | } | 323 | } |
| 324 | } | 324 | } |
| 325 | } else if (bit_depth == 10) { | 325 | } else if (bit_depth == 10) { |
| 326 | if (EXTERNAL_MMXEXT(mm_flags)) { | 326 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 327 | h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; | 327 | h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; |
| 328 | h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext; | 328 | h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext; |
| 329 | 329 | ||
| @@ -339,7 +339,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 9 unmodified lines | |||
| 339 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext; | 339 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext; |
| 340 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext; | 340 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext; |
| 341 | } | 341 | } |
| 342 | if (EXTERNAL_SSE2(mm_flags)) { | 342 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 343 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2; | 343 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2; |
| 344 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2; | 344 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2; |
| 345 | h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_sse2; | 345 | h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_sse2; |
| @@ -371,7 +371,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 25 unmodified lines | |||
| 371 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2; | 371 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2; |
| 372 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_sse2; | 372 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_sse2; |
| 373 | } | 373 | } |
| 374 | if (EXTERNAL_SSSE3(mm_flags)) { | 374 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 375 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3; | 375 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3; |
| 376 | h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3; | 376 | h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3; |
| 377 | h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_ssse3; | 377 | h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_ssse3; |
| @@ -382,7 +382,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 4 unmodified lines | |||
| 382 | h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3; | 382 | h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3; |
| 383 | h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_ssse3; | 383 | h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_ssse3; |
| 384 | } | 384 | } |
| 385 | if (EXTERNAL_AVX(mm_flags)) { | 385 | if (EXTERNAL_AVX(cpu_flags)) { |
| 386 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx; | 386 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx; |
| 387 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx; | 387 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx; |
| 388 | h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx; | 388 | h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx; |
| @@ -542,9 +542,9 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) · 541 unmodified lines | |||
| 542 | { | 542 | { |
| 543 | #if HAVE_YASM | 543 | #if HAVE_YASM |
| 544 | int high_bit_depth = bit_depth > 8; | 544 | int high_bit_depth = bit_depth > 8; |
| 545 | int mm_flags = av_get_cpu_flags(); | 545 | int cpu_flags = av_get_cpu_flags(); |
| 546 | 546 | ||
| 547 | if (EXTERNAL_MMXEXT(mm_flags)) { | 547 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 548 | if (!high_bit_depth) { | 548 | if (!high_bit_depth) { |
| 549 | SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); | 549 | SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); |
| 550 | SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); | 550 | SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); |
| @@ -564,8 +564,8 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) · 13 unmodified lines | |||
| 564 | } | 564 | } |
| 565 | } | 565 | } |
| 566 | 566 | ||
| 567 | if (EXTERNAL_SSE2(mm_flags)) { | 567 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 568 | if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW) && !high_bit_depth) { | 568 | if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW) && !high_bit_depth) { |
| 569 | // these functions are slower than mmx on AMD, but faster on Intel | 569 | // these functions are slower than mmx on AMD, but faster on Intel |
| 570 | H264_QPEL_FUNCS(0, 0, sse2); | 570 | H264_QPEL_FUNCS(0, 0, sse2); |
| 571 | } | 571 | } |
| @@ -596,7 +596,7 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) · 24 unmodified lines | |||
| 596 | } | 596 | } |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | if (EXTERNAL_SSSE3(mm_flags)) { | 599 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 600 | if (!high_bit_depth) { | 600 | if (!high_bit_depth) { |
| 601 | H264_QPEL_FUNCS(1, 0, ssse3); | 601 | H264_QPEL_FUNCS(1, 0, ssse3); |
| 602 | H264_QPEL_FUNCS(1, 1, ssse3); | 602 | H264_QPEL_FUNCS(1, 1, ssse3); |
| @@ -619,7 +619,7 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) · 16 unmodified lines | |||
| 619 | } | 619 | } |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | if (EXTERNAL_AVX(mm_flags)) { | 622 | if (EXTERNAL_AVX(cpu_flags)) { |
| 623 | /* AVX implies 64 byte cache lines without the need to avoid unaligned | 623 | /* AVX implies 64 byte cache lines without the need to avoid unaligned |
| 624 | * memory accesses that cross the boundary between two cache lines. | 624 | * memory accesses that cross the boundary between two cache lines. |
| 625 | * TODO: Port X264_CPU_CACHELINE_32/64 detection from x264 to avoid | 625 | * TODO: Port X264_CPU_CACHELINE_32/64 detection from x264 to avoid |
| @@ -71,45 +71,45 @@ av_cold void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth) · 70 unmodified lines | |||
| 71 | { | 71 | { |
| 72 | #if HAVE_YASM | 72 | #if HAVE_YASM |
| 73 | int high_bit_depth = bit_depth > 8; | 73 | int high_bit_depth = bit_depth > 8; |
| 74 | int mm_flags = av_get_cpu_flags(); | 74 | int cpu_flags = av_get_cpu_flags(); |
| 75 | 75 | ||
| 76 | if (EXTERNAL_MMX(mm_flags) && !high_bit_depth) { | 76 | if (EXTERNAL_MMX(cpu_flags) && !high_bit_depth) { |
| 77 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_mmx; | 77 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_mmx; |
| 78 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_mmx; | 78 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_mmx; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | if (EXTERNAL_AMD3DNOW(mm_flags) && !high_bit_depth) { | 81 | if (EXTERNAL_AMD3DNOW(cpu_flags) && !high_bit_depth) { |
| 82 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_3dnow; | 82 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_3dnow; |
| 83 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_3dnow; | 83 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_3dnow; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | if (EXTERNAL_MMXEXT(mm_flags) && !high_bit_depth) { | 86 | if (EXTERNAL_MMXEXT(cpu_flags) && !high_bit_depth) { |
| 87 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmxext; | 87 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmxext; |
| 88 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmxext; | 88 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmxext; |
| 89 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmxext; | 89 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmxext; |
| 90 | c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmxext; | 90 | c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmxext; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | if (EXTERNAL_MMXEXT(mm_flags) && bit_depth > 8 && bit_depth <= 10) { | 93 | if (EXTERNAL_MMXEXT(cpu_flags) && bit_depth > 8 && bit_depth <= 10) { |
| 94 | c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext; | 94 | c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext; |
| 95 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext; | 95 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext; |
| 96 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext; | 96 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext; |
| 97 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmxext; | 97 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmxext; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | if (EXTERNAL_SSE2(mm_flags) && bit_depth > 8 && bit_depth <= 10) { | 100 | if (EXTERNAL_SSE2(cpu_flags) && bit_depth > 8 && bit_depth <= 10) { |
| 101 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2; | 101 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2; |
| 102 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_sse2; | 102 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_sse2; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | if (EXTERNAL_SSSE3(mm_flags) && !high_bit_depth) { | 105 | if (EXTERNAL_SSSE3(cpu_flags) && !high_bit_depth) { |
| 106 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_ssse3; | 106 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_ssse3; |
| 107 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_ssse3; | 107 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_ssse3; |
| 108 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_ssse3; | 108 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_ssse3; |
| 109 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_ssse3; | 109 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_ssse3; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | if (EXTERNAL_AVX(mm_flags) && bit_depth > 8 && bit_depth <= 10) { | 112 | if (EXTERNAL_AVX(cpu_flags) && bit_depth > 8 && bit_depth <= 10) { |
| 113 | // AVX implies !cache64. | 113 | // AVX implies !cache64. |
| 114 | // TODO: Port cache(32|64) detection from x264. | 114 | // TODO: Port cache(32|64) detection from x264. |
| 115 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx; | 115 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx; |
| @@ -211,13 +211,13 @@ H264_BIWEIGHT_10_SSE(4, 10) · 210 unmodified lines | |||
| 211 | av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, | 211 | av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, |
| 212 | const int chroma_format_idc) | 212 | const int chroma_format_idc) |
| 213 | { | 213 | { |
| 214 | int mm_flags = av_get_cpu_flags(); | 214 | int cpu_flags = av_get_cpu_flags(); |
| 215 | 215 | ||
| 216 | if (chroma_format_idc == 1 && EXTERNAL_MMXEXT(mm_flags)) | 216 | if (chroma_format_idc == 1 && EXTERNAL_MMXEXT(cpu_flags)) |
| 217 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; | 217 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; |
| 218 | 218 | ||
| 219 | if (bit_depth == 8) { | 219 | if (bit_depth == 8) { |
| 220 | if (EXTERNAL_MMX(mm_flags)) { | 220 | if (EXTERNAL_MMX(cpu_flags)) { |
| 221 | c->h264_idct_dc_add = | 221 | c->h264_idct_dc_add = |
| 222 | c->h264_idct_add = ff_h264_idct_add_8_mmx; | 222 | c->h264_idct_add = ff_h264_idct_add_8_mmx; |
| 223 | c->h264_idct8_dc_add = | 223 | c->h264_idct8_dc_add = |
| @@ -228,10 +228,10 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 4 unmodified lines | |||
| 228 | if (chroma_format_idc == 1) | 228 | if (chroma_format_idc == 1) |
| 229 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; | 229 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; |
| 230 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx; | 230 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx; |
| 231 | if (mm_flags & AV_CPU_FLAG_CMOV) | 231 | if (cpu_flags & AV_CPU_FLAG_CMOV) |
| 232 | c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_mmx; | 232 | c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_mmx; |
| 233 | 233 | ||
| 234 | if (EXTERNAL_MMXEXT(mm_flags)) { | 234 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 235 | c->h264_idct_dc_add = ff_h264_idct_dc_add_8_mmxext; | 235 | c->h264_idct_dc_add = ff_h264_idct_dc_add_8_mmxext; |
| 236 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; | 236 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; |
| 237 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmxext; | 237 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmxext; |
| @@ -260,7 +260,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 22 unmodified lines | |||
| 260 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_mmxext; | 260 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_mmxext; |
| 261 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmxext; | 261 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmxext; |
| 262 | 262 | ||
| 263 | if (EXTERNAL_SSE2(mm_flags)) { | 263 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 264 | c->h264_idct8_add = ff_h264_idct8_add_8_sse2; | 264 | c->h264_idct8_add = ff_h264_idct8_add_8_sse2; |
| 265 | 265 | ||
| 266 | c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; | 266 | c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; |
| @@ -281,11 +281,11 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 14 unmodified lines | |||
| 281 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2; | 281 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2; |
| 282 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_sse2; | 282 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_sse2; |
| 283 | } | 283 | } |
| 284 | if (EXTERNAL_SSSE3(mm_flags)) { | 284 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 285 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3; | 285 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3; |
| 286 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3; | 286 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3; |
| 287 | } | 287 | } |
| 288 | if (EXTERNAL_AVX(mm_flags)) { | 288 | if (EXTERNAL_AVX(cpu_flags)) { |
| 289 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx; | 289 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx; |
| 290 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx; | 290 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx; |
| 291 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_avx; | 291 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_avx; |
| @@ -294,8 +294,8 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 2 unmodified lines | |||
| 294 | } | 294 | } |
| 295 | } | 295 | } |
| 296 | } else if (bit_depth == 10) { | 296 | } else if (bit_depth == 10) { |
| 297 | if (EXTERNAL_MMX(mm_flags)) { | 297 | if (EXTERNAL_MMX(cpu_flags)) { |
| 298 | if (EXTERNAL_MMXEXT(mm_flags)) { | 298 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 299 | #if ARCH_X86_32 | 299 | #if ARCH_X86_32 |
| 300 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_mmxext; | 300 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_mmxext; |
| 301 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_mmxext; | 301 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_mmxext; |
| @@ -305,7 +305,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 3 unmodified lines | |||
| 305 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_mmxext; | 305 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_mmxext; |
| 306 | #endif /* ARCH_X86_32 */ | 306 | #endif /* ARCH_X86_32 */ |
| 307 | c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmxext; | 307 | c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmxext; |
| 308 | if (EXTERNAL_SSE2(mm_flags)) { | 308 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 309 | c->h264_idct_add = ff_h264_idct_add_10_sse2; | 309 | c->h264_idct_add = ff_h264_idct_add_10_sse2; |
| 310 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; | 310 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; |
| 311 | 311 | ||
| @@ -335,7 +335,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 23 unmodified lines | |||
| 335 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; | 335 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; |
| 336 | #endif /* HAVE_ALIGNED_STACK */ | 336 | #endif /* HAVE_ALIGNED_STACK */ |
| 337 | } | 337 | } |
| 338 | if (EXTERNAL_SSE4(mm_flags)) { | 338 | if (EXTERNAL_SSE4(cpu_flags)) { |
| 339 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4; | 339 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4; |
| 340 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4; | 340 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4; |
| 341 | c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse4; | 341 | c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse4; |
| @@ -344,7 +344,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 2 unmodified lines | |||
| 344 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4; | 344 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4; |
| 345 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4; | 345 | c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4; |
| 346 | } | 346 | } |
| 347 | if (EXTERNAL_AVX(mm_flags)) { | 347 | if (EXTERNAL_AVX(cpu_flags)) { |
| 348 | c->h264_idct_dc_add = | 348 | c->h264_idct_dc_add = |
| 349 | c->h264_idct_add = ff_h264_idct_add_10_avx; | 349 | c->h264_idct_add = ff_h264_idct_add_10_avx; |
| 350 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; | 350 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; |
| @@ -157,7 +157,7 @@ HPELDSP_AVG_PIXELS16(_mmxext) · 156 unmodified lines | |||
| 157 | c->PFX ## _pixels_tab IDX [3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU; \ | 157 | c->PFX ## _pixels_tab IDX [3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU; \ |
| 158 | } while (0) | 158 | } while (0) |
| 159 | 159 | ||
| 160 | static void hpeldsp_init_mmx(HpelDSPContext *c, int flags, int mm_flags) | 160 | static void hpeldsp_init_mmx(HpelDSPContext *c, int flags, int cpu_flags) |
| 161 | { | 161 | { |
| 162 | #if HAVE_MMX_INLINE | 162 | #if HAVE_MMX_INLINE |
| 163 | SET_HPEL_FUNCS(put, [0], 16, mmx); | 163 | SET_HPEL_FUNCS(put, [0], 16, mmx); |
| @@ -170,7 +170,7 @@ static void hpeldsp_init_mmx(HpelDSPContext *c, int flags, int mm_flags) · 6 unmodified lines | |||
| 170 | #endif /* HAVE_MMX_INLINE */ | 170 | #endif /* HAVE_MMX_INLINE */ |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int mm_flags) | 173 | static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int cpu_flags) |
| 174 | { | 174 | { |
| 175 | #if HAVE_MMXEXT_EXTERNAL | 175 | #if HAVE_MMXEXT_EXTERNAL |
| 176 | c->put_pixels_tab[0][1] = ff_put_pixels16_x2_mmxext; | 176 | c->put_pixels_tab[0][1] = ff_put_pixels16_x2_mmxext; |
| @@ -204,7 +204,7 @@ static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int mm_flags) · 27 unmodified lines | |||
| 204 | #endif /* HAVE_MMXEXT_EXTERNAL */ | 204 | #endif /* HAVE_MMXEXT_EXTERNAL */ |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int mm_flags) | 207 | static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int cpu_flags) |
| 208 | { | 208 | { |
| 209 | #if HAVE_AMD3DNOW_EXTERNAL | 209 | #if HAVE_AMD3DNOW_EXTERNAL |
| 210 | c->put_pixels_tab[0][1] = ff_put_pixels16_x2_3dnow; | 210 | c->put_pixels_tab[0][1] = ff_put_pixels16_x2_3dnow; |
| @@ -238,10 +238,10 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int mm_flags) · 27 unmodified lines | |||
| 238 | #endif /* HAVE_AMD3DNOW_EXTERNAL */ | 238 | #endif /* HAVE_AMD3DNOW_EXTERNAL */ |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static void hpeldsp_init_sse2(HpelDSPContext *c, int flags, int mm_flags) | 241 | static void hpeldsp_init_sse2(HpelDSPContext *c, int flags, int cpu_flags) |
| 242 | { | 242 | { |
| 243 | #if HAVE_SSE2_EXTERNAL | 243 | #if HAVE_SSE2_EXTERNAL |
| 244 | if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | 244 | if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { |
| 245 | // these functions are slower than mmx on AMD, but faster on Intel | 245 | // these functions are slower than mmx on AMD, but faster on Intel |
| 246 | c->put_pixels_tab[0][0] = ff_put_pixels16_sse2; | 246 | c->put_pixels_tab[0][0] = ff_put_pixels16_sse2; |
| 247 | c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_sse2; | 247 | c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_sse2; |
| @@ -252,17 +252,17 @@ static void hpeldsp_init_sse2(HpelDSPContext *c, int flags, int mm_flags) · 4 unmodified lines | |||
| 252 | 252 | ||
| 253 | void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) | 253 | void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) |
| 254 | { | 254 | { |
| 255 | int mm_flags = av_get_cpu_flags(); | 255 | int cpu_flags = av_get_cpu_flags(); |
| 256 | 256 | ||
| 257 | if (mm_flags & AV_CPU_FLAG_MMX) | 257 | if (cpu_flags & AV_CPU_FLAG_MMX) |
| 258 | hpeldsp_init_mmx(c, flags, mm_flags); | 258 | hpeldsp_init_mmx(c, flags, cpu_flags); |
| 259 | 259 | ||
| 260 | if (mm_flags & AV_CPU_FLAG_MMXEXT) | 260 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) |
| 261 | hpeldsp_init_mmxext(c, flags, mm_flags); | 261 | hpeldsp_init_mmxext(c, flags, cpu_flags); |
| 262 | 262 | ||
| 263 | if (mm_flags & AV_CPU_FLAG_3DNOW) | 263 | if (cpu_flags & AV_CPU_FLAG_3DNOW) |
| 264 | hpeldsp_init_3dnow(c, flags, mm_flags); | 264 | hpeldsp_init_3dnow(c, flags, cpu_flags); |
| 265 | 265 | ||
| 266 | if (mm_flags & AV_CPU_FLAG_SSE2) | 266 | if (cpu_flags & AV_CPU_FLAG_SSE2) |
| 267 | hpeldsp_init_sse2(c, flags, mm_flags); | 267 | hpeldsp_init_sse2(c, flags, cpu_flags); |
| 268 | } | 268 | } |
| @@ -149,9 +149,9 @@ static void lpc_compute_autocorr_sse2(const double *data, int len, int lag, · 148 unmodified lines | |||
| 149 | av_cold void ff_lpc_init_x86(LPCContext *c) | 149 | av_cold void ff_lpc_init_x86(LPCContext *c) |
| 150 | { | 150 | { |
| 151 | #if HAVE_SSE2_INLINE | 151 | #if HAVE_SSE2_INLINE |
| 152 | int mm_flags = av_get_cpu_flags(); | 152 | int cpu_flags = av_get_cpu_flags(); |
| 153 | 153 | ||
| 154 | if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) { | 154 | if (cpu_flags & (AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_SSE2SLOW)) { |
| 155 | c->lpc_apply_welch_window = lpc_apply_welch_window_sse2; | 155 | c->lpc_apply_welch_window = lpc_apply_welch_window_sse2; |
| 156 | c->lpc_compute_autocorr = lpc_compute_autocorr_sse2; | 156 | c->lpc_compute_autocorr = lpc_compute_autocorr_sse2; |
| 157 | } | 157 | } |
| @@ -435,9 +435,9 @@ PIX_SAD(mmxext) · 434 unmodified lines | |||
| 435 | av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) | 435 | av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) |
| 436 | { | 436 | { |
| 437 | #if HAVE_INLINE_ASM | 437 | #if HAVE_INLINE_ASM |
| 438 | int mm_flags = av_get_cpu_flags(); | 438 | int cpu_flags = av_get_cpu_flags(); |
| 439 | 439 | ||
| 440 | if (mm_flags & AV_CPU_FLAG_MMX) { | 440 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 441 | c->pix_abs[0][0] = sad16_mmx; | 441 | c->pix_abs[0][0] = sad16_mmx; |
| 442 | c->pix_abs[0][1] = sad16_x2_mmx; | 442 | c->pix_abs[0][1] = sad16_x2_mmx; |
| 443 | c->pix_abs[0][2] = sad16_y2_mmx; | 443 | c->pix_abs[0][2] = sad16_y2_mmx; |
| @@ -450,7 +450,7 @@ av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) · 6 unmodified lines | |||
| 450 | c->sad[0]= sad16_mmx; | 450 | c->sad[0]= sad16_mmx; |
| 451 | c->sad[1]= sad8_mmx; | 451 | c->sad[1]= sad8_mmx; |
| 452 | } | 452 | } |
| 453 | if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 453 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 454 | c->pix_abs[0][0] = sad16_mmxext; | 454 | c->pix_abs[0][0] = sad16_mmxext; |
| 455 | c->pix_abs[1][0] = sad8_mmxext; | 455 | c->pix_abs[1][0] = sad8_mmxext; |
| 456 | 456 | ||
| @@ -466,7 +466,7 @@ av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) · 9 unmodified lines | |||
| 466 | c->pix_abs[1][3] = sad8_xy2_mmxext; | 466 | c->pix_abs[1][3] = sad8_xy2_mmxext; |
| 467 | } | 467 | } |
| 468 | } | 468 | } |
| 469 | if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW)) { | 469 | if ((cpu_flags & AV_CPU_FLAG_SSE2) && !(cpu_flags & AV_CPU_FLAG_3DNOW)) { |
| 470 | c->sad[0]= sad16_sse2; | 470 | c->sad[0]= sad16_sse2; |
| 471 | } | 471 | } |
| 472 | #endif /* HAVE_INLINE_ASM */ | 472 | #endif /* HAVE_INLINE_ASM */ |
| @@ -226,7 +226,7 @@ DECL_IMDCT_BLOCKS(avx,avx) · 225 unmodified lines | |||
| 226 | 226 | ||
| 227 | av_cold void ff_mpadsp_init_x86(MPADSPContext *s) | 227 | av_cold void ff_mpadsp_init_x86(MPADSPContext *s) |
| 228 | { | 228 | { |
| 229 | int mm_flags = av_get_cpu_flags(); | 229 | int cpu_flags = av_get_cpu_flags(); |
| 230 | 230 | ||
| 231 | int i, j; | 231 | int i, j; |
| 232 | for (j = 0; j < 4; j++) { | 232 | for (j = 0; j < 4; j++) { |
| @@ -243,21 +243,21 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s) · 10 unmodified lines | |||
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | #if HAVE_SSE2_INLINE | 245 | #if HAVE_SSE2_INLINE |
| 246 | if (mm_flags & AV_CPU_FLAG_SSE2) { | 246 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 247 | s->apply_window_float = apply_window_mp3; | 247 | s->apply_window_float = apply_window_mp3; |
| 248 | } | 248 | } |
| 249 | #endif /* HAVE_SSE2_INLINE */ | 249 | #endif /* HAVE_SSE2_INLINE */ |
| 250 | 250 | ||
| 251 | #if HAVE_YASM | 251 | #if HAVE_YASM |
| 252 | if (EXTERNAL_AVX(mm_flags)) { | 252 | if (EXTERNAL_AVX(cpu_flags)) { |
| 253 | s->imdct36_blocks_float = imdct36_blocks_avx; | 253 | s->imdct36_blocks_float = imdct36_blocks_avx; |
| 254 | } else if (EXTERNAL_SSSE3(mm_flags)) { | 254 | } else if (EXTERNAL_SSSE3(cpu_flags)) { |
| 255 | s->imdct36_blocks_float = imdct36_blocks_ssse3; | 255 | s->imdct36_blocks_float = imdct36_blocks_ssse3; |
| 256 | } else if (EXTERNAL_SSE3(mm_flags)) { | 256 | } else if (EXTERNAL_SSE3(cpu_flags)) { |
| 257 | s->imdct36_blocks_float = imdct36_blocks_sse3; | 257 | s->imdct36_blocks_float = imdct36_blocks_sse3; |
| 258 | } else if (EXTERNAL_SSE2(mm_flags)) { | 258 | } else if (EXTERNAL_SSE2(cpu_flags)) { |
| 259 | s->imdct36_blocks_float = imdct36_blocks_sse2; | 259 | s->imdct36_blocks_float = imdct36_blocks_sse2; |
| 260 | } else if (EXTERNAL_SSE(mm_flags)) { | 260 | } else if (EXTERNAL_SSE(cpu_flags)) { |
| 261 | s->imdct36_blocks_float = imdct36_blocks_sse; | 261 | s->imdct36_blocks_float = imdct36_blocks_sse; |
| 262 | } | 262 | } |
| 263 | #endif /* HAVE_YASM */ | 263 | #endif /* HAVE_YASM */ |
| @@ -557,9 +557,9 @@ static void denoise_dct_sse2(MpegEncContext *s, int16_t *block){ · 556 unmodified lines | |||
| 557 | av_cold void ff_MPV_common_init_x86(MpegEncContext *s) | 557 | av_cold void ff_MPV_common_init_x86(MpegEncContext *s) |
| 558 | { | 558 | { |
| 559 | #if HAVE_INLINE_ASM | 559 | #if HAVE_INLINE_ASM |
| 560 | int mm_flags = av_get_cpu_flags(); | 560 | int cpu_flags = av_get_cpu_flags(); |
| 561 | 561 | ||
| 562 | if (mm_flags & AV_CPU_FLAG_MMX) { | 562 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 563 | s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_mmx; | 563 | s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_mmx; |
| 564 | s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_mmx; | 564 | s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_mmx; |
| 565 | s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_mmx; | 565 | s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_mmx; |
| @@ -568,7 +568,7 @@ av_cold void ff_MPV_common_init_x86(MpegEncContext *s) · 2 unmodified lines | |||
| 568 | s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_mmx; | 568 | s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_mmx; |
| 569 | s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_mmx; | 569 | s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_mmx; |
| 570 | 570 | ||
| 571 | if (mm_flags & AV_CPU_FLAG_SSE2) { | 571 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 572 | s->denoise_dct= denoise_dct_sse2; | 572 | s->denoise_dct= denoise_dct_sse2; |
| 573 | } else { | 573 | } else { |
| 574 | s->denoise_dct= denoise_dct_mmx; | 574 | s->denoise_dct= denoise_dct_mmx; |
| @@ -87,20 +87,20 @@ av_cold void ff_MPV_encode_init_x86(MpegEncContext *s) · 86 unmodified lines | |||
| 87 | 87 | ||
| 88 | if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) { | 88 | if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) { |
| 89 | #if HAVE_MMX_INLINE | 89 | #if HAVE_MMX_INLINE |
| 90 | int mm_flags = av_get_cpu_flags(); | 90 | int cpu_flags = av_get_cpu_flags(); |
| 91 | if (INLINE_MMX(mm_flags)) | 91 | if (INLINE_MMX(cpu_flags)) |
| 92 | s->dct_quantize = dct_quantize_MMX; | 92 | s->dct_quantize = dct_quantize_MMX; |
| 93 | #endif | 93 | #endif |
| 94 | #if HAVE_MMXEXT_INLINE | 94 | #if HAVE_MMXEXT_INLINE |
| 95 | if (INLINE_MMXEXT(mm_flags)) | 95 | if (INLINE_MMXEXT(cpu_flags)) |
| 96 | s->dct_quantize = dct_quantize_MMXEXT; | 96 | s->dct_quantize = dct_quantize_MMXEXT; |
| 97 | #endif | 97 | #endif |
| 98 | #if HAVE_SSE2_INLINE | 98 | #if HAVE_SSE2_INLINE |
| 99 | if (INLINE_SSE2(mm_flags)) | 99 | if (INLINE_SSE2(cpu_flags)) |
| 100 | s->dct_quantize = dct_quantize_SSE2; | 100 | s->dct_quantize = dct_quantize_SSE2; |
| 101 | #endif | 101 | #endif |
| 102 | #if HAVE_SSSE3_INLINE | 102 | #if HAVE_SSSE3_INLINE |
| 103 | if (INLINE_SSSE3(mm_flags)) | 103 | if (INLINE_SSSE3(cpu_flags)) |
| 104 | s->dct_quantize = dct_quantize_SSSE3; | 104 | s->dct_quantize = dct_quantize_SSSE3; |
| 105 | #endif | 105 | #endif |
| 106 | } | 106 | } |
| @@ -35,16 +35,16 @@ void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1, · 34 unmodified lines | |||
| 35 | 35 | ||
| 36 | av_cold void ff_pngdsp_init_x86(PNGDSPContext *dsp) | 36 | av_cold void ff_pngdsp_init_x86(PNGDSPContext *dsp) |
| 37 | { | 37 | { |
| 38 | int flags = av_get_cpu_flags(); | 38 | int cpu_flags = av_get_cpu_flags(); |
| 39 | 39 | ||
| 40 | #if ARCH_X86_32 | 40 | #if ARCH_X86_32 |
| 41 | if (EXTERNAL_MMX(flags)) | 41 | if (EXTERNAL_MMX(cpu_flags)) |
| 42 | dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; | 42 | dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; |
| 43 | #endif | 43 | #endif |
| 44 | if (EXTERNAL_MMXEXT(flags)) | 44 | if (EXTERNAL_MMXEXT(cpu_flags)) |
| 45 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmxext; | 45 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmxext; |
| 46 | if (EXTERNAL_SSE2(flags)) | 46 | if (EXTERNAL_SSE2(cpu_flags)) |
| 47 | dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; | 47 | dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; |
| 48 | if (EXTERNAL_SSSE3(flags)) | 48 | if (EXTERNAL_SSSE3(cpu_flags)) |
| 49 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3; | 49 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3; |
| 50 | } | 50 | } |
| @@ -35,19 +35,19 @@ void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, · 34 unmodified lines | |||
| 35 | av_cold void ff_proresdsp_x86_init(ProresDSPContext *dsp) | 35 | av_cold void ff_proresdsp_x86_init(ProresDSPContext *dsp) |
| 36 | { | 36 | { |
| 37 | #if ARCH_X86_64 | 37 | #if ARCH_X86_64 |
| 38 | int flags = av_get_cpu_flags(); | 38 | int cpu_flags = av_get_cpu_flags(); |
| 39 | 39 | ||
| 40 | if (EXTERNAL_SSE2(flags)) { | 40 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 41 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; | 41 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 42 | dsp->idct_put = ff_prores_idct_put_10_sse2; | 42 | dsp->idct_put = ff_prores_idct_put_10_sse2; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | if (EXTERNAL_SSE4(flags)) { | 45 | if (EXTERNAL_SSE4(cpu_flags)) { |
| 46 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; | 46 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 47 | dsp->idct_put = ff_prores_idct_put_10_sse4; | 47 | dsp->idct_put = ff_prores_idct_put_10_sse4; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | if (EXTERNAL_AVX(flags)) { | 50 | if (EXTERNAL_AVX(cpu_flags)) { |
| 51 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; | 51 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 52 | dsp->idct_put = ff_prores_idct_put_10_avx; | 52 | dsp->idct_put = ff_prores_idct_put_10_avx; |
| 53 | } | 53 | } |
| @@ -32,14 +32,14 @@ void ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, int16_t *block); · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c) | 33 | av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c) |
| 34 | { | 34 | { |
| 35 | int mm_flags = av_get_cpu_flags(); | 35 | int cpu_flags = av_get_cpu_flags(); |
| 36 | 36 | ||
| 37 | if (EXTERNAL_MMX(mm_flags)) | 37 | if (EXTERNAL_MMX(cpu_flags)) |
| 38 | c->rv34_idct_dc_add = ff_rv34_idct_dc_add_mmx; | 38 | c->rv34_idct_dc_add = ff_rv34_idct_dc_add_mmx; |
| 39 | if (EXTERNAL_MMXEXT(mm_flags)) { | 39 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 40 | c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmxext; | 40 | c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmxext; |
| 41 | c->rv34_idct_add = ff_rv34_idct_add_mmxext; | 41 | c->rv34_idct_add = ff_rv34_idct_add_mmxext; |
| 42 | } | 42 | } |
| 43 | if (EXTERNAL_SSE4(mm_flags)) | 43 | if (EXTERNAL_SSE4(cpu_flags)) |
| 44 | c->rv34_idct_dc_add = ff_rv34_idct_dc_add_sse4; | 44 | c->rv34_idct_dc_add = ff_rv34_idct_dc_add_sse4; |
| 45 | } | 45 | } |
| @@ -214,9 +214,9 @@ static void avg_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, · 213 unmodified lines | |||
| 214 | av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) | 214 | av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) |
| 215 | { | 215 | { |
| 216 | #if HAVE_YASM | 216 | #if HAVE_YASM |
| 217 | int mm_flags = av_get_cpu_flags(); | 217 | int cpu_flags = av_get_cpu_flags(); |
| 218 | 218 | ||
| 219 | if (EXTERNAL_MMX(mm_flags)) { | 219 | if (EXTERNAL_MMX(cpu_flags)) { |
| 220 | c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; | 220 | c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; |
| 221 | c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; | 221 | c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; |
| 222 | #if HAVE_MMX_INLINE | 222 | #if HAVE_MMX_INLINE |
| @@ -229,7 +229,7 @@ av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) · 6 unmodified lines | |||
| 229 | QPEL_MC_SET(put_, _mmx) | 229 | QPEL_MC_SET(put_, _mmx) |
| 230 | #endif | 230 | #endif |
| 231 | } | 231 | } |
| 232 | if (EXTERNAL_MMXEXT(mm_flags)) { | 232 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 233 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmxext; | 233 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmxext; |
| 234 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmxext; | 234 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmxext; |
| 235 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmxext; | 235 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmxext; |
| @@ -239,14 +239,14 @@ av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) · 3 unmodified lines | |||
| 239 | #if ARCH_X86_32 | 239 | #if ARCH_X86_32 |
| 240 | QPEL_MC_SET(avg_, _mmxext) | 240 | QPEL_MC_SET(avg_, _mmxext) |
| 241 | #endif | 241 | #endif |
| 242 | } else if (EXTERNAL_AMD3DNOW(mm_flags)) { | 242 | } else if (EXTERNAL_AMD3DNOW(cpu_flags)) { |
| 243 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow; | 243 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow; |
| 244 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow; | 244 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow; |
| 245 | #if ARCH_X86_32 | 245 | #if ARCH_X86_32 |
| 246 | QPEL_MC_SET(avg_, _3dnow) | 246 | QPEL_MC_SET(avg_, _3dnow) |
| 247 | #endif | 247 | #endif |
| 248 | } | 248 | } |
| 249 | if (EXTERNAL_SSE2(mm_flags)) { | 249 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 250 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2; | 250 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2; |
| 251 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2; | 251 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2; |
| 252 | c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2; | 252 | c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2; |
| @@ -254,7 +254,7 @@ av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) · 1 unmodified line | |||
| 254 | QPEL_MC_SET(put_, _sse2) | 254 | QPEL_MC_SET(put_, _sse2) |
| 255 | QPEL_MC_SET(avg_, _sse2) | 255 | QPEL_MC_SET(avg_, _sse2) |
| 256 | } | 256 | } |
| 257 | if (EXTERNAL_SSSE3(mm_flags)) { | 257 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 258 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3; | 258 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3; |
| 259 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3; | 259 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3; |
| 260 | c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3; | 260 | c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3; |
| @@ -39,9 +39,9 @@ void ff_sbr_qmf_pre_shuffle_sse2(float *z); · 38 unmodified lines | |||
| 39 | 39 | ||
| 40 | av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s) | 40 | av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s) |
| 41 | { | 41 | { |
| 42 | int mm_flags = av_get_cpu_flags(); | 42 | int cpu_flags = av_get_cpu_flags(); |
| 43 | 43 | ||
| 44 | if (EXTERNAL_SSE(mm_flags)) { | 44 | if (EXTERNAL_SSE(cpu_flags)) { |
| 45 | s->neg_odd_64 = ff_sbr_neg_odd_64_sse; | 45 | s->neg_odd_64 = ff_sbr_neg_odd_64_sse; |
| 46 | s->sum_square = ff_sbr_sum_square_sse; | 46 | s->sum_square = ff_sbr_sum_square_sse; |
| 47 | s->sum64x5 = ff_sbr_sum64x5_sse; | 47 | s->sum64x5 = ff_sbr_sum64x5_sse; |
| @@ -50,7 +50,7 @@ av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s) · 2 unmodified lines | |||
| 50 | s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_sse; | 50 | s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_sse; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | if (EXTERNAL_SSE2(mm_flags)) { | 53 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 54 | s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_sse2; | 54 | s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_sse2; |
| 55 | s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_sse2; | 55 | s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_sse2; |
| 56 | } | 56 | } |
| @@ -83,12 +83,12 @@ void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src, · 82 unmodified lines | |||
| 83 | 83 | ||
| 84 | av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) | 84 | av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) |
| 85 | { | 85 | { |
| 86 | int mm_flags = av_get_cpu_flags(); | 86 | int cpu_flags = av_get_cpu_flags(); |
| 87 | 87 | ||
| 88 | if (INLINE_MMX(mm_flags)) | 88 | if (INLINE_MMX(cpu_flags)) |
| 89 | ff_vc1dsp_init_mmx(dsp); | 89 | ff_vc1dsp_init_mmx(dsp); |
| 90 | 90 | ||
| 91 | if (INLINE_MMXEXT(mm_flags)) | 91 | if (INLINE_MMXEXT(cpu_flags)) |
| 92 | ff_vc1dsp_init_mmxext(dsp); | 92 | ff_vc1dsp_init_mmxext(dsp); |
| 93 | 93 | ||
| 94 | #define ASSIGN_LF(EXT) \ | 94 | #define ASSIGN_LF(EXT) \ |
| @@ -100,31 +100,31 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) · 5 unmodified lines | |||
| 100 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT | 100 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT |
| 101 | 101 | ||
| 102 | #if HAVE_YASM | 102 | #if HAVE_YASM |
| 103 | if (mm_flags & AV_CPU_FLAG_MMX) { | 103 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 104 | dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_mmx; | 104 | dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_mmx; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 107 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 108 | ASSIGN_LF(mmxext); | 108 | ASSIGN_LF(mmxext); |
| 109 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmxext; | 109 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmxext; |
| 110 | 110 | ||
| 111 | dsp->avg_vc1_mspel_pixels_tab[0] = avg_vc1_mspel_mc00_mmxext; | 111 | dsp->avg_vc1_mspel_pixels_tab[0] = avg_vc1_mspel_mc00_mmxext; |
| 112 | } else if (mm_flags & AV_CPU_FLAG_3DNOW) { | 112 | } else if (cpu_flags & AV_CPU_FLAG_3DNOW) { |
| 113 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow; | 113 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | if (mm_flags & AV_CPU_FLAG_SSE2) { | 116 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 117 | dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2; | 117 | dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2; |
| 118 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2; | 118 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2; |
| 119 | dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2; | 119 | dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2; |
| 120 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse2; | 120 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse2; |
| 121 | } | 121 | } |
| 122 | if (mm_flags & AV_CPU_FLAG_SSSE3) { | 122 | if (cpu_flags & AV_CPU_FLAG_SSSE3) { |
| 123 | ASSIGN_LF(ssse3); | 123 | ASSIGN_LF(ssse3); |
| 124 | dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_ssse3; | 124 | dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_ssse3; |
| 125 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_ssse3; | 125 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_ssse3; |
| 126 | } | 126 | } |
| 127 | if (mm_flags & AV_CPU_FLAG_SSE4) { | 127 | if (cpu_flags & AV_CPU_FLAG_SSE4) { |
| 128 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4; | 128 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4; |
| 129 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4; | 129 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4; |
| 130 | } | 130 | } |
| @@ -100,20 +100,20 @@ void ff_prefetch_3dnow(uint8_t *buf, ptrdiff_t stride, int h); · 99 unmodified lines | |||
| 100 | av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc) | 100 | av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc) |
| 101 | { | 101 | { |
| 102 | #if HAVE_YASM | 102 | #if HAVE_YASM |
| 103 | int mm_flags = av_get_cpu_flags(); | 103 | int cpu_flags = av_get_cpu_flags(); |
| 104 | 104 | ||
| 105 | #if ARCH_X86_32 | 105 | #if ARCH_X86_32 |
| 106 | if (bpc <= 8 && mm_flags & AV_CPU_FLAG_MMX) { | 106 | if (bpc <= 8 && cpu_flags & AV_CPU_FLAG_MMX) { |
| 107 | ctx->emulated_edge_mc = emulated_edge_mc_mmx; | 107 | ctx->emulated_edge_mc = emulated_edge_mc_mmx; |
| 108 | } | 108 | } |
| 109 | if (mm_flags & AV_CPU_FLAG_3DNOW) { | 109 | if (cpu_flags & AV_CPU_FLAG_3DNOW) { |
| 110 | ctx->prefetch = ff_prefetch_3dnow; | 110 | ctx->prefetch = ff_prefetch_3dnow; |
| 111 | } | 111 | } |
| 112 | #endif /* ARCH_X86_32 */ | 112 | #endif /* ARCH_X86_32 */ |
| 113 | if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 113 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 114 | ctx->prefetch = ff_prefetch_mmxext; | 114 | ctx->prefetch = ff_prefetch_mmxext; |
| 115 | } | 115 | } |
| 116 | if (bpc <= 8 && mm_flags & AV_CPU_FLAG_SSE) { | 116 | if (bpc <= 8 && cpu_flags & AV_CPU_FLAG_SSE) { |
| 117 | ctx->emulated_edge_mc = emulated_edge_mc_sse; | 117 | ctx->emulated_edge_mc = emulated_edge_mc_sse; |
| 118 | } | 118 | } |
| 119 | #endif /* HAVE_YASM */ | 119 | #endif /* HAVE_YASM */ |
| @@ -31,13 +31,13 @@ void ff_vorbis_inverse_coupling_sse(float *mag, float *ang, · 30 unmodified lines | |||
| 31 | av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp) | 31 | av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp) |
| 32 | { | 32 | { |
| 33 | #if HAVE_YASM | 33 | #if HAVE_YASM |
| 34 | int mm_flags = av_get_cpu_flags(); | 34 | int cpu_flags = av_get_cpu_flags(); |
| 35 | 35 | ||
| 36 | #if ARCH_X86_32 | 36 | #if ARCH_X86_32 |
| 37 | if (mm_flags & AV_CPU_FLAG_3DNOW) | 37 | if (cpu_flags & AV_CPU_FLAG_3DNOW) |
| 38 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_3dnow; | 38 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_3dnow; |
| 39 | #endif /* ARCH_X86_32 */ | 39 | #endif /* ARCH_X86_32 */ |
| 40 | if (mm_flags & AV_CPU_FLAG_SSE) | 40 | if (cpu_flags & AV_CPU_FLAG_SSE) |
| 41 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_sse; | 41 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_sse; |
| 42 | #endif /* HAVE_YASM */ | 42 | #endif /* HAVE_YASM */ |
| 43 | } | 43 | } |
| @@ -42,16 +42,16 @@ void ff_vp3_h_loop_filter_mmxext(uint8_t *src, int stride, · 41 unmodified lines | |||
| 42 | 42 | ||
| 43 | av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) | 43 | av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) |
| 44 | { | 44 | { |
| 45 | int cpuflags = av_get_cpu_flags(); | 45 | int cpu_flags = av_get_cpu_flags(); |
| 46 | 46 | ||
| 47 | #if ARCH_X86_32 | 47 | #if ARCH_X86_32 |
| 48 | if (EXTERNAL_MMX(cpuflags)) { | 48 | if (EXTERNAL_MMX(cpu_flags)) { |
| 49 | c->idct_put = ff_vp3_idct_put_mmx; | 49 | c->idct_put = ff_vp3_idct_put_mmx; |
| 50 | c->idct_add = ff_vp3_idct_add_mmx; | 50 | c->idct_add = ff_vp3_idct_add_mmx; |
| 51 | } | 51 | } |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | if (EXTERNAL_MMXEXT(cpuflags)) { | 54 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 55 | c->idct_dc_add = ff_vp3_idct_dc_add_mmxext; | 55 | c->idct_dc_add = ff_vp3_idct_dc_add_mmxext; |
| 56 | 56 | ||
| 57 | if (!(flags & CODEC_FLAG_BITEXACT)) { | 57 | if (!(flags & CODEC_FLAG_BITEXACT)) { |
| @@ -60,7 +60,7 @@ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) · 2 unmodified lines | |||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | if (EXTERNAL_SSE2(cpuflags)) { | 63 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 64 | c->idct_put = ff_vp3_idct_put_sse2; | 64 | c->idct_put = ff_vp3_idct_put_sse2; |
| 65 | c->idct_add = ff_vp3_idct_add_sse2; | 65 | c->idct_add = ff_vp3_idct_add_sse2; |
| 66 | } | 66 | } |
| @@ -32,16 +32,16 @@ void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride, · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec) | 33 | av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec) |
| 34 | { | 34 | { |
| 35 | int mm_flags = av_get_cpu_flags(); | 35 | int cpu_flags = av_get_cpu_flags(); |
| 36 | 36 | ||
| 37 | if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) { | 37 | if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) { |
| 38 | #if ARCH_X86_32 | 38 | #if ARCH_X86_32 |
| 39 | if (EXTERNAL_MMX(mm_flags)) { | 39 | if (EXTERNAL_MMX(cpu_flags)) { |
| 40 | c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; | 40 | c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; |
| 41 | } | 41 | } |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | if (EXTERNAL_SSE2(mm_flags)) { | 44 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 45 | c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2; | 45 | c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2; |
| 46 | } | 46 | } |
| 47 | } | 47 | } |
| @@ -316,9 +316,9 @@ DECLARE_LOOP_FILTER(sse4) · 315 unmodified lines | |||
| 316 | av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) | 316 | av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 317 | { | 317 | { |
| 318 | #if HAVE_YASM | 318 | #if HAVE_YASM |
| 319 | int mm_flags = av_get_cpu_flags(); | 319 | int cpu_flags = av_get_cpu_flags(); |
| 320 | 320 | ||
| 321 | if (mm_flags & AV_CPU_FLAG_MMX) { | 321 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 322 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; | 322 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
| 323 | c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; | 323 | c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; |
| 324 | #if ARCH_X86_32 | 324 | #if ARCH_X86_32 |
| @@ -349,7 +349,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 24 unmodified lines | |||
| 349 | 349 | ||
| 350 | /* note that 4-tap width=16 functions are missing because w=16 | 350 | /* note that 4-tap width=16 functions are missing because w=16 |
| 351 | * is only used for luma, and luma is always a copy or sixtap. */ | 351 | * is only used for luma, and luma is always a copy or sixtap. */ |
| 352 | if (mm_flags & AV_CPU_FLAG_MMXEXT) { | 352 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 353 | VP8_MC_FUNC(2, 4, mmxext); | 353 | VP8_MC_FUNC(2, 4, mmxext); |
| 354 | VP8_BILINEAR_MC_FUNC(2, 4, mmxext); | 354 | VP8_BILINEAR_MC_FUNC(2, 4, mmxext); |
| 355 | #if ARCH_X86_32 | 355 | #if ARCH_X86_32 |
| @@ -373,14 +373,14 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 17 unmodified lines | |||
| 373 | #endif | 373 | #endif |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | if (mm_flags & AV_CPU_FLAG_SSE) { | 376 | if (cpu_flags & AV_CPU_FLAG_SSE) { |
| 377 | c->vp8_idct_add = ff_vp8_idct_add_sse; | 377 | c->vp8_idct_add = ff_vp8_idct_add_sse; |
| 378 | c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; | 378 | c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; |
| 379 | c->put_vp8_epel_pixels_tab[0][0][0] = | 379 | c->put_vp8_epel_pixels_tab[0][0][0] = |
| 380 | c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; | 380 | c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) { | 383 | if (cpu_flags & (AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_SSE2SLOW)) { |
| 384 | VP8_LUMA_MC_FUNC(0, 16, sse2); | 384 | VP8_LUMA_MC_FUNC(0, 16, sse2); |
| 385 | VP8_MC_FUNC(1, 8, sse2); | 385 | VP8_MC_FUNC(1, 8, sse2); |
| 386 | VP8_BILINEAR_MC_FUNC(0, 16, sse2); | 386 | VP8_BILINEAR_MC_FUNC(0, 16, sse2); |
| @@ -395,7 +395,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 8 unmodified lines | |||
| 395 | c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2; | 395 | c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2; |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | if (mm_flags & AV_CPU_FLAG_SSE2) { | 398 | if (cpu_flags & AV_CPU_FLAG_SSE2) { |
| 399 | c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; | 399 | c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; |
| 400 | 400 | ||
| 401 | c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2; | 401 | c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2; |
| @@ -407,7 +407,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 5 unmodified lines | |||
| 407 | c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2; | 407 | c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2; |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | if (mm_flags & AV_CPU_FLAG_SSSE3) { | 410 | if (cpu_flags & AV_CPU_FLAG_SSSE3) { |
| 411 | VP8_LUMA_MC_FUNC(0, 16, ssse3); | 411 | VP8_LUMA_MC_FUNC(0, 16, ssse3); |
| 412 | VP8_MC_FUNC(1, 8, ssse3); | 412 | VP8_MC_FUNC(1, 8, ssse3); |
| 413 | VP8_MC_FUNC(2, 4, ssse3); | 413 | VP8_MC_FUNC(2, 4, ssse3); |
| @@ -429,7 +429,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 15 unmodified lines | |||
| 429 | c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3; | 429 | c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3; |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | if (mm_flags & AV_CPU_FLAG_SSE4) { | 432 | if (cpu_flags & AV_CPU_FLAG_SSE4) { |
| 433 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; | 433 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; |
| 434 | 434 | ||
| 435 | c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4; | 435 | c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4; |
| @@ -35,24 +35,24 @@ void ff_scale_samples_s32_avx(uint8_t *dst, const uint8_t *src, int len, · 34 unmodified lines | |||
| 35 | 35 | ||
| 36 | av_cold void ff_volume_init_x86(VolumeContext *vol) | 36 | av_cold void ff_volume_init_x86(VolumeContext *vol) |
| 37 | { | 37 | { |
| 38 | int mm_flags = av_get_cpu_flags(); | 38 | int cpu_flags = av_get_cpu_flags(); |
| 39 | enum AVSampleFormat sample_fmt = av_get_packed_sample_fmt(vol->sample_fmt); | 39 | enum AVSampleFormat sample_fmt = av_get_packed_sample_fmt(vol->sample_fmt); |
| 40 | 40 | ||
| 41 | if (sample_fmt == AV_SAMPLE_FMT_S16) { | 41 | if (sample_fmt == AV_SAMPLE_FMT_S16) { |
| 42 | if (EXTERNAL_SSE2(mm_flags) && vol->volume_i < 32768) { | 42 | if (EXTERNAL_SSE2(cpu_flags) && vol->volume_i < 32768) { |
| 43 | vol->scale_samples = ff_scale_samples_s16_sse2; | 43 | vol->scale_samples = ff_scale_samples_s16_sse2; |
| 44 | vol->samples_align = 8; | 44 | vol->samples_align = 8; |
| 45 | } | 45 | } |
| 46 | } else if (sample_fmt == AV_SAMPLE_FMT_S32) { | 46 | } else if (sample_fmt == AV_SAMPLE_FMT_S32) { |
| 47 | if (EXTERNAL_SSE2(mm_flags)) { | 47 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 48 | vol->scale_samples = ff_scale_samples_s32_sse2; | 48 | vol->scale_samples = ff_scale_samples_s32_sse2; |
| 49 | vol->samples_align = 4; | 49 | vol->samples_align = 4; |
| 50 | } | 50 | } |
| 51 | if (EXTERNAL_SSSE3(mm_flags) && mm_flags & AV_CPU_FLAG_ATOM) { | 51 | if (EXTERNAL_SSSE3(cpu_flags) && cpu_flags & AV_CPU_FLAG_ATOM) { |
| 52 | vol->scale_samples = ff_scale_samples_s32_ssse3_atom; | 52 | vol->scale_samples = ff_scale_samples_s32_ssse3_atom; |
| 53 | vol->samples_align = 4; | 53 | vol->samples_align = 4; |
| 54 | } | 54 | } |
| 55 | if (EXTERNAL_AVX(mm_flags)) { | 55 | if (EXTERNAL_AVX(cpu_flags)) { |
| 56 | vol->scale_samples = ff_scale_samples_s32_avx; | 56 | vol->scale_samples = ff_scale_samples_s32_avx; |
| 57 | vol->samples_align = 8; | 57 | vol->samples_align = 8; |
| 58 | } | 58 | } |
| @@ -145,15 +145,15 @@ void ff_conv_flt_to_fltp_6ch_avx (float *const *dst, float *src, int len, · 144 unmodified lines | |||
| 145 | 145 | ||
| 146 | av_cold void ff_audio_convert_init_x86(AudioConvert *ac) | 146 | av_cold void ff_audio_convert_init_x86(AudioConvert *ac) |
| 147 | { | 147 | { |
| 148 | int mm_flags = av_get_cpu_flags(); | 148 | int cpu_flags = av_get_cpu_flags(); |
| 149 | 149 | ||
| 150 | if (EXTERNAL_MMX(mm_flags)) { | 150 | if (EXTERNAL_MMX(cpu_flags)) { |
| 151 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, | 151 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, |
| 152 | 0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx); | 152 | 0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx); |
| 153 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, | 153 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, |
| 154 | 6, 1, 4, "MMX", ff_conv_fltp_to_flt_6ch_mmx); | 154 | 6, 1, 4, "MMX", ff_conv_fltp_to_flt_6ch_mmx); |
| 155 | } | 155 | } |
| 156 | if (EXTERNAL_SSE(mm_flags)) { | 156 | if (EXTERNAL_SSE(cpu_flags)) { |
| 157 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, | 157 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, |
| 158 | 6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse); | 158 | 6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse); |
| 159 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, | 159 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, |
| @@ -161,8 +161,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac) · 1 unmodified line | |||
| 161 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, | 161 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, |
| 162 | 2, 16, 4, "SSE", ff_conv_flt_to_fltp_2ch_sse); | 162 | 2, 16, 4, "SSE", ff_conv_flt_to_fltp_2ch_sse); |
| 163 | } | 163 | } |
| 164 | if (EXTERNAL_SSE2(mm_flags)) { | 164 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 165 | if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | 165 | if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { |
| 166 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, | 166 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, |
| 167 | 0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2); | 167 | 0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2); |
| 168 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, | 168 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, |
| @@ -206,7 +206,7 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac) · 37 unmodified lines | |||
| 206 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, | 206 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, |
| 207 | 6, 16, 4, "SSE2", ff_conv_flt_to_fltp_6ch_sse2); | 207 | 6, 16, 4, "SSE2", ff_conv_flt_to_fltp_6ch_sse2); |
| 208 | } | 208 | } |
| 209 | if (EXTERNAL_SSSE3(mm_flags)) { | 209 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 210 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, | 210 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, |
| 211 | 6, 16, 4, "SSSE3", ff_conv_s16p_to_flt_6ch_ssse3); | 211 | 6, 16, 4, "SSSE3", ff_conv_s16p_to_flt_6ch_ssse3); |
| 212 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, | 212 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, |
| @@ -220,13 +220,13 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac) · 7 unmodified lines | |||
| 220 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, | 220 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, |
| 221 | 6, 16, 4, "SSSE3", ff_conv_flt_to_s16p_6ch_ssse3); | 221 | 6, 16, 4, "SSSE3", ff_conv_flt_to_s16p_6ch_ssse3); |
| 222 | } | 222 | } |
| 223 | if (EXTERNAL_SSE4(mm_flags)) { | 223 | if (EXTERNAL_SSE4(cpu_flags)) { |
| 224 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, | 224 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, |
| 225 | 0, 16, 8, "SSE4", ff_conv_s16_to_flt_sse4); | 225 | 0, 16, 8, "SSE4", ff_conv_s16_to_flt_sse4); |
| 226 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, | 226 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, |
| 227 | 6, 16, 4, "SSE4", ff_conv_fltp_to_flt_6ch_sse4); | 227 | 6, 16, 4, "SSE4", ff_conv_fltp_to_flt_6ch_sse4); |
| 228 | } | 228 | } |
| 229 | if (EXTERNAL_AVX(mm_flags)) { | 229 | if (EXTERNAL_AVX(cpu_flags)) { |
| 230 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32, | 230 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32, |
| 231 | 0, 32, 16, "AVX", ff_conv_s32_to_flt_avx); | 231 | 0, 32, 16, "AVX", ff_conv_s32_to_flt_avx); |
| 232 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, | 232 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, |
| @@ -106,7 +106,7 @@ DEFINE_MIX_3_8_TO_1_2(7) · 105 unmodified lines | |||
| 106 | DEFINE_MIX_3_8_TO_1_2(8) | 106 | DEFINE_MIX_3_8_TO_1_2(8) |
| 107 | 107 | ||
| 108 | #define SET_MIX_3_8_TO_1_2(chan) \ | 108 | #define SET_MIX_3_8_TO_1_2(chan) \ |
| 109 | if (EXTERNAL_SSE(mm_flags)) { \ | 109 | if (EXTERNAL_SSE(cpu_flags)) { \ |
| 110 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ | 110 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ |
| 111 | chan, 1, 16, 4, "SSE", \ | 111 | chan, 1, 16, 4, "SSE", \ |
| 112 | ff_mix_ ## chan ## _to_1_fltp_flt_sse); \ | 112 | ff_mix_ ## chan ## _to_1_fltp_flt_sse); \ |
| @@ -114,7 +114,7 @@ DEFINE_MIX_3_8_TO_1_2(8) · 1 unmodified line | |||
| 114 | chan, 2, 16, 4, "SSE", \ | 114 | chan, 2, 16, 4, "SSE", \ |
| 115 | ff_mix_## chan ##_to_2_fltp_flt_sse); \ | 115 | ff_mix_## chan ##_to_2_fltp_flt_sse); \ |
| 116 | } \ | 116 | } \ |
| 117 | if (EXTERNAL_SSE2(mm_flags)) { \ | 117 | if (EXTERNAL_SSE2(cpu_flags)) { \ |
| 118 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ | 118 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ |
| 119 | chan, 1, 16, 8, "SSE2", \ | 119 | chan, 1, 16, 8, "SSE2", \ |
| 120 | ff_mix_ ## chan ## _to_1_s16p_flt_sse2); \ | 120 | ff_mix_ ## chan ## _to_1_s16p_flt_sse2); \ |
| @@ -122,7 +122,7 @@ DEFINE_MIX_3_8_TO_1_2(8) · 1 unmodified line | |||
| 122 | chan, 2, 16, 8, "SSE2", \ | 122 | chan, 2, 16, 8, "SSE2", \ |
| 123 | ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \ | 123 | ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \ |
| 124 | } \ | 124 | } \ |
| 125 | if (EXTERNAL_SSE4(mm_flags)) { \ | 125 | if (EXTERNAL_SSE4(cpu_flags)) { \ |
| 126 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ | 126 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ |
| 127 | chan, 1, 16, 8, "SSE4", \ | 127 | chan, 1, 16, 8, "SSE4", \ |
| 128 | ff_mix_ ## chan ## _to_1_s16p_flt_sse4); \ | 128 | ff_mix_ ## chan ## _to_1_s16p_flt_sse4); \ |
| @@ -130,7 +130,7 @@ DEFINE_MIX_3_8_TO_1_2(8) · 1 unmodified line | |||
| 130 | chan, 2, 16, 8, "SSE4", \ | 130 | chan, 2, 16, 8, "SSE4", \ |
| 131 | ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \ | 131 | ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \ |
| 132 | } \ | 132 | } \ |
| 133 | if (EXTERNAL_AVX(mm_flags)) { \ | 133 | if (EXTERNAL_AVX(cpu_flags)) { \ |
| 134 | int ptr_align = 32; \ | 134 | int ptr_align = 32; \ |
| 135 | int smp_align = 8; \ | 135 | int smp_align = 8; \ |
| 136 | if (ARCH_X86_32 || chan >= 6) { \ | 136 | if (ARCH_X86_32 || chan >= 6) { \ |
| @@ -150,7 +150,7 @@ DEFINE_MIX_3_8_TO_1_2(8) · 13 unmodified lines | |||
| 150 | chan, 2, 16, 8, "AVX", \ | 150 | chan, 2, 16, 8, "AVX", \ |
| 151 | ff_mix_ ## chan ## _to_2_s16p_flt_avx); \ | 151 | ff_mix_ ## chan ## _to_2_s16p_flt_avx); \ |
| 152 | } \ | 152 | } \ |
| 153 | if (EXTERNAL_FMA4(mm_flags)) { \ | 153 | if (EXTERNAL_FMA4(cpu_flags)) { \ |
| 154 | int ptr_align = 32; \ | 154 | int ptr_align = 32; \ |
| 155 | int smp_align = 8; \ | 155 | int smp_align = 8; \ |
| 156 | if (ARCH_X86_32 || chan >= 6) { \ | 156 | if (ARCH_X86_32 || chan >= 6) { \ |
| @@ -174,15 +174,15 @@ DEFINE_MIX_3_8_TO_1_2(8) · 17 unmodified lines | |||
| 174 | av_cold void ff_audio_mix_init_x86(AudioMix *am) | 174 | av_cold void ff_audio_mix_init_x86(AudioMix *am) |
| 175 | { | 175 | { |
| 176 | #if HAVE_YASM | 176 | #if HAVE_YASM |
| 177 | int mm_flags = av_get_cpu_flags(); | 177 | int cpu_flags = av_get_cpu_flags(); |
| 178 | 178 | ||
| 179 | if (EXTERNAL_SSE(mm_flags)) { | 179 | if (EXTERNAL_SSE(cpu_flags)) { |
| 180 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, | 180 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 181 | 2, 1, 16, 8, "SSE", ff_mix_2_to_1_fltp_flt_sse); | 181 | 2, 1, 16, 8, "SSE", ff_mix_2_to_1_fltp_flt_sse); |
| 182 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, | 182 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 183 | 1, 2, 16, 4, "SSE", ff_mix_1_to_2_fltp_flt_sse); | 183 | 1, 2, 16, 4, "SSE", ff_mix_1_to_2_fltp_flt_sse); |
| 184 | } | 184 | } |
| 185 | if (EXTERNAL_SSE2(mm_flags)) { | 185 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 186 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, | 186 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 187 | 2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_flt_sse2); | 187 | 2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_flt_sse2); |
| 188 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, | 188 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, |
| @@ -190,13 +190,13 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am) · 1 unmodified line | |||
| 190 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, | 190 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 191 | 1, 2, 16, 8, "SSE2", ff_mix_1_to_2_s16p_flt_sse2); | 191 | 1, 2, 16, 8, "SSE2", ff_mix_1_to_2_s16p_flt_sse2); |
| 192 | } | 192 | } |
| 193 | if (EXTERNAL_SSE4(mm_flags)) { | 193 | if (EXTERNAL_SSE4(cpu_flags)) { |
| 194 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, | 194 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 195 | 2, 1, 16, 8, "SSE4", ff_mix_2_to_1_s16p_flt_sse4); | 195 | 2, 1, 16, 8, "SSE4", ff_mix_2_to_1_s16p_flt_sse4); |
| 196 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, | 196 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 197 | 1, 2, 16, 8, "SSE4", ff_mix_1_to_2_s16p_flt_sse4); | 197 | 1, 2, 16, 8, "SSE4", ff_mix_1_to_2_s16p_flt_sse4); |
| 198 | } | 198 | } |
| 199 | if (EXTERNAL_AVX(mm_flags)) { | 199 | if (EXTERNAL_AVX(cpu_flags)) { |
| 200 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, | 200 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 201 | 2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx); | 201 | 2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx); |
| 202 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, | 202 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| @@ -34,26 +34,26 @@ void ff_dither_int_to_float_triangular_avx(float *dst, int *src0, int len); · 33 unmodified lines | |||
| 34 | av_cold void ff_dither_init_x86(DitherDSPContext *ddsp, | 34 | av_cold void ff_dither_init_x86(DitherDSPContext *ddsp, |
| 35 | enum AVResampleDitherMethod method) | 35 | enum AVResampleDitherMethod method) |
| 36 | { | 36 | { |
| 37 | int mm_flags = av_get_cpu_flags(); | 37 | int cpu_flags = av_get_cpu_flags(); |
| 38 | 38 | ||
| 39 | if (EXTERNAL_SSE2(mm_flags)) { | 39 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 40 | ddsp->quantize = ff_quantize_sse2; | 40 | ddsp->quantize = ff_quantize_sse2; |
| 41 | ddsp->ptr_align = 16; | 41 | ddsp->ptr_align = 16; |
| 42 | ddsp->samples_align = 8; | 42 | ddsp->samples_align = 8; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | if (method == AV_RESAMPLE_DITHER_RECTANGULAR) { | 45 | if (method == AV_RESAMPLE_DITHER_RECTANGULAR) { |
| 46 | if (EXTERNAL_SSE2(mm_flags)) { | 46 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 47 | ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_sse2; | 47 | ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_sse2; |
| 48 | } | 48 | } |
| 49 | if (EXTERNAL_AVX(mm_flags)) { | 49 | if (EXTERNAL_AVX(cpu_flags)) { |
| 50 | ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx; | 50 | ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx; |
| 51 | } | 51 | } |
| 52 | } else { | 52 | } else { |
| 53 | if (EXTERNAL_SSE2(mm_flags)) { | 53 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 54 | ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_sse2; | 54 | ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_sse2; |
| 55 | } | 55 | } |
| 56 | if (EXTERNAL_AVX(mm_flags)) { | 56 | if (EXTERNAL_AVX(cpu_flags)) { |
| 57 | ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_avx; | 57 | ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_avx; |
| 58 | } | 58 | } |
| 59 | } | 59 | } |
| @@ -27,9 +27,7 @@ · 26 unmodified lines | |||
| 27 | av_cold void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int bit_exact) | 27 | av_cold void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int bit_exact) |
| 28 | { | 28 | { |
| 29 | #if HAVE_ALTIVEC | 29 | #if HAVE_ALTIVEC |
| 30 | int mm_flags = av_get_cpu_flags(); | 30 | if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) |
| 31 | |||
| 32 | if (!(mm_flags & AV_CPU_FLAG_ALTIVEC)) | ||
| 33 | return; | 31 | return; |
| 34 | 32 | ||
| 35 | fdsp->vector_fmul = ff_vector_fmul_altivec; | 33 | fdsp->vector_fmul = ff_vector_fmul_altivec; |
| @@ -124,17 +124,17 @@ static void vector_fmul_window_sse(float *dst, const float *src0, · 123 unmodified lines | |||
| 124 | 124 | ||
| 125 | av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) | 125 | av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) |
| 126 | { | 126 | { |
| 127 | int mm_flags = av_get_cpu_flags(); | 127 | int cpu_flags = av_get_cpu_flags(); |
| 128 | 128 | ||
| 129 | #if HAVE_6REGS && HAVE_INLINE_ASM | 129 | #if HAVE_6REGS && HAVE_INLINE_ASM |
| 130 | if (INLINE_AMD3DNOWEXT(mm_flags)) { | 130 | if (INLINE_AMD3DNOWEXT(cpu_flags)) { |
| 131 | fdsp->vector_fmul_window = vector_fmul_window_3dnowext; | 131 | fdsp->vector_fmul_window = vector_fmul_window_3dnowext; |
| 132 | } | 132 | } |
| 133 | if (INLINE_SSE(mm_flags)) { | 133 | if (INLINE_SSE(cpu_flags)) { |
| 134 | fdsp->vector_fmul_window = vector_fmul_window_sse; | 134 | fdsp->vector_fmul_window = vector_fmul_window_sse; |
| 135 | } | 135 | } |
| 136 | #endif | 136 | #endif |
| 137 | if (EXTERNAL_SSE(mm_flags)) { | 137 | if (EXTERNAL_SSE(cpu_flags)) { |
| 138 | fdsp->vector_fmul = ff_vector_fmul_sse; | 138 | fdsp->vector_fmul = ff_vector_fmul_sse; |
| 139 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; | 139 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; |
| 140 | fdsp->vector_fmul_scalar = ff_vector_fmul_scalar_sse; | 140 | fdsp->vector_fmul_scalar = ff_vector_fmul_scalar_sse; |
| @@ -143,10 +143,10 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) · 2 unmodified lines | |||
| 143 | fdsp->scalarproduct_float = ff_scalarproduct_float_sse; | 143 | fdsp->scalarproduct_float = ff_scalarproduct_float_sse; |
| 144 | fdsp->butterflies_float = ff_butterflies_float_sse; | 144 | fdsp->butterflies_float = ff_butterflies_float_sse; |
| 145 | } | 145 | } |
| 146 | if (EXTERNAL_SSE2(mm_flags)) { | 146 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 147 | fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2; | 147 | fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2; |
| 148 | } | 148 | } |
| 149 | if (EXTERNAL_AVX(mm_flags)) { | 149 | if (EXTERNAL_AVX(cpu_flags)) { |
| 150 | fdsp->vector_fmul = ff_vector_fmul_avx; | 150 | fdsp->vector_fmul = ff_vector_fmul_avx; |
| 151 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx; | 151 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx; |
| 152 | fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_avx; | 152 | fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_avx; |