Re: Gstreamer and vim2m with bayer capture formats

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

 



Em Fri, 1 Feb 2019 15:55:06 -0200
Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> escreveu:

> Em Fri, 01 Feb 2019 12:03:49 -0500
> Nicolas Dufresne <nicolas@xxxxxxxxxxxx> escreveu:
> 
> > If my change you have resources or time to work on a proper patch, be
> > aware that patch submissions works through gitlab.freedesktop.org Merge
> > Request (basically pushing a branch on a fork there and doing couple of
> > webui clicks).  
> 
> Ah, ok. Well, the intention here was just to do a RFC and check with
> you about the proper solution.
> 
> While I do have a limited amount of time, due to my kernel duties,
> I could try to write a different patch for it once I understand
> better what should be done.
> 
> While that doesn't happen, IMHO, the best is to send RFC patches via
> e-mail, as it allows c/c the discussions to the linux-media ML.

Cheers,
Mauro

Ah, I guess I see the issue... gst_v4l2_object_get_raw_caps() doesn't
associate bayer formats as a format that a v4l2transform would accept.

So, a change like the one below would make it to recognize the 4 bayer
formats that was added to vim2m as belonging to a v4l2convert type, right?

Indeed with this patch it is now recognizing the formats and a
v4l2video0convert block was recognized.

Unfortunately, this is not working yet:

$ gst-launch-1.0 videotestsrc ! video/x-raw,format=BGR ! v4l2video0convert disable-passthrough=1 extra-controls="s,horizontal_flip=1,vertical_flip=1" ! video/x-bayer,format=bggr ! bayer2rgb ! videoconvert ! ximagesink

Maybe I need to change something else too for it to negotiate between
a v4l2 capture sink from videoconvert and bayer2rgb source.

-

diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 124c778c626d..5a1e52989903 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -157,10 +157,10 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
   {V4L2_PIX_FMT_NV42, TRUE, GST_V4L2_RAW},
 
   /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
-  {V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_CODEC},
-  {V4L2_PIX_FMT_SGBRG8, TRUE, GST_V4L2_CODEC},
-  {V4L2_PIX_FMT_SGRBG8, TRUE, GST_V4L2_CODEC},
-  {V4L2_PIX_FMT_SRGGB8, TRUE, GST_V4L2_CODEC},
+  {V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_RAW | GST_V4L2_CODEC},
+  {V4L2_PIX_FMT_SGBRG8, TRUE, GST_V4L2_RAW | GST_V4L2_CODEC},
+  {V4L2_PIX_FMT_SGRBG8, TRUE, GST_V4L2_RAW | GST_V4L2_CODEC},
+  {V4L2_PIX_FMT_SRGGB8, TRUE, GST_V4L2_RAW | GST_V4L2_CODEC},
 
   /* compressed formats */
   {V4L2_PIX_FMT_MJPEG, FALSE, GST_V4L2_CODEC},




[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