Henryk Richter
Details / Features
YUV Player (and converter) for MacOS X

The RAW export process is outlined in the export dialog itself.
All internal calculations are in double precision floating point accuracy. The input data is normalized to the range 0..1 (for 8 bit: 0=0.;255=1.) for RGB and luma components and -0.5...0.5 for chroma components, respectively.
If the YCbCr input was defined as having head and footroom, the normalization assigns 0. and 1. to the maximum defined range (16=0.,235=1. in 8 Bit).
RGB to YCbCr color conversion is done using the ITU-R BT.601 or ITU-R BT.709 transfer matrices. Please note that primary color conversion is beyond the scope of this program, hence YCbCr BT.601 to YCbCr BT.709 conversion is not implemented here (and possibly never will be).
Therefore this program assumes the RGB input already consisting of the proper color primaries. After color transform, the resulting YCbCr pixels are clipped and scaled according to the bit depth (n) and presence of head/footroom in the output. The bit depth dependent scaling and clipping ranges with head/footroom are calculated as follows for a bit depth (n) between 8 and 16 bit:
Y = ((220*2^(n-8)-1) * E'Y ) + 2^(n-4) -> equals 16..235 for 8 Bit
Cb=((225*2^(n-8)-1) * E'PB)+ 2^(n-1) -> equals 16..240 for 8 Bit
Cr =((225*2^(n-8)-1) * E'PR)+ 2^(n-1) -> equals 16..240 for 8 Bit
YCbCr chroma subsampling is carried out with a 16 Tap FIR filter (see images.c, coefficients originating from G. Sullivan, roughly estimating a kaiser windowed 4 lobed sinc). The filter is initially executed for horizontal subsampling, afterwards for vertical subsampling. The chroma pel reference position (hence the phase for vertical subsampling filter taps) is tailored to match the 4:2:0 vertical chroma pel position for MPEG-2 onwards.
The color conversion and chroma subsampling process closely matches the workflow in the sgi2yuv and subsampling utilities by Tobias Oelbaum. This way, the sequences generated by the RAW export mode of this utility should be of similar quality, barring minor differences introduced by rounding.
Please note that scaling with respect to interlace input material is not implemented yet.