Merge "Recompute tile params on frame resize"
This commit is contained in:
commit
17fc3e94c9
@ -685,28 +685,6 @@ void vp9_alloc_compressor_data(VP9_COMP *cpi) {
|
||||
vp9_setup_pc_tree(&cpi->common, &cpi->td);
|
||||
}
|
||||
|
||||
static void update_frame_size(VP9_COMP *cpi) {
|
||||
VP9_COMMON *const cm = &cpi->common;
|
||||
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
|
||||
|
||||
vp9_set_mb_mi(cm, cm->width, cm->height);
|
||||
vp9_init_context_buffers(cm);
|
||||
init_macroblockd(cm, xd);
|
||||
|
||||
if (is_two_pass_svc(cpi)) {
|
||||
if (vp9_realloc_frame_buffer(&cpi->alt_ref_buffer,
|
||||
cm->width, cm->height,
|
||||
cm->subsampling_x, cm->subsampling_y,
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
cm->use_highbitdepth,
|
||||
#endif
|
||||
VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
|
||||
NULL, NULL, NULL))
|
||||
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
|
||||
"Failed to reallocate alt_ref_buffer");
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_new_framerate(VP9_COMP *cpi, double framerate) {
|
||||
cpi->framerate = framerate < 0.1 ? 30 : framerate;
|
||||
vp9_rc_update_framerate(cpi);
|
||||
@ -728,6 +706,30 @@ static void set_tile_limits(VP9_COMP *cpi) {
|
||||
}
|
||||
}
|
||||
|
||||
static void update_frame_size(VP9_COMP *cpi) {
|
||||
VP9_COMMON *const cm = &cpi->common;
|
||||
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
|
||||
|
||||
vp9_set_mb_mi(cm, cm->width, cm->height);
|
||||
vp9_init_context_buffers(cm);
|
||||
init_macroblockd(cm, xd);
|
||||
|
||||
set_tile_limits(cpi);
|
||||
|
||||
if (is_two_pass_svc(cpi)) {
|
||||
if (vp9_realloc_frame_buffer(&cpi->alt_ref_buffer,
|
||||
cm->width, cm->height,
|
||||
cm->subsampling_x, cm->subsampling_y,
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
cm->use_highbitdepth,
|
||||
#endif
|
||||
VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
|
||||
NULL, NULL, NULL))
|
||||
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
|
||||
"Failed to reallocate alt_ref_buffer");
|
||||
}
|
||||
}
|
||||
|
||||
static void init_buffer_indices(VP9_COMP *cpi) {
|
||||
cpi->lst_fb_idx = 0;
|
||||
cpi->gld_fb_idx = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user