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