Remove deprecated heavy_metrics_computation_enabled
Bug: None Change-Id: Ieaccca83559d0f17b394c2c9bbc8d52acbaebcdb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256601 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36314}
This commit is contained in:
parent
195b0a9849
commit
6a15e3ba5c
@ -363,10 +363,7 @@ void DefaultVideoQualityAnalyzerFramesComparator::ProcessComparison(
|
||||
// Perform expensive psnr and ssim calculations while not holding lock.
|
||||
double psnr = -1.0;
|
||||
double ssim = -1.0;
|
||||
// TODO(brandtr): Remove `heavy_metrics_computation_enabled` when downstream
|
||||
// has been updated.
|
||||
if ((options_.heavy_metrics_computation_enabled || options_.compute_psnr ||
|
||||
options_.compute_ssim) &&
|
||||
if ((options_.compute_psnr || options_.compute_ssim) &&
|
||||
comparison.captured.has_value() && comparison.rendered.has_value()) {
|
||||
rtc::scoped_refptr<I420BufferInterface> reference_buffer =
|
||||
comparison.captured->video_frame_buffer()->ToI420();
|
||||
|
||||
@ -31,7 +31,8 @@ constexpr int kMaxFramesInFlightPerStream = 10;
|
||||
|
||||
DefaultVideoQualityAnalyzerOptions AnalyzerOptionsForTest() {
|
||||
DefaultVideoQualityAnalyzerOptions options;
|
||||
options.heavy_metrics_computation_enabled = false;
|
||||
options.compute_psnr = false;
|
||||
options.compute_ssim = false;
|
||||
options.adjust_cropping_before_comparing_frames = false;
|
||||
options.max_frames_in_flight_per_stream_count = kMaxFramesInFlightPerStream;
|
||||
return options;
|
||||
|
||||
@ -214,8 +214,6 @@ struct DefaultVideoQualityAnalyzerOptions {
|
||||
bool compute_ssim = true;
|
||||
// If true, weights the luma plane more than the chroma planes in the PSNR.
|
||||
bool use_weighted_psnr = false;
|
||||
// DEPRECATED.
|
||||
bool heavy_metrics_computation_enabled = true;
|
||||
// If true DefaultVideoQualityAnalyzer will try to adjust frames before
|
||||
// computing PSNR and SSIM for them. In some cases picture may be shifted by
|
||||
// a few pixels after the encode/decode step. Those difference is invisible
|
||||
|
||||
@ -44,7 +44,8 @@ constexpr char kReceiverPeerName[] = "bob";
|
||||
|
||||
DefaultVideoQualityAnalyzerOptions AnalyzerOptionsForTest() {
|
||||
DefaultVideoQualityAnalyzerOptions options;
|
||||
options.heavy_metrics_computation_enabled = false;
|
||||
options.compute_psnr = false;
|
||||
options.compute_ssim = false;
|
||||
options.adjust_cropping_before_comparing_frames = false;
|
||||
options.max_frames_in_flight_per_stream_count = kMaxFramesInFlightPerStream;
|
||||
return options;
|
||||
@ -596,7 +597,8 @@ TEST(DefaultVideoQualityAnalyzerTest, HeavyQualityMetricsFromEqualFrames) {
|
||||
/*num_squares=*/absl::nullopt);
|
||||
|
||||
DefaultVideoQualityAnalyzerOptions analyzer_options;
|
||||
analyzer_options.heavy_metrics_computation_enabled = true;
|
||||
analyzer_options.compute_psnr = true;
|
||||
analyzer_options.compute_ssim = true;
|
||||
analyzer_options.adjust_cropping_before_comparing_frames = false;
|
||||
analyzer_options.max_frames_in_flight_per_stream_count =
|
||||
kMaxFramesInFlightPerStream;
|
||||
@ -654,7 +656,8 @@ TEST(DefaultVideoQualityAnalyzerTest,
|
||||
/*num_squares=*/absl::nullopt);
|
||||
|
||||
DefaultVideoQualityAnalyzerOptions analyzer_options;
|
||||
analyzer_options.heavy_metrics_computation_enabled = true;
|
||||
analyzer_options.compute_psnr = true;
|
||||
analyzer_options.compute_ssim = true;
|
||||
analyzer_options.adjust_cropping_before_comparing_frames = true;
|
||||
analyzer_options.max_frames_in_flight_per_stream_count =
|
||||
kMaxFramesInFlightPerStream;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user