Opened 7 years ago

Last modified 7 years ago

#2959 new enhancement

filter line using only one core (need frame multithreading)

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



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 Changed 7 years ago by cehoyos

  • Keywords avfilter threading removed

comment:2 Changed 7 years ago by Ck-NoSFeRaTU

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:

comment:3 Changed 7 years ago by chronek

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.