Commit 95cf7cf8 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

Use adapted CDF for invisible keyframes if refresh_context=1

Fixes #213.
parent d6770f93
Pipeline #3282 passed with stages
in 10 minutes and 4 seconds
......@@ -1388,14 +1388,14 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in, int global) {
if (c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) {
const int r = c->frame_hdr->existing_frame_idx;
for (int i = 0; i < 8; i++) {
if (i == c->frame_hdr->existing_frame_idx) continue;
if (i == r) continue;
if (c->refs[i][0])
dav1d_thread_picture_ref(&c->refs[i].p, &c->refs[r].p);
if (c->cdf[i].cdf) dav1d_cdf_thread_unref(&c->cdf[i]);
dav1d_init_states(&c->cdf[i], c->refs[r].p.p.frame_hdr->quant.yac);
dav1d_cdf_thread_ref(&c->cdf[i], &c->cdf[r]);
c->refs[i].segmap = c->refs[r].segmap;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment