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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 #endif // defined(WEBRTC_VIDEOPROCESSOR_H264_TESTS) | 619 #endif // defined(WEBRTC_VIDEOPROCESSOR_H264_TESTS) |
620 | 620 |
621 // Fails on iOS. See webrtc:4755. | 621 // Fails on iOS. See webrtc:4755. |
622 #if !defined(WEBRTC_IOS) | 622 #if !defined(WEBRTC_IOS) |
623 | 623 |
624 #if !defined(RTC_DISABLE_VP9) | 624 #if !defined(RTC_DISABLE_VP9) |
625 // VP9: Run with no packet loss and fixed bitrate. Quality should be very high. | 625 // VP9: Run with no packet loss and fixed bitrate. Quality should be very high. |
626 // One key frame (first frame only) in sequence. Setting |key_frame_interval| | 626 // One key frame (first frame only) in sequence. Setting |key_frame_interval| |
627 // to -1 below means no periodic key frames in test. | 627 // to -1 below means no periodic key frames in test. |
628 | 628 |
629 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) | 629 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) || \ |
630 // Fails on TSan and UBSan: https://bugs.webrtc.org/6781. | 630 (defined(WEBRTC_ARCH_32_BITS) && defined(WEBRTC_LINUX)) |
| 631 // Fails on TSan, UBSan and Linux 32-bit: https://bugs.webrtc.org/6781. |
631 #define MAYBE_Process0PercentPacketLossVP9 DISABLED_Process0PercentPacketLossVP9 | 632 #define MAYBE_Process0PercentPacketLossVP9 DISABLED_Process0PercentPacketLossVP9 |
632 #else | 633 #else |
633 #define MAYBE_Process0PercentPacketLossVP9 Process0PercentPacketLossVP9 | 634 #define MAYBE_Process0PercentPacketLossVP9 Process0PercentPacketLossVP9 |
634 #endif | 635 #endif |
635 TEST_F(VideoProcessorIntegrationTest, MAYBE_Process0PercentPacketLossVP9) { | 636 TEST_F(VideoProcessorIntegrationTest, MAYBE_Process0PercentPacketLossVP9) { |
636 // Bitrate and frame rate profile. | 637 // Bitrate and frame rate profile. |
637 RateProfile rate_profile; | 638 RateProfile rate_profile; |
638 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); | 639 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); |
639 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1; | 640 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1; |
640 rate_profile.num_frames = kNbrFramesShort; | 641 rate_profile.num_frames = kNbrFramesShort; |
(...skipping 30 matching lines...) Expand all Loading... |
671 RateControlMetrics rc_metrics[1]; | 672 RateControlMetrics rc_metrics[1]; |
672 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); | 673 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
673 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 674 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
674 rc_metrics); | 675 rc_metrics); |
675 } | 676 } |
676 | 677 |
677 // VP9: Run with no packet loss, with varying bitrate (3 rate updates): | 678 // VP9: Run with no packet loss, with varying bitrate (3 rate updates): |
678 // low to high to medium. Check that quality and encoder response to the new | 679 // low to high to medium. Check that quality and encoder response to the new |
679 // target rate/per-frame bandwidth (for each rate update) is within limits. | 680 // target rate/per-frame bandwidth (for each rate update) is within limits. |
680 // One key frame (first frame only) in sequence. | 681 // One key frame (first frame only) in sequence. |
681 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) | 682 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) || \ |
682 // Fails on TSan and UBSan: https://bugs.webrtc.org/6781. | 683 (defined(WEBRTC_ARCH_32_BITS) && defined(WEBRTC_LINUX)) |
| 684 // Fails on TSan, UBSan and Linux 32-bit: https://bugs.webrtc.org/6781. |
683 #define MAYBE_ProcessNoLossChangeBitRateVP9 \ | 685 #define MAYBE_ProcessNoLossChangeBitRateVP9 \ |
684 DISABLED_ProcessNoLossChangeBitRateVP9 | 686 DISABLED_ProcessNoLossChangeBitRateVP9 |
685 #else | 687 #else |
686 #define MAYBE_ProcessNoLossChangeBitRateVP9 ProcessNoLossChangeBitRateVP9 | 688 #define MAYBE_ProcessNoLossChangeBitRateVP9 ProcessNoLossChangeBitRateVP9 |
687 #endif | 689 #endif |
688 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossChangeBitRateVP9) { | 690 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossChangeBitRateVP9) { |
689 // Bitrate and frame rate profile. | 691 // Bitrate and frame rate profile. |
690 RateProfile rate_profile; | 692 RateProfile rate_profile; |
691 SetRateProfilePars(&rate_profile, 0, 200, 30, 0); | 693 SetRateProfilePars(&rate_profile, 0, 200, 30, 0); |
692 SetRateProfilePars(&rate_profile, 1, 700, 30, 100); | 694 SetRateProfilePars(&rate_profile, 1, 700, 30, 100); |
(...skipping 18 matching lines...) Expand all Loading... |
711 | 713 |
712 // VP9: Run with no packet loss, with an update (decrease) in frame rate. | 714 // VP9: Run with no packet loss, with an update (decrease) in frame rate. |
713 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. | 715 // Lower frame rate means higher per-frame-bandwidth, so easier to encode. |
714 // At the low bitrate in this test, this means better rate control after the | 716 // At the low bitrate in this test, this means better rate control after the |
715 // update(s) to lower frame rate. So expect less frame drops, and max values | 717 // update(s) to lower frame rate. So expect less frame drops, and max values |
716 // for the rate control metrics can be lower. One key frame (first frame only). | 718 // for the rate control metrics can be lower. One key frame (first frame only). |
717 // Note: quality after update should be higher but we currently compute quality | 719 // Note: quality after update should be higher but we currently compute quality |
718 // metrics averaged over whole sequence run. | 720 // metrics averaged over whole sequence run. |
719 | 721 |
720 #if defined(WEBRTC_ANDROID) || defined(THREAD_SANITIZER) || \ | 722 #if defined(WEBRTC_ANDROID) || defined(THREAD_SANITIZER) || \ |
721 defined(UNDEFINED_SANITIZER) | 723 defined(UNDEFINED_SANITIZER) || \ |
| 724 (defined(WEBRTC_ARCH_32_BITS) && defined(WEBRTC_LINUX)) |
722 // Flaky on Android: https://bugs.chromium.org/p/webrtc/issues/detail?id=6057. | 725 // Flaky on Android: https://bugs.chromium.org/p/webrtc/issues/detail?id=6057. |
723 // Fails on TSan and UBSan: https://bugs.webrtc.org/6781. | 726 // Fails on TSan, UBSan and Linux 32-bit: https://bugs.webrtc.org/6781. |
724 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ | 727 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ |
725 DISABLED_ProcessNoLossChangeFrameRateFrameDropVP9 | 728 DISABLED_ProcessNoLossChangeFrameRateFrameDropVP9 |
726 #else | 729 #else |
727 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ | 730 #define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9 \ |
728 ProcessNoLossChangeFrameRateFrameDropVP9 | 731 ProcessNoLossChangeFrameRateFrameDropVP9 |
729 #endif | 732 #endif |
730 TEST_F(VideoProcessorIntegrationTest, | 733 TEST_F(VideoProcessorIntegrationTest, |
731 MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9) { | 734 MAYBE_ProcessNoLossChangeFrameRateFrameDropVP9) { |
732 config_.networking_config.packet_loss_probability = 0; | 735 config_.networking_config.packet_loss_probability = 0; |
733 // Bitrate and frame rate profile. | 736 // Bitrate and frame rate profile. |
(...skipping 13 matching lines...) Expand all Loading... |
747 // Metrics for rate control. | 750 // Metrics for rate control. |
748 RateControlMetrics rc_metrics[3]; | 751 RateControlMetrics rc_metrics[3]; |
749 SetRateControlMetrics(rc_metrics, 0, 38, 50, 75, 15, 45, 0, 1); | 752 SetRateControlMetrics(rc_metrics, 0, 38, 50, 75, 15, 45, 0, 1); |
750 SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0); | 753 SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0); |
751 SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0); | 754 SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0); |
752 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 755 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
753 rc_metrics); | 756 rc_metrics); |
754 } | 757 } |
755 | 758 |
756 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). | 759 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). |
757 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) | 760 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) || \ |
758 // Fails on TSan and UBSan: https://bugs.webrtc.org/6781. | 761 (defined(WEBRTC_ARCH_32_BITS) && defined(WEBRTC_LINUX)) |
| 762 // Fails on TSan, UBSan and Linux 32-bit: https://bugs.webrtc.org/6781. |
759 #define MAYBE_ProcessNoLossDenoiserOnVP9 DISABLED_ProcessNoLossDenoiserOnVP9 | 763 #define MAYBE_ProcessNoLossDenoiserOnVP9 DISABLED_ProcessNoLossDenoiserOnVP9 |
760 #else | 764 #else |
761 #define MAYBE_ProcessNoLossDenoiserOnVP9 ProcessNoLossDenoiserOnVP9 | 765 #define MAYBE_ProcessNoLossDenoiserOnVP9 ProcessNoLossDenoiserOnVP9 |
762 #endif | 766 #endif |
763 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossDenoiserOnVP9) { | 767 TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossDenoiserOnVP9) { |
764 // Bitrate and frame rate profile. | 768 // Bitrate and frame rate profile. |
765 RateProfile rate_profile; | 769 RateProfile rate_profile; |
766 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); | 770 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); |
767 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1; | 771 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1; |
768 rate_profile.num_frames = kNbrFramesShort; | 772 rate_profile.num_frames = kNbrFramesShort; |
769 // Codec/network settings. | 773 // Codec/network settings. |
770 CodecConfigPars process_settings; | 774 CodecConfigPars process_settings; |
771 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, | 775 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, |
772 true, true, false); | 776 true, true, false); |
773 // Metrics for expected quality. | 777 // Metrics for expected quality. |
774 QualityMetrics quality_metrics; | 778 QualityMetrics quality_metrics; |
775 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91); | 779 SetQualityMetrics(&quality_metrics, 36.8, 35.8, 0.92, 0.91); |
776 // Metrics for rate control. | 780 // Metrics for rate control. |
777 RateControlMetrics rc_metrics[1]; | 781 RateControlMetrics rc_metrics[1]; |
778 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); | 782 SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 20, 0, 1); |
779 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 783 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
780 rc_metrics); | 784 rc_metrics); |
781 } | 785 } |
782 | 786 |
783 // Run with no packet loss, at low bitrate. | 787 // Run with no packet loss, at low bitrate. |
784 // spatial_resize is on, for this low bitrate expect one resize in sequence. | 788 // spatial_resize is on, for this low bitrate expect one resize in sequence. |
785 // Resize happens on delta frame. Expect only one key frame (first frame). | 789 // Resize happens on delta frame. Expect only one key frame (first frame). |
786 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) | 790 #if defined(THREAD_SANITIZER) || defined(UNDEFINED_SANITIZER) || \ |
787 // Fails on TSan and UBSan: https://bugs.webrtc.org/6781. | 791 (defined(WEBRTC_ARCH_32_BITS) && defined(WEBRTC_LINUX)) |
| 792 // Fails on TSan, UBSan and Linux 32-bit: https://bugs.webrtc.org/6781. |
788 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ | 793 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ |
789 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9 | 794 DISABLED_ProcessNoLossSpatialResizeFrameDropVP9 |
790 #else | 795 #else |
791 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ | 796 #define MAYBE_ProcessNoLossSpatialResizeFrameDropVP9 \ |
792 ProcessNoLossSpatialResizeFrameDropVP9 | 797 ProcessNoLossSpatialResizeFrameDropVP9 |
793 #endif | 798 #endif |
794 TEST_F(VideoProcessorIntegrationTest, | 799 TEST_F(VideoProcessorIntegrationTest, |
795 MAYBE_ProcessNoLossSpatialResizeFrameDropVP9) { | 800 MAYBE_ProcessNoLossSpatialResizeFrameDropVP9) { |
796 config_.networking_config.packet_loss_probability = 0; | 801 config_.networking_config.packet_loss_probability = 0; |
797 // Bitrate and frame rate profile. | 802 // Bitrate and frame rate profile. |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 QualityMetrics quality_metrics; | 1037 QualityMetrics quality_metrics; |
1033 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); | 1038 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); |
1034 // Metrics for rate control. | 1039 // Metrics for rate control. |
1035 RateControlMetrics rc_metrics[2]; | 1040 RateControlMetrics rc_metrics[2]; |
1036 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); | 1041 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
1037 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); | 1042 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
1038 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 1043 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
1039 rc_metrics); | 1044 rc_metrics); |
1040 } | 1045 } |
1041 } // namespace webrtc | 1046 } // namespace webrtc |
OLD | NEW |