-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update libjpeg-turbo to upstream stable release 2.1.5.1
This release consists mostly of bug fixes. Change-Id: Ic1b7ea6c10c9c92125eaf31345991d9096b19fb4
- Loading branch information
Showing
42 changed files
with
1,182 additions
and
879 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
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) 1991-1996, Thomas G. Lane. | ||
* libjpeg-turbo Modifications: | ||
* Copyright 2009 Pierre Ossman <[email protected]> for Cendio AB | ||
* Copyright (C) 2009-2012, 2015, D. R. Commander. | ||
* Copyright (C) 2009-2012, 2015, 2022, D. R. Commander. | ||
* Copyright (C) 2014, MIPS Technologies, Inc., California. | ||
* For conditions of distribution and use, see the accompanying README.ijg | ||
* file. | ||
|
@@ -17,7 +17,6 @@ | |
#include "jinclude.h" | ||
#include "jpeglib.h" | ||
#include "jsimd.h" | ||
#include "jconfigint.h" | ||
|
||
|
||
/* Private subobject */ | ||
|
@@ -84,6 +83,18 @@ typedef my_color_converter *my_cconvert_ptr; | |
#define B_CR_OFF (7 * (MAXJSAMPLE + 1)) | ||
#define TABLE_SIZE (8 * (MAXJSAMPLE + 1)) | ||
|
||
/* 12-bit samples use a 16-bit data type, so it is possible to pass | ||
* out-of-range sample values (< 0 or > 4095) to jpeg_write_scanlines(). | ||
* Thus, we mask the incoming 12-bit samples to guard against overrunning | ||
* or underrunning the conversion tables. | ||
*/ | ||
|
||
#if BITS_IN_JSAMPLE == 12 | ||
#define RANGE_LIMIT(value) ((value) & 0xFFF) | ||
#else | ||
#define RANGE_LIMIT(value) (value) | ||
#endif | ||
|
||
|
||
/* Include inline routines for colorspace extensions */ | ||
|
||
|
@@ -392,9 +403,9 @@ cmyk_ycck_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, | |
outptr3 = output_buf[3][output_row]; | ||
output_row++; | ||
for (col = 0; col < num_cols; col++) { | ||
r = MAXJSAMPLE - inptr[0]; | ||
g = MAXJSAMPLE - inptr[1]; | ||
b = MAXJSAMPLE - inptr[2]; | ||
r = MAXJSAMPLE - RANGE_LIMIT(inptr[0]); | ||
g = MAXJSAMPLE - RANGE_LIMIT(inptr[1]); | ||
b = MAXJSAMPLE - RANGE_LIMIT(inptr[2]); | ||
/* K passes through as-is */ | ||
outptr3[col] = inptr[3]; | ||
inptr += 4; | ||
|
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
Oops, something went wrong.