| 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 e4cb7eb814047eb1617a3c48937a15e19ee019a3..a0b4f80de1af5c6d13e47d1ed3c5f5abfa5e23a4 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
|
| @@ -66,6 +66,26 @@ TEST_F(TestVp9Impl, EncodeDecode) {
|
| EXPECT_GT(I420PSNR(input_frame_.get(), decoded_frame.get()), 36);
|
| }
|
|
|
| +// We only test the encoder here, since the decoded frame rotation is set based
|
| +// on the CVO RTP header extension in VCMDecodedFrameCallback::Decoded.
|
| +// TODO(brandtr): Consider passing through the rotation flag through the decoder
|
| +// in the same way as done in the encoder.
|
| +TEST_F(TestVp9Impl, EncodedRotationEqualsInputRotation) {
|
| + input_frame_->set_rotation(kVideoRotation_0);
|
| + 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));
|
| + EXPECT_EQ(kVideoRotation_0, encoded_frame.rotation_);
|
| +
|
| + input_frame_->set_rotation(kVideoRotation_90);
|
| + EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
| + encoder_->Encode(*input_frame_, nullptr, nullptr));
|
| + ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
|
| + EXPECT_EQ(kVideoRotation_90, encoded_frame.rotation_);
|
| +}
|
| +
|
| TEST_F(TestVp9Impl, DecodedQpEqualsEncodedQp) {
|
| EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
| encoder_->Encode(*input_frame_, nullptr, nullptr));
|
|
|