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

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

Issue 1569903002: vp9 tests: Adjust some parameters and re-enable the tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
683 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, 674 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false,
684 false, true, false); 675 false, true, false);
685 // Metrics for expected quality. 676 // Metrics for expected quality.
686 QualityMetrics quality_metrics; 677 QualityMetrics quality_metrics;
687 SetQualityMetrics(&quality_metrics, 31.5, 18.0, 0.80, 0.44); 678 SetQualityMetrics(&quality_metrics, 31.5, 18.0, 0.80, 0.44);
688 // Metrics for rate control. 679 // Metrics for rate control.
689 RateControlMetrics rc_metrics[3]; 680 RateControlMetrics rc_metrics[3];
690 SetRateControlMetrics(rc_metrics, 0, 35, 50, 75, 15, 45, 0, 1); 681 SetRateControlMetrics(rc_metrics, 0, 38, 50, 75, 15, 45, 0, 1);
691 SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0); 682 SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0);
692 SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0); 683 SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0);
693 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 684 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
694 rc_metrics); 685 rc_metrics);
695 } 686 }
696 687
697 // VP9: Run with no packet loss and denoiser on. One key frame (first frame). 688 // VP9: Run with no packet loss and denoiser on. One key frame (first frame).
698 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossDenoiserOnVP9) { 689 TEST_F(VideoProcessorIntegrationTest, ProcessNoLossDenoiserOnVP9) {
699 // Bitrate and frame rate profile. 690 // Bitrate and frame rate profile.
700 RateProfile rate_profile; 691 RateProfile rate_profile;
701 SetRateProfilePars(&rate_profile, 0, 500, 30, 0); 692 SetRateProfilePars(&rate_profile, 0, 500, 30, 0);
702 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1; 693 rate_profile.frame_index_rate_update[1] = kNbrFramesShort + 1;
703 rate_profile.num_frames = kNbrFramesShort; 694 rate_profile.num_frames = kNbrFramesShort;
704 // Codec/network settings. 695 // Codec/network settings.
705 CodecConfigPars process_settings; 696 CodecConfigPars process_settings;
706 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false, 697 SetCodecParameters(&process_settings, kVideoCodecVP9, 0.0f, -1, 1, false,
707 true, true, false); 698 true, true, false);
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);
742 // Metrics for expected quality. 723 // Metrics for expected quality.
743 QualityMetrics quality_metrics; 724 QualityMetrics quality_metrics;
744 SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.37); 725 SetQualityMetrics(&quality_metrics, 24.0, 13.0, 0.65, 0.37);
745 // Metrics for rate control. 726 // Metrics for rate control.
746 RateControlMetrics rc_metrics[1]; 727 RateControlMetrics rc_metrics[1];
747 SetRateControlMetrics(rc_metrics, 0, 225, 70, 160, 15, 80, 1, 1); 728 SetRateControlMetrics(rc_metrics, 0, 228, 70, 160, 15, 80, 1, 1);
748 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 729 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
749 rc_metrics); 730 rc_metrics);
750 } 731 }
751 732
752 // TODO(marpan): Add temporal layer test for VP9, once changes are in 733 // TODO(marpan): Add temporal layer test for VP9, once changes are in
753 // vp9 wrapper for this. 734 // vp9 wrapper for this.
754 735
755 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high. 736 // VP8: Run with no packet loss and fixed bitrate. Quality should be very high.
756 // One key frame (first frame only) in sequence. Setting |key_frame_interval| 737 // One key frame (first frame only) in sequence. Setting |key_frame_interval|
757 // to -1 below means no periodic key frames in test. 738 // to -1 below means no periodic key frames in test.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698