More minor code formatting tweaks

This commit is contained in:
DRC
2016-02-19 10:35:09 -06:00
parent 9100b67a75
commit e621dfc508
5 changed files with 14 additions and 14 deletions

View File

@@ -140,7 +140,7 @@ select_file_type (j_compress_ptr cinfo, FILE *infile)
static const char *progname; /* program name for error messages */ static const char *progname; /* program name for error messages */
static char *outfilename; /* for -outfile switch */ static char *outfilename; /* for -outfile switch */
boolean memdst; /* for -memdst switch */ boolean memdst; /* for -memdst switch */
LOCAL(void) LOCAL(void)

View File

@@ -90,7 +90,7 @@ static IMAGE_FORMATS requested_fmt;
static const char *progname; /* program name for error messages */ static const char *progname; /* program name for error messages */
static char *outfilename; /* for -outfile switch */ static char *outfilename; /* for -outfile switch */
boolean memsrc; /* for -memsrc switch */ boolean memsrc; /* for -memsrc switch */
boolean strip, skip; boolean strip, skip;
JDIMENSION startY, endY; JDIMENSION startY, endY;
#define INPUT_BUF_SIZE 4096 #define INPUT_BUF_SIZE 4096

View File

@@ -265,8 +265,8 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
dtbl = fdct->divisors[qtblno]; dtbl = fdct->divisors[qtblno];
for (i = 0; i < DCTSIZE2; i++) { for (i = 0; i < DCTSIZE2; i++) {
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
if(!compute_reciprocal(qtbl->quantval[i] << 3, &dtbl[i]) if (!compute_reciprocal(qtbl->quantval[i] << 3, &dtbl[i]) &&
&& fdct->quantize == jsimd_quantize) fdct->quantize == jsimd_quantize)
fdct->quantize = quantize; fdct->quantize = quantize;
#else #else
dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3; dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
@@ -305,11 +305,11 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
dtbl = fdct->divisors[qtblno]; dtbl = fdct->divisors[qtblno];
for (i = 0; i < DCTSIZE2; i++) { for (i = 0; i < DCTSIZE2; i++) {
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
if(!compute_reciprocal( if (!compute_reciprocal(
DESCALE(MULTIPLY16V16((JLONG) qtbl->quantval[i], DESCALE(MULTIPLY16V16((JLONG) qtbl->quantval[i],
(JLONG) aanscales[i]), (JLONG) aanscales[i]),
CONST_BITS-3), &dtbl[i]) CONST_BITS-3), &dtbl[i]) &&
&& fdct->quantize == jsimd_quantize) fdct->quantize == jsimd_quantize)
fdct->quantize = quantize; fdct->quantize = quantize;
#else #else
dtbl[i] = (DCTELEM) dtbl[i] = (DCTELEM)

View File

@@ -603,7 +603,7 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
cinfo->num_scans = 1; cinfo->num_scans = 1;
} }
if (cinfo->progressive_mode && !cinfo->arith_code) /* TEMPORARY HACK ??? */ if (cinfo->progressive_mode && !cinfo->arith_code) /* TEMPORARY HACK ??? */
cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
/* Initialize my private state */ /* Initialize my private state */

View File

@@ -203,13 +203,13 @@ process_restart (j_decompress_ptr cinfo)
/* Re-initialize statistics areas */ /* Re-initialize statistics areas */
for (ci = 0; ci < cinfo->comps_in_scan; ci++) { for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
compptr = cinfo->cur_comp_info[ci]; compptr = cinfo->cur_comp_info[ci];
if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { if (!cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) {
MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS);
/* Reset DC predictions to 0 */ /* Reset DC predictions to 0 */
entropy->last_dc_val[ci] = 0; entropy->last_dc_val[ci] = 0;
entropy->dc_context[ci] = 0; entropy->dc_context[ci] = 0;
} }
if (! cinfo->progressive_mode || cinfo->Ss) { if (!cinfo->progressive_mode || cinfo->Ss) {
MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS);
} }
} }
@@ -694,7 +694,7 @@ start_pass (j_decompress_ptr cinfo)
/* Allocate & initialize requested statistics areas */ /* Allocate & initialize requested statistics areas */
for (ci = 0; ci < cinfo->comps_in_scan; ci++) { for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
compptr = cinfo->cur_comp_info[ci]; compptr = cinfo->cur_comp_info[ci];
if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { if (!cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) {
tbl = compptr->dc_tbl_no; tbl = compptr->dc_tbl_no;
if (tbl < 0 || tbl >= NUM_ARITH_TBLS) if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);
@@ -706,7 +706,7 @@ start_pass (j_decompress_ptr cinfo)
entropy->last_dc_val[ci] = 0; entropy->last_dc_val[ci] = 0;
entropy->dc_context[ci] = 0; entropy->dc_context[ci] = 0;
} }
if (! cinfo->progressive_mode || cinfo->Ss) { if (!cinfo->progressive_mode || cinfo->Ss) {
tbl = compptr->ac_tbl_no; tbl = compptr->ac_tbl_no;
if (tbl < 0 || tbl >= NUM_ARITH_TBLS) if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);