mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-19 09:02:26 +02:00
avcodec/x86/lossless_videodsp: disable median optimizations for 16bps
They only support upto 15bps Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
eaacfc7dd1
commit
e6d1c66d74
@ -261,7 +261,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
HYuvContext *s = avctx->priv_data;
|
HYuvContext *s = avctx->priv_data;
|
||||||
|
|
||||||
ff_huffyuv_common_init(avctx);
|
|
||||||
memset(s->vlc, 0, 4 * sizeof(VLC));
|
memset(s->vlc, 0, 4 * sizeof(VLC));
|
||||||
|
|
||||||
s->interlaced = s->height > 288;
|
s->interlaced = s->height > 288;
|
||||||
@ -470,6 +469,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ff_huffyuv_common_init(avctx);
|
||||||
|
|
||||||
if ((avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUV420P) && avctx->width & 1) {
|
if ((avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUV420P) && avctx->width & 1) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
|
av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
|
||||||
|
@ -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)
|
void ff_llviddsp_init_x86(LLVidDSPContext *c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
int cpu_flags = av_get_cpu_flags();
|
int cpu_flags = av_get_cpu_flags();
|
||||||
|
const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(avctx->pix_fmt);
|
||||||
|
|
||||||
if (EXTERNAL_MMX(cpu_flags)) {
|
if (EXTERNAL_MMX(cpu_flags)) {
|
||||||
c->add_int16 = ff_add_int16_mmx;
|
c->add_int16 = ff_add_int16_mmx;
|
||||||
c->diff_int16 = ff_diff_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->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;
|
c->sub_hfyu_median_prediction_int16 = ff_sub_hfyu_median_prediction_int16_mmxext;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user