vp10: make render_width/height referenceable through ref frames.

See issue 1079.

Change-Id: I754a61ec011c3508bbb26826cf8e11dbdfdd8379
This commit is contained in:
Ronald S. Bultje
2015-09-30 21:57:26 -04:00
parent 3fedf4a59b
commit ce3780251c
2 changed files with 21 additions and 1 deletions

View File

@@ -1276,13 +1276,21 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *const buf = cm->frame_refs[i].buf;
width = buf->y_crop_width;
height = buf->y_crop_height;
#if CONFIG_MISC_FIXES
cm->render_width = buf->render_width;
cm->render_height = buf->render_height;
#endif
found = 1;
break;
}
}
if (!found)
if (!found) {
vp10_read_frame_size(rb, &width, &height);
#if CONFIG_MISC_FIXES
setup_render_size(cm, rb);
#endif
}
if (width <= 0 || height <= 0)
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
@@ -1313,7 +1321,9 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm,
}
resize_context_buffers(cm, width, height);
#if !CONFIG_MISC_FIXES
setup_render_size(cm, rb);
#endif
lock_buffer_pool(pool);
if (vpx_realloc_frame_buffer(