Using Convert in lieu of ExtractBuffer: Less error prone (as we don't need to compute buffer sizes etc.). This cl is first in a series (doing all of WebRtc would make it quite a big cl). While at it, fixing a few headers.
BUG=988 Review URL: https://webrtc-codereview.appspot.com/995014 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3343 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -255,6 +255,9 @@ UnitTest::Setup()
|
||||
|
||||
unsigned int frameLength = 0;
|
||||
int i=0;
|
||||
_inputVideoBuffer.CreateEmptyFrame(_inst.width, _inst.height, _inst.width,
|
||||
(_inst.width + 1) / 2,
|
||||
(_inst.width + 1) / 2);
|
||||
while (frameLength == 0)
|
||||
{
|
||||
if (i > 0)
|
||||
@ -262,13 +265,8 @@ UnitTest::Setup()
|
||||
// Insert yet another frame
|
||||
ASSERT_TRUE(fread(_refFrame, 1, _lengthSourceFrame,
|
||||
_sourceFile) == _lengthSourceFrame);
|
||||
_inputVideoBuffer.CreateFrame(size_y, _refFrame,
|
||||
size_uv, _refFrame + size_y,
|
||||
size_uv, _refFrame + size_y + size_uv,
|
||||
_inst.width, _inst.height,
|
||||
_inst.width,
|
||||
(_inst.width + 1) / 2,
|
||||
(_inst.width + 1) / 2);
|
||||
EXPECT_EQ(0, ConvertToI420(kI420, _refFrame, 0, 0, _width, _height,
|
||||
0, kRotateNone, &_inputVideoBuffer));
|
||||
_encoder->Encode(_inputVideoBuffer, NULL, NULL);
|
||||
ASSERT_TRUE(WaitForEncodedFrame() > 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user