A simple way of making the luma table smoother is to symmetrize by taking geometric averages of symmetric entries. Of course, this does not give integers. I chose ceiling as a casting operator. (Yes, I know that this makes the quantization table ignore the different perception of horizontal and vertical features. I find it hard to believe that the experiment was so precise that it nailed this anisotropy to a significant degree in the general situation, given that it specifically concerned 2x horizontal chroma subsampling in an interlaced set up. Of course I may be wrong, but I actually trust symmetrized values with -sample 2x2 more than the original, unsymmetrized, ones.)
The following luma table will produce, on average, JPEG files which are very slightly smaller (if generated from a reasonably high quality image). It will, also, produce JPEG images which are slightly smoother. I attach my current attempt at improving the chroma table (it is not, in practice, that different from the standard one). If you try it, you should see that my hunch was correct. I'm actually pretty confident in stating that this is a better set of quantization tables.
Code: Select all
# Nicolas Robidoux's better (?) JPEG quantization tables v.2012.02.16.17
# Remix of ISO-IEC 10918-1 : 1993(E) Annex K
# Recommended for use with cjpeg -sample 2x2
# Luma
16 12 12 15 21 31 50 67
12 12 14 18 24 46 62 72
12 14 16 23 39 56 74 73
15 18 23 29 54 75 84 78
21 24 39 54 68 94 103 93
31 46 56 75 94 104 117 96
50 62 74 84 103 117 120 102
67 72 73 78 93 96 102 99
# Chroma
17 18 24 47 99 128 192 256
18 21 26 66 99 128 192 256
24 26 56 99 128 192 256 512
47 66 99 128 192 256 512 1024
99 99 128 192 256 512 1024 2048
128 128 192 256 512 1024 3072 4096
192 192 256 512 1024 3072 6144 7168
256 256 512 1024 2048 4096 7168 8192