{
/* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */if (quality <= 0) quality = 1;
if (quality > 100) quality = 100;
/* The basic table is used as-is (scaling 100) for a quality of 50. * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table * to make all the table entries 1 (hence, minimum quantization loss). * Qualities 1..50 are converted to scaling percentage 5000/Q. */if (quality < 50)
quality = 5000 / quality;
elsequality = 200 - quality*2;
returnquality;
}
Generated on Sun May 27 2012 04:49:13 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.