mirror of https://git.ffmpeg.org/ffmpeg.git
vp9: maintain lf_delta values if feature is turned off.
This is required if it's subsequently re-enabled with no value updates (which means, use values that were previously set). Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d02619fde3
commit
c82e870c12
|
@ -622,8 +622,6 @@ static int decode_frame_header(AVCodecContext *ctx,
|
||||||
if (get_bits1(&s->gb))
|
if (get_bits1(&s->gb))
|
||||||
s->lf_delta.mode[i] = get_sbits_inv(&s->gb, 6);
|
s->lf_delta.mode[i] = get_sbits_inv(&s->gb, 6);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
memset(&s->lf_delta, 0, sizeof(s->lf_delta));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* quantization header data */
|
/* quantization header data */
|
||||||
|
@ -705,6 +703,7 @@ static int decode_frame_header(AVCodecContext *ctx,
|
||||||
} else {
|
} else {
|
||||||
lflvl = s->filter.level;
|
lflvl = s->filter.level;
|
||||||
}
|
}
|
||||||
|
if (s->lf_delta.enabled) {
|
||||||
s->segmentation.feat[i].lflvl[0][0] =
|
s->segmentation.feat[i].lflvl[0][0] =
|
||||||
s->segmentation.feat[i].lflvl[0][1] =
|
s->segmentation.feat[i].lflvl[0][1] =
|
||||||
av_clip_uintp2(lflvl + (s->lf_delta.ref[0] << sh), 6);
|
av_clip_uintp2(lflvl + (s->lf_delta.ref[0] << sh), 6);
|
||||||
|
@ -716,6 +715,10 @@ static int decode_frame_header(AVCodecContext *ctx,
|
||||||
av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] +
|
av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] +
|
||||||
s->lf_delta.mode[1]) * (1 << sh)), 6);
|
s->lf_delta.mode[1]) * (1 << sh)), 6);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
memset(s->segmentation.feat[i].lflvl, lflvl,
|
||||||
|
sizeof(s->segmentation.feat[i].lflvl));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tiling info */
|
/* tiling info */
|
||||||
|
|
Loading…
Reference in New Issue