[Libav-user] Handling PIX_FMT_YUV422P10 in my code
Bruce Wheaton
bruce at spearmorgan.com
Thu Oct 13 19:08:53 CEST 2011
> PIX_FMT_YUV422P10 and PIX_FMT_YUV444P10 are 10-bit planar formats, delivered in 3 (or 4, with alpha) planes of 16-bit integers, in the endianness of the host platform (the actual pixel format has an endian postifix). The 10 least significant bits of each integer represent the pixel component's value.
>
> In the context of OpenGL (on a little endian computer), push the planes onto the GPU as 16-bit luminance integer textures (floating point may work as well, with some different scaling). After sampling a single value, multiply by 1023 to get to a 0.0 - 1.0 range. It's safe to assume that codecs using this pixel format will be providing video level values, so you would need to scale and offset as well to match openGL ranges.
<sigh> divide by 1023.0, not multiply.
>
> Bruce
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
More information about the Libav-user
mailing list