Reconcile indentation, whitespace, and other code formatting with libjpeg-turbo.
For whatever reason, some of these files didn't get fully merged from libjpeg-turbo 1.4. They still contained tab characters and other formatting conventions from libjpeg-turbo 1.3. This patch also fixes some obvious indentation errors in the mozjpeg-specific code. There is more formatting work that needs to be done to the mozjpeg-specific code, to fix line overruns, incorrect operator whitespace, and other issues that make it not consistent with the libjpeg/libjpeg-turbo code.
This commit is contained in:
3
cjpeg.c
3
cjpeg.c
@@ -753,7 +753,8 @@ main (int argc, char **argv)
|
||||
GETJOCTET(marker->data[3]) == 0x62 &&
|
||||
GETJOCTET(marker->data[4]) == 0x65)
|
||||
continue; /* reject duplicate Adobe */
|
||||
jpeg_write_marker(&cinfo, marker->marker, marker->data, marker->data_length);
|
||||
jpeg_write_marker(&cinfo, marker->marker, marker->data,
|
||||
marker->data_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "jpeglib.h"
|
||||
#include "jchuff.h"
|
||||
|
||||
|
||||
/* We use a full-image coefficient buffer when doing Huffman optimization,
|
||||
* and also for writing multiple-scan JPEG files. In all cases, the DCT
|
||||
* step is run during the first pass, and subsequent passes need only read
|
||||
@@ -190,7 +191,8 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
(*cinfo->fdct->forward_DCT) (cinfo, compptr,
|
||||
input_buf[compptr->component_index],
|
||||
coef->MCU_buffer[blkn],
|
||||
ypos, xpos, (JDIMENSION) blockcnt, NULL);
|
||||
ypos, xpos, (JDIMENSION) blockcnt,
|
||||
NULL);
|
||||
if (blockcnt < compptr->MCU_width) {
|
||||
/* Create some dummy blocks at the right edge of the image. */
|
||||
jzero_far((void *) coef->MCU_buffer[blkn + blockcnt],
|
||||
@@ -302,7 +304,8 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
(*cinfo->fdct->forward_DCT) (cinfo, compptr,
|
||||
input_buf[ci], thisblockrow,
|
||||
(JDIMENSION) (block_row * DCTSIZE),
|
||||
(JDIMENSION) 0, blocks_across, buffer_dst[block_row]);
|
||||
(JDIMENSION) 0, blocks_across,
|
||||
buffer_dst[block_row]);
|
||||
if (ndummy > 0) {
|
||||
/* Create dummy blocks at the right edge of the image. */
|
||||
thisblockrow += blocks_across; /* => first dummy block */
|
||||
@@ -503,7 +506,6 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Try to write the MCU. */
|
||||
if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
|
||||
/* Suspension forced; update state counters and exit */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/* Private subobject for this module */
|
||||
|
||||
typedef void (*forward_DCT_method_ptr) (DCTELEM * data);
|
||||
|
||||
@@ -809,5 +809,4 @@ jpeg_simple_progression (j_compress_ptr cinfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* C_PROGRESSIVE_SUPPORTED */
|
||||
|
||||
@@ -25,7 +25,6 @@ typedef enum { /* Operating modes for buffer controllers */
|
||||
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
|
||||
JBUF_SAVE_AND_PASS, /* Run both subobjects, save output */
|
||||
JBUF_REQUANT /* Requantize */
|
||||
|
||||
} J_BUF_MODE;
|
||||
|
||||
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
|
||||
|
||||
Reference in New Issue
Block a user