| Index: patches/to_upstream/18_respect_swscale.patch
|
| ===================================================================
|
| --- patches/to_upstream/18_respect_swscale.patch (revision 0)
|
| +++ patches/to_upstream/18_respect_swscale.patch (revision 0)
|
| @@ -0,0 +1,64 @@
|
| +diff -wurp -N orig/cmdutils.c ffmpeg-mt/cmdutils.c
|
| +--- orig/cmdutils.c 2010-11-04 08:11:38 -0700
|
| ++++ ffmpeg-mt/cmdutils.c 2010-11-04 08:11:46 -0700
|
| +@@ -32,7 +32,9 @@
|
| + #include "libavformat/avformat.h"
|
| + #include "libavfilter/avfilter.h"
|
| + #include "libavdevice/avdevice.h"
|
| ++#if CONFIG_SWSCALE
|
| + #include "libswscale/swscale.h"
|
| ++#endif
|
| + #include "libpostproc/postprocess.h"
|
| + #include "libavutil/avstring.h"
|
| + #include "libavutil/pixdesc.h"
|
| +@@ -53,7 +55,9 @@ const char **opt_values;
|
| + static int opt_name_count;
|
| + AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
| + AVFormatContext *avformat_opts;
|
| ++#if CONFIG_SWSCALE
|
| + struct SwsContext *sws_opts;
|
| ++#endif
|
| +
|
| + const int this_year = 2010;
|
| +
|
| +@@ -63,7 +67,9 @@ void init_opts(void)
|
| + for (i = 0; i < AVMEDIA_TYPE_NB; i++)
|
| + avcodec_opts[i] = avcodec_alloc_context2(i);
|
| + avformat_opts = avformat_alloc_context();
|
| ++#if CONFIG_SWSCALE
|
| + sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL);
|
| ++#endif
|
| + }
|
| +
|
| + void uninit_opts(void)
|
| +@@ -73,7 +79,9 @@ void uninit_opts(void)
|
| + av_freep(&avcodec_opts[i]);
|
| + av_freep(&avformat_opts->key);
|
| + av_freep(&avformat_opts);
|
| ++#if CONFIG_SWSCALE
|
| + av_freep(&sws_opts);
|
| ++#endif
|
| + }
|
| +
|
| + void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
|
| +@@ -225,8 +233,10 @@ int opt_default(const char *opt, const c
|
| + }
|
| + if(!o && avformat_opts)
|
| + ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
|
| ++#if CONFIG_SWSCALE
|
| + if(!o && sws_opts)
|
| + ret = av_set_string3(sws_opts, opt, arg, 1, &o);
|
| ++#endif
|
| + if(!o){
|
| + if(opt[0] == 'a')
|
| + ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
|
| +@@ -390,7 +400,9 @@ static void print_all_libs_info(FILE* ou
|
| + PRINT_LIB_INFO(outstream, avformat, AVFORMAT, flags);
|
| + PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags);
|
| + PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags);
|
| ++#if CONFIG_SWSCALE
|
| + PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags);
|
| ++#endif
|
| + PRINT_LIB_INFO(outstream, postproc, POSTPROC, flags);
|
| + }
|
| +
|
|
|