aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-05 12:59:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-05 13:00:41 +0200
commitbf7ed956ffcd390b3f5ead2b36d47b068f89178f (patch)
tree9cdd1e203de9e57536cc3263320506cc69944cec /libavcodec
parent77aafadc5655401e5806daed58300a2cccb19fb8 (diff)
parentadf8227cf4e7b4fccb2ad88e1e09b6dc00dd00ed (diff)
downloadffmpeg-bf7ed956ffcd390b3f5ead2b36d47b068f89178f.tar.gz
Merge commit 'adf8227cf4e7b4fccb2ad88e1e09b6dc00dd00ed'
* commit 'adf8227cf4e7b4fccb2ad88e1e09b6dc00dd00ed': vc-1: Add platform-specific start code search routine to VC1DSPContext. Conflicts: configure libavcodec/arm/vc1dsp_init_arm.c libavcodec/vc1dsp.c libavcodec/vc1dsp.h See: 9d8ecdd8ca6d248e7439e8fdf255e39eda14e0f2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/Makefile4
-rw-r--r--libavcodec/arm/Makefile2
-rw-r--r--libavcodec/arm/vc1dsp_init_arm.c7
-rw-r--r--libavcodec/vc1_parser.c2
-rw-r--r--libavcodec/vc1dsp.c2
-rw-r--r--libavcodec/vc1dsp.h2
6 files changed, 8 insertions, 11 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index c73eb83f34..6873439e3d 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -478,7 +478,7 @@ OBJS-$(CONFIG_VB_DECODER) += vb.o
OBJS-$(CONFIG_VBLE_DECODER) += vble.o
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
msmpeg4dec.o msmpeg4.o msmpeg4data.o \
- wmv2dsp.o startcode.o
+ wmv2dsp.o
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
OBJS-$(CONFIG_VMDAUDIO_DECODER) += vmdaudio.o
OBJS-$(CONFIG_VMDVIDEO_DECODER) += vmdvideo.o
@@ -806,7 +806,7 @@ OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o
OBJS-$(CONFIG_TAK_PARSER) += tak_parser.o tak.o
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o vc1dsp.o \
msmpeg4.o msmpeg4data.o mpeg4video.o \
- h263.o startcode.o
+ h263.o
OBJS-$(CONFIG_VORBIS_PARSER) += vorbis_parser.o xiph.o
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 3daf21104d..41485b38d2 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -66,8 +66,6 @@ ARMV6-OBJS-$(CONFIG_PIXBLOCKDSP) += arm/pixblockdsp_armv6.o
ARMV6-OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_armv6.o
ARMV6-OBJS-$(CONFIG_STARTCODE) += arm/startcode_armv6.o
-ARMV6-OBJS-$(CONFIG_VC1_DECODER) += arm/startcode_armv6.o
-ARMV6-OBJS-$(CONFIG_VC1_PARSER) += arm/startcode_armv6.o
ARMV6-OBJS-$(CONFIG_VP7_DECODER) += arm/vp8_armv6.o \
arm/vp8dsp_init_armv6.o \
arm/vp8dsp_armv6.o
diff --git a/libavcodec/arm/vc1dsp_init_arm.c b/libavcodec/arm/vc1dsp_init_arm.c
index 4a84848463..9dae22c822 100644
--- a/libavcodec/arm/vc1dsp_init_arm.c
+++ b/libavcodec/arm/vc1dsp_init_arm.c
@@ -20,17 +20,16 @@
#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
+#include "libavcodec/arm/startcode.h"
#include "libavcodec/vc1dsp.h"
#include "vc1dsp.h"
-int ff_startcode_find_candidate_armv6(const uint8_t *buf, int size);
-
av_cold void ff_vc1dsp_init_arm(VC1DSPContext *dsp)
{
int cpu_flags = av_get_cpu_flags();
- if (have_armv6(cpu_flags))
- dsp->vc1_find_start_code_candidate = ff_startcode_find_candidate_armv6;
+ if (have_setend(cpu_flags))
+ dsp->startcode_find_candidate = ff_startcode_find_candidate_armv6;
if (have_neon(cpu_flags))
ff_vc1dsp_init_neon(dsp);
}
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 0021febaf5..c68981fa30 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -173,7 +173,7 @@ static int vc1_parse(AVCodecParserContext *s,
if (unesc_index >= UNESCAPED_THRESHOLD && !start_code_found) {
while (i < buf_size) {
if (search_state == NO_MATCH) {
- i += vpc->v.vc1dsp.vc1_find_start_code_candidate(buf + i, buf_size - i);
+ i += vpc->v.vc1dsp.startcode_find_candidate(buf + i, buf_size - i);
if (i < buf_size) {
search_state = ONE_ZERO;
}
diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c
index fae9daec6a..73e1001279 100644
--- a/libavcodec/vc1dsp.c
+++ b/libavcodec/vc1dsp.c
@@ -1025,7 +1025,7 @@ av_cold void ff_vc1dsp_init(VC1DSPContext *dsp)
dsp->sprite_v_double_twoscale = sprite_v_double_twoscale_c;
#endif /* CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER */
- dsp->vc1_find_start_code_candidate = ff_startcode_find_candidate_c;
+ dsp->startcode_find_candidate = ff_startcode_find_candidate_c;
if (ARCH_AARCH64)
ff_vc1dsp_init_aarch64(dsp);
diff --git a/libavcodec/vc1dsp.h b/libavcodec/vc1dsp.h
index aa5b6d34fd..e2f75ac7dc 100644
--- a/libavcodec/vc1dsp.h
+++ b/libavcodec/vc1dsp.h
@@ -80,7 +80,7 @@ typedef struct VC1DSPContext {
* to filter out any zero bytes that are known to not be followed by
* one or more further zero bytes and a one byte.
*/
- int (*vc1_find_start_code_candidate)(const uint8_t *buf, int size);
+ int (*startcode_find_candidate)(const uint8_t *buf, int size);
} VC1DSPContext;
void ff_vc1dsp_init(VC1DSPContext* c);