/* * jdcolext.c * * 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, 2023, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains output colorspace conversion routines. */ /* This file is included by jdcolor.c */ /* * Convert some rows of samples to the output colorspace. * * Note that we change from noninterleaved, one-plane-per-component format * to interleaved-pixel format. The output buffer is therefore three times * as wide as the input buffer. * A starting row offset is provided only for the input buffer. The caller * can easily adjust the passed output_buf value to accommodate any row * offset required on that side. */ INLINE LOCAL(void) ycc_rgb_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows) { … } /* * Convert grayscale to RGB: just duplicate the graylevel three times. * This is provided to support applications that don't want to cope * with grayscale as a separate case. */ INLINE LOCAL(void) gray_rgb_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows) { … } /* * Convert RGB to extended RGB: just swap the order of source pixels */ INLINE LOCAL(void) rgb_rgb_convert_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows) { … }