OLD | NEW |
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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 // Metrics for rate control. | 721 // Metrics for rate control. |
722 RateControlMetrics rc_metrics[1]; | 722 RateControlMetrics rc_metrics[1]; |
723 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); | 723 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
724 ProcessFramesAndVerify(quality_metrics, | 724 ProcessFramesAndVerify(quality_metrics, |
725 rate_profile, | 725 rate_profile, |
726 process_settings, | 726 process_settings, |
727 rc_metrics); | 727 rc_metrics); |
728 } | 728 } |
729 | 729 |
730 // Run with no packet loss, at low bitrate. | 730 // Run with no packet loss, at low bitrate. |
731 // spatial_resize is on, and for this low bitrate expect two resizes during the | 731 // spatial_resize is on, for this low bitrate expect one resize in sequence. |
732 // sequence; first resize is 3/4, second is 1/2 (from original). | |
733 // Resize happens on delta frame. Expect only one key frame (first frame). | 732 // Resize happens on delta frame. Expect only one key frame (first frame). |
734 TEST_F(VideoProcessorIntegrationTest, | 733 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossSpatialResizeFrameDropVP9) { |
735 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9) { | |
736 config_.networking_config.packet_loss_probability = 0; | 734 config_.networking_config.packet_loss_probability = 0; |
737 // Bitrate and frame rate profile. | 735 // Bitrate and frame rate profile. |
738 RateProfile rate_profile; | 736 RateProfile rate_profile; |
739 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); | 737 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); |
740 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; | 738 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; |
741 rate_profile.num_frames = kNbrFramesLong; | 739 rate_profile.num_frames = kNbrFramesLong; |
742 // Codec/network settings. | 740 // Codec/network settings. |
743 CodecConfigPars process_settings; | 741 CodecConfigPars process_settings; |
744 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, | 742 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, |
745 1, false, false, true, true); | 743 1, false, false, true, true); |
746 // Metrics for expected quality. | 744 // Metrics for expected quality. |
747 QualityMetrics quality_metrics; | 745 QualityMetrics quality_metrics; |
748 SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.40); | 746 SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.40); |
749 // Metrics for rate control. | 747 // Metrics for rate control. |
750 RateControlMetrics rc_metrics[1]; | 748 RateControlMetrics rc_metrics[1]; |
751 SetRateControlMetrics(rc_metrics, 0, 180, 70, 130, 15, 80, 2, 1); | 749 SetRateControlMetrics(rc_metrics, 0, 185, 70, 130, 15, 80, 1, 1); |
752 ProcessFramesAndVerify(quality_metrics, | 750 ProcessFramesAndVerify(quality_metrics, |
753 rate_profile, | 751 rate_profile, |
754 process_settings, | 752 process_settings, |
755 rc_metrics); | 753 rc_metrics); |
756 } | 754 } |
757 | 755 |
758 // TODO(marpan): Add temporal layer test for VP9, once changes are in | 756 // TODO(marpan): Add temporal layer test for VP9, once changes are in |
759 // vp9 wrapper for this. | 757 // vp9 wrapper for this. |
760 | 758 |
761 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. | 759 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 // Metrics for rate control. | 954 // Metrics for rate control. |
957 RateControlMetrics rc_metrics[2]; | 955 RateControlMetrics rc_metrics[2]; |
958 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); | 956 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
959 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); | 957 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
960 ProcessFramesAndVerify(quality_metrics, | 958 ProcessFramesAndVerify(quality_metrics, |
961 rate_profile, | 959 rate_profile, |
962 process_settings, | 960 process_settings, |
963 rc_metrics); | 961 rc_metrics); |
964 } | 962 } |
965 } // namespace webrtc | 963 } // namespace webrtc |
OLD | NEW |