Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Darnley <jdarnley@obe.tv>2019-03-05 01:54:58 +0300
committerJames Darnley <jdarnley@obe.tv>2019-05-02 20:21:37 +0300
commite2cbf24f2738e9ead5d97977e7aaf096d7954ae3 (patch)
treeadff2a3180cd6e90e0da92bbc5e7819d232dbccb /libavcodec/v210dec.c
parente427ba5c68a522b26a45bf7c61016d9349fab43d (diff)
avcodec/v210dec: move DSP function setting into dedicated function
Prepare for checkasm test.
Diffstat (limited to 'libavcodec/v210dec.c')
-rw-r--r--libavcodec/v210dec.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index ddc5dbe8be..fd8a6b0d78 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -50,6 +50,13 @@ static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u,
}
}
+av_cold void ff_v210dec_init(V210DecContext *s)
+{
+ s->unpack_frame = v210_planar_unpack_c;
+ if (ARCH_X86)
+ ff_v210_x86_init(s);
+}
+
static av_cold int decode_init(AVCodecContext *avctx)
{
V210DecContext *s = avctx->priv_data;
@@ -57,10 +64,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
avctx->bits_per_raw_sample = 10;
- s->unpack_frame = v210_planar_unpack_c;
-
- if (HAVE_MMX)
- ff_v210_x86_init(s);
+ s->aligned_input = 0;
+ ff_v210dec_init(s);
return 0;
}
@@ -102,8 +107,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf);
if (aligned_input != s->aligned_input) {
s->aligned_input = aligned_input;
- if (HAVE_MMX)
- ff_v210_x86_init(s);
+ ff_v210dec_init(s);
}
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)