-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VideoPlayer: init ffmpeg threads like LAVFilters does #9899
Conversation
is this related to http://forum.kodi.tv/showthread.php?tid=277724? |
@afedchin yes - that should allow up to 16 threads, while av_cpu_count returns the number of logical cores. E.g. 8 on a i7 quad core. The *3 / 2 most likely was found by cpuload testing as it seems the decoder does not fully use the cpu cores. So running 50% more most likely has increased performance. |
@fritsch thanks for clarification. |
jenkins build this please |
can remove #if defined(TARGET_POSIX) || defined(TARGET_WINDOWS) |
on my list |
fixed for android |
@MrMC av_cpu_count <- does not work correctly or does it ignore sleeping CPUs which are not usable afterwards anyways? |
av_cpu_count only counts active cpus (for android). With the change, sleeping cpus will be woken and used. Tested under a quad. |
that means, not quite working on linux if hotplug cpu scaling governor is used, too :) |
depends on if sched_getaffinity is present on linux and others. |
uh. it is available of course, but it wont count "inactive" cpus (hotplug, as said..) ;) however. I dont think it will be a big deal |
It can be a big deal depending on cpus active at time of call. Leads to unpredictable behavior for sw decoding that depends now on how many cpus are active at the time of the call. If you have all spun up, then can handle resource hungry formats, if only one then same media will max decode and fall behind. |
ookay. then I guess hotplug will not be good choice anymore, I'll advice people switch back to ondemand. btw, I just tested it. while /proc/cpuinfo says "4 cpus", sched_getaffinity sees 3 right now (most of the time it sees 1, if kodi is idle) :) |
let's switch back to g_cpuInfo.getCPUCount() and multiply with 3 / 2 |
@FernetMenta most linux hw/distributions do not use hotplug, it's just wetek (and maybe some chineses) who do afaik. hotplug is not even available on mainline kernels. so up to you :) |
… fix for android
see title