summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jdcol565.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libjpeg/src/jdcol565.c')
-rw-r--r--src/3rdparty/libjpeg/src/jdcol565.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/3rdparty/libjpeg/src/jdcol565.c b/src/3rdparty/libjpeg/src/jdcol565.c
index 40068ef84f..53c7bd9187 100644
--- a/src/3rdparty/libjpeg/src/jdcol565.c
+++ b/src/3rdparty/libjpeg/src/jdcol565.c
@@ -45,9 +45,9 @@ ycc_rgb565_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
outptr = *output_buf++;
if (PACK_NEED_ALIGNMENT(outptr)) {
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[y + Crrtab[cr]];
g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
@@ -58,18 +58,18 @@ ycc_rgb565_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
num_cols--;
}
for (col = 0; col < (num_cols >> 1); col++) {
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[y + Crrtab[cr]];
g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
b = range_limit[y + Cbbtab[cb]];
rgb = PACK_SHORT_565(r, g, b);
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[y + Crrtab[cr]];
g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
@@ -80,9 +80,9 @@ ycc_rgb565_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
outptr += 4;
}
if (num_cols & 1) {
- y = GETJSAMPLE(*inptr0);
- cb = GETJSAMPLE(*inptr1);
- cr = GETJSAMPLE(*inptr2);
+ y = *inptr0;
+ cb = *inptr1;
+ cr = *inptr2;
r = range_limit[y + Crrtab[cr]];
g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
@@ -125,9 +125,9 @@ ycc_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
input_row++;
outptr = *output_buf++;
if (PACK_NEED_ALIGNMENT(outptr)) {
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
g = range_limit[DITHER_565_G(y +
((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
@@ -139,9 +139,9 @@ ycc_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
num_cols--;
}
for (col = 0; col < (num_cols >> 1); col++) {
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
g = range_limit[DITHER_565_G(y +
((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
@@ -150,9 +150,9 @@ ycc_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
d0 = DITHER_ROTATE(d0);
rgb = PACK_SHORT_565(r, g, b);
- y = GETJSAMPLE(*inptr0++);
- cb = GETJSAMPLE(*inptr1++);
- cr = GETJSAMPLE(*inptr2++);
+ y = *inptr0++;
+ cb = *inptr1++;
+ cr = *inptr2++;
r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
g = range_limit[DITHER_565_G(y +
((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
@@ -165,9 +165,9 @@ ycc_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
outptr += 4;
}
if (num_cols & 1) {
- y = GETJSAMPLE(*inptr0);
- cb = GETJSAMPLE(*inptr1);
- cr = GETJSAMPLE(*inptr2);
+ y = *inptr0;
+ cb = *inptr1;
+ cr = *inptr2;
r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
g = range_limit[DITHER_565_G(y +
((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
@@ -202,32 +202,32 @@ rgb_rgb565_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
input_row++;
outptr = *output_buf++;
if (PACK_NEED_ALIGNMENT(outptr)) {
- r = GETJSAMPLE(*inptr0++);
- g = GETJSAMPLE(*inptr1++);
- b = GETJSAMPLE(*inptr2++);
+ r = *inptr0++;
+ g = *inptr1++;
+ b = *inptr2++;
rgb = PACK_SHORT_565(r, g, b);
*(INT16 *)outptr = (INT16)rgb;
outptr += 2;
num_cols--;
}
for (col = 0; col < (num_cols >> 1); col++) {
- r = GETJSAMPLE(*inptr0++);
- g = GETJSAMPLE(*inptr1++);
- b = GETJSAMPLE(*inptr2++);
+ r = *inptr0++;
+ g = *inptr1++;
+ b = *inptr2++;
rgb = PACK_SHORT_565(r, g, b);
- r = GETJSAMPLE(*inptr0++);
- g = GETJSAMPLE(*inptr1++);
- b = GETJSAMPLE(*inptr2++);
+ r = *inptr0++;
+ g = *inptr1++;
+ b = *inptr2++;
rgb = PACK_TWO_PIXELS(rgb, PACK_SHORT_565(r, g, b));
WRITE_TWO_ALIGNED_PIXELS(outptr, rgb);
outptr += 4;
}
if (num_cols & 1) {
- r = GETJSAMPLE(*inptr0);
- g = GETJSAMPLE(*inptr1);
- b = GETJSAMPLE(*inptr2);
+ r = *inptr0;
+ g = *inptr1;
+ b = *inptr2;
rgb = PACK_SHORT_565(r, g, b);
*(INT16 *)outptr = (INT16)rgb;
}
@@ -259,24 +259,24 @@ rgb_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
input_row++;
outptr = *output_buf++;
if (PACK_NEED_ALIGNMENT(outptr)) {
- r = range_limit[DITHER_565_R(GETJSAMPLE(*inptr0++), d0)];
- g = range_limit[DITHER_565_G(GETJSAMPLE(*inptr1++), d0)];
- b = range_limit[DITHER_565_B(GETJSAMPLE(*inptr2++), d0)];
+ r = range_limit[DITHER_565_R(*inptr0++, d0)];
+ g = range_limit[DITHER_565_G(*inptr1++, d0)];
+ b = range_limit[DITHER_565_B(*inptr2++, d0)];
rgb = PACK_SHORT_565(r, g, b);
*(INT16 *)outptr = (INT16)rgb;
outptr += 2;
num_cols--;
}
for (col = 0; col < (num_cols >> 1); col++) {
- r = range_limit[DITHER_565_R(GETJSAMPLE(*inptr0++), d0)];
- g = range_limit[DITHER_565_G(GETJSAMPLE(*inptr1++), d0)];
- b = range_limit[DITHER_565_B(GETJSAMPLE(*inptr2++), d0)];
+ r = range_limit[DITHER_565_R(*inptr0++, d0)];
+ g = range_limit[DITHER_565_G(*inptr1++, d0)];
+ b = range_limit[DITHER_565_B(*inptr2++, d0)];
d0 = DITHER_ROTATE(d0);
rgb = PACK_SHORT_565(r, g, b);
- r = range_limit[DITHER_565_R(GETJSAMPLE(*inptr0++), d0)];
- g = range_limit[DITHER_565_G(GETJSAMPLE(*inptr1++), d0)];
- b = range_limit[DITHER_565_B(GETJSAMPLE(*inptr2++), d0)];
+ r = range_limit[DITHER_565_R(*inptr0++, d0)];
+ g = range_limit[DITHER_565_G(*inptr1++, d0)];
+ b = range_limit[DITHER_565_B(*inptr2++, d0)];
d0 = DITHER_ROTATE(d0);
rgb = PACK_TWO_PIXELS(rgb, PACK_SHORT_565(r, g, b));
@@ -284,9 +284,9 @@ rgb_rgb565D_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
outptr += 4;
}
if (num_cols & 1) {
- r = range_limit[DITHER_565_R(GETJSAMPLE(*inptr0), d0)];
- g = range_limit[DITHER_565_G(GETJSAMPLE(*inptr1), d0)];
- b = range_limit[DITHER_565_B(GETJSAMPLE(*inptr2), d0)];
+ r = range_limit[DITHER_565_R(*inptr0, d0)];
+ g = range_limit[DITHER_565_G(*inptr1, d0)];
+ b = range_limit[DITHER_565_B(*inptr2, d0)];
rgb = PACK_SHORT_565(r, g, b);
*(INT16 *)outptr = (INT16)rgb;
}