By Ross Thomas <ross@grinfinity.com>
There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will.
The standard known as CCIR-601 defines the range of pixel values considered legal for presenting on a TV. These ranges are 16-235 for the luma component and 16-240 for the chroma component.
Pixels outside this range are known to cause problems with some TV sets, and thus it is best to remove them before encoding if that is your intended display device. This filter clips (or "clamps") pixels under 16 to 16 and over 235 (or 240) to 235 (or 240). It's very complicated ;).
If your CPU supports integer SSE operations (Intel Pentium III and better, AMD Athlon and better) and the width of the clip is a multiple of four, then SSE-optimized code will be used.
LegalClip(clip clip)
Parameter | Meaning | Default |
---|---|---|
clip |
Specifies the clip to affect. |
last |
Ross Thomas <ross@grinfinity.com>
Version | Description |
---|---|
0.2 | Now two versions of main loop, one plain assembler and one SSE. |
0.1 | First release. Alpha code. Danger, Will Robinson! |