Commit Graph

32 Commits

Author SHA1 Message Date
DRC
adb33bb1a4 Fix additional uninitialized values reported by valgrind 2014-03-10 20:11:56 +00:00
DRC
8419f05afa When tjDecodeYUV() is used with a "fresh" decompressor instance (one that hasn't been previously used to decompress a JPEG image), then it needs comps_in_scan, data_precision, and the quantization tables to be defined. This patch also extends TJUnitTest to check for this error. 2014-03-10 09:34:04 +00:00
DRC
897a525e3f Go ahead and call jinit_master_decompress() rather than trying to reproduce its functionality. That function does a few things that we were missing, including allocating the range limit table used by the plain C color conversion code. 2014-03-07 03:52:57 +00:00
DRC
2409fb9d03 Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code. 2014-03-06 20:07:03 +00:00
DRC
b861ef600c Fix unitialized value reported by valgrind (the upsampling routine used by 4:4:0 and 4:1:1 reads the value of component_index.) 2014-02-28 09:35:34 +00:00
DRC
5c2f2cccb7 Implement a YUV decode function in the TurboJPEG API, to be symmetric with tjEncodeYUV(). 2014-02-28 09:17:14 +00:00
DRC
6500625c07 Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.) 2014-02-28 05:34:02 +00:00
DRC
b7e14cbaca Use C-style comments 2014-02-27 21:22:54 +00:00
DRC
040c688263 Fix an issue that prevented tjEncodeYUV3() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV3() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.) 2014-02-11 09:45:18 +00:00
DRC
fca3a77590 r1065 broke the build on Windows, because getinstance() defines a variable. Thus, it needs to occur before the array initialization code. 2013-10-31 05:00:19 +00:00
DRC
b3633e930b Extend the TurboJPEG C API to support compressing JPEG images from YUV planar images 2013-10-30 23:02:57 +00:00
DRC
8e4a07e20f Oops 2013-10-30 22:21:58 +00:00
DRC
07eadec225 Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV3(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV2(). 2013-10-30 22:21:06 +00:00
DRC
24668df1df Add CMYK support to the TurboJPEG C API 2013-08-23 02:49:25 +00:00
DRC
5ca8bf8738 Add 4:1:1 subsampling support in the TurboJPEG C API 2013-08-18 10:19:00 +00:00
DRC
22be928d5a Fix incorrect data output and buffer overruns in the new tjDecompressToYUV2() function whenever scaling is used along with a 4:2:0 JPEG image; extend tjunittest and TJUnitTest to test for these issues. 2013-05-07 21:17:35 +00:00
DRC
da64629c62 Extend the TurboJPEG C API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV 2013-04-26 10:33:29 +00:00
DRC
cc4145ce2f Actually, turbojpeg.c works with libjpeg as well 2013-01-22 13:56:34 +00:00
DRC
9f8a003137 Eliminated the awkward and confusing "TurboJPEG/OSS" designation, since there are no other active implementations of the TurboJPEG API anymore; don't refer to the libjpeg API library as "libjpeg-turbo" anymore, since that can be confusing; ARM v7s build instructions 2013-01-21 23:42:12 +00:00
DRC
0a9250c2c0 Oops. Add support for TJFLAG_FASTDCT to tjDecompressToYUV() as well. 2012-07-03 20:02:49 +00:00
DRC
019d51d4f1 Add flags to the TurboJPEG API that allow the caller to force the use of either the fast or the accurate DCT/IDCT algorithms in the underlying codec. 2012-06-29 23:46:38 +00:00
DRC
1086af6541 Fix memory leak in the colorspace emulation code 2012-04-26 03:18:49 +00:00
DRC
9d7101c8f6 Emulate colorspace extensions if they are not present in the libjpeg API. This allows the TurboJPEG wrapper to be used with libjpeg rather than libjpeg-turbo. Not useful within the context of our project, but other projects prefer to include the TurboJPEG wrapper in-tree, and this allows them to be linked against either libjpeg-turbo or libjpeg. 2012-03-23 19:47:57 +00:00
DRC
c17aa549ab Ensure that tjDecompress2() exits cleanly if setDecompDefaults() fails 2012-03-23 19:37:40 +00:00
DRC
5e805d2f4b Expose new scaling factors in TurboJPEG API 2012-01-28 06:49:56 +00:00
DRC
5bd7a89f6a Compiler warnings 2012-01-17 11:48:38 +00:00
DRC
c1e4151607 Added new alpha channel colorspace constants/pixel formats, so applications can specify that they need the unused byte in a 4-component RGB output buffer set to 0xFF when decompressing. 2011-12-19 02:21:03 +00:00
DRC
f343d7332a Implement custom filter callback in Java 2011-09-20 05:02:19 +00:00
DRC
85a878bf07 Implement a custom DCT filter callback for lossless transforms 2011-09-17 00:18:31 +00:00
DRC
c02c1fa775 Fix compile error when JCS_EXTENSIONS!=1 2011-09-07 05:03:18 +00:00
DRC
489864aefa Re-work TJBUFSIZE() to take into account the level of chrominance subsampling 2011-07-12 03:17:23 +00:00
DRC
395bf7e218 turbojpegl.c=turbojpeg.c 2011-05-26 10:45:06 +00:00