summaryrefslogtreecommitdiff
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-09 14:10:41 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-10 07:51:16 -0400
commitfd8b90f5f63de12c1ee1ec1cbe99791c5629c582 (patch)
treebdf50fda06657232f3c54265cb7fe3681567dd97 /libavcodec/vp9.c
parent4bb9dbe4d7952d82bddb23c45889ab1550897397 (diff)
vp9: fix overflow in 8x8 topleft 32x32 idct ssse3 version.
Also disable the mmx/iwht optimization when the bitexact flag is set. With synthetically coded coefficients (i.e. these that lead to a residual well outside the [-255,255] range), our optimizations will overflow. It doesn't make sense to fix the overflows, since they can only occur on synthetic input, not on real fwht-generated input. Thus, add a bitexact flag that disables this optimization.
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 98fd8a3046..fcdd6e128e 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -360,7 +360,7 @@ static int update_size(AVCodecContext *ctx, int w, int h, enum AVPixelFormat fmt
av_freep(&s->block_base);
if (s->bpp != s->last_bpp) {
- ff_vp9dsp_init(&s->dsp, s->bpp);
+ ff_vp9dsp_init(&s->dsp, s->bpp, ctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_videodsp_init(&s->vdsp, s->bpp);
s->last_bpp = s->bpp;
}