aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/jpeg-6b/jchuff.c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 15:45:39 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 15:45:39 +0100
commit35244064bbb2a853fb5c08898e8a74a7ec489aaa (patch)
treee9b7ccb8b46174301ccf106807ea2fcd640350e5 /test/monniaux/jpeg-6b/jchuff.c
parent8ae9063a94fbf3756bb2b1d596f35b81e3e608eb (diff)
downloadcompcert-kvx-35244064bbb2a853fb5c08898e8a74a7ec489aaa.tar.gz
compcert-kvx-35244064bbb2a853fb5c08898e8a74a7ec489aaa.zip
block tail calls etc.
Diffstat (limited to 'test/monniaux/jpeg-6b/jchuff.c')
-rw-r--r--test/monniaux/jpeg-6b/jchuff.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/monniaux/jpeg-6b/jchuff.c b/test/monniaux/jpeg-6b/jchuff.c
index 4a2d0da2..f2352505 100644
--- a/test/monniaux/jpeg-6b/jchuff.c
+++ b/test/monniaux/jpeg-6b/jchuff.c
@@ -95,6 +95,7 @@ METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
#endif
+
/*
* Initialize for a Huffman-compressed scan.
* If gather_statistics is TRUE, we do not output anything during the scan,
@@ -262,6 +263,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
}
}
+
/* Outputting bytes to the file */
/* Emit a byte, taking 'action' if must suspend. */
@@ -440,6 +442,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
return TRUE;
}
+
/*
* Emit a restart marker & resynchronize predictions.
*/
@@ -548,6 +551,7 @@ finish_pass_huff (j_compress_ptr cinfo)
ASSIGN_STATE(entropy->saved, state.cur);
}
+
/*
* Huffman coding optimization.
*
@@ -561,6 +565,7 @@ finish_pass_huff (j_compress_ptr cinfo)
#ifdef ENTROPY_OPT_SUPPORTED
+
/* Process a single block's worth of coefficients */
LOCAL(void)
@@ -630,12 +635,12 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
ac_counts[0]++;
}
+
/*
* Trial-encode one MCU's worth of Huffman-compressed coefficients.
* No data is actually output, so no suspension return is possible.
*/
-
METHODDEF(boolean)
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{
@@ -892,7 +897,8 @@ jinit_huff_encoder (j_compress_ptr cinfo)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(huff_entropy_encoder));
cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
- ASSIGN_FUNPTR(entropy->pub.start_pass, start_pass_huff);
+ entropy->pub.start_pass = start_pass_huff;
+
/* Mark tables unallocated */
for (i = 0; i < NUM_HUFF_TBLS; i++) {
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;