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

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

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: rebase Created 4 years 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65); 970 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65);
971 // Metrics for rate control. 971 // Metrics for rate control.
972 RateControlMetrics rc_metrics[3]; 972 RateControlMetrics rc_metrics[3];
973 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1); 973 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1);
974 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0); 974 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0);
975 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0); 975 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0);
976 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 976 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
977 rc_metrics); 977 rc_metrics);
978 } 978 }
979 979
980 // Run with no packet loss, at low bitrate. During this time we should've
981 // resized once. Expect 2 key frames generated (first and one for resize).
982 // Too slow to finish before timeout on iOS. See webrtc:4755.
983 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
984 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \
985 DISABLED_ProcessNoLossSpatialResizeFrameDropVP8
986 #else
987 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \
988 ProcessNoLossSpatialResizeFrameDropVP8
989 #endif
990 TEST_F(VideoProcessorIntegrationTest,
991 MAYBE_ProcessNoLossSpatialResizeFrameDropVP8) {
992 config_.networking_config.packet_loss_probability = 0;
993 // Bitrate and frame rate profile.
994 RateProfile rate_profile;
995 SetRateProfilePars(&rate_profile, 0, 50, 30, 0);
996 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1;
997 rate_profile.num_frames = kNbrFramesLong;
998 // Codec/network settings.
999 CodecConfigPars process_settings;
1000 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false,
1001 true, true, true);
1002 // Metrics for expected quality.
1003 QualityMetrics quality_metrics;
1004 SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40);
1005 // Metrics for rate control.
1006 RateControlMetrics rc_metrics[1];
1007 SetRateControlMetrics(rc_metrics, 0, 160, 80, 120, 20, 70, 1, 2);
1008 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
1009 rc_metrics);
1010 }
1011
1012 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in 980 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in
1013 // the middle of the sequence. The max values for the frame size mismatch and 981 // the middle of the sequence. The max values for the frame size mismatch and
1014 // encoding rate mismatch are applied to each layer. 982 // encoding rate mismatch are applied to each layer.
1015 // No dropped frames in this test, and internal spatial resizer is off. 983 // No dropped frames in this test, and internal spatial resizer is off.
1016 // One key frame (first frame only) in sequence, so no spatial resizing. 984 // One key frame (first frame only) in sequence, so no spatial resizing.
1017 // Too slow to finish before timeout on iOS. See webrtc:4755. 985 // Too slow to finish before timeout on iOS. See webrtc:4755.
1018 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) 986 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
1019 #define MAYBE_ProcessNoLossTemporalLayersVP8 \ 987 #define MAYBE_ProcessNoLossTemporalLayersVP8 \
1020 DISABLED_ProcessNoLossTemporalLayersVP8 988 DISABLED_ProcessNoLossTemporalLayersVP8
1021 #else 989 #else
(...skipping 15 matching lines...) Expand all
1037 QualityMetrics quality_metrics; 1005 QualityMetrics quality_metrics;
1038 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); 1006 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80);
1039 // Metrics for rate control. 1007 // Metrics for rate control.
1040 RateControlMetrics rc_metrics[2]; 1008 RateControlMetrics rc_metrics[2];
1041 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); 1009 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1);
1042 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); 1010 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0);
1043 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 1011 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
1044 rc_metrics); 1012 rc_metrics);
1045 } 1013 }
1046 } // namespace webrtc 1014 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698