aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-05-15 11:42:39 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-05-15 15:43:23 -0400
commitc81677e9b73c31508b78123dd6e4473fe45b03cd (patch)
treeb6728a489bb3b5d9ada92e7eacc61b5e9cb39e01
parent88126916c8199bacdd429a3f9eeb3b717f0d3b9a (diff)
downloadffmpeg-c81677e9b73c31508b78123dd6e4473fe45b03cd.tar.gz
vp9: reset loopfilter mode/ref deltas on keyframe.
-rw-r--r--libavcodec/vp9.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 23cf99b214..8b1ef67cdf 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -698,6 +698,15 @@ static int decode_frame_header(AVCodecContext *ctx,
s->framectxid = c = get_bits(&s->gb, 2);
/* loopfilter header data */
+ if (s->keyframe || s->errorres || s->intraonly) {
+ // reset loopfilter defaults
+ s->lf_delta.ref[0] = 1;
+ s->lf_delta.ref[1] = 0;
+ s->lf_delta.ref[2] = -1;
+ s->lf_delta.ref[3] = -1;
+ s->lf_delta.mode[0] = 0;
+ s->lf_delta.mode[1] = 0;
+ }
s->filter.level = get_bits(&s->gb, 6);
sharp = get_bits(&s->gb, 3);
// if sharpness changed, reinit lim/mblim LUTs. if it didn't change, keep