summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libjpeg/src/jutils.c')
-rw-r--r--src/3rdparty/libjpeg/src/jutils.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/3rdparty/libjpeg/src/jutils.c b/src/3rdparty/libjpeg/src/jutils.c
index d86271624a..24caac1902 100644
--- a/src/3rdparty/libjpeg/src/jutils.c
+++ b/src/3rdparty/libjpeg/src/jutils.c
@@ -17,8 +17,11 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
+#include "jsamplecomp.h"
+#if BITS_IN_JSAMPLE == 8
+
/*
* jpeg_zigzag_order[i] is the zigzag-order position of the i'th element
* of a DCT block read in natural order (left to right, top to bottom).
@@ -89,19 +92,24 @@ jround_up(long a, long b)
return a - (a % b);
}
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE != 16 || \
+ defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED)
GLOBAL(void)
-jcopy_sample_rows(JSAMPARRAY input_array, int source_row,
- JSAMPARRAY output_array, int dest_row, int num_rows,
- JDIMENSION num_cols)
+_jcopy_sample_rows(_JSAMPARRAY input_array, int source_row,
+ _JSAMPARRAY output_array, int dest_row, int num_rows,
+ JDIMENSION num_cols)
/* Copy some rows of samples from one place to another.
* num_rows rows are copied from input_array[source_row++]
* to output_array[dest_row++]; these areas may overlap for duplication.
* The source and destination arrays must be at least as wide as num_cols.
*/
{
- register JSAMPROW inptr, outptr;
- register size_t count = (size_t)(num_cols * sizeof(JSAMPLE));
+ register _JSAMPROW inptr, outptr;
+ register size_t count = (size_t)(num_cols * sizeof(_JSAMPLE));
register int row;
input_array += source_row;
@@ -114,6 +122,11 @@ jcopy_sample_rows(JSAMPARRAY input_array, int source_row,
}
}
+#endif /* BITS_IN_JSAMPLE != 16 ||
+ defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED) */
+
+
+#if BITS_IN_JSAMPLE == 8
GLOBAL(void)
jcopy_block_row(JBLOCKROW input_row, JBLOCKROW output_row,
@@ -131,3 +144,5 @@ jzero_far(void *target, size_t bytestozero)
{
memset(target, 0, bytestozero);
}
+
+#endif /* BITS_IN_JSAMPLE == 8 */