I did a study a while back which compressed every 10th frame of the entire run of Viewperf using the entire range of JPEG quality and subsampling settings and computed an average compression ratio from these hundreds of images for each quality level (spreadsheet available on request.)
Based on that study, I would propose using the following quality and subsampling levels, which correspond to meaningful average compression ratios: Quality level 9 = JPEG quality level 100, no subsampling (ratio ~= 10:1) [this should be lossless, except for round-off error] Quality level 8 = JPEG quality level 92, no subsampling (ratio ~= 20:1) [this should be perceptually lossless, based on current research] Quality level 7 = JPEG quality level 86, no subsampling (ratio ~= 25:1) Quality level 6 = JPEG quality level 79, no subsampling (ratio ~= 30:1) Quality level 5 = JPEG quality level 77, 4:2:2 subsampling (ratio ~= 40:1) Quality level 4 = JPEG quality level 62, 4:2:2 subsampling (ratio ~= 50:1) Quality level 3 = JPEG quality level 42, 4:2:2 subsampling (ratio ~= 60:1) Quality level 2 = JPEG quality level 41, 4:1:1 subsampling (ratio ~= 70:1) Quality level 1 = JPEG quality level 29, 4:1:1 subsampling (ratio ~= 80:1) Quality level 0 = JPEG quality level 15, 4:1:1 subsampling (ratio ~= 100:1) Anything below JPEG quality level=15 is generally not going to be usable. ossm...@users.sourceforge.net wrote: > + { 512, 32, 6, 0, 0, 0, 4, 10, 1 }, // 0 > + { 2048, 64, 6, 1, 1, 1, 8, 25, 1 }, // 1 > + { 4096, 128, 8, 3, 3, 2, 24, 25, 0 }, // 2 > + { 8192, 256, 12, 5, 5, 2, 32, 50, 1 }, // 3 > + { 16384, 512, 12, 6, 7, 3, 32, 50, 0 }, // 4 > + { 32768, 512, 12, 7, 8, 4, 32, 75, 1 }, // 5 > + { 65536, 1024, 16, 7, 8, 5, 32, 75, 0 }, // 6 > + { 65536, 1024, 16, 8, 9, 6, 64, 83, 0 }, // 7 > + { 65536, 2048, 24, 9, 9, 7, 64, 92, 0 }, // 8 > + { 65536, 2048, 32, 9, 9, 9, 96,100, 0 } // 9 > }; > const int TightEncoder::defaultCompressLevel = 6; > > > Modified: trunk/common/rfb/TightEncoder.h > =================================================================== > --- trunk/common/rfb/TightEncoder.h 2009-03-11 14:33:49 UTC (rev 3659) > +++ trunk/common/rfb/TightEncoder.h 2009-03-11 16:15:29 UTC (rev 3660) > @@ -35,7 +35,7 @@ > unsigned int monoMinRectSize; > int idxZlibLevel, monoZlibLevel, rawZlibLevel; > int idxMaxColorsDivisor; > - int jpegQuality; > + int jpegQuality, jpegSubSample; > }; > > // > > Modified: trunk/common/rfb/tightEncode.h > =================================================================== > --- trunk/common/rfb/tightEncode.h 2009-03-11 14:33:49 UTC (rev 3659) > +++ trunk/common/rfb/tightEncode.h 2009-03-11 16:15:29 UTC (rev 3660) > @@ -537,6 +537,13 @@ > > jpeg_set_defaults(&cinfo); > jpeg_set_quality(&cinfo, s_pjconf->jpegQuality, TRUE); > + if (s_pjconf->jpegSubSample) { > + cinfo.comp_info[0].h_samp_factor = 2; > + cinfo.comp_info[0].v_samp_factor = 2; > + } else { > + cinfo.comp_info[0].h_samp_factor = 1; > + cinfo.comp_info[0].v_samp_factor = 1; > + } > > rdr::U8 *dstBuf = new rdr::U8[2048]; > JpegSetDstManager(&cinfo, dstBuf, 2048); > > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Tigervnc-commits mailing list > tigervnc-comm...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tigervnc-commits > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Tigervnc-devel mailing list Tigervnc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-devel