diff options
author | James Almer <jamrial@gmail.com> | 2019-09-06 06:50:32 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-09-06 06:57:39 +0300 |
commit | 79c4aa95cd1f0fd849e130aa282c632d51fb70da (patch) | |
tree | a1231dbbb598b8b40911cd95cb3ed16fd2727cd8 | |
parent | acad1a99eaaeefacadbd1756c80365665bc7570a (diff) |
obu: fix deriving render_width and render_height from reference frames
Both values can be independently coded in the bitstream, and are not
always equal to frame_width and frame_height.
-rw-r--r-- | src/obu.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -298,9 +298,10 @@ static int read_frame_size(Dav1dContext *const c, GetBits *const gb, Dav1dThreadPicture *const ref = &c->refs[c->frame_hdr->refidx[i]].p; if (!ref->p.data[0]) return -1; - // FIXME render_* may be wrong - hdr->render_width = hdr->width[1] = ref->p.p.w; - hdr->render_height = hdr->height = ref->p.p.h; + hdr->width[1] = ref->p.p.w; + hdr->height = ref->p.p.h; + hdr->render_width = ref->p.frame_hdr->render_width; + hdr->render_height = ref->p.frame_hdr->render_height; hdr->super_res.enabled = seqhdr->super_res && dav1d_get_bits(gb, 1); if (hdr->super_res.enabled) { const int d = hdr->super_res.width_scale_denominator = |