diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-05-26 07:39:19 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-05-26 07:39:19 +0000 |
commit | 2b248e29ffeae551331b0f72835f3e70506e7a57 (patch) | |
tree | 48caad39c7f571dc8ff2055dfa2b9904d12c9b27 /ext/ffmpeg/gstffmpegcodecmap.c | |
parent | a24ce03f75a819f664497ec03a83234418cbc579 (diff) |
Use av_picture_copy() instead of libswscale to copy pictures. This removes the swscale dependency and is faster. Fixe...
Original commit message from CVS:
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.
Diffstat (limited to 'ext/ffmpeg/gstffmpegcodecmap.c')
-rw-r--r-- | ext/ffmpeg/gstffmpegcodecmap.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index d4c17a3..9a3fe83 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -25,9 +25,7 @@ #include <gst/gst.h> #ifdef HAVE_FFMPEG_UNINSTALLED #include <avcodec.h> -#include <libswscale/swscale.h> #else -#include <ffmpeg/swscale.h> #include <ffmpeg/avcodec.h> #endif #include <string.h> @@ -3287,29 +3285,3 @@ gst_ffmpeg_avpicture_fill (AVPicture * picture, return 0; } - -/** - * Convert image 'src' to 'dst'. - * - * We use this code to copy two pictures between the same - * colorspaces, so this function is not realy used to do - * colorspace conversion. - * The ffmpeg code has a bug in it where odd sized frames were - * not copied completely. We adjust the input parameters for - * the original ffmpeg img_convert function here so that it - * still does the right thing. - */ -int -gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt, - const AVPicture * src, int src_pix_fmt, int src_width, int src_height) -{ - struct SwsContext *ctx; - int res; - - ctx = sws_getContext (src_width, src_height, src_pix_fmt, src_width, src_height, dst_pix_fmt, 2, /* flags : bicubic */ - NULL, NULL, NULL); - res = sws_scale (ctx, (uint8_t **) src->data, (int *) src->linesize, - 2, src_width, dst->data, dst->linesize); - sws_freeContext (ctx); - return res; -} |