forked from qt/qtbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bundled libjpeg-turbo to version 3.0.1
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.1 Fixes: QTBUG-117804 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: Ia6cdb02eb9c590fe024bdf75566976756c6e13c6 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
- Loading branch information
Showing
6 changed files
with
110 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 1994-1997, Thomas G. Lane. | ||
* libjpeg-turbo Modifications: | ||
* Copyright 2009 Pierre Ossman <[email protected]> for Cendio AB | ||
* Copyright (C) 2010, 2015-2016, 2019-2020, 2022, D. R. Commander. | ||
* Copyright (C) 2010, 2015-2016, 2019-2020, 2022-2023, D. R. Commander. | ||
* Copyright (C) 2015, 2020, Google, Inc. | ||
* For conditions of distribution and use, see the accompanying README.ijg | ||
* file. | ||
|
@@ -431,7 +431,8 @@ decompress_smooth_data(j_decompress_ptr cinfo, _JSAMPIMAGE output_buf) | |
my_coef_ptr coef = (my_coef_ptr)cinfo->coef; | ||
JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; | ||
JDIMENSION block_num, last_block_column; | ||
int ci, block_row, block_rows, access_rows; | ||
int ci, block_row, block_rows, access_rows, image_block_row, | ||
image_block_rows; | ||
JBLOCKARRAY buffer; | ||
JBLOCKROW buffer_ptr, prev_prev_block_row, prev_block_row; | ||
JBLOCKROW next_block_row, next_next_block_row; | ||
|
@@ -497,6 +498,7 @@ decompress_smooth_data(j_decompress_ptr cinfo, _JSAMPIMAGE output_buf) | |
(JDIMENSION)access_rows, FALSE); | ||
buffer += 2 * compptr->v_samp_factor; /* point to current iMCU row */ | ||
} else if (cinfo->output_iMCU_row > 0) { | ||
access_rows += compptr->v_samp_factor; /* prior iMCU row too */ | ||
buffer = (*cinfo->mem->access_virt_barray) | ||
((j_common_ptr)cinfo, coef->whole_image[ci], | ||
(cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, | ||
|
@@ -539,29 +541,30 @@ decompress_smooth_data(j_decompress_ptr cinfo, _JSAMPIMAGE output_buf) | |
inverse_DCT = cinfo->idct->_inverse_DCT[ci]; | ||
output_ptr = output_buf[ci]; | ||
/* Loop over all DCT blocks to be processed. */ | ||
image_block_rows = block_rows * cinfo->total_iMCU_rows; | ||
for (block_row = 0; block_row < block_rows; block_row++) { | ||
image_block_row = cinfo->output_iMCU_row * block_rows + block_row; | ||
buffer_ptr = buffer[block_row] + cinfo->master->first_MCU_col[ci]; | ||
|
||
if (block_row > 0 || cinfo->output_iMCU_row > 0) | ||
if (image_block_row > 0) | ||
prev_block_row = | ||
buffer[block_row - 1] + cinfo->master->first_MCU_col[ci]; | ||
else | ||
prev_block_row = buffer_ptr; | ||
|
||
if (block_row > 1 || cinfo->output_iMCU_row > 1) | ||
if (image_block_row > 1) | ||
prev_prev_block_row = | ||
buffer[block_row - 2] + cinfo->master->first_MCU_col[ci]; | ||
else | ||
prev_prev_block_row = prev_block_row; | ||
|
||
if (block_row < block_rows - 1 || cinfo->output_iMCU_row < last_iMCU_row) | ||
if (image_block_row < image_block_rows - 1) | ||
next_block_row = | ||
buffer[block_row + 1] + cinfo->master->first_MCU_col[ci]; | ||
else | ||
next_block_row = buffer_ptr; | ||
|
||
if (block_row < block_rows - 2 || | ||
cinfo->output_iMCU_row + 1 < last_iMCU_row) | ||
if (image_block_row < image_block_rows - 2) | ||
next_next_block_row = | ||
buffer[block_row + 2] + cinfo->master->first_MCU_col[ci]; | ||
else | ||
|
@@ -584,11 +587,11 @@ decompress_smooth_data(j_decompress_ptr cinfo, _JSAMPIMAGE output_buf) | |
/* Update DC values */ | ||
if (block_num == cinfo->master->first_MCU_col[ci] && | ||
block_num < last_block_column) { | ||
DC04 = (int)prev_prev_block_row[1][0]; | ||
DC09 = (int)prev_block_row[1][0]; | ||
DC14 = (int)buffer_ptr[1][0]; | ||
DC19 = (int)next_block_row[1][0]; | ||
DC24 = (int)next_next_block_row[1][0]; | ||
DC04 = DC05 = (int)prev_prev_block_row[1][0]; | ||
DC09 = DC10 = (int)prev_block_row[1][0]; | ||
DC14 = DC15 = (int)buffer_ptr[1][0]; | ||
DC19 = DC20 = (int)next_block_row[1][0]; | ||
DC24 = DC25 = (int)next_next_block_row[1][0]; | ||
} | ||
if (block_num + 1 < last_block_column) { | ||
DC05 = (int)prev_prev_block_row[2][0]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters