Merge branch 'main' into dev

This commit is contained in:
DRC
2023-01-17 18:31:31 -06:00
5 changed files with 37 additions and 32 deletions

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2009, 2011, 2015, 2022, D. R. Commander.
* Copyright (C) 2009, 2011, 2015, 2022-2023, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -63,10 +63,10 @@ ycc_rgb_convert_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]];
/* Set unused byte to 0xFF so it can be interpreted as an opaque */
/* alpha channel value */
/* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
/* opaque alpha channel value */
#ifdef RGB_ALPHA
outptr[RGB_ALPHA] = 0xFF;
outptr[RGB_ALPHA] = _MAXJSAMPLE;
#endif
outptr += RGB_PIXELSIZE;
}
@@ -98,10 +98,10 @@ gray_rgb_convert_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
outptr = *output_buf++;
for (col = 0; col < num_cols; col++) {
outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
/* Set unused byte to 0xFF so it can be interpreted as an opaque */
/* alpha channel value */
/* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
/* opaque alpha channel value */
#ifdef RGB_ALPHA
outptr[RGB_ALPHA] = 0xFF;
outptr[RGB_ALPHA] = _MAXJSAMPLE;
#endif
outptr += RGB_PIXELSIZE;
}
@@ -134,10 +134,10 @@ rgb_rgb_convert_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
outptr[RGB_RED] = inptr0[col];
outptr[RGB_GREEN] = inptr1[col];
outptr[RGB_BLUE] = inptr2[col];
/* Set unused byte to 0xFF so it can be interpreted as an opaque */
/* alpha channel value */
/* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
/* opaque alpha channel value */
#ifdef RGB_ALPHA
outptr[RGB_ALPHA] = 0xFF;
outptr[RGB_ALPHA] = _MAXJSAMPLE;
#endif
outptr += RGB_PIXELSIZE;
}