GL bayer2rgba

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GL bayer2rgba

Cyril Baletaud
Hi,

I'm porting my cpu memory pipeline to handle GiGE Vision buffer to GL Memory.
Overlay drawing and text is ready and i need now to transform bayer image to GL RGBA texture.

I use glupload to upload from CPU to GL texture, and i want to derive GstGLBaseFilter for my GLBayer2Rgba.

Is the "video/x-bayer" type can be uploaded by the glupload element ?

If not, what is the best approch to add this feature to GLUpload element.

Regards

CB

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GL bayer2rgba

Nicolas Dufresne-5
Le lundi 03 avril 2017 à 15:14 +0200, Cyril Baletaud a écrit :

> I'm porting my cpu memory pipeline to handle GiGE Vision buffer to GL
> Memory.
> Overlay drawing and text is ready and i need now to transform bayer
> image to GL RGBA texture.
>
> I use glupload to upload from CPU to GL texture, and i want to derive
> GstGLBaseFilter for my GLBayer2Rgba.
>
> Is the "video/x-bayer" type can be uploaded by the glupload element ?
>
> If not, what is the best approch to add this feature to GLUpload
> element.
A separate element would share a lot of GLUpload code, so I think I
would recommended adding this to glupload directly. It's not currently
supported, you would have to implement it. If you just want to make it
work for now, there is a CPU base converter, bayer2rgb.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GL bayer2rgba

Cyril Baletaud
Oki,

bayer2rgb is not a good solution because high CPU load (1600*1200@50).
I'll try to modify glupload to apply demosaic shader into the element.

Not easy but not impossible.

regards,
Cyril



2017-04-03 17:53 GMT+02:00 Nicolas Dufresne <[hidden email]>:
Le lundi 03 avril 2017 à 15:14 +0200, Cyril Baletaud a écrit :
> I'm porting my cpu memory pipeline to handle GiGE Vision buffer to GL
> Memory.
> Overlay drawing and text is ready and i need now to transform bayer
> image to GL RGBA texture.
>
> I use glupload to upload from CPU to GL texture, and i want to derive
> GstGLBaseFilter for my GLBayer2Rgba.
>
> Is the "video/x-bayer" type can be uploaded by the glupload element ?
>
> If not, what is the best approch to add this feature to GLUpload
> element.

A separate element would share a lot of GLUpload code, so I think I
would recommended adding this to glupload directly. It's not currently
supported, you would have to implement it. If you just want to make it
work for now, there is a CPU base converter, bayer2rgb.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GL bayer2rgba

Nicolas Dufresne-5
Le lundi 03 avril 2017 à 18:24 +0200, Cyril Baletaud a écrit :
> bayer2rgb is not a good solution because high CPU load (1600*1200@50)
> .
> I'll try to modify glupload to apply demosaic shader into the
> element.
>
> Not easy but not impossible.

Reminds me my attempt to add a detiling shader, worked at low
resolution, but failed due to lack of precision at higher resolution.
Hopefully for this one, the error tolerance will be better.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GL bayer2rgba

Nicolas Dufresne-5
Le lundi 03 avril 2017 à 12:46 -0400, Nicolas Dufresne a écrit :

> Le lundi 03 avril 2017 à 18:24 +0200, Cyril Baletaud a écrit :
> > bayer2rgb is not a good solution because high CPU load (1600*1200@5
> > 0)
> > .
> > I'll try to modify glupload to apply demosaic shader into the
> > element.
> >
> > Not easy but not impossible.
>
> Reminds me my attempt to add a detiling shader, worked at low
> resolution, but failed due to lack of precision at higher resolution.
> Hopefully for this one, the error tolerance will be better.
I've just stumbled across this, if it's correct, I believe it's much
simpler then I thought.

https://github.com/rasmus25/debayer-rpi/blob/master/demosaic.vrt

>
> Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GL bayer2rgba

Nicolas Dufresne-5
Le lundi 03 avril 2017 à 12:52 -0400, Nicolas Dufresne a écrit :

> Le lundi 03 avril 2017 à 12:46 -0400, Nicolas Dufresne a écrit :
> > Le lundi 03 avril 2017 à 18:24 +0200, Cyril Baletaud a écrit :
> > > bayer2rgb is not a good solution because high CPU load (1600*1200
> > > @5
> > > 0)
> > > .
> > > I'll try to modify glupload to apply demosaic shader into the
> > > element.
> > >
> > > Not easy but not impossible.
> >
> > Reminds me my attempt to add a detiling shader, worked at low
> > resolution, but failed due to lack of precision at higher
> > resolution.
> > Hopefully for this one, the error tolerance will be better.
>
> I've just stumbled across this, if it's correct, I believe it's much
> simpler then I thought.
>
> https://github.com/rasmus25/debayer-rpi/blob/master/demosaic.vrt
Sorry for the noise, this is just the vertex shader, it comes from:

http://graphics.cs.williams.edu/papers/BayerJGT09/

>
> >
> > Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Loading...