diff options
author | Aaron Gable <agable@chromium.org> | 2015-08-06 09:54:48 -0700 |
---|---|---|
committer | Aaron Gable <agable@chromium.org> | 2015-08-06 09:54:48 -0700 |
commit | feec46f80444b8eed4126a86a2c0e2cffe1c9673 (patch) | |
tree | 8bb36e3f61e201cb718af143ea8409ace64d6e4d /djpeg.c | |
parent | c9c8755c326b42c8d0dc938ec3f0d1d648bd361a (diff) |
Add support for decoding to 565 to libjpeg_turbo
It was submitted upstream at libjpeg_turbo as r1295 plus
sundry fixes and SIMD optimizations (r1385, r1386, r1398,
and r1402). Now cherry pick the change into
third_party/libjpeg-turbo.
At this time, this new capability is intended for Android
devices, not Chrome, and should have no affect on JPEG
decode behavior or perf of Chrome.
BUG=516761
R=noel@chromium.org
Review URL: https://codereview.chromium.org/1270213002 .
Diffstat (limited to 'djpeg.c')
-rw-r--r-- | djpeg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -110,6 +110,7 @@ usage (void) fprintf(stderr, " -fast Fast, low-quality processing\n"); fprintf(stderr, " -grayscale Force grayscale output\n"); fprintf(stderr, " -rgb Force RGB output\n"); + fprintf(stderr, " -rgb565 Force RGB565 output\n"); #ifdef IDCT_SCALING_SUPPORTED fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); #endif @@ -288,6 +289,10 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv, /* Force RGB output. */ cinfo->out_color_space = JCS_RGB; + } else if (keymatch(arg, "rgb565", 2)) { + /* Force RGB565 output. */ + cinfo->out_color_space = JCS_RGB565; + } else if (keymatch(arg, "map", 3)) { /* Quantize to a color map taken from an input file. */ if (++argn >= argc) /* advance to next argument */ |