summaryrefslogtreecommitdiff
path: root/media/libjpeg/jutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libjpeg/jutils.c')
-rw-r--r--media/libjpeg/jutils.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/media/libjpeg/jutils.c b/media/libjpeg/jutils.c
index f9d35023e5..d86271624a 100644
--- a/media/libjpeg/jutils.c
+++ b/media/libjpeg/jutils.c
@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1996, Thomas G. Lane.
- * It was modified by The libjpeg-turbo Project to include only code
- * relevant to libjpeg-turbo.
+ * libjpeg-turbo Modifications:
+ * Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -53,7 +53,7 @@ const int jpeg_zigzag_order[DCTSIZE2] = {
* fake entries.
*/
-const int jpeg_natural_order[DCTSIZE2+16] = {
+const int jpeg_natural_order[DCTSIZE2 + 16] = {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
@@ -72,7 +72,7 @@ const int jpeg_natural_order[DCTSIZE2+16] = {
*/
GLOBAL(long)
-jdiv_round_up (long a, long b)
+jdiv_round_up(long a, long b)
/* Compute a/b rounded up to next integer, ie, ceil(a/b) */
/* Assumes a >= 0, b > 0 */
{
@@ -81,7 +81,7 @@ jdiv_round_up (long a, long b)
GLOBAL(long)
-jround_up (long a, long b)
+jround_up(long a, long b)
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
/* Assumes a >= 0, b > 0 */
{
@@ -91,9 +91,9 @@ jround_up (long a, long b)
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.
@@ -101,7 +101,7 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
*/
{
register JSAMPROW inptr, outptr;
- register size_t count = (size_t) (num_cols * sizeof(JSAMPLE));
+ register size_t count = (size_t)(num_cols * sizeof(JSAMPLE));
register int row;
input_array += source_row;
@@ -110,24 +110,24 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
for (row = num_rows; row > 0; row--) {
inptr = *input_array++;
outptr = *output_array++;
- MEMCOPY(outptr, inptr, count);
+ memcpy(outptr, inptr, count);
}
}
GLOBAL(void)
-jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
- JDIMENSION num_blocks)
+jcopy_block_row(JBLOCKROW input_row, JBLOCKROW output_row,
+ JDIMENSION num_blocks)
/* Copy a row of coefficient blocks from one place to another. */
{
- MEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * sizeof(JCOEF)));
+ memcpy(output_row, input_row, num_blocks * (DCTSIZE2 * sizeof(JCOEF)));
}
GLOBAL(void)
-jzero_far (void *target, size_t bytestozero)
+jzero_far(void *target, size_t bytestozero)
/* Zero out a chunk of memory. */
/* This might be sample-array data, block-array data, or alloc_large data. */
{
- MEMZERO(target, bytestozero);
+ memset(target, 0, bytestozero);
}