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

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

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

Powered by Google App Engine
This is Rietveld 408576698