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

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h

Issue 2903163002: Add unit tests for qp parser. (Closed)
Patch Set: Refactor. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h
index 2481252c7b275e16f2a53ad588c867ab615defde..8ca2d3ca06ef31a04e757a2054124fd9c02a4a99 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h
@@ -494,6 +494,14 @@ class VideoProcessorIntegrationTest : public testing::Test {
EXPECT_GT(ssim_result.min, quality_thresholds.min_min_ssim);
}
+ void VerifyQpParser(const CodecParams& process, int frame_number) {
+ if (!process.hw_codec && (process.codec_type == kVideoCodecVP8 ||
+ process.codec_type == kVideoCodecVP9)) {
+ EXPECT_EQ(processor_->GetQpFromEncoder(frame_number),
+ processor_->GetQpFromBitstream(frame_number));
+ }
+ }
+
// Temporal layer index corresponding to frame number, for up to 3 layers.
int TemporalLayerIndexForFrame(int frame_number) {
int tl_idx = -1;
@@ -605,7 +613,7 @@ class VideoProcessorIntegrationTest : public testing::Test {
while (frame_number < num_frames) {
EXPECT_TRUE(processor_->ProcessFrame(frame_number));
-
+ VerifyQpParser(process, frame_number);
++num_frames_per_update_[TemporalLayerIndexForFrame(frame_number)];
++num_frames_total_;
UpdateRateControlMetrics(frame_number);

Powered by Google App Engine
This is Rietveld 408576698