[gst-devel] colorspace conversion

Ronald Bultje rbultje at ronald.bitfreak.net
Tue Feb 17 09:34:04 CET 2004


Hi,

On Tue, 17 Feb 2004, Thomas Vander Stichele wrote:
> Is there someone who has some documentation on our handling of
> colorspaces ?

docs/random/mimetypes or the plugin writer's guide, the 'types' section in
advanced. I'd suggest the latests, it looks better.

> Second, any recommendations on what to do to have an RGB-to-YUV
> element ? I found some simple formulas on the net to do the
> conversion, and it seems to me that it would be wiser to have a
> separate element for YUV-to-RGB so as to not make the code for, for
> example gstcolorspace, more complicated.  I'm assuming we currently
> don't handle the case very well were an element can handle A(x) ->
> B(y) and B(x) -> A(y), but not B(x) -> B(y), since that would expose
> A(x) and B(x) as pad templates on sink and A(y) and B(y) on src, while
> the element itself only handles some conversions internally.

I'm seriously gonna cry if you even consider doing this.

* ffmpeg is highly optimized for many architectures
* ffmpeg is well maintained by lots of people
* ffmpeg receives a lot of testing and has been thoroughly bugfixed
* ffmpeg does pretty much all formats except some uncommon RGB formats
which are handled by hermes
* ffmpeg works
* we need ffmpeg for decoding pretty much any movie type anyway

Don't. Please. Don't. Please. I'll seriously cry and not send you
christmas presents if you do this.

If you really want to, I wrote a bunch of CSP conv. routines which are in
a libcolorspace-related bug in GStreamer/GNOME bugzilla. You could use
that as a starting point. It includes patches for our LCS plugin to work
with it, too. You need those two patches, latest LCS CVS (from codecs.org)
and some more.

Bad things:
* it's slow
* I think RGB on LE is inverted because I misinterpreted masks by then. I
never bothered to fix this.
* no optimizations whatsoever, and it'll probably require some slight
changes to use liboil or so to do this (Dave?)

Good things:
* it handles very many formats already (any RGB format, plus +/- 5 YUV
formats) ecause it's very generic
* it's easily extendable

Ronald





More information about the gstreamer-devel mailing list