summaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-02 13:47:22 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-04 09:33:45 -0400
commit48f641a18b841c8704b741b59ae71e4bc129e07f (patch)
treec31ac3daae601aa43b3756dbdbafa29a1b0b3d32 /libavcodec/vp9.c
parenteaff36c973af2807606b5277343fc9e237add24f (diff)
downloadffmpeg-streaming-48f641a18b841c8704b741b59ae71e4bc129e07f.zip
ffmpeg-streaming-48f641a18b841c8704b741b59ae71e4bc129e07f.tar.gz
vp9: clip intermediates in dequant calculations.
This makes values consistent with libvpx.
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 3eff1f1..95af94b 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -785,9 +785,9 @@ static int decode_frame_header(AVCodecContext *ctx,
if (s->segmentation.feat[i].q_enabled) {
if (s->segmentation.absolute_vals)
- qyac = s->segmentation.feat[i].q_val;
+ qyac = av_clip_uintp2(s->segmentation.feat[i].q_val, 8);
else
- qyac = s->yac_qi + s->segmentation.feat[i].q_val;
+ qyac = av_clip_uintp2(s->yac_qi + s->segmentation.feat[i].q_val, 8);
} else {
qyac = s->yac_qi;
}
OpenPOWER on IntegriCloud