Skip to contentSkip to conversation

V4L2_PIX_FMT_SBGGR16 not in kernel

DISCUSSION Johan Hedlund 4 participants 11 messages Apr 24, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello

I am working on a application that will use V4L2 on a linux-2.6-22 kernel. I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82' for my captured images. But it seems like I only can find it the in the V4L2 specification and not in the mainline kernel. Is this format not a standard format that should be in the mainline kernel? Can I just add the definition to my code and use it or will it break something else?

/Johan

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#1 lore raw
Quoted 8 lines · On Thu, 24 Apr 2008 16:12:59 +0200 Johan Hedlund <[email protected]> wrote:

Hello

I am working on a application that will use V4L2 on a linux-2.6-22 kernel. I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82' for my captured images. But it seems like I only can find it the in the V4L2 specification and not in the mainline kernel. Is this format not a standard format that should be in the mainline kernel? Can I just add the definition to my code and use it or will it break something else?

If it isn't at mainline kernel, there's no in-kernel drivers supporting it. It is better to use a format that is already supported by the drivers.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#2 lore raw

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

/Johan

Quoted 12 lines · Mauro Carvalho Chehab
Quoted 8 lines · On Thu, 24 Apr 2008 16:12:59 +0200 Johan Hedlund <[email protected]> wrote:

Hello

I am working on a application that will use V4L2 on a linux-2.6-22 kernel. I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82' for my captured images. But it seems like I only can find it the in the V4L2 specification and not in the mainline kernel. Is this format not a standard format that should be in the mainline kernel? Can I just add the definition to my code and use it or will it break something else?

Quoted 5 lines

If it isn't at mainline kernel, there's no in-kernel drivers supporting it. It is better to use a format that is already supported by the drivers.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#3 lore raw

Hi,

Quoted 8 lines · Johan Hedlund

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

/Johan

Also I sent a patch for this a little while back... I thought it had been added, and I rather lost track of what has happend to it,

Steve.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#4 lore raw
Quoted 8 lines · On Thu, 24 Apr 2008 15:15:13 +0100 Steven Whitehouse <[email protected]> wrote:

Hi,

Quoted 5 lines · Johan Hedlund

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

Quoted 5 lines
Quoted 3 lines

/Johan

Also I sent a patch for this a little while back... I thought it had been added, and I rather lost track of what has happend to it,

Hi Steve,

It seems that I lost your patches adding this new standard and adding a driver using it. Could you please send those to me again?

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#5 lore raw

Hi,

Quoted 17 lines · Mauro Carvalho Chehab
Quoted 8 lines · On Thu, 24 Apr 2008 15:15:13 +0100 Steven Whitehouse <[email protected]> wrote:

Hi,

Quoted 5 lines · Johan Hedlund

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

Quoted 5 lines
Quoted 3 lines

/Johan

Also I sent a patch for this a little while back... I thought it had been added, and I rather lost track of what has happend to it,

Quoted 7 lines

Hi Steve,

It seems that I lost your patches adding this new standard and adding a driver using it. Could you please send those to me again?

Cheers,
Mauro

Btw, the V4L spec claims that it exists already:
http://v4l2spec.bytesex.org/spec/r3796.htm

Guennadi Liakhovetski submitted a driver which uses this too so thats why I'd thought it was already included. I hadn't looked to see what stage his driver was at recently.

Somehow my patch got mangled up with some other stuff too, because I saw this thread:
http://lists.zerezo.com/video4linux/msg21484.html

but my original patch did nothing but add the two new pix formats so I've no idea why I was being credited with various extra changes as well, which were nothing to do with me.

Btw, here was the original patch:
http://www.archivum.info/[email protected]/2008-01/msg00059.html

I do have a (not yet submitted driver) which uses it, and the hold up has been basically that the various subsystems that I was using were in a state of flux. I hope that when the current merge window is complete I'll be able to take another look at it, and get it ready.

I hadn't bothered to follow up on the patch since my driver wasn't ready yet, but nonetheless I didn't receive any feedback at the time to suggest that it was a prerequsite.

There are a lot of sensors though that use this format. Pretty much all the Omnivision sensors and the Micron sensors all have 10 bit interfaces, even though some manufacturers only choose to use the upper 8 bits, so it will be something that it of general use to lots of people,

Steve.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#6 lore raw
Quoted 6 lines · On Thu, 24 Apr 2008 15:38:25 +0100 Steven Whitehouse <[email protected]> wrote:

