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

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

Issue 2903163002: Add unit tests for qp parser. (Closed)
Patch Set: Fix test failure. Created 3 years, 7 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
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // it has been sent for encoding. 599 // it has been sent for encoding.
600 600
601 if (process.hw_codec) { 601 if (process.hw_codec) {
602 LOG(LS_WARNING) << "HW codecs should mostly be run in batch mode, " 602 LOG(LS_WARNING) << "HW codecs should mostly be run in batch mode, "
603 "since they may be pipelining."; 603 "since they may be pipelining.";
604 } 604 }
605 605
606 while (frame_number < num_frames) { 606 while (frame_number < num_frames) {
607 EXPECT_TRUE(processor_->ProcessFrame(frame_number)); 607 EXPECT_TRUE(processor_->ProcessFrame(frame_number));
608 608
609 #if !defined(WEBRTC_VIDEOPROCESSOR_H264_TESTS)
brandtr 2017/05/26 07:18:46 This will disable the EXPECT whenever H264 is comp
jianj 2017/05/26 18:20:27 Done.
610 if (!process.hw_codec)
brandtr 2017/05/26 07:18:46 {}
jianj 2017/05/26 18:20:27 Done.
611 EXPECT_EQ(processor_->GetQpFromEncoder(),
612 processor_->GetQpFromBitstream());
613 #endif
614
609 ++num_frames_per_update_[TemporalLayerIndexForFrame(frame_number)]; 615 ++num_frames_per_update_[TemporalLayerIndexForFrame(frame_number)];
610 ++num_frames_total_; 616 ++num_frames_total_;
611 UpdateRateControlMetrics(frame_number); 617 UpdateRateControlMetrics(frame_number);
612 618
613 ++frame_number; 619 ++frame_number;
614 620
615 // If we hit another/next update, verify stats for current state and 621 // If we hit another/next update, verify stats for current state and
616 // update layers and codec with new rates. 622 // update layers and codec with new rates.
617 if (frame_number == 623 if (frame_number ==
618 rate_profile.frame_index_rate_update[update_index + 1]) { 624 rate_profile.frame_index_rate_update[update_index + 1]) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 825
820 // Codec and network settings. 826 // Codec and network settings.
821 float packet_loss_probability_; 827 float packet_loss_probability_;
822 int num_temporal_layers_; 828 int num_temporal_layers_;
823 }; 829 };
824 830
825 } // namespace test 831 } // namespace test
826 } // namespace webrtc 832 } // namespace webrtc
827 833
828 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_ 834 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698