[gstreamer-bugs] [Bug 620412] [PATCH] Incomplete support for 15 and 16 bit RGB and BGR formats

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jun 6 11:19:06 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=620412
  GStreamer | gst-plugins-base | git

Benjamin Otte (Company) <otte> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |otte at gnome.org

--- Comment #2 from Benjamin Otte (Company) <otte at gnome.org> 2010-06-06 18:19:00 UTC ---
you have 16bits for 565, so on big endian it looks like:
rrrrrggg gggbbbbb
On Little endian, it is:
gggbbbbb rrrrrggg

So the general approach is to stuff the value into a guint16 using shifts and
then TO_BE/LE to get the endianness right, kinda like this:
guint16 pixel;
pixel = (r << 11) | ((g & 0x3f) << 5) | (b & 0x1f);
pixel = GUINT16_TO_BE(pixel);

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list