The above picture is a photograph scanned in a Umax Vista 1200S scanner at high resolution and 30 bit color, then after brightness and contrast were adjusted a little, downsampled to 640x480 pixes and 24 bit color. It in effect is an ideal video frame: what we would like video to be in a perfect world. I then compressed it using the FAST AVMaster MJPEG codec and converted those back into uncompressed stills. Using photoshop, I then combined those stills with the original using difference (each resulting pixel's brightness is the absolute value of the difference of the corresponding pixes of the source images) to get an idea of how much damage the MJPEG codec does to an image. The answer is quite a lot. Using the histogram... dialog in photoshop, I collected the statistics summarized in the table below.
At the lower data rates, a quality setting 75% or 100% makes no significant difference. Surprisingly, at 5000MB/s, a lower quality setting does significantly effect the quality of sharp edges in the image. At all levels of compression measured, the low order 2 bits of each color channel is effectively random. This is not particularly surprising since NTSC's color space is much smaller than 24-bit.
If you download the images below, please save them off if you think you may want to come back to this page again. I'd rather not have my ISP come complaining to me for generating too much traffic. Thank you.
MB/s | Quality | Mean | Stand. Dev. | Median | Count of 0 | 99 %ile | Link |
1500 | 75 | 2.80 | 2.52 | 2 | 16997 | 13 | image1 |
1500 | 100 | 2.80 | 2.52 | 2 | 17011 | 13 | image2 |
2000 | 75 | 2.42 | 2.03 | 2 | 19630 | 10 | image3 |
2000 | 100 | 2.42 | 2.03 | 2 | 19630 | 10 | image4 |
2500 | 75 | 2.18 | 1.75 | 2 | 23053 | 8 | image5 |
2500 | 100 | 2.17 | 1.74 | 2 | 23396 | 8 | image6 |
5000 | 75 | 1.90 | 2.15 | 1 | 31429 | 10 | image7 |
5000 | 100 | 1.65 | 1.30 | 1 | 31868 | 6 | image8 |
Key to terms: