Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6986 closed defect (invalid)

max CPUs setting for Multithreading ffmpeg h264 has no affect.

Reported by: reidjr_at_lineone_net Owned by: Isaac Richards
Priority: major Milestone: unknown
Component: MythTV - General Version: head
Severity: medium Keywords: multithread h264
Cc: Ticket locked: no

Description

Setting max CPUs no longer allows multi-threading on playback of BBC-HD.

I was updating my loop-filter skipping patch for trunk, #4653 and while testing it I noticed that without the patch, I was seeing only 1 core of my core2duo e4300 used.

The strange thing is that the patch has not been incorperated, but the multi threaded support is there. I've updated the patch for trunk. Without the patch, multithreading h264 doesnt work, whatever you set max CPUs to. With the patch Setting the loopfilter option to off, doesn't save any overall cpu load, but does allow multithreading to work. Looks like either ffmpeg or underlying code has changed, as the overall cpu load is comparible to the performance I used to see with the loopfilter disabled.

So the behaviour I saw was : using trunk 21651:

Max cpu = 1 result single threaded 90% cpu load

Max cpu = 2 result single threaded 90% cpu load

using trunk 21651 with enc>skiploop = AVDISCARD_ALL added to avformatdecoder.cpp:

Max cpu = 1 result single threaded 90% cpu load

Max cpu = 2 result multi threaded 45% x 2 cpu load

So no overall reduction, but multi-threading works.

Change History (2)

comment:1 Changed 10 years ago by Janne Grunau

Milestone: unknown
Resolution: invalid
Status: newclosed

slice based multi threading requires disabled or not slice spanning loop filter.

so this is a known limitation and I close this as feature request without patch. it will be fixed when frame based multithreading is merged to ffmpeg.

comment:2 in reply to:  1 Changed 10 years ago by anonymous

Replying to janne:

slice based multi threading requires disabled or not slice spanning loop filter.

so this is a known limitation and I close this as feature request without patch. it will be fixed when frame based multithreading is merged to ffmpeg.

Thanks for the clarification. Patch to disable the loop filter is attached to #4653

Note: See TracTickets for help on using tickets.