Re: Efficient image drawing



John Cupitt wrote:

On 4/27/06, Paul Davis <pjdavis engineering uiowa edu> wrote:
I'm developing a video playback app and I'm a bit curious to see if
there's a better way to render images to the screen.  As it is now I'm
using the Gtkmm objects and copying images from my non-standard format
in a GdkPixbuf and then drawing to a GtkDrawingArea using
gdk_draw_rgb_image_dithalign.

Admittedly, this method is fairly fast.  I'm getting between 15 and 20
fps on my development machine which is only a 1.4 GHz.

I'm just wondering if anyone knew a more efficient method to get image
data from disk to the screen.  Any suggestions are welcome.

I think gdk_draw_rgb_image_dithalign() is about as fast as you can get
while staying within the world of gdk. I avoid a copy by having my
non-standard format be 24-bit RGB and drawing directly from that, but
that's it I think.

I thought about doing something like this, but trippling the disk space is pretty much out of the question. The total space used by all the data is nearing 1TB (of course, thats in multiple movies).

For the moment, I'm not too concerned about being tied directly to X. If I can find something that screams through the data, I'd be willing to put forth the effort to have multiple drawing schemes. Granted I haven't even thought about porting this to windows yet. Thats somewhere on my TODO list, but not quite at the top.

I don't know if gdk_draw_rgb_image_dithalign() uses the XVideo
extension, but I imagine not. Of course using that ties you to X.
Maybe Cairo with a GL backend would be quicker? Though it'll be a
while before that is a common target :)

John
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list





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