summaryrefslogtreecommitdiff
path: root/camlibs/ax203/ax203_compress_jpeg.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-04-10 10:15:45 +0000
committerHans de Goede <hdegoede@redhat.com>2010-04-10 10:15:45 +0000
commit2acf9057b64a4305e251bcca544a014e82f9a22b (patch)
tree26ab8246bac08ecff0a62afa97cd3d0671e81173 /camlibs/ax203/ax203_compress_jpeg.c
parent6b9446bc09a11e7467294e3bf78298f2722a9598 (diff)
downloadlibgphoto2-2acf9057b64a4305e251bcca544a014e82f9a22b.tar.gz
ax203: Remove JPEG huffman table optimalization code
It turns out that with some pictures the frame cannot properly decompress them when compressed with JPEG huffman table optimalization, so remove it. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12950 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/ax203/ax203_compress_jpeg.c')
-rw-r--r--camlibs/ax203/ax203_compress_jpeg.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/camlibs/ax203/ax203_compress_jpeg.c b/camlibs/ax203/ax203_compress_jpeg.c
index 1d304b652..6bd58b9fe 100644
--- a/camlibs/ax203/ax203_compress_jpeg.c
+++ b/camlibs/ax203/ax203_compress_jpeg.c
@@ -124,7 +124,6 @@ ax203_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
int last_dc_val[3] = { 0, 0, 0 };
/* Compression configuration settings */
int uv_subsample = camera->pl->jpeg_uv_subsample;
- int optimize = camera->pl->jpeg_optimize;
i = 8 * uv_subsample;
if (width % i || height % i) {
@@ -144,7 +143,6 @@ ax203_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults (&cinfo);
- cinfo.optimize_coding = optimize;
cinfo.comp_info[0].h_samp_factor = uv_subsample;
cinfo.comp_info[0].v_samp_factor = uv_subsample;
@@ -241,15 +239,6 @@ ax203_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
cinfo.comp_info[2].quant_tbl_no = 0;
cinfo.comp_info[2].dc_tbl_no = 0;
cinfo.comp_info[2].ac_tbl_no = 0;
- /* Copy over our optimized huffman tables */
- memcpy (cinfo.dc_huff_tbl_ptrs[0], dinfo.dc_huff_tbl_ptrs[0],
- sizeof(JHUFF_TBL));
- memcpy (cinfo.dc_huff_tbl_ptrs[1], dinfo.dc_huff_tbl_ptrs[1],
- sizeof(JHUFF_TBL));
- memcpy (cinfo.ac_huff_tbl_ptrs[0], dinfo.ac_huff_tbl_ptrs[0],
- sizeof(JHUFF_TBL));
- memcpy (cinfo.ac_huff_tbl_ptrs[1], dinfo.ac_huff_tbl_ptrs[1],
- sizeof(JHUFF_TBL));
/* And create a mini JPEG for each MCU with the shuffled component order
and extract its huffman data. This fixes our component order problem and