Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-09-06 06:50:32 +0300
committerJames Almer <jamrial@gmail.com>2019-09-06 06:57:39 +0300
commit79c4aa95cd1f0fd849e130aa282c632d51fb70da (patch)
treea1231dbbb598b8b40911cd95cb3ed16fd2727cd8
parentacad1a99eaaeefacadbd1756c80365665bc7570a (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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/obu.c b/src/obu.c
index 72d0152..c3c518d 100644
--- a/src/obu.c
+++ b/src/obu.c
@@ -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 =