[FFmpeg-cvslog] Add yvu410 as a supported v4l2 input format.

Carl Eugen Hoyos git at videolan.org
Sun Feb 17 19:47:48 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Feb 17 19:45:58 2013 +0100| [fdbe7628a9579a06403ccf0d96232759b776b039] | committer: Carl Eugen Hoyos

Add yvu410 as a supported v4l2 input format.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fdbe7628a9579a06403ccf0d96232759b776b039
---

 libavdevice/v4l2.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index b17a0c8..a027369 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -140,6 +140,7 @@ static struct fmt_map fmt_conversion_table[] = {
     { AV_PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY    },
     { AV_PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
     { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410  },
+    { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU410  },
     { AV_PIX_FMT_RGB555LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555  },
     { AV_PIX_FMT_RGB555BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X },
     { AV_PIX_FMT_RGB565LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565  },
@@ -944,6 +945,8 @@ static int v4l2_read_header(AVFormatContext *s1)
             avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
     if (desired_format == V4L2_PIX_FMT_YVU420)
         st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');
+    else if (desired_format == V4L2_PIX_FMT_YVU410)
+        st->codec->codec_tag = MKTAG('Y', 'V', 'U', '9');
     st->codec->width = s->width;
     st->codec->height = s->height;
     st->codec->bit_rate = s->frame_size * av_q2d(st->avg_frame_rate) * 8;



More information about the ffmpeg-cvslog mailing list