[MPlayer-dev-eng] [PATCH] Add support for 9-bit/10-bit H.264
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun May 8 20:17:46 CEST 2011
On Sun, May 08, 2011 at 06:23:58PM +0200, Arne Bochem wrote:
> This patch adds support for displaying 9-bit and 10-bit H.264 video and
> support for ffmpeg's new YUV420P10, YUV420P9, and YUV422P10 colorspaces
> in general.
Could you please provide some samples to test?
> I was not quite sure how to go about adding 4CCs for the new
> colorspaces, since there don't seem to be any official ones. In the end
> I set the second and fourth bit P16's 'Q' byte for P10 and P9
> respectively, which makes for 422S, 420S and 420Y, and allows the
> adjusted masks in IMGFMT_IS_YUVP16_* to still uniquely identify the high
> bit-depth YUV formats.
The idea was to just count up, that's why it's 0x51 for the 16 bit formats,
you should just continue with 0x52, 0x53...
With IMGFMT_IS_YUVP16_* covering these formats vo_gl will incorrectly
claim to support them but it might still be best.
You should be able to use
#define IMGFMT_IS_YUVP16_LE(fmt) (((fmt - 0x51000034) & 0xfc0000ff) == 0)
#define IMGFMT_IS_YUVP16_BE(fmt) (((fmt - 0x34000051) & 0xff0000fc) == 0)
It might make sense to extend mp_get_chroma_shift to also return something
like y_bits or so.
More information about the MPlayer-dev-eng
mailing list