From: DRC Date: Tue, 31 Jan 2012 09:53:46 +0000 (+0000) Subject: Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmeti... X-Git-Tag: 1.2.0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccd1bfdd31a5e682261740cc7b51817ea14c8f98;p=libjpeg-turbo Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmetic into "switches for advanced users" git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@764 632fc199-4ca6-4c93-a231-07263d6284db --- ccd1bfdd31a5e682261740cc7b51817ea14c8f98 diff --cc README index 32e062b,0a23c19..0e9b429 --- a/README +++ b/README @@@ -1,9 -1,3 +1,10 @@@ - libjpeg-turbo note: This file is mostly taken from the libjpeg README - file, and it is included only for reference. Some parts of it may not apply to - libjpeg-turbo. Please see README-turbo.txt for information specific to the - turbo version. ++libjpeg-turbo note: This file contains portions of the libjpeg v6b and v8 ++README files, with additional wordsmithing by The libjpeg-turbo Project. ++It is included only for reference, as some parts of it may not apply to ++libjpeg-turbo. Please see README-turbo.txt for information specific to ++libjpeg-turbo. + + The Independent JPEG Group's JPEG software ========================================== diff --cc cjpeg.1 index d348964,c10f971..6fb7299 --- a/cjpeg.1 +++ b/cjpeg.1 @@@ -1,4 -1,4 +1,4 @@@ - .TH CJPEG 1 "27 January 2012" -.TH CJPEG 1 "28 August 2011" ++.TH CJPEG 1 "31 January 2012" .SH NAME cjpeg \- compress an image file to a JPEG file .SH SYNOPSIS @@@ -108,35 -123,33 +108,35 @@@ other JPEG programs may be unable to de .B \-baseline if you need to ensure compatibility at low quality values.) .PP -The -.B \-quality -option has been extended in IJG version 7 for support of separate quality -settings for luminance and chrominance (or in general, for every provided -quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -.B \-quality -ratings refer to the quantization table slots, and that the last value is -replicated if there are more q-table slots than parameters. The default -q-table slots are 0 for luminance and 1 for chrominance with default tables as -given in the JPEG standard. This is compatible with the old behaviour in case -that only one parameter is given, which is then used for both luminance and -chrominance (slots 0 and 1). More or custom quantization tables can be set -with -.B \-qtables -and assigned to components with -.B \-qslots -parameter (see the "wizard" switches below). -.B Caution: -You must explicitly add -.BI \-sample " 1x1" -for efficient separate color -quality selection, since the default value used by library is 2x2! +The \fB-quality\fR option has been extended in this version of \fBcjpeg\fR to +support separate quality settings for luminance and chrominance (or, in +general, separate settings for every quantization table slot.) The principle +is the same as chrominance subsampling: since the human eye is more sensitive +to spatial changes in brightness than spatial changes in color, the chrominance +components can be quantized more than the luminance components without +incurring any visible image quality loss. However, unlike subsampling, this +feature reduces data in the frequency domain instead of the spatial domain, +which allows for more fine-grained control. This option is useful in +quality-sensitive applications, for which the artifacts generated by +subsampling may be unacceptable. +.PP +The \fB-quality\fR option accepts a comma-separated list of parameters, which - respectively refer to the quality levels which should be assigned to the ++respectively refer to the quality levels that should be assigned to the +quantization table slots. If there are more q-table slots than parameters, +then the last parameter is replicated. Thus, if only one quality parameter is +given, this is used for both luminance and chrominance (slots 0 and 1, +respectively), preserving the legacy behavior of cjpeg v6b and prior. +More (or customized) quantization tables can be set with the \fB-qtables\fR +option and assigned to components with the \fB-qslots\fR option (see the +"wizard" switches below.) +.PP +JPEG files generated with separate luminance and chrominance quality are fully +compliant with standard JPEG decoders. +.PP +.BR CAUTION: +For this setting to be useful, be sure to pass an argument of \fB-sample 1x1\fR +to \fBcjpeg\fR to disable chrominance subsampling. Otherwise, the default +subsampling level (2x2, AKA "4:2:0") will be used. .PP The .B \-progressive diff --cc jpegtran.1 index f10cdbb,0ad1bbc..160b47d --- a/jpegtran.1 +++ b/jpegtran.1 @@@ -1,4 -1,4 +1,4 @@@ - .TH JPEGTRAN 1 "11 October 2010" -.TH JPEGTRAN 1 "28 December 2009" ++.TH JPEGTRAN 1 "31 January 2012" .SH NAME jpegtran \- lossless transformation of JPEG files .SH SYNOPSIS @@@ -183,8 -201,8 +183,8 @@@ Copy no extra markers from source file comments and other excess baggage present in the source file. .TP .B \-copy comments -Copy only comment markers. This setting copies comments from the source file, -but discards any other inessential (for image display) data. +Copy only comment markers. This setting copies comments from the source file - but discards any other data which is inessential for image display. ++but discards any other data that is inessential for image display. .TP .B \-copy all Copy all extra markers. This setting preserves miscellaneous markers diff --cc libjpeg.txt index c781757,9702669..d350fc7 --- a/libjpeg.txt +++ b/libjpeg.txt @@@ -977,14 -1005,12 +977,14 @@@ JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_T slot 1 for chrominance. int q_scale_factor[NUM_QUANT_TBLS] - Linear quantization scaling factors (percentage, initialized 100) + [libjpeg v7+ API/ABI emulation only] + Linear quantization scaling factors (0-100, default 100) for use with jpeg_default_qtables(). See rdswitch.c and cjpeg.c for an example of usage. - Note that the q_scale_factor[] fields are the "linear" scales, so you - have to convert from user-defined ratings via jpeg_quality_scaling(). - Here is an example code which corresponds to cjpeg -quality 90,70: + Note that the q_scale_factor[] values use "linear" scales, so JPEG + quality levels chosen by the user must be converted to these scales - using jpeg_quality_scaling(). Here is an example which corresponds to ++ using jpeg_quality_scaling(). Here is an example that corresponds to + cjpeg -quality 90,70: jpeg_set_defaults(cinfo); diff --cc usage.txt index 7af75a8,de9def7..2abfbea --- a/usage.txt +++ b/usage.txt @@@ -118,34 -129,23 +118,34 @@@ cjpeg emits a warning message when you other JPEG programs may be unable to decode the resulting file. Use -baseline if you need to ensure compatibility at low quality values.) -The -quality option has been extended in IJG version 7 for support of separate -quality settings for luminance and chrominance (or in general, for every -provided quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -quality ratings refer to the quantization table slots, and that -the last value is replicated if there are more q-table slots than parameters. -The default q-table slots are 0 for luminance and 1 for chrominance with -default tables as given in the JPEG standard. This is compatible with the old -behaviour in case that only one parameter is given, which is then used for -both luminance and chrominance (slots 0 and 1). More or custom quantization -tables can be set with -qtables and assigned to components with -qslots -parameter (see the "wizard" switches below). -CAUTION: You must explicitly add -sample 1x1 for efficient separate color -quality selection, since the default value used by library is 2x2! +The -quality option has been extended in this version of cjpeg to support +separate quality settings for luminance and chrominance (or, in general, +separate settings for every quantization table slot.) The principle is the +same as chrominance subsampling: since the human eye is more sensitive to +spatial changes in brightness than spatial changes in color, the chrominance +components can be quantized more than the luminance components without +incurring any visible image quality loss. However, unlike subsampling, this +feature reduces data in the frequency domain instead of the spatial domain, +which allows for more fine-grained control. This option is useful in +quality-sensitive applications, for which the artifacts generated by +subsampling may be unacceptable. + +The -quality option accepts a comma-separated list of parameters, which - respectively refer to the quality levels which should be assigned to the ++respectively refer to the quality levels that should be assigned to the +quantization table slots. If there are more q-table slots than parameters, +then the last parameter is replicated. Thus, if only one quality parameter is +given, this is used for both luminance and chrominance (slots 0 and 1, +respectively), preserving the legacy behavior of cjpeg v6b and prior. More (or +customized) quantization tables can be set with the -qtables option and +assigned to components with the -qslots option (see the "wizard" switches +below.) + +JPEG files generated with separate luminance and chrominance quality are +fully compliant with standard JPEG decoders. + +CAUTION: For this setting to be useful, be sure to pass an argument of +-sample 1x1 to cjpeg to disable chrominance subsampling. Otherwise, the +default subsampling level (2x2, AKA "4:2:0") will be used. The -progressive switch creates a "progressive JPEG" file. In this type of JPEG file, the data is stored in multiple scans of increasing quality. If the @@@ -157,6 -157,24 +157,11 @@@ file size is about the same --- often Switches for advanced users: + -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG + is not yet widely implemented, so many decoders will + be unable to view an arithmetic coded JPEG file at + all. + - -block N Set DCT block size. All N from 1 to 16 are possible. - Default is 8 (baseline format). - Larger values produce higher compression, - smaller values produce higher quality - (exact DCT stage possible with 1 or 2; with the - default quality of 75 and default Luminance qtable - the DCT+Quantization stage is lossless for N=1). - CAUTION: An implementation of the JPEG SmartScale - extension is required for this feature. SmartScale - enabled JPEG is not yet widely implemented, so many - decoders will be unable to view a SmartScale extended - JPEG file at all. - -dct int Use integer DCT method (default). -dct fast Use fast integer DCT (less accurate). -dct float Use floating-point DCT method. @@@ -526,8 -556,8 +526,8 @@@ markers, such as comment blocks suppresses all comments and other excess baggage present in the source file. -copy comments Copy only comment markers. This setting copies - comments from the source file, but discards - any other inessential (for image display) data. + comments from the source file but discards - any other data which is inessential for image display. ++ any other data that is inessential for image display. -copy all Copy all extra markers. This setting preserves miscellaneous markers found in the source file, such as JFIF thumbnails, Exif data, and Photoshop settings.