aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-24 11:03:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-24 11:04:11 +0200
commitf9418d156fe641af50d05114a9787a3bdb579369 (patch)
tree85db1ae696dfaba1b5603d412a57ac19d6391b37
parentb99d3613cfdb5714a3c0e18b0db209280d879a10 (diff)
parent8506ff97c9ea4a1f52983497ecf8d4ef193403a9 (diff)
downloadffmpeg-f9418d156fe641af50d05114a9787a3bdb579369.tar.gz
Merge commit '8506ff97c9ea4a1f52983497ecf8d4ef193403a9'
* commit '8506ff97c9ea4a1f52983497ecf8d4ef193403a9': vp56: Mark VP6-only optimizations as such. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/arm/Makefile6
-rw-r--r--libavcodec/arm/vp6dsp_init_arm.c (renamed from libavcodec/arm/vp56dsp_init_arm.c)4
-rw-r--r--libavcodec/arm/vp6dsp_neon.S (renamed from libavcodec/arm/vp56dsp_neon.S)0
-rw-r--r--libavcodec/vp56dsp.c8
-rw-r--r--libavcodec/vp56dsp.h4
-rw-r--r--libavcodec/x86/Makefile5
-rw-r--r--libavcodec/x86/vp6dsp.asm (renamed from libavcodec/x86/vp56dsp.asm)0
-rw-r--r--libavcodec/x86/vp6dsp_init.c (renamed from libavcodec/x86/vp56dsp_init.c)15
8 files changed, 19 insertions, 23 deletions
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 9c64b361f1..0e5e53a16a 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -25,8 +25,7 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_init_arm.o
OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_arm.o
OBJS-$(CONFIG_VORBIS_DECODER) += arm/vorbisdsp_init_arm.o
OBJS-$(CONFIG_VP3DSP) += arm/vp3dsp_init_arm.o
-OBJS-$(CONFIG_VP5_DECODER) += arm/vp56dsp_init_arm.o
-OBJS-$(CONFIG_VP6_DECODER) += arm/vp56dsp_init_arm.o
+OBJS-$(CONFIG_VP6_DECODER) += arm/vp6dsp_init_arm.o
OBJS-$(CONFIG_VP8_DECODER) += arm/vp8dsp_init_arm.o
OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_arm.o
OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_arm.o \
@@ -89,7 +88,6 @@ NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_neon.o \
arm/rv40dsp_neon.o
NEON-OBJS-$(CONFIG_VORBIS_DECODER) += arm/vorbisdsp_neon.o
NEON-OBJS-$(CONFIG_VP3DSP) += arm/vp3dsp_neon.o
-NEON-OBJS-$(CONFIG_VP5_DECODER) += arm/vp56dsp_neon.o
-NEON-OBJS-$(CONFIG_VP6_DECODER) += arm/vp56dsp_neon.o
+NEON-OBJS-$(CONFIG_VP6_DECODER) += arm/vp6dsp_neon.o
NEON-OBJS-$(CONFIG_VP8_DECODER) += arm/vp8dsp_init_neon.o \
arm/vp8dsp_neon.o
diff --git a/libavcodec/arm/vp56dsp_init_arm.c b/libavcodec/arm/vp6dsp_init_arm.c
index f53cbae1ed..ed6832145e 100644
--- a/libavcodec/arm/vp56dsp_init_arm.c
+++ b/libavcodec/arm/vp6dsp_init_arm.c
@@ -28,11 +28,11 @@
void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
-av_cold void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
+av_cold void ff_vp6dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
{
int cpu_flags = av_get_cpu_flags();
- if (codec != AV_CODEC_ID_VP5 && have_neon(cpu_flags)) {
+ if (have_neon(cpu_flags)) {
s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
}
diff --git a/libavcodec/arm/vp56dsp_neon.S b/libavcodec/arm/vp6dsp_neon.S
index 03dd28d1cb..03dd28d1cb 100644
--- a/libavcodec/arm/vp56dsp_neon.S
+++ b/libavcodec/arm/vp6dsp_neon.S
diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c
index 8c17fd9f83..fa533ec5c9 100644
--- a/libavcodec/vp56dsp.c
+++ b/libavcodec/vp56dsp.c
@@ -88,9 +88,11 @@ av_cold void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec)
if (CONFIG_VP6_DECODER) {
s->vp6_filter_diag4 = ff_vp6_filter_diag4_c;
+
+ if (ARCH_ARM)
+ ff_vp6dsp_init_arm(s, codec);
+ if (ARCH_X86)
+ ff_vp6dsp_init_x86(s, codec);
}
}
-
- if (ARCH_ARM) ff_vp56dsp_init_arm(s, codec);
- if (ARCH_X86) ff_vp56dsp_init_x86(s, codec);
}
diff --git a/libavcodec/vp56dsp.h b/libavcodec/vp56dsp.h
index 51e8c16480..7807baa4b1 100644
--- a/libavcodec/vp56dsp.h
+++ b/libavcodec/vp56dsp.h
@@ -36,7 +36,7 @@ void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
const int16_t *h_weights, const int16_t *v_weights);
void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec);
-void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec);
-void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec);
+void ff_vp6dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec);
+void ff_vp6dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec);
#endif /* AVCODEC_VP56DSP_H */
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index e881ef2a26..a8f4ae8b9d 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -29,8 +29,7 @@ OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_init.o
OBJS-$(CONFIG_VIDEODSP) += x86/videodsp_init.o
OBJS-$(CONFIG_VORBIS_DECODER) += x86/vorbisdsp_init.o
OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o
-OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o
-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o
+OBJS-$(CONFIG_VP6_DECODER) += x86/vp6dsp_init.o
OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp_init.o
OBJS-$(CONFIG_WEBP_DECODER) += x86/vp8dsp_init.o
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
@@ -98,6 +97,6 @@ YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp.o
YASM-OBJS-$(CONFIG_VIDEODSP) += x86/videodsp.o
YASM-OBJS-$(CONFIG_VORBIS_DECODER) += x86/vorbisdsp.o
YASM-OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp.o
-YASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp.o
+YASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp6dsp.o
YASM-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp.o
YASM-OBJS-$(CONFIG_WEBP_DECODER) += x86/vp8dsp.o
diff --git a/libavcodec/x86/vp56dsp.asm b/libavcodec/x86/vp6dsp.asm
index 3d874ea62a..3d874ea62a 100644
--- a/libavcodec/x86/vp56dsp.asm
+++ b/libavcodec/x86/vp6dsp.asm
diff --git a/libavcodec/x86/vp56dsp_init.c b/libavcodec/x86/vp6dsp_init.c
index 09bdb1030d..8718e23a83 100644
--- a/libavcodec/x86/vp56dsp_init.c
+++ b/libavcodec/x86/vp6dsp_init.c
@@ -30,19 +30,16 @@ void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride,
void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,
const int16_t *h_weights,const int16_t *v_weights);
-av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec)
+av_cold void ff_vp6dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec)
{
int cpu_flags = av_get_cpu_flags();
- if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) {
#if ARCH_X86_32
- if (EXTERNAL_MMX(cpu_flags)) {
- c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
- }
+ if (EXTERNAL_MMX(cpu_flags)) {
+ c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
+ }
#endif
-
- if (EXTERNAL_SSE2(cpu_flags)) {
- c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2;
- }
+ if (EXTERNAL_SSE2(cpu_flags)) {
+ c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2;
}
}