diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-09-05 10:50:42 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-09-06 11:21:43 +0200 |
commit | e6d3657f7f90a6a184b391d74a9542ef0acf072c (patch) | |
tree | c237aef3e5a85af6f7de3dce39b7a923e20d9f00 /src/3rdparty/libjpeg/src/jdapistd.c | |
parent | b4f31336e30e9d39f247fddd34c22c3b3fe01ab9 (diff) |
Update bundled libjpeg-turbo to version 2.1.4
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.4
Pick-to: 6.4 6.2 5.15
Change-Id: Iaffb12606ec53c3ee217b51ad20663aa4409eafa
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/3rdparty/libjpeg/src/jdapistd.c')
-rw-r--r-- | src/3rdparty/libjpeg/src/jdapistd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/3rdparty/libjpeg/src/jdapistd.c b/src/3rdparty/libjpeg/src/jdapistd.c index 8827d8abf5..02cd0cb93a 100644 --- a/src/3rdparty/libjpeg/src/jdapistd.c +++ b/src/3rdparty/libjpeg/src/jdapistd.c @@ -159,9 +159,12 @@ jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, JDIMENSION input_xoffset; boolean reinit_upsampler = FALSE; jpeg_component_info *compptr; +#ifdef UPSAMPLE_MERGING_SUPPORTED my_master_ptr master = (my_master_ptr)cinfo->master; +#endif - if (cinfo->global_state != DSTATE_SCANNING || cinfo->output_scanline != 0) + if ((cinfo->global_state != DSTATE_SCANNING && + cinfo->global_state != DSTATE_BUFIMAGE) || cinfo->output_scanline != 0) ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); if (!xoffset || !width) @@ -209,11 +212,13 @@ jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, */ *width = *width + input_xoffset - *xoffset; cinfo->output_width = *width; +#ifdef UPSAMPLE_MERGING_SUPPORTED if (master->using_merged_upsample && cinfo->max_v_samp_factor == 2) { my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample; upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; } +#endif /* Set the first and last iMCU columns that we must decompress. These values * will be used in single-scan decompressions. @@ -324,7 +329,9 @@ LOCAL(void) read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines) { JDIMENSION n; +#ifdef UPSAMPLE_MERGING_SUPPORTED my_master_ptr master = (my_master_ptr)cinfo->master; +#endif JSAMPLE dummy_sample[1] = { 0 }; JSAMPROW dummy_row = dummy_sample; JSAMPARRAY scanlines = NULL; @@ -348,10 +355,12 @@ read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines) cinfo->cquantize->color_quantize = noop_quantize; } +#ifdef UPSAMPLE_MERGING_SUPPORTED if (master->using_merged_upsample && cinfo->max_v_samp_factor == 2) { my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample; scanlines = &upsample->spare_row; } +#endif for (n = 0; n < num_lines; n++) jpeg_read_scanlines(cinfo, scanlines, 1); @@ -517,7 +526,7 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines) * all of the entropy decoding occurs in jpeg_start_decompress(), assuming * that the input data source is non-suspending. This makes skipping easy. */ - if (cinfo->inputctl->has_multiple_scans) { + if (cinfo->inputctl->has_multiple_scans || cinfo->buffered_image) { if (cinfo->upsample->need_context_rows) { cinfo->output_scanline += lines_to_skip; cinfo->output_iMCU_row += lines_to_skip / lines_per_iMCU_row; |