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