diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-13 10:10:31 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-06-13 13:57:47 +0200 |
commit | 2f296e39a17cd947c6675c20ff61a2d993ff0de2 (patch) | |
tree | 48381cb324a199ef704c34ec86d433a4bc6abe13 | |
parent | a48802836261082be8fe3d809e9e788f50620536 (diff) | |
download | ffmpeg-2f296e39a17cd947c6675c20ff61a2d993ff0de2.tar.gz |
lavfi: allow building without swscale.
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | libavfilter/Makefile | 4 | ||||
-rw-r--r-- | libavfilter/allfilters.c | 5 | ||||
-rw-r--r-- | libavfilter/avfiltergraph.c | 9 |
4 files changed, 13 insertions, 9 deletions
@@ -1531,16 +1531,16 @@ frei0r_src_filter_extralibs='$ldl' hqdn3d_filter_deps="gpl" resample_filter_deps="avresample" ocv_filter_deps="libopencv" +scale_filter_deps="swscale" yadif_filter_deps="gpl" # libraries avdevice_deps="avcodec avformat" -avfilter_deps="swscale" avformat_deps="avcodec" # programs avconv_deps="avcodec avfilter avformat avresample swscale format_filter - setpts_filter" + scale_filter setpts_filter" avplay_deps="avcodec avformat swscale sdl" avplay_select="rdft" avprobe_deps="avcodec avformat" diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 7e1a6d1209..955a97cafb 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -1,8 +1,9 @@ NAME = avfilter -FFLIBS = avutil swscale +FFLIBS = avutil FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample +FFLIBS-$(CONFIG_SCALE_FILTER) += swscale HEADERS = avfilter.h \ avfiltergraph.h \ @@ -63,6 +64,7 @@ OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o +OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 681487118b..118f09d057 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -73,6 +73,7 @@ void avfilter_register_all(void) REGISTER_FILTER (OVERLAY, overlay, vf); REGISTER_FILTER (PAD, pad, vf); REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf); + REGISTER_FILTER (SCALE, scale, vf); REGISTER_FILTER (SELECT, select, vf); REGISTER_FILTER (SETDAR, setdar, vf); REGISTER_FILTER (SETPTS, setpts, vf); @@ -113,8 +114,4 @@ void avfilter_register_all(void) extern AVFilter avfilter_asink_abuffer; avfilter_register(&avfilter_asink_abuffer); } - { - extern AVFilter avfilter_vf_scale; - avfilter_register(&avfilter_vf_scale); - } } diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 4521f790f7..0a863e569c 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -213,11 +213,16 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) /* couldn't merge format lists. auto-insert conversion filter */ switch (link->type) { case AVMEDIA_TYPE_VIDEO: + if (!(filter = avfilter_get_by_name("scale"))) { + av_log(log_ctx, AV_LOG_ERROR, "'scale' filter " + "not present, cannot convert pixel formats.\n"); + return AVERROR(EINVAL); + } + snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d", scaler_count++); snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts); - if ((ret = avfilter_graph_create_filter(&convert, - avfilter_get_by_name("scale"), + if ((ret = avfilter_graph_create_filter(&convert, filter, inst_name, scale_args, NULL, graph)) < 0) return ret; |