[osg-users] Advice on Rendering Streaming video

spowers at gdrs.com spowers at gdrs.com
Wed Jun 25 13:59:47 PDT 2008


The format the image data I'll be using is a proprietary format that
basically just has the raw bayer data below a header.

I do have an additional question about how to load the data into the
texture.

I've already set up an orthographic2D view that will look at a quad
which will display the texture. The shader will then convert the texture
into RGB and do the whitebalance.  I am also able to swap the texture
back and forth and maintain decent frame rates but the textures I'm
using to test are only 64x64 pixels (tank.rgba and water.rgba) and I'm
wondering if it would be too slow (<30fps) to use the same method for
1000x1000 pixel images.

Is there another method that I should be trying out? 


-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Ulrich
Hertlein
Sent: Monday, June 23, 2008 9:57 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Advice on Rendering Streaming video

spowers at gdrs.com wrote:
> The video stream will be in Bayer format and will need to be converted
> to RGB before being displayed on the screen.
> 
> I will also need to zoom the image and pan the image back and forth.
> There will be other filters that I'll need to apply but I think they
> will just end up being shaders.
>... 
> I was contemplating dumping the raw data into a texture and doing all
> the decoding on the graphics card within a series of shaders. Is this
a
> viable approach?

Use of a shader for the debayer process is definitively the way to go if
you 
want to be realtime.  For any kind of reasonable result the debayer
algorithms 
will be too slow when done on the CPU.

Hopefully you'll have a grayscale image (and not something more
convoluted like 
YCbCr) so just upload that to a texture and knock yourself out with a
debayer 
shader! ;-)

Zoom/pan can also be done in the shader by modifying the texture
coordinates.

Just out of curiosity, what kind of image data are you using?  RED?
ARRI?

Cheers,
/ulrich

_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g


More information about the osg-users mailing list