diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-23 01:35:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-23 01:51:24 +0100 |
commit | e6d1c66d742d766a80a26ed2a9524a0fffbcf958 (patch) | |
tree | bf93e6d70c9af7126e1c9b53d4a20cbbb8e4e9c0 /libavcodec/x86/lossless_videodsp_init.c | |
parent | eaacfc7dd1eaeec7e5e243f1e0ee5e8a7ff845a3 (diff) | |
download | ffmpeg-e6d1c66d742d766a80a26ed2a9524a0fffbcf958.tar.gz |
avcodec/x86/lossless_videodsp: disable median optimizations for 16bps
They only support upto 15bps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/lossless_videodsp_init.c')
-rw-r--r-- | libavcodec/x86/lossless_videodsp_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/x86/lossless_videodsp_init.c b/libavcodec/x86/lossless_videodsp_init.c index fe88c4ebcc..03ea2dff26 100644 --- a/libavcodec/x86/lossless_videodsp_init.c +++ b/libavcodec/x86/lossless_videodsp_init.c @@ -35,13 +35,14 @@ void ff_sub_hfyu_median_prediction_int16_mmxext(uint16_t *dst, const uint16_t *s void ff_llviddsp_init_x86(LLVidDSPContext *c, AVCodecContext *avctx) { int cpu_flags = av_get_cpu_flags(); + const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(avctx->pix_fmt); if (EXTERNAL_MMX(cpu_flags)) { c->add_int16 = ff_add_int16_mmx; c->diff_int16 = ff_diff_int16_mmx; } - if (EXTERNAL_MMXEXT(cpu_flags)) { + if (EXTERNAL_MMXEXT(cpu_flags) && pix_desc->comp[0].depth_minus1<15) { c->add_hfyu_median_prediction_int16 = ff_add_hfyu_median_prediction_int16_mmxext; c->sub_hfyu_median_prediction_int16 = ff_sub_hfyu_median_prediction_int16_mmxext; } |