aboutsummaryrefslogtreecommitdiff
path: root/libavresample
diff options
context:
space:
mode:
authorDiego Biurrun2013-07-17 20:19:24 +0200
committerDiego Biurrun2013-07-18 00:31:35 +0200
commit3ac7fa81b2383ff2697e5d1a76ff79be205f011a (patch)
treed080e675151c826cad78a3a645a64bfd95732dbb /libavresample
parentb6293e2798afab60596a87010b6163fcb4ca3086 (diff)
Consistently use "cpu_flags" as variable/parameter name for CPU flags
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/x86/audio_convert_init.c16
-rw-r--r--libavresample/x86/audio_mix_init.c20
-rw-r--r--libavresample/x86/dither_init.c12
3 files changed, 24 insertions, 24 deletions
diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c
index 21104458d3..d85ca8405f 100644
--- a/libavresample/x86/audio_convert_init.c
+++ b/libavresample/x86/audio_convert_init.c
@@ -145,15 +145,15 @@ void ff_conv_flt_to_fltp_6ch_avx (float *const *dst, float *src, int len,
av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
{
- int mm_flags = av_get_cpu_flags();
+ int cpu_flags = av_get_cpu_flags();
- if (EXTERNAL_MMX(mm_flags)) {
+ if (EXTERNAL_MMX(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
6, 1, 4, "MMX", ff_conv_fltp_to_flt_6ch_mmx);
}
- if (EXTERNAL_SSE(mm_flags)) {
+ if (EXTERNAL_SSE(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP,
6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse);
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)
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT,
2, 16, 4, "SSE", ff_conv_flt_to_fltp_2ch_sse);
}
- if (EXTERNAL_SSE2(mm_flags)) {
- if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) {
+ if (EXTERNAL_SSE2(cpu_flags)) {
+ if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2);
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)
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT,
6, 16, 4, "SSE2", ff_conv_flt_to_fltp_6ch_sse2);
}
- if (EXTERNAL_SSSE3(mm_flags)) {
+ if (EXTERNAL_SSSE3(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P,
6, 16, 4, "SSSE3", ff_conv_s16p_to_flt_6ch_ssse3);
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)
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT,
6, 16, 4, "SSSE3", ff_conv_flt_to_s16p_6ch_ssse3);
}
- if (EXTERNAL_SSE4(mm_flags)) {
+ if (EXTERNAL_SSE4(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16,
0, 16, 8, "SSE4", ff_conv_s16_to_flt_sse4);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
6, 16, 4, "SSE4", ff_conv_fltp_to_flt_6ch_sse4);
}
- if (EXTERNAL_AVX(mm_flags)) {
+ if (EXTERNAL_AVX(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32,
0, 32, 16, "AVX", ff_conv_s32_to_flt_avx);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT,
diff --git a/libavresample/x86/audio_mix_init.c b/libavresample/x86/audio_mix_init.c
index 9b977f892d..932f6f2126 100644
--- a/libavresample/x86/audio_mix_init.c
+++ b/libavresample/x86/audio_mix_init.c
@@ -106,7 +106,7 @@ DEFINE_MIX_3_8_TO_1_2(7)
DEFINE_MIX_3_8_TO_1_2(8)
#define SET_MIX_3_8_TO_1_2(chan) \
- if (EXTERNAL_SSE(mm_flags)) { \
+ if (EXTERNAL_SSE(cpu_flags)) { \
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
chan, 1, 16, 4, "SSE", \
ff_mix_ ## chan ## _to_1_fltp_flt_sse); \
@@ -114,7 +114,7 @@ DEFINE_MIX_3_8_TO_1_2(8)
chan, 2, 16, 4, "SSE", \
ff_mix_## chan ##_to_2_fltp_flt_sse); \
} \
- if (EXTERNAL_SSE2(mm_flags)) { \
+ if (EXTERNAL_SSE2(cpu_flags)) { \
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
chan, 1, 16, 8, "SSE2", \
ff_mix_ ## chan ## _to_1_s16p_flt_sse2); \
@@ -122,7 +122,7 @@ DEFINE_MIX_3_8_TO_1_2(8)
chan, 2, 16, 8, "SSE2", \
ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \
} \
- if (EXTERNAL_SSE4(mm_flags)) { \
+ if (EXTERNAL_SSE4(cpu_flags)) { \
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
chan, 1, 16, 8, "SSE4", \
ff_mix_ ## chan ## _to_1_s16p_flt_sse4); \
@@ -130,7 +130,7 @@ DEFINE_MIX_3_8_TO_1_2(8)
chan, 2, 16, 8, "SSE4", \
ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \
} \
- if (EXTERNAL_AVX(mm_flags)) { \
+ if (EXTERNAL_AVX(cpu_flags)) { \
int ptr_align = 32; \
int smp_align = 8; \
if (ARCH_X86_32 || chan >= 6) { \
@@ -150,7 +150,7 @@ DEFINE_MIX_3_8_TO_1_2(8)
chan, 2, 16, 8, "AVX", \
ff_mix_ ## chan ## _to_2_s16p_flt_avx); \
} \
- if (EXTERNAL_FMA4(mm_flags)) { \
+ if (EXTERNAL_FMA4(cpu_flags)) { \
int ptr_align = 32; \
int smp_align = 8; \
if (ARCH_X86_32 || chan >= 6) { \
@@ -174,15 +174,15 @@ DEFINE_MIX_3_8_TO_1_2(8)
av_cold void ff_audio_mix_init_x86(AudioMix *am)
{
#if HAVE_YASM
- int mm_flags = av_get_cpu_flags();
+ int cpu_flags = av_get_cpu_flags();
- if (EXTERNAL_SSE(mm_flags)) {
+ if (EXTERNAL_SSE(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
2, 1, 16, 8, "SSE", ff_mix_2_to_1_fltp_flt_sse);
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
1, 2, 16, 4, "SSE", ff_mix_1_to_2_fltp_flt_sse);
}
- if (EXTERNAL_SSE2(mm_flags)) {
+ if (EXTERNAL_SSE2(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_flt_sse2);
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)
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
1, 2, 16, 8, "SSE2", ff_mix_1_to_2_s16p_flt_sse2);
}
- if (EXTERNAL_SSE4(mm_flags)) {
+ if (EXTERNAL_SSE4(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
2, 1, 16, 8, "SSE4", ff_mix_2_to_1_s16p_flt_sse4);
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
1, 2, 16, 8, "SSE4", ff_mix_1_to_2_s16p_flt_sse4);
}
- if (EXTERNAL_AVX(mm_flags)) {
+ if (EXTERNAL_AVX(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx);
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
diff --git a/libavresample/x86/dither_init.c b/libavresample/x86/dither_init.c
index cc7e4dc13b..8349d5efc8 100644
--- a/libavresample/x86/dither_init.c
+++ b/libavresample/x86/dither_init.c
@@ -34,26 +34,26 @@ void ff_dither_int_to_float_triangular_avx(float *dst, int *src0, int len);
av_cold void ff_dither_init_x86(DitherDSPContext *ddsp,
enum AVResampleDitherMethod method)
{
- int mm_flags = av_get_cpu_flags();
+ int cpu_flags = av_get_cpu_flags();
- if (EXTERNAL_SSE2(mm_flags)) {
+ if (EXTERNAL_SSE2(cpu_flags)) {
ddsp->quantize = ff_quantize_sse2;
ddsp->ptr_align = 16;
ddsp->samples_align = 8;
}
if (method == AV_RESAMPLE_DITHER_RECTANGULAR) {
- if (EXTERNAL_SSE2(mm_flags)) {
+ if (EXTERNAL_SSE2(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_sse2;
}
- if (EXTERNAL_AVX(mm_flags)) {
+ if (EXTERNAL_AVX(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx;
}
} else {
- if (EXTERNAL_SSE2(mm_flags)) {
+ if (EXTERNAL_SSE2(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_sse2;
}
- if (EXTERNAL_AVX(mm_flags)) {
+ if (EXTERNAL_AVX(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_avx;
}
}