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 577436 - xvimagesink should use xcontext->depth and not count bits in colorkey
xvimagesink should use xcontext->depth and not count bits in colorkey
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-31 10:33 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2009-03-31 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use xcontext->depth (3.73 KB, patch)
2009-03-31 10:33 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-31 10:33:06 UTC
in gst_xvimagesink_get_xv_support() we currently count bits in attribute.max_value to setup the colorkey for different screen-depths. The max value is always a constant in the Xorg drivers. It will not reflect any
particular depth. Well, maybe it reflects the maximum depth supported by the
driver, and since practically all drivers support depth=24 the max value is the
same across all those drivers.

Below are some link to the source code of the Xorg drivers (since there is no
offical specification for this stuff AFAICS):

http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/tree/src/radeon_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-i740/tree/src/i740_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/i830_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-mach64/tree/src/atimach64xv.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-mga/tree/src/mga_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-r128/tree/src/r128_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-s3/tree/src/s3_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-savage/tree/src/savage_video.c
http://cgit.freedesktop.org/xorg/driver/xf86-video-siliconmotion/tree/src/smi_video.c

Could people that have a xvideo driver where XV_COLORKEY is implemented (xvinfo | grep XV_COLORKEY), try gst-plugins-base/tests/icles/test-colorkey, then apply the patch and try again. Please report wheter it worked before and after and attach the xvinfo output.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-31 10:33:55 UTC
Created attachment 131763 [details] [review]
use xcontext->depth
Comment 2 Jan Schmidt 2009-03-31 10:39:30 UTC
I don't have access to the ATI gfx card I was working on at the time of changing this colorkey stuff, and this laptop doesn't have the attribute.

Another machine at home, with Intel integrated gfx has:

    supported visuals:
      depth 24, visualID 0x21

      "XV_COLORKEY" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66046)

This change seems sensible to me.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-31 10:58:10 UTC
lets give it a try.

commit 2f90615d14574c62453f55a854f4599bce1391a3
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Thu Mar 26 18:54:56 2009 +0200

xvimagesink: use xcontext->depth instead of bits in attr.max_value for colorkey
    
According to the drivers in http://cgit.freedesktop.org/xorg/driver/ we should
format the colorkey depending on xcontext->depth. This is what they will use to
interprete the value. The max_value in turn is usualy a constant regardless of
the depth.