Index: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc |
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc |
index 70fe98737df4cd356803d4e6b02730d57e139270..d4e1e6e3a06bb2096d51c449bcf8bb162d2de3ee 100644 |
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc |
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc |
@@ -81,7 +81,6 @@ struct RateControlMetrics { |
int num_key_frames; |
}; |
- |
// Sequence used is foreman (CIF): may be better to use VGA for resize test. |
const int kCIFWidth = 352; |
const int kCIFHeight = 288; |
@@ -101,7 +100,7 @@ const float kScaleKeyFrameSize = 0.5f; |
// dropping/spatial resize, and temporal layers. The limits for the rate |
// control metrics are set to be fairly conservative, so failure should only |
// happen when some significant regression or breakdown occurs. |
-class VideoProcessorIntegrationTest: public testing::Test { |
+class VideoProcessorIntegrationTest : public testing::Test { |
protected: |
VideoEncoder* encoder_; |
VideoDecoder* decoder_; |
@@ -148,7 +147,6 @@ class VideoProcessorIntegrationTest: public testing::Test { |
bool frame_dropper_on_; |
bool spatial_resize_on_; |
- |
VideoProcessorIntegrationTest() {} |
virtual ~VideoProcessorIntegrationTest() {} |
@@ -165,14 +163,13 @@ class VideoProcessorIntegrationTest: public testing::Test { |
// CIF is currently used for all tests below. |
// Setup the TestConfig struct for processing of a clip in CIF resolution. |
- config_.input_filename = |
- webrtc::test::ResourcePath("foreman_cif", "yuv"); |
+ config_.input_filename = webrtc::test::ResourcePath("foreman_cif", "yuv"); |
// Generate an output filename in a safe way. |
config_.output_filename = webrtc::test::TempFilename( |
webrtc::test::OutputPath(), "videoprocessor_integrationtest"); |
- config_.frame_length_in_bytes = CalcBufferSize(kI420, |
- kCIFWidth, kCIFHeight); |
+ config_.frame_length_in_bytes = |
+ CalcBufferSize(kI420, kCIFWidth, kCIFHeight); |
config_.verbose = false; |
// Only allow encoder/decoder to use single core, for predictability. |
config_.use_single_core = true; |
@@ -188,52 +185,46 @@ class VideoProcessorIntegrationTest: public testing::Test { |
// These features may be set depending on the test. |
switch (config_.codec_settings->codecType) { |
- case kVideoCodecVP8: |
- config_.codec_settings->codecSpecific.VP8.errorConcealmentOn = |
- error_concealment_on_; |
- config_.codec_settings->codecSpecific.VP8.denoisingOn = |
- denoising_on_; |
- config_.codec_settings->codecSpecific.VP8.numberOfTemporalLayers = |
- num_temporal_layers_; |
- config_.codec_settings->codecSpecific.VP8.frameDroppingOn = |
- frame_dropper_on_; |
- config_.codec_settings->codecSpecific.VP8.automaticResizeOn = |
- spatial_resize_on_; |
- config_.codec_settings->codecSpecific.VP8.keyFrameInterval = |
- kBaseKeyFrameInterval; |
- break; |
- case kVideoCodecVP9: |
- config_.codec_settings->codecSpecific.VP9.denoisingOn = |
- denoising_on_; |
- config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers = |
- num_temporal_layers_; |
- config_.codec_settings->codecSpecific.VP9.frameDroppingOn = |
- frame_dropper_on_; |
- config_.codec_settings->codecSpecific.VP9.automaticResizeOn = |
- spatial_resize_on_; |
- config_.codec_settings->codecSpecific.VP9.keyFrameInterval = |
- kBaseKeyFrameInterval; |
- break; |
- default: |
- assert(false); |
- break; |
- } |
- frame_reader_ = |
- new webrtc::test::FrameReaderImpl(config_.input_filename, |
- config_.frame_length_in_bytes); |
- frame_writer_ = |
- new webrtc::test::FrameWriterImpl(config_.output_filename, |
- config_.frame_length_in_bytes); |
+ case kVideoCodecVP8: |
+ config_.codec_settings->codecSpecific.VP8.errorConcealmentOn = |
+ error_concealment_on_; |
+ config_.codec_settings->codecSpecific.VP8.denoisingOn = denoising_on_; |
+ config_.codec_settings->codecSpecific.VP8.numberOfTemporalLayers = |
+ num_temporal_layers_; |
+ config_.codec_settings->codecSpecific.VP8.frameDroppingOn = |
+ frame_dropper_on_; |
+ config_.codec_settings->codecSpecific.VP8.automaticResizeOn = |
+ spatial_resize_on_; |
+ config_.codec_settings->codecSpecific.VP8.keyFrameInterval = |
+ kBaseKeyFrameInterval; |
+ break; |
+ case kVideoCodecVP9: |
+ config_.codec_settings->codecSpecific.VP9.denoisingOn = denoising_on_; |
+ config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers = |
+ num_temporal_layers_; |
+ config_.codec_settings->codecSpecific.VP9.frameDroppingOn = |
+ frame_dropper_on_; |
+ config_.codec_settings->codecSpecific.VP9.automaticResizeOn = |
+ spatial_resize_on_; |
+ config_.codec_settings->codecSpecific.VP9.keyFrameInterval = |
+ kBaseKeyFrameInterval; |
+ break; |
+ default: |
+ assert(false); |
+ break; |
+ } |
+ frame_reader_ = new webrtc::test::FrameReaderImpl( |
+ config_.input_filename, config_.frame_length_in_bytes); |
+ frame_writer_ = new webrtc::test::FrameWriterImpl( |
+ config_.output_filename, config_.frame_length_in_bytes); |
ASSERT_TRUE(frame_reader_->Init()); |
ASSERT_TRUE(frame_writer_->Init()); |
packet_manipulator_ = new webrtc::test::PacketManipulatorImpl( |
&packet_reader_, config_.networking_config, config_.verbose); |
- processor_ = new webrtc::test::VideoProcessorImpl(encoder_, decoder_, |
- frame_reader_, |
- frame_writer_, |
- packet_manipulator_, |
- config_, &stats_); |
+ processor_ = new webrtc::test::VideoProcessorImpl( |
+ encoder_, decoder_, frame_reader_, frame_writer_, packet_manipulator_, |
+ config_, &stats_); |
ASSERT_TRUE(processor_->Init()); |
} |
@@ -247,7 +238,7 @@ class VideoProcessorIntegrationTest: public testing::Test { |
encoding_bitrate_[i] = 0.0f; |
// Update layer per-frame-bandwidth. |
per_frame_bandwidth_[i] = static_cast<float>(bit_rate_layer_[i]) / |
- static_cast<float>(frame_rate_layer_[i]); |
+ static_cast<float>(frame_rate_layer_[i]); |
} |
// Set maximum size of key frames, following setting in the VP8 wrapper. |
float max_key_size = kScaleKeyFrameSize * kOptimalBufferSize * frame_rate_; |
@@ -274,28 +265,28 @@ class VideoProcessorIntegrationTest: public testing::Test { |
// Update rate mismatch relative to per-frame bandwidth for delta frames. |
if (frame_type == kVideoFrameDelta) { |
// TODO(marpan): Should we count dropped (zero size) frames in mismatch? |
- sum_frame_size_mismatch_[layer_] += fabs(encoded_size_kbits - |
- per_frame_bandwidth_[layer_]) / |
- per_frame_bandwidth_[layer_]; |
+ sum_frame_size_mismatch_[layer_] += |
+ fabs(encoded_size_kbits - per_frame_bandwidth_[layer_]) / |
+ per_frame_bandwidth_[layer_]; |
} else { |
- float target_size = (frame_num == 1) ? target_size_key_frame_initial_ : |
- target_size_key_frame_; |
- sum_key_frame_size_mismatch_ += fabs(encoded_size_kbits - target_size) / |
- target_size; |
+ float target_size = (frame_num == 1) ? target_size_key_frame_initial_ |
+ : target_size_key_frame_; |
+ sum_key_frame_size_mismatch_ += |
+ fabs(encoded_size_kbits - target_size) / target_size; |
num_key_frames_ += 1; |
} |
sum_encoded_frame_size_[layer_] += encoded_size_kbits; |
// Encoding bitrate per layer: from the start of the update/run to the |
// current frame. |
encoding_bitrate_[layer_] = sum_encoded_frame_size_[layer_] * |
- frame_rate_layer_[layer_] / |
- num_frames_per_update_[layer_]; |
+ frame_rate_layer_[layer_] / |
+ num_frames_per_update_[layer_]; |
// Total encoding rate: from the start of the update/run to current frame. |
sum_encoded_frame_size_total_ += encoded_size_kbits; |
- encoding_bitrate_total_ = sum_encoded_frame_size_total_ * frame_rate_ / |
- num_frames_total_; |
- perc_encoding_rate_mismatch_ = 100 * fabs(encoding_bitrate_total_ - |
- bit_rate_) / bit_rate_; |
+ encoding_bitrate_total_ = |
+ sum_encoded_frame_size_total_ * frame_rate_ / num_frames_total_; |
+ perc_encoding_rate_mismatch_ = |
+ 100 * fabs(encoding_bitrate_total_ - bit_rate_) / bit_rate_; |
if (perc_encoding_rate_mismatch_ < kPercTargetvsActualMismatch && |
!encoding_rate_within_target_) { |
num_frames_to_hit_target_ = num_frames_total_; |
@@ -314,34 +305,38 @@ class VideoProcessorIntegrationTest: public testing::Test { |
int num_key_frames) { |
int num_dropped_frames = processor_->NumberDroppedFrames(); |
int num_resize_actions = processor_->NumberSpatialResizes(); |
- printf("For update #: %d,\n " |
+ printf( |
+ "For update #: %d,\n " |
" Target Bitrate: %d,\n" |
" Encoding bitrate: %f,\n" |
" Frame rate: %d \n", |
update_index, bit_rate_, encoding_bitrate_total_, frame_rate_); |
- printf(" Number of frames to approach target rate = %d, \n" |
- " Number of dropped frames = %d, \n" |
- " Number of spatial resizes = %d, \n", |
- num_frames_to_hit_target_, num_dropped_frames, num_resize_actions); |
+ printf( |
+ " Number of frames to approach target rate = %d, \n" |
+ " Number of dropped frames = %d, \n" |
+ " Number of spatial resizes = %d, \n", |
+ num_frames_to_hit_target_, num_dropped_frames, num_resize_actions); |
EXPECT_LE(perc_encoding_rate_mismatch_, max_encoding_rate_mismatch); |
if (num_key_frames_ > 0) { |
- int perc_key_frame_size_mismatch = 100 * sum_key_frame_size_mismatch_ / |
- num_key_frames_; |
- printf(" Number of Key frames: %d \n" |
- " Key frame rate mismatch: %d \n", |
- num_key_frames_, perc_key_frame_size_mismatch); |
+ int perc_key_frame_size_mismatch = |
+ 100 * sum_key_frame_size_mismatch_ / num_key_frames_; |
+ printf( |
+ " Number of Key frames: %d \n" |
+ " Key frame rate mismatch: %d \n", |
+ num_key_frames_, perc_key_frame_size_mismatch); |
EXPECT_LE(perc_key_frame_size_mismatch, max_key_frame_size_mismatch); |
} |
printf("\n"); |
printf("Rates statistics for Layer data \n"); |
- for (int i = 0; i < num_temporal_layers_ ; i++) { |
+ for (int i = 0; i < num_temporal_layers_; i++) { |
printf("Layer #%d \n", i); |
- int perc_frame_size_mismatch = 100 * sum_frame_size_mismatch_[i] / |
- num_frames_per_update_[i]; |
- int perc_encoding_rate_mismatch = 100 * fabs(encoding_bitrate_[i] - |
- bit_rate_layer_[i]) / |
- bit_rate_layer_[i]; |
- printf(" Target Layer Bit rate: %f \n" |
+ int perc_frame_size_mismatch = |
+ 100 * sum_frame_size_mismatch_[i] / num_frames_per_update_[i]; |
+ int perc_encoding_rate_mismatch = |
+ 100 * fabs(encoding_bitrate_[i] - bit_rate_layer_[i]) / |
+ bit_rate_layer_[i]; |
+ printf( |
+ " Target Layer Bit rate: %f \n" |
" Layer frame rate: %f, \n" |
" Layer per frame bandwidth: %f, \n" |
" Layer Encoding bit rate: %f, \n" |
@@ -366,13 +361,13 @@ class VideoProcessorIntegrationTest: public testing::Test { |
if (num_temporal_layers_ == 1) { |
layer_ = 0; |
} else if (num_temporal_layers_ == 2) { |
- // layer 0: 0 2 4 ... |
- // layer 1: 1 3 |
- if (frame_number % 2 == 0) { |
- layer_ = 0; |
- } else { |
- layer_ = 1; |
- } |
+ // layer 0: 0 2 4 ... |
+ // layer 1: 1 3 |
+ if (frame_number % 2 == 0) { |
+ layer_ = 0; |
+ } else { |
+ layer_ = 1; |
+ } |
} else if (num_temporal_layers_ == 3) { |
// layer 0: 0 4 8 ... |
// layer 1: 2 6 |
@@ -391,20 +386,20 @@ class VideoProcessorIntegrationTest: public testing::Test { |
// Set the bitrate and frame rate per layer, for up to 3 layers. |
void SetLayerRates() { |
- assert(num_temporal_layers_<= 3); |
+ assert(num_temporal_layers_ <= 3); |
for (int i = 0; i < num_temporal_layers_; i++) { |
float bit_rate_ratio = |
kVp8LayerRateAlloction[num_temporal_layers_ - 1][i]; |
if (i > 0) { |
- float bit_rate_delta_ratio = kVp8LayerRateAlloction |
- [num_temporal_layers_ - 1][i] - |
+ float bit_rate_delta_ratio = |
+ kVp8LayerRateAlloction[num_temporal_layers_ - 1][i] - |
kVp8LayerRateAlloction[num_temporal_layers_ - 1][i - 1]; |
bit_rate_layer_[i] = bit_rate_ * bit_rate_delta_ratio; |
} else { |
bit_rate_layer_[i] = bit_rate_ * bit_rate_ratio; |
} |
- frame_rate_layer_[i] = frame_rate_ / static_cast<float>( |
- 1 << (num_temporal_layers_ - 1)); |
+ frame_rate_layer_[i] = |
+ frame_rate_ / static_cast<float>(1 << (num_temporal_layers_ - 1)); |
} |
if (num_temporal_layers_ == 3) { |
frame_rate_layer_[2] = frame_rate_ / 2.0f; |
@@ -437,12 +432,12 @@ class VideoProcessorIntegrationTest: public testing::Test { |
spatial_resize_on_ = process.spatial_resize_on; |
SetUpCodecConfig(); |
// Update the layers and the codec with the initial rates. |
- bit_rate_ = rate_profile.target_bit_rate[0]; |
+ bit_rate_ = rate_profile.target_bit_rate[0]; |
frame_rate_ = rate_profile.input_frame_rate[0]; |
SetLayerRates(); |
// Set the initial target size for key frame. |
- target_size_key_frame_initial_ = 0.5 * kInitialBufferSize * |
- bit_rate_layer_[0]; |
+ target_size_key_frame_initial_ = |
+ 0.5 * kInitialBufferSize * bit_rate_layer_[0]; |
processor_->SetRates(bit_rate_, frame_rate_); |
// Process each frame, up to |num_frames|. |
int num_frames = rate_profile.num_frames; |
@@ -452,7 +447,7 @@ class VideoProcessorIntegrationTest: public testing::Test { |
int frame_number = 0; |
FrameType frame_type = kVideoFrameDelta; |
while (processor_->ProcessFrame(frame_number) && |
- frame_number < num_frames) { |
+ frame_number < num_frames) { |
// Get the layer index for the frame |frame_number|. |
LayerIndexForFrame(frame_number); |
// Get the frame_type. |
@@ -468,8 +463,7 @@ class VideoProcessorIntegrationTest: public testing::Test { |
if (frame_number == |
rate_profile.frame_index_rate_update[update_index + 1]) { |
VerifyRateControl( |
- update_index, |
- rc_metrics[update_index].max_key_frame_size_mismatch, |
+ update_index, rc_metrics[update_index].max_key_frame_size_mismatch, |
rc_metrics[update_index].max_delta_frame_size_mismatch, |
rc_metrics[update_index].max_encoding_rate_mismatch, |
rc_metrics[update_index].max_time_hit_target, |
@@ -478,23 +472,22 @@ class VideoProcessorIntegrationTest: public testing::Test { |
rc_metrics[update_index].num_key_frames); |
// Update layer rates and the codec with new rates. |
++update_index; |
- bit_rate_ = rate_profile.target_bit_rate[update_index]; |
+ bit_rate_ = rate_profile.target_bit_rate[update_index]; |
frame_rate_ = rate_profile.input_frame_rate[update_index]; |
SetLayerRates(); |
- ResetRateControlMetrics(rate_profile. |
- frame_index_rate_update[update_index + 1]); |
+ ResetRateControlMetrics( |
+ rate_profile.frame_index_rate_update[update_index + 1]); |
processor_->SetRates(bit_rate_, frame_rate_); |
} |
} |
- VerifyRateControl( |
- update_index, |
- rc_metrics[update_index].max_key_frame_size_mismatch, |
- rc_metrics[update_index].max_delta_frame_size_mismatch, |
- rc_metrics[update_index].max_encoding_rate_mismatch, |
- rc_metrics[update_index].max_time_hit_target, |
- rc_metrics[update_index].max_num_dropped_frames, |
- rc_metrics[update_index].num_spatial_resizes, |
- rc_metrics[update_index].num_key_frames); |
+ VerifyRateControl(update_index, |
+ rc_metrics[update_index].max_key_frame_size_mismatch, |
+ rc_metrics[update_index].max_delta_frame_size_mismatch, |
+ rc_metrics[update_index].max_encoding_rate_mismatch, |
+ rc_metrics[update_index].max_time_hit_target, |
+ rc_metrics[update_index].max_num_dropped_frames, |
+ rc_metrics[update_index].num_spatial_resizes, |
+ rc_metrics[update_index].num_key_frames); |
EXPECT_EQ(num_frames, frame_number); |
EXPECT_EQ(num_frames + 1, static_cast<int>(stats_.stats_.size())); |
@@ -507,16 +500,14 @@ class VideoProcessorIntegrationTest: public testing::Test { |
// TODO(marpan): should compute these quality metrics per SetRates update. |
webrtc::test::QualityMetricsResult psnr_result, ssim_result; |
- EXPECT_EQ(0, webrtc::test::I420MetricsFromFiles( |
- config_.input_filename.c_str(), |
- config_.output_filename.c_str(), |
- config_.codec_settings->width, |
- config_.codec_settings->height, |
- &psnr_result, |
- &ssim_result)); |
+ EXPECT_EQ( |
+ 0, webrtc::test::I420MetricsFromFiles( |
+ config_.input_filename.c_str(), config_.output_filename.c_str(), |
+ config_.codec_settings->width, config_.codec_settings->height, |
+ &psnr_result, &ssim_result)); |
printf("PSNR avg: %f, min: %f SSIM avg: %f, min: %f\n", |
- psnr_result.average, psnr_result.min, |
- ssim_result.average, ssim_result.min); |
+ psnr_result.average, psnr_result.min, ssim_result.average, |
+ ssim_result.min); |
stats_.PrintSummary(); |
EXPECT_GT(psnr_result.average, quality_metrics.minimum_avg_psnr); |
EXPECT_GT(psnr_result.min, quality_metrics.minimum_min_psnr); |
@@ -549,7 +540,7 @@ void SetCodecParameters(CodecConfigPars* process_settings, |
bool spatial_resize_on) { |
process_settings->codec_type = codec_type; |
process_settings->packet_loss = packet_loss; |
- process_settings->key_frame_interval = key_frame_interval; |
+ process_settings->key_frame_interval = key_frame_interval; |
process_settings->num_temporal_layers = num_temporal_layers, |
process_settings->error_concealment_on = error_concealment_on; |
process_settings->denoising_on = denoising_on; |
@@ -608,9 +599,7 @@ TEST_F(VideoProcessorIntegrationTest, Process0PercentPacketLossVP9) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -632,13 +621,10 @@ TEST_F(VideoProcessorIntegrationTest, Process5PercentPacketLossVP9) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
- |
// VP9: Run with no packet loss, with varying bitrate (3 rate updates): |
// low to high to medium. Check that quality and encoder response to the new |
// target rate/per-frame bandwidth (for each rate update) is within limits. |
@@ -663,9 +649,7 @@ TEST_F(VideoProcessorIntegrationTest, ProcessNoLossChangeBitRateVP9) { |
SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 30, 0, 1); |
SetRateControlMetrics(rc_metrics, 1, 2, 0, 20, 20, 60, 0, 0); |
SetRateControlMetrics(rc_metrics, 2, 0, 0, 25, 20, 40, 0, 0); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -698,9 +682,7 @@ TEST_F(VideoProcessorIntegrationTest, |
SetRateControlMetrics(rc_metrics, 0, 35, 50, 75, 15, 45, 0, 1); |
SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0); |
SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -721,9 +703,7 @@ TEST_F(VideoProcessorIntegrationTest, ProcessNoLossDenoiserOnVP9) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -739,17 +719,15 @@ TEST_F(VideoProcessorIntegrationTest, ProcessNoLossSpatialResizeFrameDropVP9) { |
rate_profile.num_frames = kNbrFramesLong; |
// Codec/network settings. |
CodecConfigPars process_settings; |
- SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, |
- 1, false, false, true, true); |
+ SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, |
+ false, true, true); |
// Metrics for expected quality. |
QualityMetrics quality_metrics; |
SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.37); |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 225, 70, 160, 15, 80, 1, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -775,9 +753,7 @@ TEST_F(VideoProcessorIntegrationTest, ProcessZeroPacketLoss) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 15, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -799,9 +775,7 @@ TEST_F(VideoProcessorIntegrationTest, Process5PercentPacketLoss) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 15, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -823,9 +797,7 @@ TEST_F(VideoProcessorIntegrationTest, Process10PercentPacketLoss) { |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 15, 0, 1); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -863,9 +835,7 @@ TEST_F(VideoProcessorIntegrationTest, |
SetRateControlMetrics(rc_metrics, 0, 0, 45, 20, 10, 15, 0, 1); |
SetRateControlMetrics(rc_metrics, 1, 0, 0, 25, 20, 10, 0, 0); |
SetRateControlMetrics(rc_metrics, 2, 0, 0, 25, 15, 10, 0, 0); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -898,9 +868,7 @@ TEST_F(VideoProcessorIntegrationTest, |
SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1); |
SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0); |
SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -916,17 +884,15 @@ TEST_F(VideoProcessorIntegrationTest, |
rate_profile.num_frames = kNbrFramesLong; |
// Codec/network settings. |
CodecConfigPars process_settings; |
- SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, |
- 1, false, true, true, true); |
+ SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false, |
+ true, true, true); |
// Metrics for expected quality. |
QualityMetrics quality_metrics; |
SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40); |
// Metrics for rate control. |
RateControlMetrics rc_metrics[1]; |
SetRateControlMetrics(rc_metrics, 0, 160, 60, 120, 20, 70, 1, 2); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
@@ -955,9 +921,7 @@ TEST_F(VideoProcessorIntegrationTest, |
RateControlMetrics rc_metrics[2]; |
SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
- ProcessFramesAndVerify(quality_metrics, |
- rate_profile, |
- process_settings, |
+ ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
rc_metrics); |
} |
} // namespace webrtc |