diff --git a/ChangeLog.txt b/ChangeLog.txt index a18dc6bf..27fd925e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,13 @@ [2] TurboJPEG/OSS can now scale down images during decompression. +1.1.1 +===== + +[1] Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated +by tjEncodeYUV(). + + 1.1.0 ===== diff --git a/jpegut.c b/jpegut.c index 67299f2d..0cf45339 100644 --- a/jpegut.c +++ b/jpegut.c @@ -222,7 +222,7 @@ int checkbuf(unsigned char *buf, int w, int h, int ps, int subsamp, }} #define checkval255(v) { \ - if(v<254 && !(v==217 && i==0 && j==21)) { \ + if(v<254) { \ printf("\nComp. %s at %d,%d should be 255, not %d\n", #v, i, j, v); \ retval=0; goto bailout; \ }} diff --git a/turbojpegl.c b/turbojpegl.c index 4755144e..e06bc1ad 100644 --- a/turbojpegl.c +++ b/turbojpegl.c @@ -310,6 +310,7 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h, } *size=yuvsize; cinfo->next_scanline+=height; + jpeg_abort_compress(&j->cinfo); } else { @@ -325,11 +326,10 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h, jpeg_write_scanlines(&j->cinfo, &row_pointer[j->cinfo.next_scanline], j->cinfo.image_height-j->cinfo.next_scanline); } - } - jpeg_finish_compress(&j->cinfo); - if(!(flags&TJ_YUV)) + jpeg_finish_compress(&j->cinfo); *size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height) -(unsigned long)(j->jdms.free_in_buffer); + } bailout: if(j->cinfo.global_state>CSTATE_START) jpeg_abort_compress(&j->cinfo);