[FFmpeg-devel] [PATCH] avutil: Add NV61 pixel format and enable IO support for NV16 and NV61 pixel formats

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Jun 19 19:53:19 EEST 2020


Am Fr., 19. Juni 2020 um 18:42 Uhr schrieb <c.bicheru0 at gmail.com>:
>
> From: Cristian Bicheru <c.bicheru0 at gmail.com>
>
> NV16 and NV61 are interleaved 4:2:2 8-bit formats. There was some internal
> NV16 support prior to this patch but the pixel format was not publicly accessible.

> diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
> index a46acf3..24b053c 100644
> --- a/libavutil/pixfmt.h
> +++ b/libavutil/pixfmt.h
> @@ -199,6 +199,7 @@ enum AVPixelFormat {
>      AV_PIX_FMT_XYZ12LE,      ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0
>      AV_PIX_FMT_XYZ12BE,      ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0
>      AV_PIX_FMT_NV16,         ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
> +    AV_PIX_FMT_NV61,         ///< as above, but U and V bytes are swapped
>      AV_PIX_FMT_NV20LE,       ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
>      AV_PIX_FMT_NV20BE,       ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

You cannot add a pix_fmt in the middle of the list.

Please explain (as thorough as possible) why the new pix_fmt is necessay.

Carl Eugen


More information about the ffmpeg-devel mailing list