vp9: SVC: allow for setting the interp_filter in non-rd pickmode.
For SVC 1 pass non-rd pickmode, the interpolation filter for the upsampling of the golden (spatial) reference was not being explicitly set and instead was takin gwhatever value was set in the previous mode/block (which would be either EIGHTTAP or EIGHTAP_SMOOTH). Fix it to the default EIGHTTAP for now, to be updated/selected adaptively in a later change. Minor adjustmemt to rate targeting thresholds in datarate unittests. Change-Id: I52085048674072c6cfb7163e11e9a2658d773826
This commit is contained in:
@@ -1288,7 +1288,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TL) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.82)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1336,7 +1336,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TLDenoiserOn) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.82)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1384,7 +1384,7 @@ TEST_P(DatarateOnePassCbrSvc, DISABLED_OnePassCbrSvc2SL3TLSmallKf) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.80)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1421,7 +1421,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TL4threads) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.82)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1466,7 +1466,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SL3TL) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.82)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1514,7 +1514,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SL3TLSmallKf) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.80)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.30)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.30)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
@@ -1553,7 +1553,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SL3TL4threads) {
|
|||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.82)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
|||||||
@@ -1488,6 +1488,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
|
|||||||
int64_t zero_last_cost_orig = INT64_MAX;
|
int64_t zero_last_cost_orig = INT64_MAX;
|
||||||
int denoise_svc_pickmode = 1;
|
int denoise_svc_pickmode = 1;
|
||||||
#endif
|
#endif
|
||||||
|
INTERP_FILTER filter_gf_svc = EIGHTTAP;
|
||||||
|
|
||||||
init_ref_frame_cost(cm, xd, ref_frame_cost);
|
init_ref_frame_cost(cm, xd, ref_frame_cost);
|
||||||
|
|
||||||
@@ -1909,6 +1910,11 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
|
|||||||
? bsize > BLOCK_32X32
|
? bsize > BLOCK_32X32
|
||||||
: bsize >= BLOCK_32X32;
|
: bsize >= BLOCK_32X32;
|
||||||
mi->interp_filter = (filter_ref == SWITCHABLE) ? EIGHTTAP : filter_ref;
|
mi->interp_filter = (filter_ref == SWITCHABLE) ? EIGHTTAP : filter_ref;
|
||||||
|
|
||||||
|
if (cpi->use_svc && ref_frame == GOLDEN_FRAME &&
|
||||||
|
svc_force_zero_mode[ref_frame - 1])
|
||||||
|
mi->interp_filter = filter_gf_svc;
|
||||||
|
|
||||||
vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
|
vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
|
||||||
|
|
||||||
// For large partition blocks, extra testing is done.
|
// For large partition blocks, extra testing is done.
|
||||||
|
|||||||
Reference in New Issue
Block a user