diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-02 13:47:22 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-04 09:33:45 -0400 |
commit | 48f641a18b841c8704b741b59ae71e4bc129e07f (patch) | |
tree | c31ac3daae601aa43b3756dbdbafa29a1b0b3d32 /libavcodec/vp9.c | |
parent | eaff36c973af2807606b5277343fc9e237add24f (diff) | |
download | ffmpeg-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 3eff1f180b..95af94b29b 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; } |