[FFmpeg-devel] [PATCHv3 3/4] libavcodec: v4l2: add codec formats
Jorge Ramirez-Ortiz
jorge.ramirez-ortiz at linaro.org
Wed Aug 2 10:32:51 EEST 2017
From: Alexis Ballier <aballier at gentoo.org>
In addition, enable the multi planar raw formats.
Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz at linaro.org>
Tested-by: Jorge Ramirez <jorge.ramirez-ortiz at linaro.org>
---
libavcodec/v4l2-common.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/libavcodec/v4l2-common.c b/libavcodec/v4l2-common.c
index 815a5c4..13744fb 100644
--- a/libavcodec/v4l2-common.c
+++ b/libavcodec/v4l2-common.c
@@ -58,6 +58,36 @@ const struct v4l_fmt_map avpriv_v4l_fmt_conversion_table[] = {
{ AV_PIX_FMT_BAYER_GRBG8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SGRBG8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME },
{ AV_PIX_FMT_BAYER_RGGB8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SRGGB8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME },
#endif
+#ifdef V4L2_PIX_FMT_NV12M
+ { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12M , FF_V4L_PACK_AVFRAME },
+#endif
+#ifdef V4L2_PIX_FMT_NV21M
+ { AV_PIX_FMT_NV21, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV21M , FF_V4L_PACK_AVFRAME },
+#endif
+#ifdef V4L2_PIX_FMT_YUV420M
+ { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420M , FF_V4L_PACK_AVFRAME },
+#endif
+#ifdef V4L2_PIX_FMT_NV16M
+ { AV_PIX_FMT_NV16, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV16M , FF_V4L_PACK_AVFRAME },
+#endif
+#ifdef V4L2_PIX_FMT_DV
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_DVVIDEO, V4L2_PIX_FMT_DV , FF_V4L_PACK_AVPACKET },
+#endif
+#ifdef V4L2_PIX_FMT_H263
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_H263, V4L2_PIX_FMT_H263 , FF_V4L_PACK_AVPACKET },
+#endif
+#ifdef V4L2_PIX_FMT_MPEG1
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG1VIDEO, V4L2_PIX_FMT_MPEG1 , FF_V4L_PACK_AVPACKET },
+#endif
+#ifdef V4L2_PIX_FMT_MPEG2
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG2VIDEO, V4L2_PIX_FMT_MPEG2 , FF_V4L_PACK_AVPACKET },
+#endif
+#ifdef V4L2_PIX_FMT_VC1_ANNEX_G
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_VC1, V4L2_PIX_FMT_VC1_ANNEX_G, FF_V4L_PACK_AVPACKET },
+#endif
+#ifdef V4L2_PIX_FMT_VP8
+ { AV_PIX_FMT_NONE, AV_CODEC_ID_VP8, V4L2_PIX_FMT_VP8 , FF_V4L_PACK_AVPACKET },
+#endif
{ AV_PIX_FMT_NONE, AV_CODEC_ID_NONE, 0 },
};
--
2.7.4
More information about the ffmpeg-devel
mailing list