[FFmpeg-devel] [PATCH v3] ffmpeg: parameters for filter thread counts
Marton Balint
cus at passwd.hu
Thu Nov 24 16:32:13 EET 2016
On Sun, 6 Nov 2016, Michael Niedermayer wrote:
> On Sun, Nov 06, 2016 at 09:20:33AM -0500, DeHackEd wrote:
>> On 11/06/2016 06:44 AM, Michael Niedermayer wrote:
>>> On Sun, Oct 30, 2016 at 09:25:39AM -0400, DeHackEd wrote:
>>> [...]
>>>
>>>> if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)
>>>> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
>>>> index 4d25fff..dc94380 100644
>>>> --- a/ffmpeg_opt.c
>>>> +++ b/ffmpeg_opt.c
>>>> @@ -3365,12 +3365,16 @@ const OptionDef options[] = {
>>>> "set profile", "profile" },
>>>> { "filter", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(filters) },
>>>> "set stream filtergraph", "filter_graph" },
>>>> + { "filter_threads", HAS_ARG | OPT_INT, { &filter_nbthreads },
>>>> + "number of non-complex filter threads" },
>>>> { "filter_script", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(filter_scripts) },
>>>> "read stream filtergraph description from a file", "filename" },
>>>> { "reinit_filter", HAS_ARG | OPT_INT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(reinit_filters) },
>>>> "reinit filtergraph on input parameter changes", "" },
>>>> { "filter_complex", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex },
>>>> "create a complex filtergraph", "graph_description" },
>>>> + { "filter_complex_threads", HAS_ARG | OPT_INT, { &filter_complex_nbthreads },
>>>> + "number of threads for -filter_complex" },
>>>> { "lavfi", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex },
>>>> "create a complex filtergraph", "graph_description" },
>>>> { "filter_complex_script", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex_script },
>>>
>>> why are there 2 options instead of 1 ?
>>>
>>
>> One affects -filter_complex filtergraphs, one affects -af and -vf filtergraphs...
>>
>> The main motivation was that you typically have one -filter_complex graph, but could have many -af and -vf filtergraphs,
>> so if you are trying to limit how many threads you use then you would have different needs depending on which type you
>> are using.
>
> ok, makes sense
>
> patch applied
>
It seems to me this patch disabled filter threading by default. Is this
intentional?
Thanks,
Marton
More information about the ffmpeg-devel
mailing list