From 4ee29c65d947dff55c21d5a3409711c5dc0591d4 Mon Sep 17 00:00:00 2001 From: "mikhal@webrtc.org" Date: Fri, 19 Oct 2012 16:08:59 +0000 Subject: [PATCH] Updating vp8 unit_test - fixing issue introduced in r2954 TBR=Stefan Review URL: https://webrtc-codereview.appspot.com/917005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2958 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../codecs/test_framework/unit_test.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/video_coding/codecs/test_framework/unit_test.cc b/src/modules/video_coding/codecs/test_framework/unit_test.cc index 954ec8ef5..8d38593c1 100644 --- a/src/modules/video_coding/codecs/test_framework/unit_test.cc +++ b/src/modules/video_coding/codecs/test_framework/unit_test.cc @@ -434,12 +434,12 @@ UnitTest::Perform() // Init then encode. _encodedVideoBuffer.SetLength(0); - EXPECT_TRUE(_encoder->Encode(inputImage, NULL, NULL) == + EXPECT_TRUE(_encoder->Encode(_inputVideoBuffer, NULL, NULL) == WEBRTC_VIDEO_CODEC_OK); EXPECT_TRUE(WaitForEncodedFrame() > 0); EXPECT_TRUE(_encoder->InitEncode(&_inst, 1, 1440) == WEBRTC_VIDEO_CODEC_OK); - _encoder->Encode(inputImage, NULL, NULL); + _encoder->Encode(_inputVideoBuffer, NULL, NULL); frameLength = WaitForEncodedFrame(); EXPECT_TRUE(frameLength > 0); EXPECT_TRUE(CheckIfBitExact(_refEncFrame, _refEncFrameLength, @@ -447,11 +447,11 @@ UnitTest::Perform() // Reset then encode. _encodedVideoBuffer.SetLength(0); - EXPECT_TRUE(_encoder->Encode(inputImage, NULL, NULL) == + EXPECT_TRUE(_encoder->Encode(_inputVideoBuffer, NULL, NULL) == WEBRTC_VIDEO_CODEC_OK); WaitForEncodedFrame(); EXPECT_TRUE(_encoder->InitEncode(&_inst, 1, 1440) == WEBRTC_VIDEO_CODEC_OK); - _encoder->Encode(inputImage, NULL, NULL); + _encoder->Encode(_inputVideoBuffer, NULL, NULL); frameLength = WaitForEncodedFrame(); EXPECT_TRUE(frameLength > 0); EXPECT_TRUE(CheckIfBitExact(_refEncFrame, _refEncFrameLength, @@ -459,12 +459,12 @@ UnitTest::Perform() // Release then encode. _encodedVideoBuffer.SetLength(0); - EXPECT_TRUE(_encoder->Encode(inputImage, NULL, NULL) == + EXPECT_TRUE(_encoder->Encode(_inputVideoBuffer, NULL, NULL) == WEBRTC_VIDEO_CODEC_OK); WaitForEncodedFrame(); EXPECT_TRUE(_encoder->Release() == WEBRTC_VIDEO_CODEC_OK); EXPECT_TRUE(_encoder->InitEncode(&_inst, 1, 1440) == WEBRTC_VIDEO_CODEC_OK); - _encoder->Encode(inputImage, NULL, NULL); + _encoder->Encode(_inputVideoBuffer, NULL, NULL); frameLength = WaitForEncodedFrame(); EXPECT_TRUE(frameLength > 0); EXPECT_TRUE(CheckIfBitExact(_refEncFrame, _refEncFrameLength, @@ -571,8 +571,8 @@ UnitTest::Perform() EXPECT_TRUE(_encoder->InitEncode(&tempInst, 1, 1440) == WEBRTC_VIDEO_CODEC_OK); VideoFrame tempInput; - unsigned int tmpLength = inputImage.Length() / 4; - tempInput.CopyFrame(tmpLength, inputImage.Buffer()); + unsigned int tmpLength = _inputVideoBuffer.Length() / 4; + tempInput.CopyFrame(tmpLength, _inputVideoBuffer.Buffer()); tempInput.SetWidth(tempInst.width); tempInput.SetHeight(tempInst.height); _encoder->Encode(tempInput, NULL, NULL); @@ -593,7 +593,7 @@ UnitTest::Perform() EXPECT_TRUE(_encoder->Release() == WEBRTC_VIDEO_CODEC_OK); EXPECT_TRUE(_encoder->InitEncode(&_inst, 1, 1440) == WEBRTC_VIDEO_CODEC_OK); - _encoder->Encode(inputImage, NULL, NULL); + _encoder->Encode(_inputVideoBuffer, NULL, NULL); frameLength = WaitForEncodedFrame(); EXPECT_TRUE(frameLength > 0);