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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 SetQualityMetrics(&quality_metrics, 35.7, 30.0, 0.90, 0.85); | 645 SetQualityMetrics(&quality_metrics, 35.7, 30.0, 0.90, 0.85); |
646 // Metrics for rate control. | 646 // Metrics for rate control. |
647 RateControlMetrics rc_metrics[3]; | 647 RateControlMetrics rc_metrics[3]; |
648 SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 30, 0, 1); | 648 SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 30, 0, 1); |
649 SetRateControlMetrics(rc_metrics, 1, 2, 0, 20, 20, 60, 0, 0); | 649 SetRateControlMetrics(rc_metrics, 1, 2, 0, 20, 20, 60, 0, 0); |
650 SetRateControlMetrics(rc_metrics, 2, 0, 0, 25, 20, 40, 0, 0); | 650 SetRateControlMetrics(rc_metrics, 2, 0, 0, 25, 20, 40, 0, 0); |
651 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 651 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
652 rc_metrics); | 652 rc_metrics); |
653 } | 653 } |
654 | 654 |
655 #if defined(WEBRTC_ANDROID) | |
656 // Fails on Android, see | |
657 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5401 | |
658 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ | |
659 DISABLED_ProcessNoLossChangeFrameRateFrameDropVP9 | |
660 #else | |
661 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ | |
662 ProcessNoLossChangeFrameRateFrameDropVP9 | |
663 #endif | |
664 // VP9: Run with no packet loss, with an update (decrease) in frame rate. | 655 // VP9: Run with no packet loss, with an update (decrease) in frame rate. |
665 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. | 656 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. |
666 // At the low bitrate in this test, this means better rate control after the | 657 // At the low bitrate in this test, this means better rate control after the |
667 // update(s) to lower frame rate. So expect less frame drops, and max values | 658 // update(s) to lower frame rate. So expect less frame drops, and max values |
668 // for the rate control metrics can be lower. One key frame (first frame only). | 659 // for the rate control metrics can be lower. One key frame (first frame only). |
669 // Note: quality after update should be higher but we currently compute quality | 660 // Note: quality after update should be higher but we currently compute quality |
670 // metrics averaged over whole sequence run. | 661 // metrics averaged over whole sequence run. |
671 TEST_F(VideoProcessorIntegrationTest, | 662 TEST_F(VideoProcessorIntegrationTest, |
672 MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9) { | 663 ProcessNoLossChangeFrameRateFrameDropVP9) { |
673 config_.networking_config.packet_loss_probability = 0; | 664 config_.networking_config.packet_loss_probability = 0; |
674 // Bitrate and frame rate profile. | 665 // Bitrate and frame rate profile. |
675 RateProfile rate_profile; | 666 RateProfile rate_profile; |
676 SetRateProfilePars(&rate_profile, 0, 100, 24, 0); | 667 SetRateProfilePars(&rate_profile, 0, 100, 24, 0); |
677 SetRateProfilePars(&rate_profile, 1, 100, 15, 100); | 668 SetRateProfilePars(&rate_profile, 1, 100, 15, 100); |
678 SetRateProfilePars(&rate_profile, 2, 100, 10, 200); | 669 SetRateProfilePars(&rate_profile, 2, 100, 10, 200); |
679 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1; | 670 rate_profile.frame_index_rate_update[3] = kNbrFramesLong + 1; |
680 rate_profile.num_frames = kNbrFramesLong; | 671 rate_profile.num_frames = kNbrFramesLong; |
681 // Codec/network settings. | 672 // Codec/network settings. |
682 CodecConfigPars process_settings; | 673 CodecConfigPars process_settings; |
(...skipping 25 matching lines...) Expand all Loading... |
708 // Metrics for expected quality. | 699 // Metrics for expected quality. |
709 QualityMetrics quality_metrics; | 700 QualityMetrics quality_metrics; |
710 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91); | 701 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91); |
711 // Metrics for rate control. | 702 // Metrics for rate control. |
712 RateControlMetrics rc_metrics[1]; | 703 RateControlMetrics rc_metrics[1]; |
713 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); | 704 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
714 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 705 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
715 rc_metrics); | 706 rc_metrics); |
716 } | 707 } |
717 | 708 |
718 #if defined(WEBRTC_ANDROID) | |
719 // Fails on Android, see | |
720 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5401 | |
721 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ | |
722 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9 | |
723 #else | |
724 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ | |
725 ProcessNoLossSpatialResizeFrameDropVP9 | |
726 #endif | |
727 // Run with no packet loss, at low bitrate. | 709 // Run with no packet loss, at low bitrate. |
728 // spatial_resize is on, for this low bitrate expect one resize in sequence. | 710 // spatial_resize is on, for this low bitrate expect one resize in sequence. |
729 // Resize happens on delta frame. Expect only one key frame (first frame). | 711 // Resize happens on delta frame. Expect only one key frame (first frame). |
730 TEST_F(VideoProcessorIntegrationTest, | 712 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossSpatialResizeFrameDropVP9) { |
731 MAYBE_ProcessNoLossSpatialResizeFrameDropVP9) { | |
732 config_.networking_config.packet_loss_probability = 0; | 713 config_.networking_config.packet_loss_probability = 0; |
733 // Bitrate and frame rate profile. | 714 // Bitrate and frame rate profile. |
734 RateProfile rate_profile; | 715 RateProfile rate_profile; |
735 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); | 716 SetRateProfilePars(&rate_profile, 0, 50, 30, 0); |
736 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; | 717 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; |
737 rate_profile.num_frames = kNbrFramesLong; | 718 rate_profile.num_frames = kNbrFramesLong; |
738 // Codec/network settings. | 719 // Codec/network settings. |
739 CodecConfigPars process_settings; | 720 CodecConfigPars process_settings; |
740 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, | 721 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, |
741 false, true, true); | 722 false, true, true); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 QualityMetrics quality_metrics; | 941 QualityMetrics quality_metrics; |
961 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); | 942 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); |
962 // Metrics for rate control. | 943 // Metrics for rate control. |
963 RateControlMetrics rc_metrics[2]; | 944 RateControlMetrics rc_metrics[2]; |
964 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); | 945 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
965 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); | 946 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
966 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 947 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
967 rc_metrics); | 948 rc_metrics); |
968 } | 949 } |
969 } // namespace webrtc | 950 } // namespace webrtc |
OLD | NEW |