Re: P010 fourcc format support - Was: Re: Kernel error "Unknown pixelformat 0x00000000" occurs when I start capture video

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Sent from my iPad

> On Jan 9, 2019, at 9:01 PM, Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> wrote:
> 
> Em Wed, 9 Jan 2019 14:19:00 +0200
> Sakari Ailus <sakari.ailus@xxxxxx> escreveu:
> 
>>> On Tue, Jan 08, 2019 at 04:49:16PM -0200, Mauro Carvalho Chehab wrote:
>>> Em Tue, 8 Jan 2019 21:11:41 +0500
>>> Mikhail Gavrilov <mikhail.v.gavrilov@xxxxxxxxx> escreveu:
>>> 
>>>> On Tue, 8 Jan 2019 at 20:57, Laurent Pinchart
>>>> <laurent.pinchart@xxxxxxxxxxxxxxxx> 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.  
>> 
>> There is some work done on this but it's not finished; searching "P010" in
>> Patchwork yields this:
>> 
>> <URL:https://patchwork.linuxtv.org/patch/39752/>
> 
> Good point! I'm c/c the author of it.
> 
> The actual patch for media is this one:
> 
>    https://patchwork.linuxtv.org/patch/39753/
> 
> It sounds that the author didn't sent any version after that.
> 
> The goal seemed to be to add P010 support at DRM for the rockchip driver.
> 
> specifically with regards to patch 2/3, the issues seemed to be:
> 
>    - some naming issues with the multiplane format variants;
>    - a typo: simliar -> similar;
>    - a comment about the usage of 1/2 UTF code (½). Not sure if
>      Sphinx will handle it well for both html and pdf outputs.
>      It should, but better to double check.
> 
> Ayaka,
> 
> There is a UVC media device that supports P010 device. We're discussing
> about adding support for it on media. The full thread is at:
> 
> https://lore.kernel.org/linux-media/20190109121900.hbrpttmxz3gaotwx@xxxxxxxxxxxxxxxxxxxxxxxxxx/T/#m8c395156ca0e898e4c8b1e2c6309d912bc414804
> 
> We've seen that you tried to submit a patch series for DRM adding
> support for it at the rockship driver. What's the status of such
> series?
Rockchip would use another 10bit variant of NV12, which is merged as NV12LE40 at Gstreamer and I sent another patch for it, but I didn’t receive any feedback from that.
> 
> Thanks,
> Mauro




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux