зеркало из https://github.com/mozilla/mozjpeg.git
Only access TJBUFSIZEYUV symbol if YUV encoding is enabled, and add 1 to the buffer size; This allows jpgtest to be used to benchmark the old TurboJPEG/IPP libraries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@446 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
Родитель
0cc1279e03
Коммит
94476c648b
|
@ -79,10 +79,9 @@ void dotest(unsigned char *srcbuf, int w, int h, int pf, int bu,
|
|||
|
||||
flags |= _flags[pf];
|
||||
if(bu) flags |= TJ_BOTTOMUP;
|
||||
if(yuv==YUVENCODE) flags |= TJ_YUV;
|
||||
|
||||
yuvsize=TJBUFSIZEYUV(w, h, jpegsub);
|
||||
if((rgbbuf=(unsigned char *)malloc(max(yuvsize, pitch*h))) == NULL)
|
||||
if(yuv==YUVENCODE) yuvsize=TJBUFSIZEYUV(w, h, jpegsub);
|
||||
if((rgbbuf=(unsigned char *)malloc(max(yuvsize, pitch*h+1))) == NULL)
|
||||
_throwunix("allocating image buffer");
|
||||
|
||||
if(!quiet)
|
||||
|
|
Загрузка…
Ссылка в новой задаче