Btw, the V4L spec claims that it exists already:
http://v4l2spec.bytesex.org/spec/r3796.htm

Guennadi Liakhovetski submitted a driver which uses this too so thats why I'd thought it was already included. I hadn't looked to see what stage his driver was at recently.

It isn't already at mainstream, but it will be soon. I'm finishing to prepare its submission.

Quoted 8 lines

I do have a (not yet submitted driver) which uses it, and the hold up has been basically that the various subsystems that I was using were in a state of flux. I hope that when the current merge window is complete I'll be able to take another look at it, and get it ready.

I hadn't bothered to follow up on the patch since my driver wasn't ready yet, but nonetheless I didn't receive any feedback at the time to suggest that it was a prerequsite.

It makes no sense to change the API for something that is not used ;)

Quoted 5 lines

There are a lot of sensors though that use this format. Pretty much all the Omnivision sensors and the Micron sensors all have 10 bit interfaces, even though some manufacturers only choose to use the upper 8 bits, so it will be something that it of general use to lots of people,

Good.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#7 lore raw
In reply to Steven Whitehouse
Quoted 7 lines · Steven Whitehouse

Btw, the V4L spec claims that it exists already:
http://v4l2spec.bytesex.org/spec/r3796.htm

Guennadi Liakhovetski submitted a driver which uses this too so thats why I'd thought it was already included. I hadn't looked to see what stage his driver was at recently.

Quoted 7 lines

Somehow my patch got mangled up with some other stuff too, because I saw this thread:
http://lists.zerezo.com/video4linux/msg21484.html

but my original patch did nothing but add the two new pix formats so I've no idea why I was being credited with various extra changes as well, which were nothing to do with me.

Right, there was a merge problem at some point, but it has been resolved, and now your patch in its original undamaged form in the v4l git tree waiting to be submitted into the mainline.

Thanks
Guennadi
---
Guennadi Liakhovetski

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#8 lore raw
In reply to Johan Hedlund
Quoted 6 lines · On Thu, 24 Apr 2008 16:35:35 +0200 Johan Hedlund <[email protected]> wrote:

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

Quoted 1 line
Quoted 1 line

I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82'

A format with this name will be added, but the fourcc code that Guennadi used is different from yours. Not sure what would be the proper one.

This is what's currently defined:

#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#9 lore raw
Quoted 10 lines · Mauro Carvalho Chehab
Quoted 6 lines · On Thu, 24 Apr 2008 16:35:35 +0200 Johan Hedlund <[email protected]> wrote:

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

Quoted 1 line
Quoted 1 line

I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82'

Quoted 7 lines

A format with this name will be added, but the fourcc code that Guennadi used is different from yours. Not sure what would be the proper one.

This is what's currently defined:

#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */

As we have already seen in this thread, these defines actually originate from Steven Whitehouse and the BYR2 fourcc code agrees with
http://www.fourcc.org/rgb.php

Thanks
Guennadi
---
Guennadi Liakhovetski

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#10 lore raw
Quoted 15 lines · On Thu, 24 Apr 2008 19:25:53 +0200 (CEST) Guennadi Liakhovetski…
Quoted 13 lines · Mauro Carvalho Chehab
Quoted 6 lines · On Thu, 24 Apr 2008 16:35:35 +0200 Johan Hedlund <[email protected]> wrote:

I am developing my own capture drivers for our own developed hardware based on a driver that does not exist in mainline. This driver used a uyuv format, but since we want to use the raw bayer format with 10-bit color resolution I need to change the format.

Quoted 1 line
Quoted 1 line

I am interested in using the format V4L2_PIX_FMT_SBGGR16 'BA82'

A format with this name will be added, but the fourcc code that Guennadi used is different from yours. Not sure what would be the proper one.

Quoted 8 lines
Quoted 4 lines

This is what's currently defined:

#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */

As we have already seen in this thread, these defines actually originate from Steven Whitehouse and the BYR2 fourcc code agrees with
http://www.fourcc.org/rgb.php

Argh... to much patches... Yes, the author is Steven. The patch is already applied at my -git and seems OK:

http://git.kernel.org/?p=linux/kernel/git/mchehab/v4l-dvb.git;a=commitdiff;h=588cd02c512658f4756750c2aef46d473bd88663

I should be send in a few minutes the pull request for all those 452 patches pending merge.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list