summaryrefslogtreecommitdiff
path: root/src/libjpeg/jcinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjpeg/jcinit.c')
-rw-r--r--src/libjpeg/jcinit.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/libjpeg/jcinit.c b/src/libjpeg/jcinit.c
index 5efffe3..0ba310f 100644
--- a/src/libjpeg/jcinit.c
+++ b/src/libjpeg/jcinit.c
@@ -41,17 +41,10 @@ jinit_compress_master (j_compress_ptr cinfo)
/* Forward DCT */
jinit_forward_dct(cinfo);
/* Entropy encoding: either Huffman or arithmetic coding. */
- if (cinfo->arith_code) {
- ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
- } else {
- if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
- jinit_phuff_encoder(cinfo);
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- } else
- jinit_huff_encoder(cinfo);
+ if (cinfo->arith_code)
+ jinit_arith_encoder(cinfo);
+ else {
+ jinit_huff_encoder(cinfo);
}
/* Need a full-image coefficient buffer in any multi-pass mode. */