aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-10-14 14:13:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-14 14:13:44 -0700
commitb16da2189f013e44ba5b44b843f784110fa0ffe6 (patch)
tree52912d97597d16baa92b5af2724e12cf92cbcd05
parent135f5dc7b1302ba3cab48f4738d5ed1450bcb896 (diff)
parent6435abb2c5883ceb85598a9c690ea8f744df6b5f (diff)
downloadjpeg-b16da2189f013e44ba5b44b843f784110fa0ffe6.tar.gz
am 6435abb2: Merge "Fix build for c99"idea133
* commit '6435abb2c5883ceb85598a9c690ea8f744df6b5f': Fix build for c99
-rw-r--r--jdphuff.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/jdphuff.c b/jdphuff.c
index 922017e..2f856e0 100644
--- a/jdphuff.c
+++ b/jdphuff.c
@@ -632,23 +632,6 @@ undoit:
}
/*
- * Save the current Huffman deocde position and the DC coefficients
- * for each component into bitstream_offset and dc_info[], respectively.
- */
-METHODDEF(void)
-get_huffman_decoder_configuration(j_decompress_ptr cinfo,
- huffman_offset_data *offset)
-{
- int i;
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- jpeg_get_huffman_decoder_configuration_progressive(cinfo, offset);
- offset->EOBRUN = entropy->saved.EOBRUN;
- for (i = 0; i < cinfo->comps_in_scan; i++)
- offset->prev_dc[i] = entropy->saved.last_dc_val[i];
-}
-
-
-/*
* Save the current Huffman decoder position and the bit buffer
* into bitstream_offset and get_buffer, respectively.
*/
@@ -676,20 +659,20 @@ jpeg_get_huffman_decoder_configuration_progressive(j_decompress_ptr cinfo,
offset->get_buffer = entropy->bitstate.get_buffer;
}
-
/*
- * Configure the Huffman decoder to decode the image
- * starting from (iMCU_row_offset, iMCU_col_offset).
+ * Save the current Huffman deocde position and the DC coefficients
+ * for each component into bitstream_offset and dc_info[], respectively.
*/
METHODDEF(void)
-configure_huffman_decoder(j_decompress_ptr cinfo, huffman_offset_data offset)
+get_huffman_decoder_configuration(j_decompress_ptr cinfo,
+ huffman_offset_data *offset)
{
int i;
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- jpeg_configure_huffman_decoder_progressive(cinfo, offset);
- entropy->saved.EOBRUN = offset.EOBRUN;
+ jpeg_get_huffman_decoder_configuration_progressive(cinfo, offset);
+ offset->EOBRUN = entropy->saved.EOBRUN;
for (i = 0; i < cinfo->comps_in_scan; i++)
- entropy->saved.last_dc_val[i] = offset.prev_dc[i];
+ offset->prev_dc[i] = entropy->saved.last_dc_val[i];
}
/*
@@ -717,6 +700,21 @@ jpeg_configure_huffman_decoder_progressive(j_decompress_ptr cinfo,
bit_in_bit_buffer, offset.get_buffer);
}
+/*
+ * Configure the Huffman decoder to decode the image
+ * starting from (iMCU_row_offset, iMCU_col_offset).
+ */
+METHODDEF(void)
+configure_huffman_decoder(j_decompress_ptr cinfo, huffman_offset_data offset)
+{
+ int i;
+ phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+ jpeg_configure_huffman_decoder_progressive(cinfo, offset);
+ entropy->saved.EOBRUN = offset.EOBRUN;
+ for (i = 0; i < cinfo->comps_in_scan; i++)
+ entropy->saved.last_dc_val[i] = offset.prev_dc[i];
+}
+
GLOBAL(void)
jpeg_configure_huffman_index_scan(j_decompress_ptr cinfo,
huffman_index *index, int scan_no, int offset)