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 580869 - dvdsubdec ARGB support
dvdsubdec ARGB support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other All
: Normal minor
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-30 11:09 UTC by kapil
Modified: 2009-05-21 13:23 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
dvdsubdec element patch to support ARGB output. (10.38 KB, patch)
2009-04-30 11:10 UTC, kapil
none Details | Review
Cleaned the earlier patch (11.27 KB, patch)
2009-05-05 10:17 UTC, kapil
needs-work Details | Review
Cleaned as per Jan suggestion (11.68 KB, patch)
2009-05-15 16:42 UTC, kapil
none Details | Review
Removed clip from patch (11.35 KB, patch)
2009-05-21 12:30 UTC, kapil
none Details | Review

Description kapil 2009-04-30 11:09:23 UTC
In dvdsubdec only AYUV, support is there. Adding ARGB support will help to skip the colorspace conversion using ffmpegcolorspace, on the whole frame instead only the subtitle part's conversion can be done. 

Other information:
Comment 1 kapil 2009-04-30 11:10:29 UTC
Created attachment 133646 [details] [review]
dvdsubdec element patch to support ARGB output.
Comment 2 kapil 2009-05-05 10:17:23 UTC
Created attachment 134010 [details] [review]
Cleaned the earlier patch
Comment 3 Jan Schmidt 2009-05-15 10:49:20 UTC
In general this seems like an OK idea. A couple of notes on the patch:

* I'd prefer to use glib's CLAMP macro rather than the inline clip() function.
* Move the use_ARGB check out of the DRAW_RUN inner loop. Instead, I'd redefine the Color_val struct to be guint A, Y_R, U_G, V_B and define separate palette caches: palette_cache_rgb, hl_palette_cache_rgb. That way, you can switch to select the different color palette outside the inner loop, and avoid the extra check.

* Are you actually using dvdsubdec successfully somewhere? I stopped using it in favour of gstdvdspu, so I'm not sure how complete its functionality is any more.
* In the sinkpad setcaps function, the gst_pad_fixate_caps call looks wrong - you want to check the entire set of allowed caps for ARGB support, not the fixated set. Also, a bit further down - if the peer accepts the proposed caps, you break from the loop without setting the use_ARGB flag. It looks like use_ARGB will only get set if ARGB is in the set of allowed caps, but the peer rejects it. At which point, it will set ARGB as the output caps, but not the flag that actually renders in that mode.


Comment 4 kapil 2009-05-15 16:42:41 UTC
Created attachment 134721 [details] [review]
Cleaned as per Jan suggestion

Thanks Jan, I had attached the patch as per your suggestions. 
Please let me know if there is anything missing.
Comment 5 kapil 2009-05-21 12:30:57 UTC
Created attachment 135091 [details] [review]
Removed clip from patch

Please check, I had tested , it works properly for me.
Comment 6 Jan Schmidt 2009-05-21 13:08:23 UTC
I think this looks fine now - apart from the common submodule change bit, that should not go in.
Comment 7 Jan Schmidt 2009-05-21 13:23:15 UTC
Thanks, committed:

commit 59bd88e4bdd0a0ef7d5a1b0b3813eac8708f3fe0
Author: Kapil Agrawal <kapil@mediamagictechnologies.com>
Date:   Thu May 21 14:20:22 2009 +0100

    dvdsubdec: Support ARGB output
    
    Negotiate to and render into ARGB buffers directly if the peer supports it.
    Fixes: #580869