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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 3004603002: Update jpeg writer to compile on iOS and document it better (Closed)
Patch Set: Rename jpeg_frame_writer_dummy.cc to jpeg_frame_writer_ios.cc Created 3 years, 3 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
« no previous file with comments | « webrtc/video/replay.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 #include "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 printf("RESULT cpu_usage: %s = %lf %%\n", test_label_.c_str(), 828 printf("RESULT cpu_usage: %s = %lf %%\n", test_label_.c_str(),
829 GetCpuUsagePercent()); 829 GetCpuUsagePercent());
830 830
831 #if defined(WEBRTC_WIN) 831 #if defined(WEBRTC_WIN)
832 // On Linux and Mac in Resident Set some unused pages may be counted. 832 // On Linux and Mac in Resident Set some unused pages may be counted.
833 // Therefore this metric will depend on order in which tests are run and 833 // Therefore this metric will depend on order in which tests are run and
834 // will be flaky. 834 // will be flaky.
835 PrintResult("memory_usage", memory_usage_, " bytes"); 835 PrintResult("memory_usage", memory_usage_, " bytes");
836 #endif 836 #endif
837 837
838 // LibJpeg is not available on iOS.
839 #if !defined(WEBRTC_IOS)
840 // Saving only the worst frame for manual analysis. Intention here is to 838 // Saving only the worst frame for manual analysis. Intention here is to
841 // only detect video corruptions and not to track picture quality. Thus, 839 // only detect video corruptions and not to track picture quality. Thus,
842 // jpeg is used here. 840 // jpeg is used here.
843 if (FLAGS_save_worst_frame && worst_frame_) { 841 if (FLAGS_save_worst_frame && worst_frame_) {
844 std::string output_dir; 842 std::string output_dir;
845 test::GetTestOutputDir(&output_dir); 843 test::GetTestOutputDir(&output_dir);
846 std::string output_path = 844 std::string output_path =
847 rtc::Pathname(output_dir, test_label_ + ".jpg").pathname(); 845 rtc::Pathname(output_dir, test_label_ + ".jpg").pathname();
848 LOG(LS_INFO) << "Saving worst frame to " << output_path; 846 LOG(LS_INFO) << "Saving worst frame to " << output_path;
849 test::JpegFrameWriter frame_writer(output_path); 847 test::JpegFrameWriter frame_writer(output_path);
850 RTC_CHECK(frame_writer.WriteFrame(worst_frame_->frame, 848 RTC_CHECK(frame_writer.WriteFrame(worst_frame_->frame,
851 100 /*best quality*/)); 849 100 /*best quality*/));
852 } 850 }
853 #endif
854 851
855 // Disable quality check for quick test, as quality checks may fail 852 // Disable quality check for quick test, as quality checks may fail
856 // because too few samples were collected. 853 // because too few samples were collected.
857 if (!is_quick_test_enabled_) { 854 if (!is_quick_test_enabled_) {
858 EXPECT_GT(psnr_.Mean(), avg_psnr_threshold_); 855 EXPECT_GT(psnr_.Mean(), avg_psnr_threshold_);
859 EXPECT_GT(ssim_.Mean(), avg_ssim_threshold_); 856 EXPECT_GT(ssim_.Mean(), avg_ssim_threshold_);
860 } 857 }
861 } 858 }
862 859
863 void PerformFrameComparison(const FrameComparison& comparison) { 860 void PerformFrameComparison(const FrameComparison& comparison) {
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 if (!params_.logging.encoded_frame_base_path.empty()) { 2156 if (!params_.logging.encoded_frame_base_path.empty()) {
2160 std::ostringstream str; 2157 std::ostringstream str;
2161 str << receive_logs_++; 2158 str << receive_logs_++;
2162 std::string path = 2159 std::string path =
2163 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 2160 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
2164 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 2161 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
2165 100000000); 2162 100000000);
2166 } 2163 }
2167 } 2164 }
2168 } // namespace webrtc 2165 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/replay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698