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

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

Issue 1323943007: VP9: Add automaticeResize to codec setting. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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/common_types.h ('k') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('j') | 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) 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 config_.codec_settings->codecSpecific.VP8.keyFrameInterval = 201 config_.codec_settings->codecSpecific.VP8.keyFrameInterval =
202 kBaseKeyFrameInterval; 202 kBaseKeyFrameInterval;
203 break; 203 break;
204 case kVideoCodecVP9: 204 case kVideoCodecVP9:
205 config_.codec_settings->codecSpecific.VP9.denoisingOn = 205 config_.codec_settings->codecSpecific.VP9.denoisingOn =
206 denoising_on_; 206 denoising_on_;
207 config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers = 207 config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers =
208 num_temporal_layers_; 208 num_temporal_layers_;
209 config_.codec_settings->codecSpecific.VP9.frameDroppingOn = 209 config_.codec_settings->codecSpecific.VP9.frameDroppingOn =
210 frame_dropper_on_; 210 frame_dropper_on_;
211 config_.codec_settings->codecSpecific.VP9.automaticResizeOn =
212 spatial_resize_on_;
211 config_.codec_settings->codecSpecific.VP9.keyFrameInterval = 213 config_.codec_settings->codecSpecific.VP9.keyFrameInterval =
212 kBaseKeyFrameInterval; 214 kBaseKeyFrameInterval;
213 break; 215 break;
214 default: 216 default:
215 assert(false); 217 assert(false);
216 break; 218 break;
217 } 219 }
218 frame_reader_ = 220 frame_reader_ =
219 new webrtc::test::FrameReaderImpl(config_.input_filename, 221 new webrtc::test::FrameReaderImpl(config_.input_filename,
220 config_.frame_length_in_bytes); 222 config_.frame_length_in_bytes);
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91); 721 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91);
720 // Metrics for rate control. 722 // Metrics for rate control.
721 RateControlMetrics rc_metrics[1]; 723 RateControlMetrics rc_metrics[1];
722 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0); 724 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0);
723 ProcessFramesAndVerify(quality_metrics, 725 ProcessFramesAndVerify(quality_metrics,
724 rate_profile, 726 rate_profile,
725 process_settings, 727 process_settings,
726 rc_metrics); 728 rc_metrics);
727 } 729 }
728 730
731 // Run with no packet loss, at low bitrate.
732 // |spatial_resizei| is on, so expect one resize during the sequence,
stefan-webrtc 2015/09/03 12:27:52 spatial_resize
mflodman 2015/09/03 12:40:26 Remove 'i' in "spatial_resizei".
marpan 2015/09/04 21:45:45 Done.
733 // resize happens on delta frame (only first frame is key frame).
734 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossSpatialResizeFrameDropVP9) {
735 config_.networking_config.packet_loss_probability = 0;
736 // Bitrate and frame rate profile.
737 RateProfile rate_profile;
738 SetRateProfilePars(&rate_profile, 0, 50, 30, 0);
739 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1;
740 rate_profile.num_frames = kNbrFramesLong;
741 // Codec/network settings.
742 CodecConfigPars process_settings;
743 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1,
744 1, false, false, true, true);
745 // Metrics for expected quality.
746 QualityMetrics quality_metrics;
747 SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.40);
748 // Metrics for rate control.
749 RateControlMetrics rc_metrics[1];
750 SetRateControlMetrics(rc_metrics, 0, 160, 70, 120, 10, 80, 1);
751 ProcessFramesAndVerify(quality_metrics,
752 rate_profile,
753 process_settings,
754 rc_metrics);
stefan-webrtc 2015/09/03 12:27:52 Is there any way to actually verify that only the
marpan 2015/09/04 21:45:45 Done. Added that for all the tests.
755 }
756
729 // TODO(marpan): Add temporal layer test for VP9, once changes are in 757 // TODO(marpan): Add temporal layer test for VP9, once changes are in
730 // vp9 wrapper for this. 758 // vp9 wrapper for this.
731 759
732 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. 760 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high.
733 // One key frame (first frame only) in sequence. Setting |key_frame_interval| 761 // One key frame (first frame only) in sequence. Setting |key_frame_interval|
734 // to -1 below means no periodic key frames in test. 762 // to -1 below means no periodic key frames in test.
735 TEST_F(VideoProcessorIntegrationTest, ProcessZeroPacketLoss) { 763 TEST_F(VideoProcessorIntegrationTest, ProcessZeroPacketLoss) {
736 // Bitrate and frame rate profile. 764 // Bitrate and frame rate profile.
737 RateProfile rate_profile; 765 RateProfile rate_profile;
738 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); 766 SetRateProfilePars(&rate_profile, 0, 500, 30, 0);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 // Metrics for rate control. 955 // Metrics for rate control.
928 RateControlMetrics rc_metrics[2]; 956 RateControlMetrics rc_metrics[2];
929 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0); 957 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0);
930 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0); 958 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0);
931 ProcessFramesAndVerify(quality_metrics, 959 ProcessFramesAndVerify(quality_metrics,
932 rate_profile, 960 rate_profile,
933 process_settings, 961 process_settings,
934 rc_metrics); 962 rc_metrics);
935 } 963 }
936 } // namespace webrtc 964 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698