Opened 11 years ago

Last modified 11 years ago

#2959 new enhancement

filter line using only one core (need frame multithreading)

Reported by: mike Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello,

I am using ffmpeg version N-56143-gd1a1656, when i set threads 8 and trying reencode like : hi-res source -> filter (postprocesor,scale,unsharp,gradfun) -> output , then i see only one core is busy.
Adding frame multi-threading for whole filter line would be welcome, as that would allow filters that can't generally use slice threading to benefit of multiple cores like in my case

Change History (3)

comment:1 by Carl Eugen Hoyos, 11 years ago

Keywords: avfilter threading removed

comment:2 by Ck-NoSFeRaTU, 11 years ago

Yeah, it is a big problem, especially when one ffmpeg process doing multistep filter processing and many outputs at once, one core is not near enough... There were some patches in maillist about multithread support to filters, but they aren't compatible anymore:
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126188.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126189.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126238.html

comment:3 by mike, 11 years ago

i do not know if it is a good implementation , cause i am not a programist and i do not compile ffmpeg self, so can't check if it would help me , if it is not in official version it means it is not complete

I was thought of something like when call filter if it can operate on single frame it will buffor x frames , and run x threads each filtering one frame, so like:

source -> buffor -> filter1 -> filter2 -> buffor -> output
                 -> filter1 -> filter2 ->
                 -> filter1 -> filter2 ->

but not every filter can operate on sigle frame so maybe better would be :

source -> buffor -> filter1 -> buffor -> filter2 -> buffor -> filter3 -> buffor -> output
                 -> filter1 ->                             -> filter3 ->
Note: See TracTickets for help on using tickets.