summaryrefslogtreecommitdiff
path: root/branches
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-25 00:54:29 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-25 00:54:29 +0000
commitc93de78928c15ba5aaa2b5141e7ada7b47092531 (patch)
treede273cb1a86b592313af53fa433e6f91b44ee718 /branches
parent7c4ea4b860d7582a955bb12049e7839b9d6954a6 (diff)
Use correct size for YUV buffers
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@445 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'branches')
-rw-r--r--branches/1.1.x/jpgtest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/branches/1.1.x/jpgtest.c b/branches/1.1.x/jpgtest.c
index 11d679c..e514733 100644
--- a/branches/1.1.x/jpgtest.c
+++ b/branches/1.1.x/jpgtest.c
@@ -109,7 +109,9 @@ void dotest(unsigned char *srcbuf, int w, int h, int pf, int bu,
memset(jpegbuf, 0, sizeof(unsigned char *)*numtilesx*numtilesy);
for(i=0; i<numtilesx*numtilesy; i++)
{
- if((jpegbuf[i]=(unsigned char *)malloc(TJBUFSIZE(tilesizex, tilesizey))) == NULL)
+ if((jpegbuf[i]=(unsigned char *)malloc(
+ yuv==YUVENCODE? TJBUFSIZEYUV(tilesizex, tilesizey, jpegsub)
+ : TJBUFSIZE(tilesizex, tilesizey))) == NULL)
_throwunix("allocating image buffers");
}