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 534390 - Patch: use av_picture_copy instead of swscale to copy pictures
Patch: use av_picture_copy instead of swscale to copy pictures
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
0.10.4
Other Linux
: Normal normal
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-22 18:43 UTC by Hans de Goede
Modified: 2008-05-26 07:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch: use av_picture_copy instead of swscale to copy pictures (4.42 KB, patch)
2008-05-22 18:43 UTC, Hans de Goede
committed Details | Review

Description Hans de Goede 2008-05-22 18:43:19 UTC
This patch changes gst-ffmpeg to use av_picture_copy instead of swscale to copy pictures, using swscale to simply copy pictures is way overkill.

Note that with this patch the linking of libgstffmpeg.so to libswscale isn't needed anymore AFAIK, so that probably can be removed too.

Besides saving the overkill of swscale to simply copy the picture this alsso works around a bug in some version of swscale, which is exposed by using the system ffmpeg on Fedora. Normally I wouldn't dare mentioning the use of a system ffmpeg, but I'm very happy to see system ffmpeg related patches were accepted into 0.10.4 and that 0.10.4 now works well with newer ffmpeg snapshots.
Comment 1 Hans de Goede 2008-05-22 18:43:52 UTC
Created attachment 111357 [details] [review]
Patch: use av_picture_copy instead of swscale to copy pictures
Comment 2 Sebastian Dröge (slomo) 2008-05-22 19:50:39 UTC
Does av_picture_copy() handle stride changes?
Comment 3 Hans de Goede 2008-05-22 19:56:51 UTC
(In reply to comment #2)
> Does av_picture_copy() handle stride changes?
> 

I assume you mean that the source and dest stride are different, yes it handles that, see:
http://www.irisa.fr/texmex/people/dufouil/ffmpegdoxy/imgconvert_8c-source.html

For the source, where you can clearly see it does.
Comment 4 Sebastian Dröge (slomo) 2008-05-22 20:01:30 UTC
Great, then your patch(es) look fine. I'll commit them after gst-ffmpeg is unfrozen again...
Comment 5 Sebastian Dröge (slomo) 2008-05-26 07:38:59 UTC
2008-05-26  Sebastian Dröge  <slomo@circular-chaos.org>

        Patch by:
            Hans de Goede <j dot w dot r degoede at hhs dot nl>

        * configure.ac:
        * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_avpicture_fill):
        * ext/ffmpeg/gstffmpegcodecmap.h:
        * ext/ffmpeg/gstffmpegdec.c: (get_output_buffer):
        * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
        * ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_collected):
        Use av_picture_copy() instead of libswscale to copy pictures. This
        removes the swscale dependency and is faster. Fixes bug #534390.