Unified · Split
| @@ -449,9 +449,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi · 448 unmodified lines | ||
| 449 | 449 | av_cold void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags) |
| 450 | 450 | { |
| 451 | 451 | #if HAVE_ALTIVEC |
| 452 | − int mm_flags = av_get_cpu_flags(); | |
| 453 | − | |
| 454 | − if (mm_flags & AV_CPU_FLAG_ALTIVEC) { | |
| 452 | + if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { | |
| 455 | 453 | c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec; |
| 456 | 454 | c->avg_pixels_tab[1][0] = avg_pixels8_altivec; |
| 457 | 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 | 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 | 186 | c->ac3_exponent_min = ff_ac3_exponent_min_mmx; |
| 187 | 187 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx; |
| 188 | 188 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx; |
| 189 | 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 | 192 | if (!bit_exact) { |
| 193 | 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 | 197 | c->ac3_exponent_min = ff_ac3_exponent_min_mmxext; |
| 198 | 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 | 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 | 204 | c->ac3_exponent_min = ff_ac3_exponent_min_sse2; |
| 205 | 205 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2; |
| 206 | 206 | c->float_to_fixed24 = ff_float_to_fixed24_sse2; |
| 207 | 207 | c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2; |
| 208 | 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 | 210 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2; |
| 211 | 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 | 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 | 217 | c->extract_exponents = ff_ac3_extract_exponents_ssse3; |
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | #if HAVE_SSE_INLINE && HAVE_7REGS |
| 222 | − if (INLINE_SSE(mm_flags)) { | |
| 222 | + if (INLINE_SSE(cpu_flags)) { | |
| 223 | 223 | c->downmix = ac3_downmix_sse; |
| 224 | 224 | } |
| 225 | 225 | #endif |
| @@ -542,17 +542,17 @@ static av_cold void cavsdsp_init_3dnow(CAVSDSPContext *c, · 541 unmodified lines | ||
| 542 | 542 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx) |
| 543 | 543 | { |
| 544 | 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 | 548 | cavsdsp_init_mmx(c, avctx); |
| 549 | 549 | #endif /* HAVE_MMX_INLINE */ |
| 550 | 550 | #if HAVE_MMXEXT_INLINE |
| 551 | − if (mm_flags & AV_CPU_FLAG_MMXEXT) | |
| 551 | + if (cpu_flags & AV_CPU_FLAG_MMXEXT) | |
| 552 | 552 | cavsdsp_init_mmxext(c, avctx); |
| 553 | 553 | #endif /* HAVE_MMXEXT_INLINE */ |
| 554 | 554 | #if HAVE_AMD3DNOW_INLINE |
| 555 | − if (mm_flags & AV_CPU_FLAG_3DNOW) | |
| 555 | + if (cpu_flags & AV_CPU_FLAG_3DNOW) | |
| 556 | 556 | cavsdsp_init_3dnow(c, avctx); |
| 557 | 557 | #endif /* HAVE_AMD3DNOW_INLINE */ |
| 558 | 558 | } |
| @@ -529,7 +529,7 @@ QPEL_OP(put_no_rnd_, _no_rnd_, mmxext) · 528 unmodified lines | ||
| 529 | 529 | } while (0) |
| 530 | 530 | |
| 531 | 531 | static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, |
| 532 | − int mm_flags) | |
| 532 | + int cpu_flags) | |
| 533 | 533 | { |
| 534 | 534 | #if HAVE_MMX_INLINE |
| 535 | 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 | 577 | static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, |
| 578 | − int mm_flags) | |
| 578 | + int cpu_flags) | |
| 579 | 579 | { |
| 580 | 580 | #if HAVE_MMXEXT_INLINE |
| 581 | 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 | 597 | SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); |
| 598 | 598 | |
| 599 | 599 | /* slower than cmov version on AMD */ |
| 600 | − if (!(mm_flags & AV_CPU_FLAG_3DNOW)) | |
| 600 | + if (!(cpu_flags & AV_CPU_FLAG_3DNOW)) | |
| 601 | 601 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmxext; |
| 602 | 602 | |
| 603 | 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 | 614 | static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, |
| 615 | − int mm_flags) | |
| 615 | + int cpu_flags) | |
| 616 | 616 | { |
| 617 | 617 | #if HAVE_SSE_INLINE |
| 618 | 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 | 632 | static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, |
| 633 | − int mm_flags) | |
| 633 | + int cpu_flags) | |
| 634 | 634 | { |
| 635 | 635 | #if HAVE_SSE2_INLINE |
| 636 | 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 | 646 | #if HAVE_SSE2_EXTERNAL |
| 647 | 647 | c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; |
| 648 | 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 | 650 | c->vector_clip_int32 = ff_vector_clip_int32_int_sse2; |
| 651 | 651 | } else { |
| 652 | 652 | c->vector_clip_int32 = ff_vector_clip_int32_sse2; |
| 653 | 653 | } |
| 654 | 654 | if (avctx->flags & CODEC_FLAG_BITEXACT) { |
| 655 | 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 | 657 | c->apply_window_int16 = ff_apply_window_int16_round_sse2; |
| 658 | 658 | } |
| 659 | 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 | 663 | static av_cold void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx, |
| 664 | − int mm_flags) | |
| 664 | + int cpu_flags) | |
| 665 | 665 | { |
| 666 | 666 | #if HAVE_SSSE3_EXTERNAL |
| 667 | 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 | 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 | 672 | c->apply_window_int16 = ff_apply_window_int16_ssse3_atom; |
| 673 | 673 | else |
| 674 | 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 | 676 | c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; |
| 677 | 677 | c->bswap_buf = ff_bswap32_buf_ssse3; |
| 678 | 678 | #endif /* HAVE_SSSE3_EXTERNAL */ |
| 679 | 679 | } |
| 680 | 680 | |
| 681 | 681 | static av_cold void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx, |
| 682 | − int mm_flags) | |
| 682 | + int cpu_flags) | |
| 683 | 683 | { |
| 684 | 684 | #if HAVE_SSE4_EXTERNAL |
| 685 | 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 | 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 | 693 | #if HAVE_7REGS && HAVE_INLINE_ASM |
| 694 | − if (mm_flags & AV_CPU_FLAG_CMOV) | |
| 694 | + if (cpu_flags & AV_CPU_FLAG_CMOV) | |
| 695 | 695 | c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_cmov; |
| 696 | 696 | #endif |
| 697 | 697 | |
| 698 | − if (mm_flags & AV_CPU_FLAG_MMX) | |
| 699 | − dsputil_init_mmx(c, avctx, mm_flags); | |
| 698 | + if (cpu_flags & AV_CPU_FLAG_MMX) | |
| 699 | + dsputil_init_mmx(c, avctx, cpu_flags); | |
| 700 | 700 | |
| 701 | − if (mm_flags & AV_CPU_FLAG_MMXEXT) | |
| 702 | − dsputil_init_mmxext(c, avctx, mm_flags); | |
| 701 | + if (cpu_flags & AV_CPU_FLAG_MMXEXT) | |
| 702 | + dsputil_init_mmxext(c, avctx, cpu_flags); | |
| 703 | 703 | |
| 704 | − if (mm_flags & AV_CPU_FLAG_SSE) | |
| 705 | − dsputil_init_sse(c, avctx, mm_flags); | |
| 704 | + if (cpu_flags & AV_CPU_FLAG_SSE) | |
| 705 | + dsputil_init_sse(c, avctx, cpu_flags); | |
| 706 | 706 | |
| 707 | − if (mm_flags & AV_CPU_FLAG_SSE2) | |
| 708 | − dsputil_init_sse2(c, avctx, mm_flags); | |
| 707 | + if (cpu_flags & AV_CPU_FLAG_SSE2) | |
| 708 | + dsputil_init_sse2(c, avctx, cpu_flags); | |
| 709 | 709 | |
| 710 | − if (mm_flags & AV_CPU_FLAG_SSSE3) | |
| 711 | − dsputil_init_ssse3(c, avctx, mm_flags); | |
| 710 | + if (cpu_flags & AV_CPU_FLAG_SSSE3) | |
| 711 | + dsputil_init_ssse3(c, avctx, cpu_flags); | |
| 712 | 712 | |
| 713 | − if (mm_flags & AV_CPU_FLAG_SSE4) | |
| 714 | − dsputil_init_sse4(c, avctx, mm_flags); | |
| 713 | + if (cpu_flags & AV_CPU_FLAG_SSE4) | |
| 714 | + dsputil_init_sse4(c, avctx, cpu_flags); | |
| 715 | 715 | |
| 716 | 716 | if (CONFIG_ENCODERS) |
| 717 | 717 | ff_dsputilenc_init_mmx(c, avctx); |
| @@ -945,12 +945,12 @@ hadamard_func(ssse3) · 944 unmodified lines | ||
| 945 | 945 | |
| 946 | 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 | 950 | #if HAVE_YASM |
| 951 | 951 | int bit_depth = avctx->bits_per_raw_sample; |
| 952 | 952 | |
| 953 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 953 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 954 | 954 | if (bit_depth <= 8) |
| 955 | 955 | c->get_pixels = ff_get_pixels_mmx; |
| 956 | 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 | 959 | c->pix_norm1 = ff_pix_norm1_mmx; |
| 960 | 960 | } |
| 961 | − if (EXTERNAL_SSE2(mm_flags)) | |
| 961 | + if (EXTERNAL_SSE2(cpu_flags)) | |
| 962 | 962 | if (bit_depth <= 8) |
| 963 | 963 | c->get_pixels = ff_get_pixels_sse2; |
| 964 | 964 | #endif /* HAVE_YASM */ |
| 965 | 965 | |
| 966 | 966 | #if HAVE_INLINE_ASM |
| 967 | − if (mm_flags & AV_CPU_FLAG_MMX) { | |
| 967 | + if (cpu_flags & AV_CPU_FLAG_MMX) { | |
| 968 | 968 | const int dct_algo = avctx->dct_algo; |
| 969 | 969 | if (avctx->bits_per_raw_sample <= 8 && |
| 970 | 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 | 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 | 974 | c->fdct = ff_fdct_mmxext; |
| 975 | 975 | }else{ |
| 976 | 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 | 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 | 1002 | c->sum_abs_dctelem = sum_abs_dctelem_mmxext; |
| 1003 | 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 | 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 | 1013 | c->sum_abs_dctelem= sum_abs_dctelem_sse2; |
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | #if HAVE_SSSE3_INLINE |
| 1017 | − if(mm_flags & AV_CPU_FLAG_SSSE3){ | |
| 1017 | + if (cpu_flags & AV_CPU_FLAG_SSSE3) { | |
| 1018 | 1018 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 1019 | 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 | 1024 | #endif |
| 1025 | 1025 | |
| 1026 | − if(mm_flags & AV_CPU_FLAG_3DNOW){ | |
| 1026 | + if (cpu_flags & AV_CPU_FLAG_3DNOW) { | |
| 1027 | 1027 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 1028 | 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 | 1033 | #endif /* HAVE_INLINE_ASM */ |
| 1034 | 1034 | |
| 1035 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 1035 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 1036 | 1036 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmx; |
| 1037 | 1037 | c->hadamard8_diff[1] = ff_hadamard8_diff_mmx; |
| 1038 | 1038 | |
| 1039 | − if (EXTERNAL_MMXEXT(mm_flags)) { | |
| 1039 | + if (EXTERNAL_MMXEXT(cpu_flags)) { | |
| 1040 | 1040 | c->hadamard8_diff[0] = ff_hadamard8_diff16_mmxext; |
| 1041 | 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 | 1045 | c->sse[0] = ff_sse16_sse2; |
| 1046 | 1046 | |
| 1047 | 1047 | #if HAVE_ALIGNED_STACK |
| @@ -1050,7 +1050,7 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) · 2 unmodified lines | ||
| 1050 | 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 | 1054 | c->hadamard8_diff[0] = ff_hadamard8_diff16_ssse3; |
| 1055 | 1055 | c->hadamard8_diff[1] = ff_hadamard8_diff_ssse3; |
| 1056 | 1056 | } |
| @@ -23,22 +23,23 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 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 | 28 | #if ARCH_X86_32 |
| 28 | − if (EXTERNAL_AMD3DNOW(has_vectors)) { | |
| 29 | + if (EXTERNAL_AMD3DNOW(cpu_flags)) { | |
| 29 | 30 | /* 3DNow! for K6-2/3 */ |
| 30 | 31 | s->imdct_calc = ff_imdct_calc_3dnow; |
| 31 | 32 | s->imdct_half = ff_imdct_half_3dnow; |
| 32 | 33 | s->fft_calc = ff_fft_calc_3dnow; |
| 33 | 34 | } |
| 34 | − if (EXTERNAL_AMD3DNOWEXT(has_vectors)) { | |
| 35 | + if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { | |
| 35 | 36 | /* 3DNowEx for K7 */ |
| 36 | 37 | s->imdct_calc = ff_imdct_calc_3dnowext; |
| 37 | 38 | s->imdct_half = ff_imdct_half_3dnowext; |
| 38 | 39 | s->fft_calc = ff_fft_calc_3dnowext; |
| 39 | 40 | } |
| 40 | 41 | #endif |
| 41 | − if (EXTERNAL_SSE(has_vectors)) { | |
| 42 | + if (EXTERNAL_SSE(cpu_flags)) { | |
| 42 | 43 | /* SSE for P3/P4/K8 */ |
| 43 | 44 | s->imdct_calc = ff_imdct_calc_sse; |
| 44 | 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 | 47 | s->fft_calc = ff_fft_calc_sse; |
| 47 | 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 | 51 | /* AVX for SB */ |
| 51 | 52 | s->imdct_half = ff_imdct_half_avx; |
| 52 | 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 | 58 | #if CONFIG_DCT |
| 58 | 59 | av_cold void ff_dct_init_x86(DCTContext *s) |
| 59 | 60 | { |
| 60 | − int has_vectors = av_get_cpu_flags(); | |
| 61 | − if (EXTERNAL_SSE(has_vectors)) | |
| 61 | + int cpu_flags = av_get_cpu_flags(); | |
| 62 | + | |
| 63 | + if (EXTERNAL_SSE(cpu_flags)) | |
| 62 | 64 | s->dct32 = ff_dct32_float_sse; |
| 63 | − if (EXTERNAL_SSE2(has_vectors)) | |
| 65 | + if (EXTERNAL_SSE2(cpu_flags)) | |
| 64 | 66 | s->dct32 = ff_dct32_float_sse2; |
| 65 | − if (EXTERNAL_AVX(has_vectors)) | |
| 67 | + if (EXTERNAL_AVX(cpu_flags)) | |
| 66 | 68 | s->dct32 = ff_dct32_float_avx; |
| 67 | 69 | } |
| 68 | 70 | #endif |
| @@ -116,29 +116,29 @@ static void float_interleave_sse(float *dst, const float **src, · 115 unmodified lines | ||
| 116 | 116 | av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx) |
| 117 | 117 | { |
| 118 | 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 | 122 | c->float_interleave = float_interleave_mmx; |
| 123 | 123 | |
| 124 | − if (EXTERNAL_AMD3DNOW(mm_flags)) { | |
| 124 | + if (EXTERNAL_AMD3DNOW(cpu_flags)) { | |
| 125 | 125 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 126 | 126 | c->float_to_int16 = ff_float_to_int16_3dnow; |
| 127 | 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 | 131 | if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
| 132 | 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 | 136 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; |
| 137 | 137 | c->float_to_int16 = ff_float_to_int16_sse; |
| 138 | 138 | c->float_to_int16_interleave = float_to_int16_interleave_sse; |
| 139 | 139 | c->float_interleave = float_interleave_sse; |
| 140 | 140 | } |
| 141 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 141 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 142 | 142 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; |
| 143 | 143 | c->float_to_int16 = ff_float_to_int16_sse2; |
| 144 | 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 | 185 | const int bit_depth, |
| 186 | 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 | 190 | if (bit_depth == 8) { |
| 191 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 191 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 192 | 192 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx; |
| 193 | 193 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx; |
| 194 | 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 | 203 | if (chroma_format_idc == 1) |
| 204 | 204 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx; |
| 205 | 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 | 207 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx; |
| 208 | 208 | } else if (codec_id == AV_CODEC_ID_RV40) { |
| 209 | 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 | 217 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext; |
| 218 | 218 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext; |
| 219 | 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 | 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 | 273 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_sse2; |
| 274 | 274 | h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_sse2; |
| 275 | 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 | 296 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3; |
| 297 | 297 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3; |
| 298 | 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 | 325 | } else if (bit_depth == 10) { |
| 326 | − if (EXTERNAL_MMXEXT(mm_flags)) { | |
| 326 | + if (EXTERNAL_MMXEXT(cpu_flags)) { | |
| 327 | 327 | h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; |
| 328 | 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 | 339 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext; |
| 340 | 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 | 343 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2; |
| 344 | 344 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2; |
| 345 | 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 | 371 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2; |
| 372 | 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 | 375 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3; |
| 376 | 376 | h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3; |
| 377 | 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 | 382 | h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3; |
| 383 | 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 | 386 | h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx; |
| 387 | 387 | h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx; |
| 388 | 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 | 543 | #if HAVE_YASM |
| 544 | 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 | 548 | if (!high_bit_depth) { |
| 549 | 549 | SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); |
| 550 | 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)) { | |
| 568 | − if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW) && !high_bit_depth) { | |
| 567 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 568 | + if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW) && !high_bit_depth) { | |
| 569 | 569 | // these functions are slower than mmx on AMD, but faster on Intel |
| 570 | 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 | 600 | if (!high_bit_depth) { |
| 601 | 601 | H264_QPEL_FUNCS(1, 0, ssse3); |
| 602 | 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 | 623 | /* AVX implies 64 byte cache lines without the need to avoid unaligned |
| 624 | 624 | * memory accesses that cross the boundary between two cache lines. |
| 625 | 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 | 72 | #if HAVE_YASM |
| 73 | 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 | 77 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_mmx; |
| 78 | 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 | 82 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_3dnow; |
| 83 | 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 | 87 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmxext; |
| 88 | 88 | c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmxext; |
| 89 | 89 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmxext; |
| 90 | 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 | 94 | c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext; |
| 95 | 95 | c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext; |
| 96 | 96 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext; |
| 97 | 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 | 101 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2; |
| 102 | 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 | 106 | c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_ssse3; |
| 107 | 107 | c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_ssse3; |
| 108 | 108 | c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_ssse3; |
| 109 | 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 | 113 | // AVX implies !cache64. |
| 114 | 114 | // TODO: Port cache(32|64) detection from x264. |
| 115 | 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 | 211 | av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, |
| 212 | 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 | 217 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; |
| 218 | 218 | |
| 219 | 219 | if (bit_depth == 8) { |
| 220 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 220 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 221 | 221 | c->h264_idct_dc_add = |
| 222 | 222 | c->h264_idct_add = ff_h264_idct_add_8_mmx; |
| 223 | 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 | 228 | if (chroma_format_idc == 1) |
| 229 | 229 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; |
| 230 | 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 | 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 | 235 | c->h264_idct_dc_add = ff_h264_idct_dc_add_8_mmxext; |
| 236 | 236 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; |
| 237 | 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 | 260 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_mmxext; |
| 261 | 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 | 264 | c->h264_idct8_add = ff_h264_idct8_add_8_sse2; |
| 265 | 265 | |
| 266 | 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 | 281 | c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2; |
| 282 | 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 | 285 | c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3; |
| 286 | 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 | 289 | c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx; |
| 290 | 290 | c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx; |
| 291 | 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 | 296 | } else if (bit_depth == 10) { |
| 297 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 298 | − if (EXTERNAL_MMXEXT(mm_flags)) { | |
| 297 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 298 | + if (EXTERNAL_MMXEXT(cpu_flags)) { | |
| 299 | 299 | #if ARCH_X86_32 |
| 300 | 300 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_mmxext; |
| 301 | 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 | 305 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_mmxext; |
| 306 | 306 | #endif /* ARCH_X86_32 */ |
| 307 | 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 | 309 | c->h264_idct_add = ff_h264_idct_add_10_sse2; |
| 310 | 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 | 335 | c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; |
| 336 | 336 | #endif /* HAVE_ALIGNED_STACK */ |
| 337 | 337 | } |
| 338 | − if (EXTERNAL_SSE4(mm_flags)) { | |
| 338 | + if (EXTERNAL_SSE4(cpu_flags)) { | |
| 339 | 339 | c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4; |
| 340 | 340 | c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4; |
| 341 | 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 | 344 | c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4; |
| 345 | 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 | 348 | c->h264_idct_dc_add = |
| 349 | 349 | c->h264_idct_add = ff_h264_idct_add_10_avx; |
| 350 | 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 | 157 | c->PFX ## _pixels_tab IDX [3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU; \ |
| 158 | 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 | 162 | #if HAVE_MMX_INLINE |
| 163 | 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 | 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 | 175 | #if HAVE_MMXEXT_EXTERNAL |
| 176 | 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 | 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 | 209 | #if HAVE_AMD3DNOW_EXTERNAL |
| 210 | 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 | 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 | 243 | #if HAVE_SSE2_EXTERNAL |
| 244 | − if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | |
| 244 | + if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { | |
| 245 | 245 | // these functions are slower than mmx on AMD, but faster on Intel |
| 246 | 246 | c->put_pixels_tab[0][0] = ff_put_pixels16_sse2; |
| 247 | 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 | 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) | |
| 258 | − hpeldsp_init_mmx(c, flags, mm_flags); | |
| 257 | + if (cpu_flags & AV_CPU_FLAG_MMX) | |
| 258 | + hpeldsp_init_mmx(c, flags, cpu_flags); | |
| 259 | 259 | |
| 260 | − if (mm_flags & AV_CPU_FLAG_MMXEXT) | |
| 261 | − hpeldsp_init_mmxext(c, flags, mm_flags); | |
| 260 | + if (cpu_flags & AV_CPU_FLAG_MMXEXT) | |
| 261 | + hpeldsp_init_mmxext(c, flags, cpu_flags); | |
| 262 | 262 | |
| 263 | − if (mm_flags & AV_CPU_FLAG_3DNOW) | |
| 264 | − hpeldsp_init_3dnow(c, flags, mm_flags); | |
| 263 | + if (cpu_flags & AV_CPU_FLAG_3DNOW) | |
| 264 | + hpeldsp_init_3dnow(c, flags, cpu_flags); | |
| 265 | 265 | |
| 266 | − if (mm_flags & AV_CPU_FLAG_SSE2) | |
| 267 | − hpeldsp_init_sse2(c, flags, mm_flags); | |
| 266 | + if (cpu_flags & AV_CPU_FLAG_SSE2) | |
| 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 | 149 | av_cold void ff_lpc_init_x86(LPCContext *c) |
| 150 | 150 | { |
| 151 | 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 | 155 | c->lpc_apply_welch_window = lpc_apply_welch_window_sse2; |
| 156 | 156 | c->lpc_compute_autocorr = lpc_compute_autocorr_sse2; |
| 157 | 157 | } |
| @@ -435,9 +435,9 @@ PIX_SAD(mmxext) · 434 unmodified lines | ||
| 435 | 435 | av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) |
| 436 | 436 | { |
| 437 | 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 | 441 | c->pix_abs[0][0] = sad16_mmx; |
| 442 | 442 | c->pix_abs[0][1] = sad16_x2_mmx; |
| 443 | 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 | 450 | c->sad[0]= sad16_mmx; |
| 451 | 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 | 454 | c->pix_abs[0][0] = sad16_mmxext; |
| 455 | 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 | 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 | 470 | c->sad[0]= sad16_sse2; |
| 471 | 471 | } |
| 472 | 472 | #endif /* HAVE_INLINE_ASM */ |
| @@ -226,7 +226,7 @@ DECL_IMDCT_BLOCKS(avx,avx) · 225 unmodified lines | ||
| 226 | 226 | |
| 227 | 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 | 231 | int i, j; |
| 232 | 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 | 245 | #if HAVE_SSE2_INLINE |
| 246 | − if (mm_flags & AV_CPU_FLAG_SSE2) { | |
| 246 | + if (cpu_flags & AV_CPU_FLAG_SSE2) { | |
| 247 | 247 | s->apply_window_float = apply_window_mp3; |
| 248 | 248 | } |
| 249 | 249 | #endif /* HAVE_SSE2_INLINE */ |
| 250 | 250 | |
| 251 | 251 | #if HAVE_YASM |
| 252 | − if (EXTERNAL_AVX(mm_flags)) { | |
| 252 | + if (EXTERNAL_AVX(cpu_flags)) { | |
| 253 | 253 | s->imdct36_blocks_float = imdct36_blocks_avx; |
| 254 | − } else if (EXTERNAL_SSSE3(mm_flags)) { | |
| 254 | + } else if (EXTERNAL_SSSE3(cpu_flags)) { | |
| 255 | 255 | s->imdct36_blocks_float = imdct36_blocks_ssse3; |
| 256 | − } else if (EXTERNAL_SSE3(mm_flags)) { | |
| 256 | + } else if (EXTERNAL_SSE3(cpu_flags)) { | |
| 257 | 257 | s->imdct36_blocks_float = imdct36_blocks_sse3; |
| 258 | − } else if (EXTERNAL_SSE2(mm_flags)) { | |
| 258 | + } else if (EXTERNAL_SSE2(cpu_flags)) { | |
| 259 | 259 | s->imdct36_blocks_float = imdct36_blocks_sse2; |
| 260 | − } else if (EXTERNAL_SSE(mm_flags)) { | |
| 260 | + } else if (EXTERNAL_SSE(cpu_flags)) { | |
| 261 | 261 | s->imdct36_blocks_float = imdct36_blocks_sse; |
| 262 | 262 | } |
| 263 | 263 | #endif /* HAVE_YASM */ |
| @@ -557,9 +557,9 @@ static void denoise_dct_sse2(MpegEncContext *s, int16_t *block){ · 556 unmodified lines | ||
| 557 | 557 | av_cold void ff_MPV_common_init_x86(MpegEncContext *s) |
| 558 | 558 | { |
| 559 | 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 | 563 | s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_mmx; |
| 564 | 564 | s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_mmx; |
| 565 | 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 | 568 | s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_mmx; |
| 569 | 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 | 572 | s->denoise_dct= denoise_dct_sse2; |
| 573 | 573 | } else { |
| 574 | 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 | 88 | if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) { |
| 89 | 89 | #if HAVE_MMX_INLINE |
| 90 | − int mm_flags = av_get_cpu_flags(); | |
| 91 | − if (INLINE_MMX(mm_flags)) | |
| 90 | + int cpu_flags = av_get_cpu_flags(); | |
| 91 | + if (INLINE_MMX(cpu_flags)) | |
| 92 | 92 | s->dct_quantize = dct_quantize_MMX; |
| 93 | 93 | #endif |
| 94 | 94 | #if HAVE_MMXEXT_INLINE |
| 95 | − if (INLINE_MMXEXT(mm_flags)) | |
| 95 | + if (INLINE_MMXEXT(cpu_flags)) | |
| 96 | 96 | s->dct_quantize = dct_quantize_MMXEXT; |
| 97 | 97 | #endif |
| 98 | 98 | #if HAVE_SSE2_INLINE |
| 99 | − if (INLINE_SSE2(mm_flags)) | |
| 99 | + if (INLINE_SSE2(cpu_flags)) | |
| 100 | 100 | s->dct_quantize = dct_quantize_SSE2; |
| 101 | 101 | #endif |
| 102 | 102 | #if HAVE_SSSE3_INLINE |
| 103 | − if (INLINE_SSSE3(mm_flags)) | |
| 103 | + if (INLINE_SSSE3(cpu_flags)) | |
| 104 | 104 | s->dct_quantize = dct_quantize_SSSE3; |
| 105 | 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 | 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 | 40 | #if ARCH_X86_32 |
| 41 | − if (EXTERNAL_MMX(flags)) | |
| 41 | + if (EXTERNAL_MMX(cpu_flags)) | |
| 42 | 42 | dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; |
| 43 | 43 | #endif |
| 44 | − if (EXTERNAL_MMXEXT(flags)) | |
| 44 | + if (EXTERNAL_MMXEXT(cpu_flags)) | |
| 45 | 45 | dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmxext; |
| 46 | − if (EXTERNAL_SSE2(flags)) | |
| 46 | + if (EXTERNAL_SSE2(cpu_flags)) | |
| 47 | 47 | dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; |
| 48 | − if (EXTERNAL_SSSE3(flags)) | |
| 48 | + if (EXTERNAL_SSSE3(cpu_flags)) | |
| 49 | 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 | 35 | av_cold void ff_proresdsp_x86_init(ProresDSPContext *dsp) |
| 36 | 36 | { |
| 37 | 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 | 41 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 42 | 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 | 46 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 47 | 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 | 51 | dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
| 52 | 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 | 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 | 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 | 40 | c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmxext; |
| 41 | 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 | 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 | 214 | av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) |
| 215 | 215 | { |
| 216 | 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 | 220 | c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; |
| 221 | 221 | c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; |
| 222 | 222 | #if HAVE_MMX_INLINE |
| @@ -229,7 +229,7 @@ av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c) · 6 unmodified lines | ||
| 229 | 229 | QPEL_MC_SET(put_, _mmx) |
| 230 | 230 | #endif |
| 231 | 231 | } |
| 232 | − if (EXTERNAL_MMXEXT(mm_flags)) { | |
| 232 | + if (EXTERNAL_MMXEXT(cpu_flags)) { | |
| 233 | 233 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmxext; |
| 234 | 234 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmxext; |
| 235 | 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 | 239 | #if ARCH_X86_32 |
| 240 | 240 | QPEL_MC_SET(avg_, _mmxext) |
| 241 | 241 | #endif |
| 242 | − } else if (EXTERNAL_AMD3DNOW(mm_flags)) { | |
| 242 | + } else if (EXTERNAL_AMD3DNOW(cpu_flags)) { | |
| 243 | 243 | c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow; |
| 244 | 244 | c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow; |
| 245 | 245 | #if ARCH_X86_32 |
| 246 | 246 | QPEL_MC_SET(avg_, _3dnow) |
| 247 | 247 | #endif |
| 248 | 248 | } |
| 249 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 249 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 250 | 250 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2; |
| 251 | 251 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2; |
| 252 | 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 | 254 | QPEL_MC_SET(put_, _sse2) |
| 255 | 255 | QPEL_MC_SET(avg_, _sse2) |
| 256 | 256 | } |
| 257 | − if (EXTERNAL_SSSE3(mm_flags)) { | |
| 257 | + if (EXTERNAL_SSSE3(cpu_flags)) { | |
| 258 | 258 | c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3; |
| 259 | 259 | c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3; |
| 260 | 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 | 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 | 45 | s->neg_odd_64 = ff_sbr_neg_odd_64_sse; |
| 46 | 46 | s->sum_square = ff_sbr_sum_square_sse; |
| 47 | 47 | s->sum64x5 = ff_sbr_sum64x5_sse; |
| @@ -50,7 +50,7 @@ av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s) · 2 unmodified lines | ||
| 50 | 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 | 54 | s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_sse2; |
| 55 | 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 | 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 | 89 | ff_vc1dsp_init_mmx(dsp); |
| 90 | 90 | |
| 91 | − if (INLINE_MMXEXT(mm_flags)) | |
| 91 | + if (INLINE_MMXEXT(cpu_flags)) | |
| 92 | 92 | ff_vc1dsp_init_mmxext(dsp); |
| 93 | 93 | |
| 94 | 94 | #define ASSIGN_LF(EXT) \ |
| @@ -100,31 +100,31 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) · 5 unmodified lines | ||
| 100 | 100 | dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT |
| 101 | 101 | |
| 102 | 102 | #if HAVE_YASM |
| 103 | − if (mm_flags & AV_CPU_FLAG_MMX) { | |
| 103 | + if (cpu_flags & AV_CPU_FLAG_MMX) { | |
| 104 | 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 | 108 | ASSIGN_LF(mmxext); |
| 109 | 109 | dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmxext; |
| 110 | 110 | |
| 111 | 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 | 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 | 117 | dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2; |
| 118 | 118 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2; |
| 119 | 119 | dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2; |
| 120 | 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 | 123 | ASSIGN_LF(ssse3); |
| 124 | 124 | dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_ssse3; |
| 125 | 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 | 128 | dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4; |
| 129 | 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 | 100 | av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc) |
| 101 | 101 | { |
| 102 | 102 | #if HAVE_YASM |
| 103 | − int mm_flags = av_get_cpu_flags(); | |
| 103 | + int cpu_flags = av_get_cpu_flags(); | |
| 104 | 104 | |
| 105 | 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 | 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 | 110 | ctx->prefetch = ff_prefetch_3dnow; |
| 111 | 111 | } |
| 112 | 112 | #endif /* ARCH_X86_32 */ |
| 113 | − if (mm_flags & AV_CPU_FLAG_MMXEXT) { | |
| 113 | + if (cpu_flags & AV_CPU_FLAG_MMXEXT) { | |
| 114 | 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 | 117 | ctx->emulated_edge_mc = emulated_edge_mc_sse; |
| 118 | 118 | } |
| 119 | 119 | #endif /* HAVE_YASM */ |
| @@ -31,13 +31,13 @@ void ff_vorbis_inverse_coupling_sse(float *mag, float *ang, · 30 unmodified lines | ||
| 31 | 31 | av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp) |
| 32 | 32 | { |
| 33 | 33 | #if HAVE_YASM |
| 34 | − int mm_flags = av_get_cpu_flags(); | |
| 34 | + int cpu_flags = av_get_cpu_flags(); | |
| 35 | 35 | |
| 36 | 36 | #if ARCH_X86_32 |
| 37 | − if (mm_flags & AV_CPU_FLAG_3DNOW) | |
| 37 | + if (cpu_flags & AV_CPU_FLAG_3DNOW) | |
| 38 | 38 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_3dnow; |
| 39 | 39 | #endif /* ARCH_X86_32 */ |
| 40 | − if (mm_flags & AV_CPU_FLAG_SSE) | |
| 40 | + if (cpu_flags & AV_CPU_FLAG_SSE) | |
| 41 | 41 | dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_sse; |
| 42 | 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 | 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 | 47 | #if ARCH_X86_32 |
| 48 | − if (EXTERNAL_MMX(cpuflags)) { | |
| 48 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 49 | 49 | c->idct_put = ff_vp3_idct_put_mmx; |
| 50 | 50 | c->idct_add = ff_vp3_idct_add_mmx; |
| 51 | 51 | } |
| 52 | 52 | #endif |
| 53 | 53 | |
| 54 | − if (EXTERNAL_MMXEXT(cpuflags)) { | |
| 54 | + if (EXTERNAL_MMXEXT(cpu_flags)) { | |
| 55 | 55 | c->idct_dc_add = ff_vp3_idct_dc_add_mmxext; |
| 56 | 56 | |
| 57 | 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 | 64 | c->idct_put = ff_vp3_idct_put_sse2; |
| 65 | 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 | 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 | 37 | if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) { |
| 38 | 38 | #if ARCH_X86_32 |
| 39 | − if (EXTERNAL_MMX(mm_flags)) { | |
| 39 | + if (EXTERNAL_MMX(cpu_flags)) { | |
| 40 | 40 | c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; |
| 41 | 41 | } |
| 42 | 42 | #endif |
| 43 | 43 | |
| 44 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 44 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 45 | 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 | 316 | av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 317 | 317 | { |
| 318 | 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 | 322 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
| 323 | 323 | c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; |
| 324 | 324 | #if ARCH_X86_32 |
| @@ -349,7 +349,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 24 unmodified lines | ||
| 349 | 349 | |
| 350 | 350 | /* note that 4-tap width=16 functions are missing because w=16 |
| 351 | 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 | 353 | VP8_MC_FUNC(2, 4, mmxext); |
| 354 | 354 | VP8_BILINEAR_MC_FUNC(2, 4, mmxext); |
| 355 | 355 | #if ARCH_X86_32 |
| @@ -373,14 +373,14 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 17 unmodified lines | ||
| 373 | 373 | #endif |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | − if (mm_flags & AV_CPU_FLAG_SSE) { | |
| 376 | + if (cpu_flags & AV_CPU_FLAG_SSE) { | |
| 377 | 377 | c->vp8_idct_add = ff_vp8_idct_add_sse; |
| 378 | 378 | c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; |
| 379 | 379 | c->put_vp8_epel_pixels_tab[0][0][0] = |
| 380 | 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 | 384 | VP8_LUMA_MC_FUNC(0, 16, sse2); |
| 385 | 385 | VP8_MC_FUNC(1, 8, sse2); |
| 386 | 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 | 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 | 399 | c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; |
| 400 | 400 | |
| 401 | 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 | 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 | 411 | VP8_LUMA_MC_FUNC(0, 16, ssse3); |
| 412 | 412 | VP8_MC_FUNC(1, 8, ssse3); |
| 413 | 413 | VP8_MC_FUNC(2, 4, ssse3); |
| @@ -429,7 +429,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) · 15 unmodified lines | ||
| 429 | 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 | 433 | c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; |
| 434 | 434 | |
| 435 | 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 | 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 | 39 | enum AVSampleFormat sample_fmt = av_get_packed_sample_fmt(vol->sample_fmt); |
| 40 | 40 | |
| 41 | 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 | 43 | vol->scale_samples = ff_scale_samples_s16_sse2; |
| 44 | 44 | vol->samples_align = 8; |
| 45 | 45 | } |
| 46 | 46 | } else if (sample_fmt == AV_SAMPLE_FMT_S32) { |
| 47 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 47 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 48 | 48 | vol->scale_samples = ff_scale_samples_s32_sse2; |
| 49 | 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 | 52 | vol->scale_samples = ff_scale_samples_s32_ssse3_atom; |
| 53 | 53 | vol->samples_align = 4; |
| 54 | 54 | } |
| 55 | − if (EXTERNAL_AVX(mm_flags)) { | |
| 55 | + if (EXTERNAL_AVX(cpu_flags)) { | |
| 56 | 56 | vol->scale_samples = ff_scale_samples_s32_avx; |
| 57 | 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 | 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 | 151 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, |
| 152 | 152 | 0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx); |
| 153 | 153 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, |
| 154 | 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 | 157 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, |
| 158 | 158 | 6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse); |
| 159 | 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 | 161 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, |
| 162 | 162 | 2, 16, 4, "SSE", ff_conv_flt_to_fltp_2ch_sse); |
| 163 | 163 | } |
| 164 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 165 | − if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { | |
| 164 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 165 | + if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { | |
| 166 | 166 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, |
| 167 | 167 | 0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2); |
| 168 | 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 | 206 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, |
| 207 | 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 | 210 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, |
| 211 | 211 | 6, 16, 4, "SSSE3", ff_conv_s16p_to_flt_6ch_ssse3); |
| 212 | 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 | 220 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, |
| 221 | 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 | 224 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, |
| 225 | 225 | 0, 16, 8, "SSE4", ff_conv_s16_to_flt_sse4); |
| 226 | 226 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, |
| 227 | 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 | 230 | ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32, |
| 231 | 231 | 0, 32, 16, "AVX", ff_conv_s32_to_flt_avx); |
| 232 | 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 | 106 | DEFINE_MIX_3_8_TO_1_2(8) |
| 107 | 107 | |
| 108 | 108 | #define SET_MIX_3_8_TO_1_2(chan) \ |
| 109 | − if (EXTERNAL_SSE(mm_flags)) { \ | |
| 109 | + if (EXTERNAL_SSE(cpu_flags)) { \ | |
| 110 | 110 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ |
| 111 | 111 | chan, 1, 16, 4, "SSE", \ |
| 112 | 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 | 114 | chan, 2, 16, 4, "SSE", \ |
| 115 | 115 | ff_mix_## chan ##_to_2_fltp_flt_sse); \ |
| 116 | 116 | } \ |
| 117 | − if (EXTERNAL_SSE2(mm_flags)) { \ | |
| 117 | + if (EXTERNAL_SSE2(cpu_flags)) { \ | |
| 118 | 118 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ |
| 119 | 119 | chan, 1, 16, 8, "SSE2", \ |
| 120 | 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 | 122 | chan, 2, 16, 8, "SSE2", \ |
| 123 | 123 | ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \ |
| 124 | 124 | } \ |
| 125 | − if (EXTERNAL_SSE4(mm_flags)) { \ | |
| 125 | + if (EXTERNAL_SSE4(cpu_flags)) { \ | |
| 126 | 126 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ |
| 127 | 127 | chan, 1, 16, 8, "SSE4", \ |
| 128 | 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 | 130 | chan, 2, 16, 8, "SSE4", \ |
| 131 | 131 | ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \ |
| 132 | 132 | } \ |
| 133 | − if (EXTERNAL_AVX(mm_flags)) { \ | |
| 133 | + if (EXTERNAL_AVX(cpu_flags)) { \ | |
| 134 | 134 | int ptr_align = 32; \ |
| 135 | 135 | int smp_align = 8; \ |
| 136 | 136 | if (ARCH_X86_32 || chan >= 6) { \ |
| @@ -150,7 +150,7 @@ DEFINE_MIX_3_8_TO_1_2(8) · 13 unmodified lines | ||
| 150 | 150 | chan, 2, 16, 8, "AVX", \ |
| 151 | 151 | ff_mix_ ## chan ## _to_2_s16p_flt_avx); \ |
| 152 | 152 | } \ |
| 153 | − if (EXTERNAL_FMA4(mm_flags)) { \ | |
| 153 | + if (EXTERNAL_FMA4(cpu_flags)) { \ | |
| 154 | 154 | int ptr_align = 32; \ |
| 155 | 155 | int smp_align = 8; \ |
| 156 | 156 | if (ARCH_X86_32 || chan >= 6) { \ |
| @@ -174,15 +174,15 @@ DEFINE_MIX_3_8_TO_1_2(8) · 17 unmodified lines | ||
| 174 | 174 | av_cold void ff_audio_mix_init_x86(AudioMix *am) |
| 175 | 175 | { |
| 176 | 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 | 180 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 181 | 181 | 2, 1, 16, 8, "SSE", ff_mix_2_to_1_fltp_flt_sse); |
| 182 | 182 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 183 | 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 | 186 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 187 | 187 | 2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_flt_sse2); |
| 188 | 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 | 190 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 191 | 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 | 194 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 195 | 195 | 2, 1, 16, 8, "SSE4", ff_mix_2_to_1_s16p_flt_sse4); |
| 196 | 196 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, |
| 197 | 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 | 200 | ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, |
| 201 | 201 | 2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx); |
| 202 | 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 | 34 | av_cold void ff_dither_init_x86(DitherDSPContext *ddsp, |
| 35 | 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 | 40 | ddsp->quantize = ff_quantize_sse2; |
| 41 | 41 | ddsp->ptr_align = 16; |
| 42 | 42 | ddsp->samples_align = 8; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | if (method == AV_RESAMPLE_DITHER_RECTANGULAR) { |
| 46 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 46 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 47 | 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 | 50 | ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx; |
| 51 | 51 | } |
| 52 | 52 | } else { |
| 53 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 53 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 54 | 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 | 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 | 27 | av_cold void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int bit_exact) |
| 28 | 28 | { |
| 29 | 29 | #if HAVE_ALTIVEC |
| 30 | − int mm_flags = av_get_cpu_flags(); | |
| 31 | − | |
| 32 | − if (!(mm_flags & AV_CPU_FLAG_ALTIVEC)) | |
| 30 | + if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) | |
| 33 | 31 | return; |
| 34 | 32 | |
| 35 | 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 | 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 | 129 | #if HAVE_6REGS && HAVE_INLINE_ASM |
| 130 | − if (INLINE_AMD3DNOWEXT(mm_flags)) { | |
| 130 | + if (INLINE_AMD3DNOWEXT(cpu_flags)) { | |
| 131 | 131 | fdsp->vector_fmul_window = vector_fmul_window_3dnowext; |
| 132 | 132 | } |
| 133 | − if (INLINE_SSE(mm_flags)) { | |
| 133 | + if (INLINE_SSE(cpu_flags)) { | |
| 134 | 134 | fdsp->vector_fmul_window = vector_fmul_window_sse; |
| 135 | 135 | } |
| 136 | 136 | #endif |
| 137 | − if (EXTERNAL_SSE(mm_flags)) { | |
| 137 | + if (EXTERNAL_SSE(cpu_flags)) { | |
| 138 | 138 | fdsp->vector_fmul = ff_vector_fmul_sse; |
| 139 | 139 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; |
| 140 | 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 | 143 | fdsp->scalarproduct_float = ff_scalarproduct_float_sse; |
| 144 | 144 | fdsp->butterflies_float = ff_butterflies_float_sse; |
| 145 | 145 | } |
| 146 | − if (EXTERNAL_SSE2(mm_flags)) { | |
| 146 | + if (EXTERNAL_SSE2(cpu_flags)) { | |
| 147 | 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 | 150 | fdsp->vector_fmul = ff_vector_fmul_avx; |
| 151 | 151 | fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx; |
| 152 | 152 | fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_avx; |