TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
ResizingVideoSource video;
DefaultConfig();
+ // Disable internal resize for this test.
+ cfg_.rc_resize_allowed = 0;
change_bitrate_ = false;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) {
cm->width = cpi->oxcf.width;
cm->height = cpi->oxcf.height;
+ cpi->external_resize = 1;
}
if (cpi->initial_width) {
alloc_compressor_data(cpi);
realloc_segmentation_maps(cpi);
cpi->initial_width = cpi->initial_height = 0;
+ cpi->external_resize = 0;
}
}
update_frame_size(cpi);
cpi->use_svc = 0;
cpi->resize_state = 0;
+ cpi->external_resize = 0;
cpi->resize_avg_qp = 0;
cpi->resize_buffer_underflow = 0;
cpi->use_skin_detection = 0;
int resize_pending;
int resize_state;
+ int external_resize;
int resize_scale_num;
int resize_scale_den;
int resize_avg_qp;
FLAG_SKIP_INTRA_LOWVAR;
sf->adaptive_pred_interp_filter = 2;
- // Disable reference masking if using spatial scaling since
- // pred_mv_sad will not be set (since vp9_mv_pred will not
- // be called).
- // TODO(marpan/agrange): Fix this condition.
- sf->reference_masking = (cpi->oxcf.resize_mode != RESIZE_DYNAMIC &&
+ // Disable reference masking if using spatial scaling or for dynamic
+ // resizing (internal or external) since pred_mv_sad will not be set
+ // (since vp9_mv_pred will not be called).
+ // TODO(marpan): Fix this condition to allow reference masking for when
+ // all references have same resolution as source frame.
+ sf->reference_masking = (cpi->external_resize == 0 &&
+ cpi->oxcf.resize_mode != RESIZE_DYNAMIC &&
cpi->svc.number_spatial_layers == 1) ? 1 : 0;
sf->disable_filter_search_var_thresh = 50;