...and now fix the Debug build.

Review URL: http://webrtc-codereview.appspot.com/272001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@892 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2011-11-05 00:57:33 +00:00
parent 369766ed29
commit b353d21560
3 changed files with 14 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ main(int argc, char **argv)
if (fread(encodedBuffer._buffer, 1, length, openFile) != length)
{
printf("Error reading file %s\n", fileName.c_str());
exit(1);
return 1;
}
fclose(openFile);

View File

@@ -56,17 +56,17 @@ int convert_test(CmdArgs& args)
if ((sourceFile = fopen(inname.c_str(), "rb")) == NULL)
{
printf("Cannot read file %s.\n", inname.c_str());
exit(1);
return 1;
}
if ((outputFile = fopen(outname.c_str(), "wb")) == NULL)
{
printf("Cannot write file %s.\n", outname.c_str());
exit(1);
return 1;
}
if ((logFile = fopen("../log.txt", "a")) == NULL)
{
printf("Cannot write file ../log.txt.\n");
exit(1);
return 1;
}
// reading first frame of Foreman sequence
@@ -75,7 +75,7 @@ int convert_test(CmdArgs& args)
lengthSourceFrame)
{
printf("Error reading file %s\n", inname.c_str());
exit(1);
return 1;
}
// START TEST

View File

@@ -65,12 +65,14 @@ 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)
{
int k = 0;
WebRtc_Word32 res = offset*factor;
for (WebRtc_Word32 i = 0; i < height; i++)
{
for (WebRtc_Word32 j = 0; j < width; j++)
{
assert(ptrFrame[k++] == res);
assert(ptrFrame[k] == res);
k++;
}
if (i > 0)
{
@@ -81,12 +83,14 @@ 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)
{
int k = 0;
WebRtc_Word32 res = offset*factor;
for (WebRtc_Word32 i = 1; i <= height; i++)
{
for (WebRtc_Word32 j = 0; j < width; j++)
{
assert(ptrFrame[k++] == res);
assert(ptrFrame[k] == res);
k++;
}
res += factor/2;
if ((i % 3) == 0)
@@ -98,13 +102,15 @@ 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)
{
int k = 0;
WebRtc_Word32 res = offset*factor;
res += factor/2;
for (WebRtc_Word32 i = 0; i < height; i++)
{
for (WebRtc_Word32 j = 0; j < width; j++)
{
assert(ptrFrame[k++] == res);
assert(ptrFrame[k] == res);
k++;
}
res += factor*3;
}