ref: 03e043e06c4db64849cf7682ff1fba720237028d
parent: edc9a4687699b372a0c27856020b42434ddc3014
author: Jerome Jiang <jianj@google.com>
date: Mon Feb 12 05:36:14 EST 2018
VP9 ROI test clean up regarding bool type flag. Clean up code to make use_roi_ flag a bool. Change-Id: I5b606ca19f8543840259d1cc79fe3301a2a70d30
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -44,7 +44,7 @@
denoiser_offon_test_ = 0;
denoiser_offon_period_ = -1;
gf_boost_ = 0;
- use_roi_ = 0;
+ use_roi_ = false;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
@@ -55,11 +55,9 @@
encoder->Control(VP8E_SET_GF_CBR_BOOST_PCT, gf_boost_);
}
-#if CONFIG_VP8_ENCODER
- if (use_roi_ == 1) {
+ if (use_roi_) {
encoder->Control(VP8E_SET_ROI_MAP, &roi_);
}
-#endif
if (denoiser_offon_test_) {
ASSERT_GT(denoiser_offon_period_, 0)
@@ -152,7 +150,7 @@
int denoiser_offon_period_;
int set_cpu_used_;
int gf_boost_;
- int use_roi_;
+ bool use_roi_;
vpx_roi_map_t roi_;
};
@@ -441,7 +439,7 @@
ResetModel();
// Set ROI parameters
- use_roi_ = 1;
+ use_roi_ = true;
memset(&roi_, 0, sizeof(roi_));
roi_.rows = (cfg_.g_h + 15) / 16;
@@ -539,7 +537,7 @@
denoiser_offon_test_ = 0;
denoiser_offon_period_ = -1;
frame_parallel_decoding_mode_ = 1;
- use_roi_ = 0;
+ use_roi_ = false;
}
//