GNOME Bugzilla – Bug 699181
video: Add API for GstVideoFrame based scaling/conversion and use in videoscale/videoconvert
Last modified: 2014-09-23 20:22:00 UTC
There are times when a videofilter developer wants to work with a temporary downscaled copy of a frame or a scale pyramid. While image scaling is not complicated in theory, it is one of those things that is fiddly in practice. Ad-hoc implementations are unlikely to be simultaneously fast and correct. One solution would be to borrow an implementation from somewhere, but that involves tedious searching and integration. Borrowing the videoscale code at source level looks simple (the scaling parts seem to be fairly well separated from the Element parts) but require use of the orc compiler which is something of an adoption barrier. So I think it would be a good idea to expose the core image scaling functions as a plugins-base library, along the lines of the FFT library.
Yes, it should be part of libgstvideo. The conversion functions (i.e. videoconvert) is already accessible via that library, scaling would be another useful general purpose operation. Just needs someone to do it :) (And the same goes for audioconvert/audioresample routines and other things for audio, and videomixer/etc)
Along these lines, the videoscale routines to fill a frame buffer with a given color could become library routines too. Filling a buffer with a given color is not trivial either when we consider different possible pixel formats. I've found a couple of bugs of this kind in just a week of GStreamer acquaintance: https://bugzilla.gnome.org/show_bug.cgi?id=710392 https://bugzilla.gnome.org/show_bug.cgi?id=711003 I hope this is not too much OT :) Maybe this could be proposed as a GSoC thing? Thanks, Antonio
Indeed, that would be useful too. As discussed at GstConf it would make most sense to provide some kind of API that handles video conversion and scaling in one and is based on GstVideoFrame for the input and output.
*** This bug has been marked as a duplicate of bug 732415 ***