further investigation reveals:
in decode_frame_header of proresdec.c the pixel format is obtained from the frame header:
avctx->pix_fmt = (buf[12] & 0xC0) == 0xC0 ? PIX_FMT_YUV444P10 : PIX_FMT_YUV422P10;
but this byte (the 12th byte in the header) only contains the 'frameFlags' (chrominance factor 422/444, and the frame type progressive/interlaced), no information about colour depth.
The frame header also contains a src_pix_fmt field (the lower nibble of the 17th byte of the header), reportedly as such:
• 0 - unknown
• 1 - '2vuy' (8-bit 4:2:2)
• 2 - 'v210' (10-bit 4:2:2)
• 3 - 'v216' (10,12,14,16-bit 4:2:2)
• 4 - 'r408' (8-bit 4:4:4:4 with alpha)
• 5 - 'v408' (8-bit 4:4:4:4 with alpha and super black)
• 6 - 'r4fl' (32-bit floating-point 4:4:4:4)
• 7 - 0x20 (8-bit RGB)
• 8 - 'BGRA' (8-bit RGB with alpha)
• 9 - 'n302' seems to be undocumented
• 10 - 'b64a' (16-bit ARGB)
• 11 - 'R10k' (AJA 10-bit RGB)
• 12 - 'l302' seems to be undocumented
• 13-15 invalid
in the case of a ProRes 422 file exported using Compressor, this byte is set to 0x30 ('v216' (10,12,14,16-bit 4:2:2))
in the case of the ProRes 444 '12 bit' example footage from the Arri camera, this byte is set to 0 (unknown).
It would seem that the bit depth should be indicated somewhere else in the header, as ProRes 422 can support 8 OR 10 bit no?
Does anyone have the formal ProRes spec? I have been working from the following presumably reverse engineered doc:
http://wiki.multimedia.cx/index.php?title=Apple_ProRes
Thanks.
On 24 Jun 2012, at 23:45, Baptiste Coudurier wrote: