summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-11-16 11:52:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-11-16 11:52:47 +0000
commitd32ecb2cfd542a2dfe3608cc52ce6618454d275b (patch)
tree29f5926f642f140ceb73f3e7c26e0db90cbbca8f /legacy
parent16d5eb14bb29fb726cc37acf71c4602757cdcb36 (diff)
ok - longstanding issue. quality of jpeg encode and decode dropped
quickly when uf your-encoded anything due to using IFAST decoder (and encoder). this does drop speed for decode and encode (except encoding < 60% quality where it now uses IFAST), but we don't see progressively worse artifacts. SVN revision: 65294
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eet/ChangeLog6
-rw-r--r--legacy/eet/NEWS1
-rw-r--r--legacy/eet/src/lib/eet_image.c11
3 files changed, 16 insertions, 2 deletions
diff --git a/legacy/eet/ChangeLog b/legacy/eet/ChangeLog
index fcafa795cd..0b3c5fbe65 100644
--- a/legacy/eet/ChangeLog
+++ b/legacy/eet/ChangeLog
@@ -540,3 +540,9 @@
540 540
541 * Added a new macro for adding arrays of basic types. 541 * Added a new macro for adding arrays of basic types.
542 EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY 542 EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY
543
5442011-11-16 Carsten Haitzler (The Rasterman)
545
546 * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to
547 noticable quality losses in the chase for speed. It will use
548 IFAST for quality less than 60 when encoding
diff --git a/legacy/eet/NEWS b/legacy/eet/NEWS
index 80e5965fa1..43118b0aa1 100644
--- a/legacy/eet/NEWS
+++ b/legacy/eet/NEWS
@@ -25,3 +25,4 @@ Improvements:
25 * use stringshare for mmaped file names 25 * use stringshare for mmaped file names
26 * use eina locking wrappers 26 * use eina locking wrappers
27 * use eina_file for file IO 27 * use eina_file for file IO
28 * jpeg encode and decode quality improved at expense of speed
diff --git a/legacy/eet/src/lib/eet_image.c b/legacy/eet/src/lib/eet_image.c
index 06816b1cd5..79f6f906d4 100644
--- a/legacy/eet/src/lib/eet_image.c
+++ b/legacy/eet/src/lib/eet_image.c
@@ -447,7 +447,7 @@ eet_data_image_jpeg_rgb_decode(const void *data,
447 } 447 }
448 448
449 jpeg_read_header(&cinfo, TRUE); 449 jpeg_read_header(&cinfo, TRUE);
450 cinfo.dct_method = JDCT_FASTEST; 450 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
451 cinfo.do_fancy_upsampling = FALSE; 451 cinfo.do_fancy_upsampling = FALSE;
452 cinfo.do_block_smoothing = FALSE; 452 cinfo.do_block_smoothing = FALSE;
453 jpeg_start_decompress(&cinfo); 453 jpeg_start_decompress(&cinfo);
@@ -595,7 +595,7 @@ eet_data_image_jpeg_alpha_decode(const void *data,
595 } 595 }
596 596
597 jpeg_read_header(&cinfo, TRUE); 597 jpeg_read_header(&cinfo, TRUE);
598 cinfo.dct_method = JDCT_FASTEST; 598 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
599 cinfo.do_fancy_upsampling = FALSE; 599 cinfo.do_fancy_upsampling = FALSE;
600 cinfo.do_block_smoothing = FALSE; 600 cinfo.do_block_smoothing = FALSE;
601 jpeg_start_decompress(&cinfo); 601 jpeg_start_decompress(&cinfo);
@@ -832,8 +832,12 @@ eet_data_image_jpeg_convert(int *size,
832 cinfo.image_height = h; 832 cinfo.image_height = h;
833 cinfo.input_components = 3; 833 cinfo.input_components = 3;
834 cinfo.in_color_space = JCS_RGB; 834 cinfo.in_color_space = JCS_RGB;
835 cinfo.optimize_coding = FALSE;
836 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
837 if (quality < 60) cinfo.dct_method = JDCT_IFAST;
835 jpeg_set_defaults(&cinfo); 838 jpeg_set_defaults(&cinfo);
836 jpeg_set_quality(&cinfo, quality, TRUE); 839 jpeg_set_quality(&cinfo, quality, TRUE);
840
837 if (quality >= 90) 841 if (quality >= 90)
838 { 842 {
839 cinfo.comp_info[0].h_samp_factor = 1; 843 cinfo.comp_info[0].h_samp_factor = 1;
@@ -925,6 +929,9 @@ eet_data_image_jpeg_alpha_convert(int *size,
925 cinfo.image_height = h; 929 cinfo.image_height = h;
926 cinfo.input_components = 3; 930 cinfo.input_components = 3;
927 cinfo.in_color_space = JCS_RGB; 931 cinfo.in_color_space = JCS_RGB;
932 cinfo.optimize_coding = FALSE;
933 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
934 if (quality < 60) cinfo.dct_method = JDCT_IFAST;
928 jpeg_set_defaults(&cinfo); 935 jpeg_set_defaults(&cinfo);
929 jpeg_set_quality(&cinfo, quality, TRUE); 936 jpeg_set_quality(&cinfo, quality, TRUE);
930 if (quality >= 90) 937 if (quality >= 90)