avutil: Add NV24 and NV42 pixel formats

Multimedia / FFmpeg - Philip Langdale [overt.org] - 12 May 2019 14:51 UTC

These are the 4:4:4 variants of the semi-planar NV12/NV21 formats.

These formats are not used much, so we've never had a reason to add them until now. VDPAU recently added support HEVC 4:4:4 content and when you use the OpenGL interop, the returned surfaces are in NV24 format, so we need the pixel format for media players, even if there's no direct use within ffmpeg.

Separately, there are apparently webcams that use NV24, but I've never seen one.

5de4f1d871 avutil: Add NV24 and NV42 pixel formats
libavutil/pixdesc.c | 24 ++++++++++++++++++++++++
libavutil/pixfmt.h | 3 +++
libavutil/tests/pixfmt_best.c | 1 +
libavutil/version.h | 4 ++--
tests/ref/fate/pixfmt_best | 2 +-
5 files changed, 31 insertions(+), 3 deletions(-)

  • Share