[FFmpeg-devel] [PATCH]Add two v4l2 pix_fmts

Stefano Sabatini stefasab at gmail.com
Mon Feb 11 23:56:59 CET 2013


On date Monday 2013-02-11 09:08:04 +0100, Carl Eugen Hoyos encoded:
> Hi!
> 
> I unfortunately cannot test both patches.
> 
> Please test / comment, Carl Eugen
[...]
> diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
> index 4c43e37..a5b3abe 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  },
> @@ -943,6 +944,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');

why these exceptions?
-- 
FFmpeg = Fabulous Funny Mythic Proud Exploitable Gargoyle


More information about the ffmpeg-devel mailing list