From 35244064bbb2a853fb5c08898e8a74a7ec489aaa Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 1 Feb 2019 15:45:39 +0100 Subject: block tail calls etc. --- test/monniaux/jpeg-6b/jchuff.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/monniaux/jpeg-6b/jchuff.c') 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; -- cgit