Merge branch 'master' into dev
+ acknowledge 1.5.3 release
This commit is contained in:
97
ChangeLog.md
97
ChangeLog.md
@@ -1,7 +1,7 @@
|
|||||||
1.6 pre-beta
|
1.6 pre-beta
|
||||||
============
|
============
|
||||||
|
|
||||||
### Significant changes relative to 1.5.2:
|
### Significant changes relative to 1.5.3:
|
||||||
|
|
||||||
1. Added AVX2 SIMD implementations of the colorspace conversion, chroma
|
1. Added AVX2 SIMD implementations of the colorspace conversion, chroma
|
||||||
downsampling and upsampling, and integer quantization algorithms. This speeds
|
downsampling and upsampling, and integer quantization algorithms. This speeds
|
||||||
@@ -73,36 +73,7 @@ the C API and `TJTransform.OPT_COPYNONE` in the Java API) that allows the
|
|||||||
copying of markers (including EXIF and ICC profile data) to be disabled for a
|
copying of markers (including EXIF and ICC profile data) to be disabled for a
|
||||||
particular transform.
|
particular transform.
|
||||||
|
|
||||||
7. Fixed a NullPointerException in the TurboJPEG Java wrapper that occurred
|
7. Added two functions to the TurboJPEG C API (`tjLoadImage()` and
|
||||||
when using the YUVImage constructor that creates an instance backed by separate
|
|
||||||
image planes and allocates memory for the image planes.
|
|
||||||
|
|
||||||
8. Fixed an issue whereby the Java version of TJUnitTest would fail when
|
|
||||||
testing BufferedImage encoding/decoding on big endian systems.
|
|
||||||
|
|
||||||
9. Fixed a segfault in djpeg that would occur if an output format other than
|
|
||||||
PPM/PGM was selected along with the `-crop` option. The `-crop` option now
|
|
||||||
works with the GIF and Targa formats as well (unfortunately, it cannot be made
|
|
||||||
to work with the BMP and RLE formats due to the fact that those output engines
|
|
||||||
write scanlines in bottom-up order.) djpeg will now exit gracefully if an
|
|
||||||
output format other than PPM/PGM, GIF, or Targa is selected along with the
|
|
||||||
`-crop` option.
|
|
||||||
|
|
||||||
10. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
|
|
||||||
quantization was enabled.
|
|
||||||
|
|
||||||
11. TJBench (both C and Java versions) will now display usage information if
|
|
||||||
any command-line argument is unrecognized. This prevents the program from
|
|
||||||
silently ignoring typos.
|
|
||||||
|
|
||||||
12. Fixed an access violation in tjbench.exe (Windows) that occurred when the
|
|
||||||
program was used to decompress an existing JPEG image.
|
|
||||||
|
|
||||||
13. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
|
|
||||||
occurred when attempting to decompress a JPEG image that had been compressed
|
|
||||||
with 4:1:1 chrominance subsampling.
|
|
||||||
|
|
||||||
14. Added two functions to the TurboJPEG C API (`tjLoadImage()` and
|
|
||||||
`tjSaveImage()`) that can be used to load/save a BMP or PPM/PGM image to/from a
|
`tjSaveImage()`) that can be used to load/save a BMP or PPM/PGM image to/from a
|
||||||
memory buffer with a specified pixel format and layout. These functions
|
memory buffer with a specified pixel format and layout. These functions
|
||||||
replace the project-private (and slow) bmp API, which was previously used by
|
replace the project-private (and slow) bmp API, which was previously used by
|
||||||
@@ -110,21 +81,65 @@ TJBench, and they also provide a convenient way for first-time users of
|
|||||||
libjpeg-turbo to quickly develop a complete JPEG compression/decompression
|
libjpeg-turbo to quickly develop a complete JPEG compression/decompression
|
||||||
program.
|
program.
|
||||||
|
|
||||||
14. The TurboJPEG C API now includes a new convenience array
|
8. The TurboJPEG C API now includes a new convenience array (`tjAlphaOffset[]`)
|
||||||
(`tjAlphaOffset[]`) that contains the alpha component index for each pixel
|
that contains the alpha component index for each pixel format (or -1 if the
|
||||||
format (or -1 if the pixel format lacks an alpha component.) The TurboJPEG
|
pixel format lacks an alpha component.) The TurboJPEG Java API now includes a
|
||||||
Java API now includes a new method (`TJ.getAlphaOffset()`) that returns the
|
new method (`TJ.getAlphaOffset()`) that returns the same value. In addition,
|
||||||
same value. In addition, the `tjRedOffset[]`, `tjGreenOffset[]`, and
|
the `tjRedOffset[]`, `tjGreenOffset[]`, and `tjBlueOffset[]` arrays-- and the
|
||||||
`tjBlueOffset[]` arrays-- and the corresponding `TJ.getRedOffset()`,
|
corresponding `TJ.getRedOffset()`, `TJ.getGreenOffset()`, and
|
||||||
`TJ.getGreenOffset()`, and `TJ.getBlueOffset()` methods-- now return -1 for
|
`TJ.getBlueOffset()` methods-- now return -1 for `TJPF_GRAY`/`TJ.PF_GRAY`
|
||||||
`TJPF_GRAY`/`TJ.PF_GRAY` rather than 0. This allows programs to easily
|
rather than 0. This allows programs to easily determine whether a pixel format
|
||||||
determine whether a pixel format has red, green, blue, and alpha components.
|
has red, green, blue, and alpha components.
|
||||||
|
|
||||||
15. Added a new example (tjexample.c) that demonstrates the basic usage of the
|
9. Added a new example (tjexample.c) that demonstrates the basic usage of the
|
||||||
TurboJPEG C API. This example mirrors the functionality of TJExample.java.
|
TurboJPEG C API. This example mirrors the functionality of TJExample.java.
|
||||||
Both files are now included in the libjpeg-turbo documentation.
|
Both files are now included in the libjpeg-turbo documentation.
|
||||||
|
|
||||||
|
|
||||||
|
1.5.3
|
||||||
|
=====
|
||||||
|
|
||||||
|
### Significant changes relative to 1.5.2:
|
||||||
|
|
||||||
|
1. Fixed a NullPointerException in the TurboJPEG Java wrapper that occurred
|
||||||
|
when using the YUVImage constructor that creates an instance backed by separate
|
||||||
|
image planes and allocates memory for the image planes.
|
||||||
|
|
||||||
|
2. Fixed an issue whereby the Java version of TJUnitTest would fail when
|
||||||
|
testing BufferedImage encoding/decoding on big endian systems.
|
||||||
|
|
||||||
|
3. Fixed a segfault in djpeg that would occur if an output format other than
|
||||||
|
PPM/PGM was selected along with the `-crop` option. The `-crop` option now
|
||||||
|
works with the GIF and Targa formats as well (unfortunately, it cannot be made
|
||||||
|
to work with the BMP and RLE formats due to the fact that those output engines
|
||||||
|
write scanlines in bottom-up order.) djpeg will now exit gracefully if an
|
||||||
|
output format other than PPM/PGM, GIF, or Targa is selected along with the
|
||||||
|
`-crop` option.
|
||||||
|
|
||||||
|
4. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
|
||||||
|
quantization was enabled.
|
||||||
|
|
||||||
|
5. TJBench (both C and Java versions) will now display usage information if any
|
||||||
|
command-line argument is unrecognized. This prevents the program from silently
|
||||||
|
ignoring typos.
|
||||||
|
|
||||||
|
6. Fixed an access violation in tjbench.exe (Windows) that occurred when the
|
||||||
|
program was used to decompress an existing JPEG image.
|
||||||
|
|
||||||
|
7. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
|
||||||
|
occurred when attempting to decompress a JPEG image that had been compressed
|
||||||
|
with 4:1:1 chrominance subsampling.
|
||||||
|
|
||||||
|
8. Fixed an issue whereby, when using `jpeg_skip_scanlines()` to skip to the
|
||||||
|
end of a single-scan (non-progressive) image, subsequent calls to
|
||||||
|
`jpeg_consume_input()` would return `JPEG_SUSPENDED` rather than
|
||||||
|
`JPEG_REACHED_EOI`.
|
||||||
|
|
||||||
|
9. `jpeg_crop_scanlines()` now works correctly when decompressing grayscale
|
||||||
|
JPEG images that were compressed with a sampling factor other than 1 (for
|
||||||
|
instance, with `cjpeg -grayscale -sample 2x2`).
|
||||||
|
|
||||||
|
|
||||||
1.5.2
|
1.5.2
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
|||||||
13
jdapistd.c
13
jdapistd.c
@@ -190,6 +190,9 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
|
|||||||
* single-pass decompression case, allowing us to use the same MCU column
|
* single-pass decompression case, allowing us to use the same MCU column
|
||||||
* width for all of the components.
|
* width for all of the components.
|
||||||
*/
|
*/
|
||||||
|
if (cinfo->comps_in_scan == 1 && cinfo->num_components == 1)
|
||||||
|
align = cinfo->_min_DCT_scaled_size;
|
||||||
|
else
|
||||||
align = cinfo->_min_DCT_scaled_size * cinfo->max_h_samp_factor;
|
align = cinfo->_min_DCT_scaled_size * cinfo->max_h_samp_factor;
|
||||||
|
|
||||||
/* Adjust xoffset to the nearest iMCU boundary <= the requested value */
|
/* Adjust xoffset to the nearest iMCU boundary <= the requested value */
|
||||||
@@ -215,6 +218,9 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
|
|||||||
|
|
||||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||||
ci++, compptr++) {
|
ci++, compptr++) {
|
||||||
|
int hsf = (cinfo->comps_in_scan == 1 && cinfo->num_components == 1) ?
|
||||||
|
1 : compptr->h_samp_factor;
|
||||||
|
|
||||||
/* Set downsampled_width to the new output width. */
|
/* Set downsampled_width to the new output width. */
|
||||||
orig_downsampled_width = compptr->downsampled_width;
|
orig_downsampled_width = compptr->downsampled_width;
|
||||||
compptr->downsampled_width =
|
compptr->downsampled_width =
|
||||||
@@ -228,11 +234,10 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
|
|||||||
* values will be used in multi-scan decompressions.
|
* values will be used in multi-scan decompressions.
|
||||||
*/
|
*/
|
||||||
cinfo->master->first_MCU_col[ci] =
|
cinfo->master->first_MCU_col[ci] =
|
||||||
(JDIMENSION) (long) (*xoffset * compptr->h_samp_factor) /
|
(JDIMENSION) (long) (*xoffset * hsf) / (long) align;
|
||||||
(long) align;
|
|
||||||
cinfo->master->last_MCU_col[ci] =
|
cinfo->master->last_MCU_col[ci] =
|
||||||
(JDIMENSION) jdiv_round_up((long) ((*xoffset + cinfo->output_width) *
|
(JDIMENSION) jdiv_round_up((long) ((*xoffset + cinfo->output_width) *
|
||||||
compptr->h_samp_factor),
|
hsf),
|
||||||
(long) align) - 1;
|
(long) align) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,6 +391,8 @@ jpeg_skip_scanlines (j_decompress_ptr cinfo, JDIMENSION num_lines)
|
|||||||
/* Do not skip past the bottom of the image. */
|
/* Do not skip past the bottom of the image. */
|
||||||
if (cinfo->output_scanline + num_lines >= cinfo->output_height) {
|
if (cinfo->output_scanline + num_lines >= cinfo->output_height) {
|
||||||
cinfo->output_scanline = cinfo->output_height;
|
cinfo->output_scanline = cinfo->output_height;
|
||||||
|
(*cinfo->inputctl->finish_input_pass) (cinfo);
|
||||||
|
cinfo->inputctl->eoi_reached = TRUE;
|
||||||
return cinfo->output_height - cinfo->output_scanline;
|
return cinfo->output_height - cinfo->output_scanline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user