diff mbox series

[FFmpeg-devel,v2] avdevice/v4l2: add NV16 and NV24 pixel formats

Message ID 20240626111906.255191-1-ramiro.polla@gmail.com
State New
Headers show
Series [FFmpeg-devel,v2] avdevice/v4l2: add NV16 and NV24 pixel formats | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Ramiro Polla June 26, 2024, 11:19 a.m. UTC
---
 libavdevice/v4l2-common.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ramiro Polla June 28, 2024, 12:52 p.m. UTC | #1
On Wed, Jun 26, 2024 at 1:19 PM Ramiro Polla <ramiro.polla@gmail.com> wrote:
>
> ---
>  libavdevice/v4l2-common.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/libavdevice/v4l2-common.c b/libavdevice/v4l2-common.c
> index b5b4448a31..ebfd2b6d8d 100644
> --- a/libavdevice/v4l2-common.c
> +++ b/libavdevice/v4l2-common.c
> @@ -50,6 +50,12 @@ const struct fmt_map ff_fmt_conversion_table[] = {
>      { AV_PIX_FMT_GRAY16LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_Z16     },
>  #endif
>      { AV_PIX_FMT_NV12,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12    },
> +#ifdef V4L2_PIX_FMT_NV16
> +    { AV_PIX_FMT_NV16,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV16    },
> +#endif
> +#ifdef V4L2_PIX_FMT_NV24
> +    { AV_PIX_FMT_NV24,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV24    },
> +#endif
>      { AV_PIX_FMT_NONE,    AV_CODEC_ID_MJPEG,    V4L2_PIX_FMT_MJPEG   },
>      { AV_PIX_FMT_NONE,    AV_CODEC_ID_MJPEG,    V4L2_PIX_FMT_JPEG    },
>  #ifdef V4L2_PIX_FMT_H264
> --
> 2.30.2
>

I'll apply this after the weekend if there are no comments.
diff mbox series

Patch

diff --git a/libavdevice/v4l2-common.c b/libavdevice/v4l2-common.c
index b5b4448a31..ebfd2b6d8d 100644
--- a/libavdevice/v4l2-common.c
+++ b/libavdevice/v4l2-common.c
@@ -50,6 +50,12 @@  const struct fmt_map ff_fmt_conversion_table[] = {
     { AV_PIX_FMT_GRAY16LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_Z16     },
 #endif
     { AV_PIX_FMT_NV12,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12    },
+#ifdef V4L2_PIX_FMT_NV16
+    { AV_PIX_FMT_NV16,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV16    },
+#endif
+#ifdef V4L2_PIX_FMT_NV24
+    { AV_PIX_FMT_NV24,    AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV24    },
+#endif
     { AV_PIX_FMT_NONE,    AV_CODEC_ID_MJPEG,    V4L2_PIX_FMT_MJPEG   },
     { AV_PIX_FMT_NONE,    AV_CODEC_ID_MJPEG,    V4L2_PIX_FMT_JPEG    },
 #ifdef V4L2_PIX_FMT_H264