Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1278 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-05-09 18:00:32 +00:00
parent 771886c192
commit e5eaf37440
155 changed files with 22460 additions and 22460 deletions

View File

@@ -30,7 +30,7 @@ size, since more bits than necessary are expended on higher AC coefficients.
You can substitute a different set of quantization values by using the
-qtables switch:
-qtables file Use the quantization tables given in the named file.
-qtables file Use the quantization tables given in the named file.
The specified file should be a text file containing decimal quantization
values. The file should contain one to four tables, each of 64 elements.
@@ -43,27 +43,27 @@ appear between numbers. Also, comments can be included: a comment starts
with '#' and extends to the end of the line. Here is an example file that
duplicates the default quantization tables:
# Quantization tables given in JPEG spec, section K.1
# Quantization tables given in JPEG spec, section K.1
# This is table 0 (the luminance table):
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
# This is table 0 (the luminance table):
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
# This is table 1 (the chrominance table):
17 18 24 47 99 99 99 99
18 21 26 66 99 99 99 99
24 26 56 99 99 99 99 99
47 66 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
# This is table 1 (the chrominance table):
17 18 24 47 99 99 99 99
18 21 26 66 99 99 99 99
24 26 56 99 99 99 99 99
47 66 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
99 99 99 99 99 99 99 99
If the -qtables switch is used without -quality, then the specified tables
are used exactly as-is. If both -qtables and -quality are used, then the
@@ -75,8 +75,8 @@ By default, cjpeg will use quantization table 0 for luminance components and
table 1 for chrominance components. To override this choice, use the -qslots
switch:
-qslots N[,...] Select which quantization table to use for
each color component.
-qslots N[,...] Select which quantization table to use for
each color component.
The -qslots switch specifies a quantization table number for each color
component, in the order in which the components appear in the JPEG SOF marker.
@@ -93,8 +93,8 @@ By default, cjpeg uses 2:1 horizontal and vertical downsampling when
compressing YCbCr data, and no downsampling for all other color spaces.
You can override this default with the -sample switch:
-sample HxV[,...] Set JPEG sampling factors for each color
component.
-sample HxV[,...] Set JPEG sampling factors for each color
component.
The -sample switch specifies the JPEG sampling factors for each color
component, in the order in which they appear in the JPEG SOF marker.
@@ -119,7 +119,7 @@ of progression parameters. You can create multiple-scan sequential JPEG
files or progressive JPEG files with custom progression parameters by using
the -scans switch:
-scans file Use the scan sequence given in the named file.
-scans file Use the scan sequence given in the named file.
The specified file should be a text file containing a "scan script".
The script specifies the contents and ordering of the scans to be emitted.
@@ -138,10 +138,10 @@ indexes are not the "component ID" codes assigned to the components, just
positional indexes.)
The progression parameters for each scan are:
Ss Zigzag index of first coefficient included in scan
Se Zigzag index of last coefficient included in scan
Ah Zero for first scan of a coefficient, else Al of prior scan
Al Successive approximation low bit position for scan
Ss Zigzag index of first coefficient included in scan
Se Zigzag index of last coefficient included in scan
Ah Zero for first scan of a coefficient, else Al of prior scan
Al Successive approximation low bit position for scan
If the progression parameters are omitted, the values 0,63,0,0 are used,
producing a sequential JPEG file. cjpeg automatically determines whether
the script represents a progressive or sequential file, by observing whether
@@ -156,52 +156,52 @@ comment starts with '#' and extends to the end of the line. For additional
legibility, commas or dashes can be placed between values. (Actually, any
single punctuation character other than ':' or ';' can be inserted.) For
example, the following two scan definitions are equivalent:
0 1 2: 0 63 0 0;
0,1,2 : 0-63, 0,0 ;
0 1 2: 0 63 0 0;
0,1,2 : 0-63, 0,0 ;
Here is an example of a scan script that generates a partially interleaved
sequential JPEG file:
0; # Y only in first scan
1 2; # Cb and Cr in second scan
0; # Y only in first scan
1 2; # Cb and Cr in second scan
Here is an example of a progressive scan script using only spectral selection
(no successive approximation):
# Interleaved DC scan for Y,Cb,Cr:
0,1,2: 0-0, 0, 0 ;
# AC scans:
0: 1-2, 0, 0 ; # First two Y AC coefficients
0: 3-5, 0, 0 ; # Three more
1: 1-63, 0, 0 ; # All AC coefficients for Cb
2: 1-63, 0, 0 ; # All AC coefficients for Cr
0: 6-9, 0, 0 ; # More Y coefficients
0: 10-63, 0, 0 ; # Remaining Y coefficients
# Interleaved DC scan for Y,Cb,Cr:
0,1,2: 0-0, 0, 0 ;
# AC scans:
0: 1-2, 0, 0 ; # First two Y AC coefficients
0: 3-5, 0, 0 ; # Three more
1: 1-63, 0, 0 ; # All AC coefficients for Cb
2: 1-63, 0, 0 ; # All AC coefficients for Cr
0: 6-9, 0, 0 ; # More Y coefficients
0: 10-63, 0, 0 ; # Remaining Y coefficients
Here is an example of a successive-approximation script. This is equivalent
to the default script used by "cjpeg -progressive" for YCbCr images:
# Initial DC scan for Y,Cb,Cr (lowest bit not sent)
0,1,2: 0-0, 0, 1 ;
# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
0: 1-5, 0, 2 ;
# Send all Cr,Cb AC coefficients, minus lowest bit:
# (chroma data is usually too small to be worth subdividing further;
# but note we send Cr first since eye is least sensitive to Cb)
2: 1-63, 0, 1 ;
1: 1-63, 0, 1 ;
# Send remaining Y AC coefficients, minus 2 lowest bits:
0: 6-63, 0, 2 ;
# Send next-to-lowest bit of all Y AC coefficients:
0: 1-63, 2, 1 ;
# At this point we've sent all but the lowest bit of all coefficients.
# Send lowest bit of DC coefficients
0,1,2: 0-0, 1, 0 ;
# Send lowest bit of AC coefficients
2: 1-63, 1, 0 ;
1: 1-63, 1, 0 ;
# Y AC lowest bit scan is last; it's usually the largest scan
0: 1-63, 1, 0 ;
# Initial DC scan for Y,Cb,Cr (lowest bit not sent)
0,1,2: 0-0, 0, 1 ;
# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
0: 1-5, 0, 2 ;
# Send all Cr,Cb AC coefficients, minus lowest bit:
# (chroma data is usually too small to be worth subdividing further;
# but note we send Cr first since eye is least sensitive to Cb)
2: 1-63, 0, 1 ;
1: 1-63, 0, 1 ;
# Send remaining Y AC coefficients, minus 2 lowest bits:
0: 6-63, 0, 2 ;
# Send next-to-lowest bit of all Y AC coefficients:
0: 1-63, 2, 1 ;
# At this point we've sent all but the lowest bit of all coefficients.
# Send lowest bit of DC coefficients
0,1,2: 0-0, 1, 0 ;
# Send lowest bit of AC coefficients
2: 1-63, 1, 0 ;
1: 1-63, 1, 0 ;
# Y AC lowest bit scan is last; it's usually the largest scan
0: 1-63, 1, 0 ;
It may be worth pointing out that this script is tuned for quality settings
of around 50 to 75. For lower quality settings, you'd probably want to use