Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc

Issue 2020593002: Refactor scaling. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trivial rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 config_.codec_settings->width, config_.codec_settings->height, 518 config_.codec_settings->width, config_.codec_settings->height,
519 &psnr_result, &ssim_result)); 519 &psnr_result, &ssim_result));
520 printf("PSNR avg: %f, min: %f SSIM avg: %f, min: %f\n", 520 printf("PSNR avg: %f, min: %f SSIM avg: %f, min: %f\n",
521 psnr_result.average, psnr_result.min, ssim_result.average, 521 psnr_result.average, psnr_result.min, ssim_result.average,
522 ssim_result.min); 522 ssim_result.min);
523 stats_.PrintSummary(); 523 stats_.PrintSummary();
524 EXPECT_GT(psnr_result.average, quality_metrics.minimum_avg_psnr); 524 EXPECT_GT(psnr_result.average, quality_metrics.minimum_avg_psnr);
525 EXPECT_GT(psnr_result.min, quality_metrics.minimum_min_psnr); 525 EXPECT_GT(psnr_result.min, quality_metrics.minimum_min_psnr);
526 EXPECT_GT(ssim_result.average, quality_metrics.minimum_avg_ssim); 526 EXPECT_GT(ssim_result.average, quality_metrics.minimum_avg_ssim);
527 EXPECT_GT(ssim_result.min, quality_metrics.minimum_min_ssim); 527 EXPECT_GT(ssim_result.min, quality_metrics.minimum_min_ssim);
528 if (!remove(config_.output_filename.c_str())) { 528 if (remove(config_.output_filename.c_str()) < 0) {
529 fprintf(stderr, "Failed to remove temporary file!"); 529 fprintf(stderr, "Failed to remove temporary file!\n");
530 } 530 }
531 } 531 }
532 }; 532 };
533 533
534 void SetRateProfilePars(RateProfile* rate_profile, 534 void SetRateProfilePars(RateProfile* rate_profile,
535 int update_index, 535 int update_index,
536 int bit_rate, 536 int bit_rate,
537 int frame_rate, 537 int frame_rate,
538 int frame_index_rate_update) { 538 int frame_index_rate_update) {
539 rate_profile->target_bit_rate[update_index] = bit_rate; 539 rate_profile->target_bit_rate[update_index] = bit_rate;
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 QualityMetrics quality_metrics; 997 QualityMetrics quality_metrics;
998 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); 998 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80);
999 // Metrics for rate control. 999 // Metrics for rate control.
1000 RateControlMetrics rc_metrics[2]; 1000 RateControlMetrics rc_metrics[2];
1001 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); 1001 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1);
1002 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); 1002 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0);
1003 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 1003 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
1004 rc_metrics); 1004 rc_metrics);
1005 } 1005 }
1006 } // namespace webrtc 1006 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/videoprocessor.cc ('k') | webrtc/modules/video_coding/codecs/vp8/vp8_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698