aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/rv40dsp_init.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-09 13:27:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-09 13:27:42 +0200
commit77aedc77abbe21f2c28052544a0b2f227bca1c77 (patch)
tree78e2b3d349105d6f73cd5f811e5374bca4bbcb94 /libavcodec/x86/rv40dsp_init.c
parent4819d43d7f0e220b231699e0ac7b0dc906b3147c (diff)
parent75c37c5ace6271dc9dc996a61b799bcd2fc1b30d (diff)
downloadffmpeg-77aedc77abbe21f2c28052544a0b2f227bca1c77.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: swscale: Provide the right alignment for external mmx asm x86: Replace checks for CPU extensions and flags by convenience macros configure: msvc: fix/simplify setting of flags for hostcc x86: mlpdsp: mlp_filter_channel_x86 requires inline asm Conflicts: libavcodec/x86/fft_init.c libavcodec/x86/h264_intrapred_init.c libavcodec/x86/h264dsp_init.c libavcodec/x86/mpegaudiodec.c libavcodec/x86/proresdsp_init.c libavutil/x86/float_dsp_init.c libswscale/utils.c libswscale/x86/swscale.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/rv40dsp_init.c')
-rw-r--r--libavcodec/x86/rv40dsp_init.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index 50aaa24b43..966e3f22f5 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -28,6 +28,7 @@
#include "libavcodec/rv34dsp.h"
#include "libavutil/mem.h"
+#include "libavutil/x86/cpu.h"
#include "dsputil_mmx.h"
#if HAVE_YASM
@@ -191,7 +192,7 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();
- if (mm_flags & AV_CPU_FLAG_MMX) {
+ if (EXTERNAL_MMX(mm_flags)) {
c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
#if HAVE_INLINE_ASM
@@ -204,7 +205,7 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
QPEL_MC_SET(put_, _mmx)
#endif
}
- if (mm_flags & AV_CPU_FLAG_MMXEXT) {
+ if (EXTERNAL_MMXEXT(mm_flags)) {
c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;
c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmx2;
@@ -214,14 +215,14 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
#if ARCH_X86_32
QPEL_MC_SET(avg_, _mmx2)
#endif
- } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
+ } else if (EXTERNAL_AMD3DNOW(mm_flags)) {
c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;
#if ARCH_X86_32
QPEL_MC_SET(avg_, _3dnow)
#endif
}
- if (mm_flags & AV_CPU_FLAG_SSE2) {
+ if (EXTERNAL_SSE2(mm_flags)) {
c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;
c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;
c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;
@@ -229,7 +230,7 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
QPEL_MC_SET(put_, _sse2)
QPEL_MC_SET(avg_, _sse2)
}
- if (mm_flags & AV_CPU_FLAG_SSSE3) {
+ if (EXTERNAL_SSSE3(mm_flags)) {
c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;
c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;
c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;