Unified · Split
| @@ -1531,16 +1531,16 @@ frei0r_src_filter_extralibs='$ldl' · 1530 unmodified lines | ||
| 1531 | 1531 | hqdn3d_filter_deps="gpl" |
| 1532 | 1532 | resample_filter_deps="avresample" |
| 1533 | 1533 | ocv_filter_deps="libopencv" |
| 1534 | +scale_filter_deps="swscale" | |
| 1534 | 1535 | yadif_filter_deps="gpl" |
| 1535 | 1536 | |
| 1536 | 1537 | # libraries |
| 1537 | 1538 | avdevice_deps="avcodec avformat" |
| 1538 | −avfilter_deps="swscale" | |
| 1539 | 1539 | avformat_deps="avcodec" |
| 1540 | 1540 | |
| 1541 | 1541 | # programs |
| 1542 | 1542 | avconv_deps="avcodec avfilter avformat avresample swscale format_filter |
| 1543 | − setpts_filter" | |
| 1543 | + scale_filter setpts_filter" | |
| 1544 | 1544 | avplay_deps="avcodec avformat swscale sdl" |
| 1545 | 1545 | avplay_select="rdft" |
| 1546 | 1546 | avprobe_deps="avcodec avformat" |
| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | NAME = avfilter |
| 2 | −FFLIBS = avutil swscale | |
| 2 | +FFLIBS = avutil | |
| 3 | 3 | FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample |
| 4 | 4 | FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec |
| 5 | 5 | FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample |
| 6 | +FFLIBS-$(CONFIG_SCALE_FILTER) += swscale | |
| 6 | 7 | |
| 7 | 8 | HEADERS = avfilter.h \ |
| 8 | 9 | avfiltergraph.h \ |
| @@ -63,6 +64,7 @@ OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o · 54 unmodified lines | ||
| 63 | 64 | OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o |
| 64 | 65 | OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o |
| 65 | 66 | OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o |
| 67 | +OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o | |
| 66 | 68 | OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o |
| 67 | 69 | OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o |
| 68 | 70 | OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o |
| @@ -73,6 +73,7 @@ void avfilter_register_all(void) · 72 unmodified lines | ||
| 73 | 73 | REGISTER_FILTER (OVERLAY, overlay, vf); |
| 74 | 74 | REGISTER_FILTER (PAD, pad, vf); |
| 75 | 75 | REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf); |
| 76 | + REGISTER_FILTER (SCALE, scale, vf); | |
| 76 | 77 | REGISTER_FILTER (SELECT, select, vf); |
| 77 | 78 | REGISTER_FILTER (SETDAR, setdar, vf); |
| 78 | 79 | REGISTER_FILTER (SETPTS, setpts, vf); |
| @@ -113,8 +114,4 @@ void avfilter_register_all(void) · 34 unmodified lines | ||
| 113 | 114 | extern AVFilter avfilter_asink_abuffer; |
| 114 | 115 | avfilter_register(&avfilter_asink_abuffer); |
| 115 | 116 | } |
| 116 | − { | |
| 117 | − extern AVFilter avfilter_vf_scale; | |
| 118 | − avfilter_register(&avfilter_vf_scale); | |
| 119 | − } | |
| 120 | 117 | } |
| @@ -213,11 +213,16 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 212 unmodified lines | ||
| 213 | 213 | /* couldn't merge format lists. auto-insert conversion filter */ |
| 214 | 214 | switch (link->type) { |
| 215 | 215 | 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 | + | |
| 216 | 222 | snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d", |
| 217 | 223 | scaler_count++); |
| 218 | 224 | 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, | |
| 221 | 226 | inst_name, scale_args, NULL, |
| 222 | 227 | graph)) < 0) |
| 223 | 228 | return ret; |