From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org
Subject: Re: Kernel error "Unknown pixelformat 0x00000000" occurs when I start capture video
Date: Tue, 8 Jan 2019 16:49:16 -0200 [thread overview]
Message-ID: <20190108164916.55aa9b93@coco.lan> (raw)
In-Reply-To: <CABXGCsOMdyzXACZa9T1OdUmDhNPDK=cX+DfBCAnY2A4aozCFHA@mail.gmail.com>
Em Tue, 8 Jan 2019 21:11:41 +0500
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> escreveu:
> On Tue, 8 Jan 2019 at 20:57, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Thank you.
> >
> > Your device exposes five formats: YUY2 (YUYV), YV12 (YVU420), NV12, P010 and
> > BGR3 (BGR24). They are all supported by V4L2 and the uvcvideo driver except
> > for the P010 format. This would be easy to fix in the uvcvideo driver if it
> > wasn't for the fact that the P010 format isn't support by V4L2. Adding support
> > for it isn't difficult, but I don't have time to do this myself at the moment.
> > Would you consider volunteering if I guide you ? :-)
> >
>
> Sure, I'd be happy to help. What is required of me?
It shouldn't be hard.
First, you need to add the new format at include/uapi/linux/videodev2.h,
like this one:
#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
Please put it together with the other YUV formats.
As the fourcc "P010" was not used on Linux yet, you could use it,
e. g., something like:
#define V4L2_PIX_FMT_YUV_P10 v4l2_fourcc('P', '0', '1', '0') /* 10 YUV420 planar */
You need then to document it. Each V4L2 format should have a description,
like this:
https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-yuv420m.html
This is generated via a text file (using ReST syntax). On the above example,
it is produced by this file:
https://git.linuxtv.org/media_tree.git/tree/Documentation/media/uapi/v4l/pixfmt-yuv420m.rst
Writing it would take a little more time, but, provided that you don't
copy what's written from external docs, you could take a look at the
Internet for the P010 descriptions, and use the pixfmt-yuy420m.rst file
as the basis for a new pixfmt-p010.rst file.
This will produce a patch similar to this one:
https://git.linuxtv.org/media_tree.git/commit/?id=5df082e2312c
Finally, you need to teach the uvc driver that it should report P010
format, instead of 0x00000000, by adding it at uvc_format_desc uvc_fmts,
with the corresponding UVC GUID. We usually do this on a separate patch.
Something like this:
https://git.linuxtv.org/media_tree.git/commit/?id=6ea0d588d35b
Once you have the patches, submit it to the ML :-)
You could take a look at the LinuxTV wiki page about how to submit,
at the developer's section:
https://linuxtv.org/wiki/index.php/Developer_section
In particular, take a look at "Submitting Your Work" section there.
Thanks,
Mauro
next prev parent reply other threads:[~2019-01-08 18:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-05 20:05 Kernel error "Unknown pixelformat 0x00000000" occurs when I start capture video Mikhail Gavrilov
2019-01-08 14:45 ` Mauro Carvalho Chehab
2019-01-08 14:54 ` Laurent Pinchart
2019-01-08 15:16 ` Mauro Carvalho Chehab
2019-01-08 15:55 ` Laurent Pinchart
2019-01-08 15:18 ` Mikhail Gavrilov
2019-01-08 15:58 ` Laurent Pinchart
2019-01-08 16:11 ` Mikhail Gavrilov
2019-01-08 18:49 ` Mauro Carvalho Chehab [this message]
2019-01-08 19:00 ` Mauro Carvalho Chehab
2019-01-09 3:51 ` Mikhail Gavrilov
2019-01-09 12:03 ` Mauro Carvalho Chehab
2019-01-08 21:29 ` Laurent Pinchart
2019-01-09 12:19 ` Sakari Ailus
2019-01-09 13:01 ` P010 fourcc format support - Was: " Mauro Carvalho Chehab
2019-01-09 16:42 ` Ayaka
2019-01-09 16:52 ` Nicolas Dufresne
2019-01-09 17:28 ` Mauro Carvalho Chehab
2019-01-09 18:20 ` Nicolas Dufresne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190108164916.55aa9b93@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mikhail.v.gavrilov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).