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

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

Issue 1547343002: Remove DISABLED_ON_ macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: MAYBE_ yo Created 4 years, 11 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
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
11 #include <math.h> 11 #include <math.h>
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 15 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
16 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" 16 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
17 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h" 17 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h"
18 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 18 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
19 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 19 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
20 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" 20 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
21 #include "webrtc/modules/video_coding/include/video_coding.h" 21 #include "webrtc/modules/video_coding/include/video_coding.h"
22 #include "webrtc/test/testsupport/fileutils.h" 22 #include "webrtc/test/testsupport/fileutils.h"
23 #include "webrtc/test/testsupport/frame_reader.h" 23 #include "webrtc/test/testsupport/frame_reader.h"
24 #include "webrtc/test/testsupport/frame_writer.h" 24 #include "webrtc/test/testsupport/frame_writer.h"
25 #include "webrtc/test/testsupport/gtest_disable.h"
26 #include "webrtc/test/testsupport/metrics/video_metrics.h" 25 #include "webrtc/test/testsupport/metrics/video_metrics.h"
27 #include "webrtc/test/testsupport/packet_reader.h" 26 #include "webrtc/test/testsupport/packet_reader.h"
28 #include "webrtc/typedefs.h" 27 #include "webrtc/typedefs.h"
29 28
30 namespace webrtc { 29 namespace webrtc {
31 30
32 // Maximum number of rate updates (i.e., calls to encoder to change bitrate 31 // Maximum number of rate updates (i.e., calls to encoder to change bitrate
33 // and/or frame rate) for the current tests. 32 // and/or frame rate) for the current tests.
34 const int kMaxNumRateUpdates = 3; 33 const int kMaxNumRateUpdates = 3;
35 34
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 // settings in the tests below are defined for encoder speed setting 806 // settings in the tests below are defined for encoder speed setting
808 // |cpu_speed| <= ~6. A number of settings would need to be significantly 807 // |cpu_speed| <= ~6. A number of settings would need to be significantly
809 // modified for the |cpu_speed| = 12 case. For now, keep the tests below 808 // modified for the |cpu_speed| = 12 case. For now, keep the tests below
810 // disabled on Android. Some quality parameter in the above test has been 809 // disabled on Android. Some quality parameter in the above test has been
811 // adjusted to also pass for |cpu_speed| <= 12. 810 // adjusted to also pass for |cpu_speed| <= 12.
812 811
813 // VP8: Run with no packet loss, with varying bitrate (3 rate updates): 812 // VP8: Run with no packet loss, with varying bitrate (3 rate updates):
814 // low to high to medium. Check that quality and encoder response to the new 813 // low to high to medium. Check that quality and encoder response to the new
815 // target rate/per-frame bandwidth (for each rate update) is within limits. 814 // target rate/per-frame bandwidth (for each rate update) is within limits.
816 // One key frame (first frame only) in sequence. 815 // One key frame (first frame only) in sequence.
817 TEST_F(VideoProcessorIntegrationTest, 816 #if defined(WEBRTC_ANDROID)
818 DISABLED_ON_ANDROID(ProcessNoLossChangeBitRateVP8)) { 817 #define MAYBE_ProcessNoLossChangeBitRateVP8 \
818 DISABLED_ProcessNoLossChangeBitRateVP8
819 #else
820 #define MAYBE_ProcessNoLossChangeBitRateVP8 ProcessNoLossChangeBitRateVP8
821 #endif
822 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossChangeBitRateVP8) {
819 // Bitrate and frame rate profile. 823 // Bitrate and frame rate profile.
820 RateProfile rate_profile; 824 RateProfile rate_profile;
821 SetRateProfilePars(&rate_profile, 0, 200, 30, 0); 825 SetRateProfilePars(&rate_profile, 0, 200, 30, 0);
822 SetRateProfilePars(&rate_profile, 1, 800, 30, 100); 826 SetRateProfilePars(&rate_profile, 1, 800, 30, 100);
823 SetRateProfilePars(&rate_profile, 2, 500, 30, 200); 827 SetRateProfilePars(&rate_profile, 2, 500, 30, 200);
824 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1; 828 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1;
825 rate_profile.num_frames = kNbrFramesLong; 829 rate_profile.num_frames = kNbrFramesLong;
826 // Codec/network settings. 830 // Codec/network settings.
827 CodecConfigPars process_settings; 831 CodecConfigPars process_settings;
828 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false, 832 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false,
(...skipping 10 matching lines...) Expand all
839 rc_metrics); 843 rc_metrics);
840 } 844 }
841 845
842 // VP8: Run with no packet loss, with an update (decrease) in frame rate. 846 // VP8: Run with no packet loss, with an update (decrease) in frame rate.
843 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. 847 // Lower frame rate means higher per-frame-bandwidth, so easier to encode.
844 // At the bitrate in this test, this means better rate control after the 848 // At the bitrate in this test, this means better rate control after the
845 // update(s) to lower frame rate. So expect less frame drops, and max values 849 // update(s) to lower frame rate. So expect less frame drops, and max values
846 // for the rate control metrics can be lower. One key frame (first frame only). 850 // for the rate control metrics can be lower. One key frame (first frame only).
847 // Note: quality after update should be higher but we currently compute quality 851 // Note: quality after update should be higher but we currently compute quality
848 // metrics averaged over whole sequence run. 852 // metrics averaged over whole sequence run.
853 #if defined(WEBRTC_ANDROID)
854 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8 \
855 DISABLED_ProcessNoLossChangeFrameRateFrameDropVP8
856 #else
857 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8 \
858 ProcessNoLossChangeFrameRateFrameDropVP8
859 #endif
849 TEST_F(VideoProcessorIntegrationTest, 860 TEST_F(VideoProcessorIntegrationTest,
850 DISABLED_ON_ANDROID(ProcessNoLossChangeFrameRateFrameDropVP8)) { 861 MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8) {
851 config_.networking_config.packet_loss_probability = 0; 862 config_.networking_config.packet_loss_probability = 0;
852 // Bitrate and frame rate profile. 863 // Bitrate and frame rate profile.
853 RateProfile rate_profile; 864 RateProfile rate_profile;
854 SetRateProfilePars(&rate_profile, 0, 80, 24, 0); 865 SetRateProfilePars(&rate_profile, 0, 80, 24, 0);
855 SetRateProfilePars(&rate_profile, 1, 80, 15, 100); 866 SetRateProfilePars(&rate_profile, 1, 80, 15, 100);
856 SetRateProfilePars(&rate_profile, 2, 80, 10, 200); 867 SetRateProfilePars(&rate_profile, 2, 80, 10, 200);
857 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1; 868 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1;
858 rate_profile.num_frames = kNbrFramesLong; 869 rate_profile.num_frames = kNbrFramesLong;
859 // Codec/network settings. 870 // Codec/network settings.
860 CodecConfigPars process_settings; 871 CodecConfigPars process_settings;
861 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false, 872 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false,
862 true, true, false); 873 true, true, false);
863 // Metrics for expected quality. 874 // Metrics for expected quality.
864 QualityMetrics quality_metrics; 875 QualityMetrics quality_metrics;
865 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65); 876 SetQualityMetrics(&quality_metrics, 31.0, 22.0, 0.80, 0.65);
866 // Metrics for rate control. 877 // Metrics for rate control.
867 RateControlMetrics rc_metrics[3]; 878 RateControlMetrics rc_metrics[3];
868 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1); 879 SetRateControlMetrics(rc_metrics, 0, 40, 20, 75, 15, 60, 0, 1);
869 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0); 880 SetRateControlMetrics(rc_metrics, 1, 10, 0, 25, 10, 35, 0, 0);
870 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0); 881 SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 10, 15, 0, 0);
871 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 882 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
872 rc_metrics); 883 rc_metrics);
873 } 884 }
874 885
875 // Run with no packet loss, at low bitrate. During this time we should've 886 // Run with no packet loss, at low bitrate. During this time we should've
876 // resized once. Expect 2 key frames generated (first and one for resize). 887 // resized once. Expect 2 key frames generated (first and one for resize).
888 #if defined(WEBRTC_ANDROID)
889 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \
890 DISABLED_ProcessNoLossSpatialResizeFrameDropVP8
891 #else
892 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \
893 ProcessNoLossSpatialResizeFrameDropVP8
894 #endif
877 TEST_F(VideoProcessorIntegrationTest, 895 TEST_F(VideoProcessorIntegrationTest,
878 DISABLED_ON_ANDROID(ProcessNoLossSpatialResizeFrameDropVP8)) { 896 MAYBE_ProcessNoLossSpatialResizeFrameDropVP8) {
879 config_.networking_config.packet_loss_probability = 0; 897 config_.networking_config.packet_loss_probability = 0;
880 // Bitrate and frame rate profile. 898 // Bitrate and frame rate profile.
881 RateProfile rate_profile; 899 RateProfile rate_profile;
882 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); 900 SetRateProfilePars(&rate_profile, 0, 50, 30, 0);
883 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; 901 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1;
884 rate_profile.num_frames = kNbrFramesLong; 902 rate_profile.num_frames = kNbrFramesLong;
885 // Codec/network settings. 903 // Codec/network settings.
886 CodecConfigPars process_settings; 904 CodecConfigPars process_settings;
887 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false, 905 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 1, false,
888 true, true, true); 906 true, true, true);
889 // Metrics for expected quality. 907 // Metrics for expected quality.
890 QualityMetrics quality_metrics; 908 QualityMetrics quality_metrics;
891 SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40); 909 SetQualityMetrics(&quality_metrics, 25.0, 15.0, 0.70, 0.40);
892 // Metrics for rate control. 910 // Metrics for rate control.
893 RateControlMetrics rc_metrics[1]; 911 RateControlMetrics rc_metrics[1];
894 SetRateControlMetrics(rc_metrics, 0, 160, 60, 120, 20, 70, 1, 2); 912 SetRateControlMetrics(rc_metrics, 0, 160, 60, 120, 20, 70, 1, 2);
895 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 913 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
896 rc_metrics); 914 rc_metrics);
897 } 915 }
898 916
899 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in 917 // VP8: Run with no packet loss, with 3 temporal layers, with a rate update in
900 // the middle of the sequence. The max values for the frame size mismatch and 918 // the middle of the sequence. The max values for the frame size mismatch and
901 // encoding rate mismatch are applied to each layer. 919 // encoding rate mismatch are applied to each layer.
902 // No dropped frames in this test, and internal spatial resizer is off. 920 // No dropped frames in this test, and internal spatial resizer is off.
903 // One key frame (first frame only) in sequence, so no spatial resizing. 921 // One key frame (first frame only) in sequence, so no spatial resizing.
904 TEST_F(VideoProcessorIntegrationTest, 922 #if defined(WEBRTC_ANDROID)
905 DISABLED_ON_ANDROID(ProcessNoLossTemporalLayersVP8)) { 923 #define MAYBE_ProcessNoLossTemporalLayersVP8 \
924 DISABLED_ProcessNoLossTemporalLayersVP8
925 #else
926 #define MAYBE_ProcessNoLossTemporalLayersVP8 ProcessNoLossTemporalLayersVP8
927 #endif
928 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossTemporalLayersVP8) {
906 config_.networking_config.packet_loss_probability = 0; 929 config_.networking_config.packet_loss_probability = 0;
907 // Bitrate and frame rate profile. 930 // Bitrate and frame rate profile.
908 RateProfile rate_profile; 931 RateProfile rate_profile;
909 SetRateProfilePars(&rate_profile, 0, 200, 30, 0); 932 SetRateProfilePars(&rate_profile, 0, 200, 30, 0);
910 SetRateProfilePars(&rate_profile, 1, 400, 30, 150); 933 SetRateProfilePars(&rate_profile, 1, 400, 30, 150);
911 rate_profile.frame_index_rate_update[2] = kNbrFramesLong + 1; 934 rate_profile.frame_index_rate_update[2] = kNbrFramesLong + 1;
912 rate_profile.num_frames = kNbrFramesLong; 935 rate_profile.num_frames = kNbrFramesLong;
913 // Codec/network settings. 936 // Codec/network settings.
914 CodecConfigPars process_settings; 937 CodecConfigPars process_settings;
915 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 3, false, 938 SetCodecParameters(&process_settings, kVideoCodecVP8, 0.0f, -1, 3, false,
916 true, true, false); 939 true, true, false);
917 // Metrics for expected quality. 940 // Metrics for expected quality.
918 QualityMetrics quality_metrics; 941 QualityMetrics quality_metrics;
919 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); 942 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80);
920 // Metrics for rate control. 943 // Metrics for rate control.
921 RateControlMetrics rc_metrics[2]; 944 RateControlMetrics rc_metrics[2];
922 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); 945 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1);
923 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); 946 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0);
924 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 947 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
925 rc_metrics); 948 rc_metrics);
926 } 949 }
927 } // namespace webrtc 950 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698