mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
kate: do not clear out high bits from display area
http://dvd.sourceforge.net/spu_notes does not mention that high bits are to be masked, and not clearing them makes a sample work, where clearing them yielded left > right. History from the dvdspu plugin, from where this code was copied, does not shed any light, as tracing this code's origin shows the same bitmasks being there in 2007 when it was imported. https://bugzilla.gnome.org/show_bug.cgi?id=657091
This commit is contained in:
parent
c437541791
commit
46cfb5fa4f
1 changed files with 4 additions and 4 deletions
|
@ -62,10 +62,10 @@ gst_kate_spu_decode_alpha (GstKateEnc * ke, const guint8 * ptr)
|
|||
static void
|
||||
gst_kate_spu_decode_area (GstKateEnc * ke, const guint8 * ptr)
|
||||
{
|
||||
ke->spu_left = ((((guint16) ptr[0]) & 0x3f) << 4) | (ptr[1] >> 4);
|
||||
ke->spu_top = ((((guint16) ptr[3]) & 0x3f) << 4) | (ptr[4] >> 4);
|
||||
ke->spu_right = ((((guint16) ptr[1]) & 0x03) << 8) | ptr[2];
|
||||
ke->spu_bottom = ((((guint16) ptr[4]) & 0x03) << 8) | ptr[5];
|
||||
ke->spu_left = ((((guint16) ptr[0]) & 0xff) << 4) | (ptr[1] >> 4);
|
||||
ke->spu_top = ((((guint16) ptr[3]) & 0xff) << 4) | (ptr[4] >> 4);
|
||||
ke->spu_right = ((((guint16) ptr[1]) & 0x0f) << 8) | ptr[2];
|
||||
ke->spu_bottom = ((((guint16) ptr[4]) & 0x0f) << 8) | ptr[5];
|
||||
GST_DEBUG_OBJECT (ke, "SPU area %u %u -> %u %d", ke->spu_left, ke->spu_top,
|
||||
ke->spu_right, ke->spu_bottom);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue