evas - jpg loader - speed up header check for pgoressive jpgs

This commit is contained in:
Carsten Haitzler 2013-12-20 14:14:27 +09:00
parent d3e74a0c58
commit 846bbafbfb
1 changed files with 2 additions and 0 deletions

View File

@ -382,6 +382,7 @@ evas_image_load_file_head_jpeg_internal(unsigned int *w, unsigned int *h,
cinfo.do_block_smoothing = FALSE;
cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
cinfo.dither_mode = JDITHER_ORDERED;
cinfo.buffered_image = TRUE; // buffered mode in case jpg is progressive
jpeg_start_decompress(&cinfo);
/* rotation decoding */
@ -501,6 +502,7 @@ evas_image_load_file_head_jpeg_internal(unsigned int *w, unsigned int *h,
cinfo.do_block_smoothing = FALSE;
cinfo.scale_num = 1;
cinfo.scale_denom = *scale;
cinfo.buffered_image = TRUE; // buffered mode in case jpg is progressive
jpeg_calc_output_dimensions(&(cinfo));
jpeg_start_decompress(&cinfo);
}