[gst-devel] Using cairo/pixman for raw video in GStreamer

Stefan Kost ensonic at hora-obscura.de
Mon Sep 14 17:03:04 CEST 2009


Benjamin Otte schrieb:
> Stefan Kost <ensonic <at> hora-obscura.de> writes:
>
>   
>> But having read_pixel/write_pixel will be slow. How can that be
>> optimized (and/or vectorized). If I recall right "graphics-drivers" for
>> turbo pascal in dos worked that way and they were slow!
>>
>>     
> As I said, pixman is very sophisticated. 
>
> The first step is implementing the pixman_image ops - see
> http://cgit.freedesktop.org/pixman/tree/pixman/pixman-private.h#n160 - I think
> fetch_scanline_raw_32 and store_scanline_raw_32 are required, the rest can will
> use defaults.
> Once you've done that, all cairo ops work on this format. And it'll probably be
> incredibly slow.
>
> After that, you have a look at pixman_implementation_t - see
> http://cgit.freedesktop.org/pixman/tree/pixman/pixman-private.h#n372 - and
> realize that for every rendering operation, there is a vfunc that you can
> implement specifically tuned for that operation. So you can make "AYUV OVER
> I420" or "I420 SOURCE RGB" really fast and keep "YVU9 DIFFERENCE NV12" as slow
> as you want.
>
> Of course, that's a lot of work. So there's also steps in between, like the
> ability to implement blit and fill function for simple copies or fills with a
> single color - see
> http://cgit.freedesktop.org/pixman/tree/pixman/pixman-private.h#n405 - which get
> called automatically by the general functions.
>
> Of course, those functions can be separately optimized for different
> architectures - see
> http://cgit.freedesktop.org/pixman/tree/pixman/pixman-arm-neon.c for an example
> - so you can do all the optimizations you want.
>
> So I fail to see any reason why some important code would be slow.
>   

That sounds better then, but also mean that the work is not pretty small
as you've said earlier. Anyway that is to be expected. Now we just need
something like orc that can help you to write all those variants for all
those datatypes :)

Stefan
> Benjamin
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>   





More information about the gstreamer-devel mailing list