GNOME Bugzilla – Bug 628258
[dshowvideosink] add I420 support
Last modified: 2018-11-03 13:06:18 UTC
Long time ago i've made a patch to support i420 in dshowvideosink. After the commit from 07/2010 "Improvements contributed from the Moovida projet" this isn't longer working in the evr mode (vmr still works fine). Could somebody please look at this or implement i420 format for dshow? Thanks, Thomas
Created attachment 169007 [details] [review] I420-Patch
Created attachment 169011 [details] [review] Add support for I420 Added patch in git format for review.
Review of attachment 169011 [details] [review]: ::: sys/dshowvideosink/dshowvideofakesrc.cpp @@ -171,3 +174,3 @@ srcstride = GST_ROUND_UP_4 ( GST_ROUND_UP_2 (vh->rcSource.right) / 2); else { - if (component == 1) + if (I420) { In line 160, so should check for YV12 and I420. Here, check the format using the 'fourcc' variable. ::: sys/dshowvideosink/dshowvideofakesrc.h @@ +24,3 @@ #include <gst/gst.h> + +bool I420; The 'subtype' variable should be used here. ::: sys/dshowvideosink/dshowvideosink.cpp @@ +1433,3 @@ + "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'V', '1', '2'), NULL); + caps = gst_caps_new_simple ("video/x-raw-yuv", + else if (IsEqualGUID (mediatype->subtype, MEDIASUBTYPE_I420)) The fourcc should be I420 here @@ +1544,3 @@ bpp = 16; + I420 = 1; + case GST_MAKE_FOURCC ('I', '4', '2', '0'): You can use mediatype->subtype for this
Seeing that this is a regression it would have been nice if whoever broke it would have put some effort into fixing this in time for the release. But seeing that we still don't have a good enough patch, I don't really want to wait now and delay the release even further. Marking as blocker for the next release though.
This element has never supported I420, so it's not a regression. Thomas's patch was never applied upstream because, AFAIK, he didn't open a bug for it, but only attached the patch in the ML
> This element has never supported I420, so it's not a regression. > Thomas's patch was never applied upstream because, AFAIK, he didn't open a bug > for it, but only attached the patch in the ML Ah, I misunderstood, sorry. Let's mark this as enhancement then :)
Yes, Andoni is right. I've never made the patch public before because i know it was quick and dirty. Did the same for directdrawsink. ;-) Would be great to see i420, because yv12 is the same (with swapped planes) and there is no need for an extra colorspace conversion element which produces unnecessary cpu load...
Any news about this or really nobody here who can add support for i420 in dshow?
Any news on this?
Automated removal of (bad) usage of the "NONE" target milestone.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/24.