libjpeg-turbo has never really supported such compilers, since (AFAIK) they are non-existent on any modern computing platform and thus impossible for us to test. (Also, the TurboJPEG API would break without unsigned chars.) Furthermore, the unified CMake-based build system introduced in 2.0 always defines HAVE_UNSIGNED_CHAR, so retaining other code paths is pointless. Eliminating support for compilers without unsigned char eliminates the need for the GETJSAMPLE() macro, which improves the readability of many parts of the code as well as improving the performance of writing Targa and Windows BMP files. Fixes #317
29 lines
701 B
C
29 lines
701 B
C
/*
|
|
* jcsample.h
|
|
*
|
|
* This file was part of the Independent JPEG Group's software:
|
|
* Copyright (C) 1991-1996, Thomas G. Lane.
|
|
* For conditions of distribution and use, see the accompanying README.ijg
|
|
* file.
|
|
*/
|
|
|
|
LOCAL(void)
|
|
expand_right_edge(JSAMPARRAY image_data, int num_rows, JDIMENSION input_cols,
|
|
JDIMENSION output_cols)
|
|
{
|
|
register JSAMPROW ptr;
|
|
register JSAMPLE pixval;
|
|
register int count;
|
|
int row;
|
|
int numcols = (int)(output_cols - input_cols);
|
|
|
|
if (numcols > 0) {
|
|
for (row = 0; row < num_rows; row++) {
|
|
ptr = image_data[row] + input_cols;
|
|
pixval = ptr[-1];
|
|
for (count = numcols; count > 0; count--)
|
|
*ptr++ = pixval;
|
|
}
|
|
}
|
|
}
|