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 666352 - 2bit DVB sub-pictures wrongly displayed
2bit DVB sub-pictures wrongly displayed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.35
Other Linux
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-16 10:25 UTC by jfauffret
Modified: 2012-07-09 16:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
subtitle observation (7.87 KB, text/plain)
2011-12-21 08:26 UTC, jfauffret
  Details
expected behavior (7.87 KB, image/png)
2011-12-21 08:27 UTC, jfauffret
  Details
dvbsuboverlay: Handle non_modifying_colour_flag correctly in the RLE handlers (2.29 KB, patch)
2011-12-21 11:12 UTC, Mart Raudsepp
committed Details | Review

Description jfauffret 2011-12-16 10:25:06 UTC
2bit color DVB sub-pictures are not properly displayed. 
Characters are not readable easily.

'dvbsuboverlay' element is used in following pipeline like: 
// gst-launch -v filesrc location=video.mpg  ! mpegtsdemux name=d !
//               queue ! mp3parse ! mad ! audioconvert ! autoaudiosink d. !
//               queue !  ffdec_h264 ! ffmpegcolorspace ! r. d. !
//               queue ! "subpicture/x-dvb" ! dvbsuboverlay name=r ! ffmpegcolorspace ! autovideosink

While decoding, dvbs parser logged:
WARNING **: Parsing 2bit color DVB sub-picture. This is not tested at all. If you see this message, please provide the developers with sample media with these subtitles, if possible.
Comment 1 jfauffret 2011-12-16 10:39:13 UTC
No way to attach the sample here, so you'll find the sample here:
http://dl.free.fr/kPrIJ2roZ
Comment 2 jfauffret 2011-12-21 08:26:14 UTC
Created attachment 204024 [details]
subtitle observation
Comment 3 jfauffret 2011-12-21 08:27:26 UTC
Created attachment 204025 [details]
expected behavior

this is a snapshot from VLC
Comment 4 Mart Raudsepp 2011-12-21 08:54:10 UTC
I think your connection is blocking PNG uploads and we got some sort of HTMLs here instead now.
That said, I've already looked at the samples and visually seeing and can confirm the bug.
Comment 5 Mart Raudsepp 2011-12-21 11:12:50 UTC
Created attachment 204027 [details] [review]
dvbsuboverlay: Handle non_modifying_colour_flag correctly in the RLE handlers

The check for when to not memset was checking on an undeterministic 'bits' variable value,
which is only meant to be used inside the loop earlier when it is supposed to check if
clut_index is 1 together with non_mod set, as per spec:

"non_modifying_colour_flag:  If set to '1' this indicates that the CLUT entry value '1'
is a non modifying colour. When the non modifying colour is assigned to an object pixel,
then the pixel of the underlying region background or object shall not be modified. This
can be used to create "transparent holes" in objects."
Comment 6 Mart Raudsepp 2011-12-21 11:17:58 UTC
After this patch the first subtitle in the sample referenced in comment #1 looks good. The two others are looking good as well now, as seen by my PNG outputting debug code within libdvbsub, but aren't shown on the screen correctly right now. I believe this is due to bug 660233, as the quick workaround to that solves this issue and the other two subtitles are displayed as well. I'll probably look at a proper fix to that soon.
Comment 7 Mark Nauwelaerts 2012-07-09 16:23:26 UTC
Applying this patch has 3 subtitles coming up OK for me (and timing issues would then be another bug anyway), so considering this fixed:

commit a908339fee1e641961764f3281720aca1e414630
Author: Mart Raudsepp <mart.raudsepp@collabora.com>
Date:   Wed Dec 21 13:00:27 2011 +0200

    dvbsuboverlay: Handle non_modifying_colour_flag correctly in the RLE handlers
    
    The check for when to not memset was checking on an undeterministic 'bits' variable value,
    which is only meant to be used inside the loop earlier when it is supposed to check if
    clut_index is 1 together with non_mod set, as per spec:
    
    "non_modifying_colour_flag:  If set to '1' this indicates that the CLUT entry value '1'
    is a non modifying colour. When the non modifying colour is assigned to an object pixel,
    then the pixel of the underlying region background or object shall not be modified. This
    can be used to create "transparent holes" in objects."
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666352