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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65); | 932 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65); |
933 // Metrics for rate control. | 933 // Metrics for rate control. |
934 RateControlMetrics rc_metrics[3]; | 934 RateControlMetrics rc_metrics[3]; |
935 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1); | 935 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1); |
936 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0); | 936 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0); |
937 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0); | 937 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0); |
938 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 938 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
939 rc_metrics); | 939 rc_metrics); |
940 } | 940 } |
941 | 941 |
942 // Run with no packet loss, at low bitrate. During this time we should've | |
943 // resized once. Expect 2 key frames generated (first and one for resize). | |
944 // Too slow to finish before timeout on iOS. See webrtc:4755. | |
945 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) | |
946 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \ | |
947 DISABLED_ProcessNoLossSpatialResizeFrameDropVP8 | |
948 #else | |
949 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \ | |
950 ProcessNoLossSpatialResizeFrameDropVP8 | |
951 #endif | |
952 TEST_F(VideoProcessorIntegrationTest, | |
953 MAYBE_ProcessNoLossSpatialResizeFrameDropVP8) { | |
954 config_.networking_config.packet_loss_probability = 0; | |
955 // Bitrate and frame rate profile. | |
956 RateProfile rate_profile; | |
957 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); | |
958 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; | |
959 rate_profile.num_frames = kNbrFramesLong; | |
960 // Codec/network settings. | |
961 CodecConfigPars process_settings; | |
962 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false, | |
963 true, true, true); | |
964 // Metrics for expected quality. | |
965 QualityMetrics quality_metrics; | |
966 SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40); | |
967 // Metrics for rate control. | |
968 RateControlMetrics rc_metrics[1]; | |
969 SetRateControlMetrics(rc_metrics, 0, 160, 80, 120, 20, 70, 1, 2); | |
970 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | |
971 rc_metrics); | |
972 } | |
973 | |
974 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in | 942 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in |
975 // the middle of the sequence. The max values for the frame size mismatch and | 943 // the middle of the sequence. The max values for the frame size mismatch and |
976 // encoding rate mismatch are applied to each layer. | 944 // encoding rate mismatch are applied to each layer. |
977 // No dropped frames in this test, and internal spatial resizer is off. | 945 // No dropped frames in this test, and internal spatial resizer is off. |
978 // One key frame (first frame only) in sequence, so no spatial resizing. | 946 // One key frame (first frame only) in sequence, so no spatial resizing. |
979 // Too slow to finish before timeout on iOS. See webrtc:4755. | 947 // Too slow to finish before timeout on iOS. See webrtc:4755. |
980 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) | 948 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
981 #define MAYBE_ProcessNoLossTemporalLayersVP8 \ | 949 #define MAYBE_ProcessNoLossTemporalLayersVP8 \ |
982 DISABLED_ProcessNoLossTemporalLayersVP8 | 950 DISABLED_ProcessNoLossTemporalLayersVP8 |
983 #else | 951 #else |
(...skipping 15 matching lines...) Expand all Loading... |
999 QualityMetrics quality_metrics; | 967 QualityMetrics quality_metrics; |
1000 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); | 968 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); |
1001 // Metrics for rate control. | 969 // Metrics for rate control. |
1002 RateControlMetrics rc_metrics[2]; | 970 RateControlMetrics rc_metrics[2]; |
1003 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); | 971 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
1004 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); | 972 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
1005 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 973 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
1006 rc_metrics); | 974 rc_metrics); |
1007 } | 975 } |
1008 } // namespace webrtc | 976 } // namespace webrtc |
OLD | NEW |