History

lavfi: allow building without swscale.

Anton Khirnov committed 14 years ago

Commit 2f296e31 parent a4880284 files · +13 −9Browse files

Unified · Split

4 files
  1. configure +2 −2
  2. libavfilter/Makefile +3 −1
  3. libavfilter/allfilters.c +1 −4
  4. libavfilter/avfiltergraph.c +7 −2
configure+2−2
@@ -1531,16 +1531,16 @@ frei0r_src_filter_extralibs='$ldl' · 1530 unmodified lines
15311531 hqdn3d_filter_deps="gpl"
15321532 resample_filter_deps="avresample"
15331533 ocv_filter_deps="libopencv"
1534+scale_filter_deps="swscale"
15341535 yadif_filter_deps="gpl"
15351536
15361537 # libraries
15371538 avdevice_deps="avcodec avformat"
1538−avfilter_deps="swscale"
15391539 avformat_deps="avcodec"
15401540
15411541 # programs
15421542 avconv_deps="avcodec avfilter avformat avresample swscale format_filter
1543− setpts_filter"
1543+ scale_filter setpts_filter"
15441544 avplay_deps="avcodec avformat swscale sdl"
15451545 avplay_select="rdft"
15461546 avprobe_deps="avcodec avformat"
libavfilter/Makefile+3−1
@@ -1,8 +1,9 @@
11 NAME = avfilter
2−FFLIBS = avutil swscale
2+FFLIBS = avutil
33 FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample
44 FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec
55 FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample
6+FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
67
78 HEADERS = avfilter.h \
89 avfiltergraph.h \
@@ -63,6 +64,7 @@ OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o · 54 unmodified lines
6364 OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o
6465 OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o
6566 OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
67+OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o
6668 OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o
6769 OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o
6870 OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o
libavfilter/allfilters.c+1−4
@@ -73,6 +73,7 @@ void avfilter_register_all(void) · 72 unmodified lines
7373 REGISTER_FILTER (OVERLAY, overlay, vf);
7474 REGISTER_FILTER (PAD, pad, vf);
7575 REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
76+ REGISTER_FILTER (SCALE, scale, vf);
7677 REGISTER_FILTER (SELECT, select, vf);
7778 REGISTER_FILTER (SETDAR, setdar, vf);
7879 REGISTER_FILTER (SETPTS, setpts, vf);
@@ -113,8 +114,4 @@ void avfilter_register_all(void) · 34 unmodified lines
113114 extern AVFilter avfilter_asink_abuffer;
114115 avfilter_register(&avfilter_asink_abuffer);
115116 }
116− {
117− extern AVFilter avfilter_vf_scale;
118− avfilter_register(&avfilter_vf_scale);
119− }
120117 }
libavfilter/avfiltergraph.c+7−2
@@ -213,11 +213,16 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 212 unmodified lines
213213 /* couldn't merge format lists. auto-insert conversion filter */
214214 switch (link->type) {
215215 case AVMEDIA_TYPE_VIDEO:
216+ if (!(filter = avfilter_get_by_name("scale"))) {
217+ av_log(log_ctx, AV_LOG_ERROR, "'scale' filter "
218+ "not present, cannot convert pixel formats.\n");
219+ return AVERROR(EINVAL);
220+ }
221+
216222 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
217223 scaler_count++);
218224 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
219− if ((ret = avfilter_graph_create_filter(&convert,
220− avfilter_get_by_name("scale"),
225+ if ((ret = avfilter_graph_create_filter(&convert, filter,
221226 inst_name, scale_args, NULL,
222227 graph)) < 0)
223228 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t