[theora-dev] YUV clamped or unclamped ?

Timothy B. Terriberry tterribe at email.unc.edu
Wed Apr 14 17:36:11 PDT 2010

salsaman wrote:
> Hi,
> can somebody confirm whether theora uses clamped (16 - 235, 16 - 240) or
> unclamped (0 - 255) YUV ?

The specification clearly states that the former is to be used (see
Section 4.3). However, there is nothing internal to the codec that
enforces this.

> My tests are showing that Y is always in the range 16 - 235 but the U
> and V channels occasionally go above 240.

The codec itself will not clamp things to these ranges, so the whole
"lossy compression" thing can occasionally produce values slightly
outside of them. This is normal.

More information about the theora-dev mailing list