After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 117897 - New colorspace stuff
New colorspace stuff
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
git master
Other All
: Normal enhancement
: 0.7.5
Assigned To: Ronald Bultje
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-20 14:13 UTC by Ronald Bultje
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
any-to-any colorspace methods (32.16 KB, text/plain)
2003-07-20 14:13 UTC, Ronald Bultje
  Details
yuv420planar (2.51 KB, text/plain)
2003-07-20 15:20 UTC, Ronald Bultje
  Details
yuv422packed (2.57 KB, text/plain)
2003-07-20 15:21 UTC, Ronald Bultje
  Details
Patch which adds the above files to the build and registers the types (46.68 KB, patch)
2003-07-22 15:14 UTC, Ronald Bultje
none Details | Review
LCS tarball after my changes (216.91 KB, application/octet-stream)
2003-08-02 23:14 UTC, Ronald Bultje
  Details
GStreamer LCS plugin patch for my changes to LCS (9.32 KB, patch)
2003-08-02 23:15 UTC, Ronald Bultje
none Details | Review

Description Ronald Bultje 2003-07-20 14:13:01 UTC
This actually belongs to LCS @ codecs.org, but since I'd rather keep it
centralized (here), I'll put it here.

I've got a new colorspace system, any-to-any, based on a generic set of
methods. Code is attached, please give some comments (Dave? Wim? Erik?).
Problem is that I don't know how to add it to the generic system in LCS.
Also, because of this, I haven't been able to test it, so there's likely
some huge, humiliating, sad, horrible etc. bugs in it.

I'd like to test these against the two- or three-step LCS functions (e.g.
RGB xx to YUY2, YUY2 to any YUV type or so) to see which is faster. I'm
guessing mine is faster (and it also takes less memory since you're
omitting one step), but I want to be sure before we start using this.

The general idea is that this is the fallback system and that - for the
normal functions (RGB32/24-to-YUY2, any YUV422packed to each other, any
YUV420planar to each other, etc.), we write optimized ones that replace the
fallback one.

I.o.w., comments please!
Comment 1 Ronald Bultje 2003-07-20 14:13:45 UTC
Created attachment 18454 [details]
any-to-any colorspace methods
Comment 2 Ronald Bultje 2003-07-20 15:20:05 UTC
Now that I'm doing this anyway, here's some C-optimized YUV420planar
functions and some C-optimized YUV422packed functions. They basically
convert within either YUY2/UYVY/YVYU (using a DWORD approach) or
within I420/YV12 (using memcpy-per-line). LCS doesn't have this yet.
Comment 3 Ronald Bultje 2003-07-20 15:20:38 UTC
Created attachment 18459 [details]
yuv420planar
Comment 4 Ronald Bultje 2003-07-20 15:21:15 UTC
Created attachment 18460 [details]
yuv422packed
Comment 5 Ronald Bultje 2003-07-22 15:14:56 UTC
Created attachment 18522 [details] [review]
Patch which adds the above files to the build and registers the types
Comment 6 Ronald Bultje 2003-08-02 23:14:02 UTC
Created attachment 18856 [details]
LCS tarball after my changes
Comment 7 Ronald Bultje 2003-08-02 23:15:20 UTC
Created attachment 18857 [details] [review]
GStreamer LCS plugin patch for my changes to LCS
Comment 8 Ronald Bultje 2003-08-02 23:17:38 UTC
The above are a new LCS tarball and a patch to the GStreamer LCS
plugin to behave like I want them to. There's nothing new in there,
except a terribly slow fallback thing, that can barely do 25fps on my
P-II 400. I'm assuming it can be further optimized, but it's good
enough as a fallback. Most people have something better than a P-II
400 anyway (still good to use this, makes you write fast code).

Interested people, please test.

Oh, for Wim: the kernels haven't been backported in here, since the
format names are duplicated. This is probably a minor issue, but I'm
waiting for some general comments before putting the kernels back.

And the code in lcs/{yuv,rgb}2{yuv,rgb}/* is now being used, too.
Comment 9 Ronald Bultje 2003-08-02 23:22:18 UTC
Oh, I forgot, there's one issue with RGB: the bytes aren't written in
the right order in my fallback thing. However, I'm fairly sure that my
byte-write code is correct. Anyone with some knowledge for
endianness/RGB, please have a look and correct my stupidness.
Comment 10 David Schleef 2003-08-09 20:51:10 UTC
Notes about the lcs code (imcomplete, made abuot a week ago)

lcsarch.h:

- defines should be in parens

lcsfallback.c:

- unsigned long long sucks as a type, use uint64_t

- lcs_fallback_rgb_pixel_resample_component(): should multiply by
  0x1001 (or whatever) instead of dividing.

- this is the slowest code I've ever seen :)


general:

- IMO, clipping to [16,235]x[16,240]x[16,240] should be done
  3-dimensionally.

- magic constants for CCIR 601 -> RGB conversion should be
  defines

- make it possible to subclass LCSConverter, so that the individual
  converters can cache information (or have a ->priv member)
Comment 11 David Schleef 2004-02-12 03:00:42 UTC
Applied to both gstreamer CVS and codecs.org CVS.  Seems to somewhat work.