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

Unified Diff: webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc

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
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
diff --git a/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
index a0b4f80de1af5c6d13e47d1ed3c5f5abfa5e23a4..50de7fd213f6015ab87b0ff418b3673ec3806d78 100644
--- a/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
@@ -104,6 +104,19 @@ TEST_F(TestVp9Impl, DecodedQpEqualsEncodedQp) {
EXPECT_EQ(encoded_frame.qp_, *decoded_qp);
}
+TEST_F(TestVp9Impl, ParserQpEqualsEncodedQp) {
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
+ encoder_->Encode(*input_frame_, nullptr, nullptr));
+ EncodedImage encoded_frame;
+ CodecSpecificInfo codec_specific_info;
+ ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
+
+ int qp = 0;
+ ASSERT_TRUE(vp9::GetQp(encoded_frame._buffer, encoded_frame._length, &qp));
+
+ EXPECT_EQ(encoded_frame.qp_, qp);
+}
+
TEST_F(TestVp9Impl, EncoderRetainsRtpStateAfterRelease) {
// Override default settings.
codec_settings_.VP9()->numberOfTemporalLayers = 2;
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698