summaryrefslogtreecommitdiff
path: root/branches
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-03-01 08:18:30 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-03-01 08:18:30 +0000
commitc81e2f97e77f20799ee034f67893a998823911fd (patch)
tree7757e86e999b4b2529be866168475aed38a9cd8b /branches
parentdc57ca056261447cee802273ca7c8d12cac0a5aa (diff)
Don't call jpeg_finish_compress() with YUV output, because it tries to insert an EOI marker right in the middle of our image data.
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@475 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'branches')
-rw-r--r--branches/1.1.x/ChangeLog.txt7
-rw-r--r--branches/1.1.x/jpegut.c2
-rw-r--r--branches/1.1.x/turbojpegl.c6
3 files changed, 11 insertions, 4 deletions
diff --git a/branches/1.1.x/ChangeLog.txt b/branches/1.1.x/ChangeLog.txt
index 4f0dc72..fb92532 100644
--- a/branches/1.1.x/ChangeLog.txt
+++ b/branches/1.1.x/ChangeLog.txt
@@ -1,3 +1,10 @@
+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/branches/1.1.x/jpegut.c b/branches/1.1.x/jpegut.c
index 1be8bc1..3bbcb89 100644
--- a/branches/1.1.x/jpegut.c
+++ b/branches/1.1.x/jpegut.c
@@ -219,7 +219,7 @@ int checkbuf(unsigned char *buf, int w, int h, int ps, int subsamp, int flags)
}}
#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/branches/1.1.x/turbojpegl.c b/branches/1.1.x/turbojpegl.c
index 8e3f2b0..5cc5437 100644
--- a/branches/1.1.x/turbojpegl.c
+++ b/branches/1.1.x/turbojpegl.c
@@ -300,6 +300,7 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
}
*size=yuvsize;
cinfo->next_scanline+=height;
+ jpeg_abort_compress(&j->cinfo);
}
else
{
@@ -315,11 +316,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);