Fix Release mode errors in common_video tests.
Review URL: http://webrtc-codereview.appspot.com/271001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@891 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a5c4c1f1d4
commit
369766ed29
@ -49,7 +49,7 @@ main(int argc, char **argv)
|
||||
|
||||
// Get file length
|
||||
fseek(openFile, 0, SEEK_END);
|
||||
int length = ftell(openFile);
|
||||
size_t length = ftell(openFile);
|
||||
fseek(openFile, 0, SEEK_SET);
|
||||
|
||||
|
||||
@ -58,7 +58,11 @@ main(int argc, char **argv)
|
||||
encodedBuffer._buffer = new WebRtc_UWord8[length];
|
||||
encodedBuffer._size = length;
|
||||
encodedBuffer._length = length;
|
||||
fread(encodedBuffer._buffer, 1, length, openFile);
|
||||
if (fread(encodedBuffer._buffer, 1, length, openFile) != length)
|
||||
{
|
||||
printf("Error reading file %s\n", fileName.c_str());
|
||||
exit(1);
|
||||
}
|
||||
fclose(openFile);
|
||||
|
||||
// ------------------
|
||||
|
@ -32,7 +32,7 @@ ImagePSNRfromBuffer(WebRtc_UWord8 *refBufName, WebRtc_UWord8 *testBufName,
|
||||
VideoType vType, double *YPSNRptr);
|
||||
void TestRetVal(int testVal, int refVal );
|
||||
|
||||
int convert_test(CmdArgs& args)
|
||||
int convert_test(CmdArgs& args)
|
||||
{
|
||||
// reading YUV frame - testing on the first frame of the foreman sequence
|
||||
|
||||
@ -71,7 +71,12 @@ int convert_test(CmdArgs& args)
|
||||
|
||||
// reading first frame of Foreman sequence
|
||||
WebRtc_UWord8* origBuffer = new WebRtc_UWord8[width * height*3/2];
|
||||
fread(origBuffer, 1, lengthSourceFrame, sourceFile);
|
||||
if (fread(origBuffer, 1, lengthSourceFrame, sourceFile) !=
|
||||
lengthSourceFrame)
|
||||
{
|
||||
printf("Error reading file %s\n", inname.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// START TEST
|
||||
printf("\nTEST #%d I420 <-> RGB24\n", j);
|
||||
|
@ -65,7 +65,6 @@ void CreateImage(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8* ptrFr
|
||||
|
||||
void ValidateImage2(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8* ptrFrame, WebRtc_Word32 offset, WebRtc_Word32 factor)
|
||||
{
|
||||
WebRtc_Word32 k = 0;
|
||||
WebRtc_Word32 res = offset*factor;
|
||||
for (WebRtc_Word32 i = 0; i < height; i++)
|
||||
{
|
||||
@ -82,7 +81,6 @@ void ValidateImage2(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8* pt
|
||||
|
||||
void ValidateImage3_2(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8* ptrFrame, WebRtc_Word32 offset, WebRtc_Word32 factor)
|
||||
{
|
||||
WebRtc_Word32 k = 0;
|
||||
WebRtc_Word32 res = offset*factor;
|
||||
for (WebRtc_Word32 i = 1; i <= height; i++)
|
||||
{
|
||||
@ -100,7 +98,6 @@ void ValidateImage3_2(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8*
|
||||
|
||||
void ValidateImage1_3(WebRtc_Word32 width, WebRtc_Word32 height, WebRtc_UWord8* ptrFrame, WebRtc_Word32 offset, WebRtc_Word32 factor)
|
||||
{
|
||||
WebRtc_Word32 k = 0;
|
||||
WebRtc_Word32 res = offset*factor;
|
||||
res += factor/2;
|
||||
for (WebRtc_Word32 i = 0; i < height; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user