[FFmpeg-devel] [PATCH 1/5] avutil: Add YUV444P10_LSB and YUV444P12_LSB pixel formats

Timo Rothenpieler timo at rothenpieler.org
Sun Oct 7 22:43:29 EEST 2018


On 07.10.2018 19:50, Philip Langdale wrote:
> Currently, ffmpeg defines a set of YUV444P formats for use where
> the bits-per-pixel are between 8 and 16 bits. In these formats,
> the bits are packed in the MSBs of the 16 bits of available storage.
> 
> On the other hand, all the hardware vendors have defined their
> equivalent formats with the bits packed in the LSBs, which has the
> virtue of making the memory layouts compatible with being treated
> as full 16 bit values (which is also why P010 is defined this way).
> 
> So, to be able to use these hardware compatible formats, we need
> definitions for them in ffmpeg. Right now, I need this for nvdec,
> but Vulkan also uses the same format definitions.

I'm very much in favor of adding those, and potentially similar other 
ones in the future.
The other option is to add a bit depth field to AVFrame, and changes in 
various places to support it, including logic for encoder to signal 
support for pix_fmt/bit_depth support.
The later approach, while it does seem cleaner, also seems very error 
prone and invasive, so I'd prefer adding the few cases we have as pixel 
formats.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4538 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181007/bd0d16e8/attachment.bin>


More information about the ffmpeg-devel mailing list