From 1909c59bad40e4ea71d83d00ead1944a6b33f65f Mon Sep 17 00:00:00 2001 From: DRC Date: Sat, 15 Mar 2014 08:48:53 +0000 Subject: [PATCH] As with tjDecompressToYUV*(), tjCompressFromYUV() also conditionally uses an intermediate buffer if the source image dimensions do not fall on MCU boundaries. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1170 632fc199-4ca6-4c93-a231-07263d6284db --- doc/html/group___turbo_j_p_e_g.html | 1 + turbojpeg.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index 28e4926..6936e5d 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -1067,6 +1067,7 @@ If you choose option 1, *jpegSize should be set to the size of your

Compress a YUV planar image into a JPEG image.

+

Note that, if the width or height of the YUV image is not an even multiple of the MCU block size (see tjMCUWidth and tjMCUHeight), then an intermediate buffer copy will be performed within TurboJPEG.

Parameters
diff --git a/turbojpeg.h b/turbojpeg.h index a082fa3..6c13851 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -636,7 +636,10 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf, /** - * Compress a YUV planar image into a JPEG image. + * Compress a YUV planar image into a JPEG image. Note that, if the width or + * height of the YUV image is not an even multiple of the MCU block size + * (see #tjMCUWidth and #tjMCUHeight), then an intermediate buffer copy will be + * performed within TurboJPEG. * * @param handle a handle to a TurboJPEG compressor or transformer instance * @param srcBuf pointer to an image buffer containing a YUV planar image -- 2.40.0
handlea handle to a TurboJPEG compressor or transformer instance