aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-05-15 11:43:09 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-05-15 15:43:23 -0400
commit5de142d316a6f806e8a5faee4599f49cd26af11e (patch)
tree72a9c928c103aefbf5db90d6ab8fd471acf17fa7
parentc81677e9b73c31508b78123dd6e4473fe45b03cd (diff)
downloadffmpeg-5de142d316a6f806e8a5faee4599f49cd26af11e.tar.gz
vp9: clamp segmented lflvl before applying ref/mode deltas.
-rw-r--r--libavcodec/vp9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 8b1ef67cdf..bc88bf9680 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -800,9 +800,9 @@ static int decode_frame_header(AVCodecContext *ctx,
sh = s->filter.level >= 32;
if (s->segmentation.feat[i].lf_enabled) {
if (s->segmentation.absolute_vals)
- lflvl = s->segmentation.feat[i].lf_val;
+ lflvl = av_clip_uintp2(s->segmentation.feat[i].lf_val, 6);
else
- lflvl = s->filter.level + s->segmentation.feat[i].lf_val;
+ lflvl = av_clip_uintp2(s->filter.level + s->segmentation.feat[i].lf_val, 6);
} else {
lflvl = s->filter.level;
}