Skip to content
Snippets Groups Projects
Commit d0494dcd authored by Steve Lhomme's avatar Steve Lhomme
Browse files

access/v4l2: map newer ARGB32/ABGR32 formats

RGB32 and BGR32 are deprecated [1]

[1] https://www.kernel.org/doc/html/v4.15/media/uapi/v4l/pixfmt-packed-rgb.html
parent fcca2403
No related branches found
No related tags found
1 merge request!74test/clock: add a way to force a scenario duration from cmdline
......@@ -607,9 +607,10 @@ static const vlc_v4l2_fmt_t v4l2_fmts[] =
// { V4L2_PIX_FMT_M420, },
/* Packed RGB */
{ V4L2_PIX_FMT_ABGR32, VLC_CODEC_BGRA, 4, 0, 0, 0 },
{ V4L2_PIX_FMT_ARGB32, VLC_CODEC_ARGB, 4, 0, 0, 0 },
#ifdef WORDS_BIGENDIAN
{ V4L2_PIX_FMT_RGB32, VLC_CODEC_RGB32, 4, 0xFF00, 0xFF0000, 0xFF000000 },
{ V4L2_PIX_FMT_BGR32, VLC_CODEC_RGB32, 4, 0xFF000000, 0xFF0000, 0xFF00 },
{ V4L2_PIX_FMT_RGB24, VLC_CODEC_RGB24, 3, 0xFF0000, 0x00FF00, 0x0000FF },
{ V4L2_PIX_FMT_BGR24, VLC_CODEC_RGB24, 3, 0x0000FF, 0x00FF00, 0xFF0000 },
// { V4L2_PIX_FMT_RGB565, },
......@@ -617,8 +618,6 @@ static const vlc_v4l2_fmt_t v4l2_fmts[] =
// { V4L2_PIX_FMT_RGB555, },
{ V4L2_PIX_FMT_RGB555X, VLC_CODEC_RGB15, 2, 0x001F, 0x03E0, 0x7C00 },
#else
{ V4L2_PIX_FMT_RGB32, VLC_CODEC_RGB32, 4, 0x0000FF, 0x00FF00, 0xFF0000 },
{ V4L2_PIX_FMT_BGR32, VLC_CODEC_RGB32, 4, 0xFF0000, 0x00FF00, 0x0000FF },
{ V4L2_PIX_FMT_RGB24, VLC_CODEC_RGB24, 3, 0x0000FF, 0x00FF00, 0xFF0000 },
{ V4L2_PIX_FMT_BGR24, VLC_CODEC_RGB24, 3, 0xFF0000, 0x00FF00, 0x0000FF },
{ V4L2_PIX_FMT_RGB565, VLC_CODEC_RGB16, 2, 0x001F, 0x07E0, 0xF800 },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment