Kodi Community Forum

Full Version: No multithreaded Video decoding on XBMC INTREPID version (in-depth testing)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
alanwww1 Wrote:Hey guys !

This works really well. Big Grin

i just tested the Dark Knight file with a 2Ghz C2D it was dropping frames in every sec. After running this line it works like charm. No dropped frames and even CPU load.

Great work and thanks everyone contributed to the solution. Now there's absolutely no need to stuck with Hardy anymore.

Ok now we gotta have someone submit this "fix" to the linux kernel. Seems they were the problem that caused this. At the very least, Ubuntu could apply this fix to their kernel sources.
althekiller Wrote:
Code:
for i in /proc/sys/kernel/sched_domain/*; do echo $(( `cat "$i/domain0/flags"` | 16 )) > "$i/domain0/flags"; done

Try to run that as root, it allows the kernel to wake idle CPUs when a thread that was running on them awakes. Apparently the kernel gods say it's too aggressive on multicore CPUs, some cache affinity blah blah blah... It alleviates most of the problems I've seen, if it works for you, do it. Credit to theuni for bisecting the kernel to find the change that caused all of this, and bobo1on1 for digging up the procfs tunable.

Just some more anecdotal evidence... this worked a charm for me too, my AMD x2 5200 running Jaunty now plays every bit of 1080p I have thrown at it without any (visible) frame drops
Yeah just wanna say fixed for me too
I wonder if the kernel developers somehow got the algorithms backwards, it makes sense to move all threads to one core and put the other one to sleep when the load is low, we're seeing the exact opposite here.
When I run that command as root on jaunty i see no difference. The load is still uneven.
Not all videos can be decoded with multithreading.
Okej. But none of my movies gets decoded with even load. I see absolutely no difference with this "hack".
butchjr Wrote:Okej. But none of my movies gets decoded with even load. I see absolutely no difference with this "hack".

butchjr, I had to add the commands to a shell script and run it as root - made no difference for me just pasting into a terminal window and running as root.

E.g. create a file called multithreadfix.sh, then paste the following in:

Code:
#!/bin/sh

for i in /proc/sys/kernel/sched_domain/*; do echo $(( `cat "$i/domain0/flags"` | 16 )) > "$i/domain0/flags"; done

save and then run by:
sudo multithreadfix.sh
ads_german: Thanks, now I've got even load when playing HD movies.

But it's still very uneven when playing xvid,divx and dvd. But I guess they don't use both cores?

I've got 1% and 80% with Xvid with Sinc upscaling. And framedropps with Sinc and DVD.
Only h264 can be decoded in multiple threads. Disable HQ SW upscaling, all it does is kill the CPU.
althekiller Wrote:Only h264 can be decoded in multiple threads. Disable HQ SW upscaling, all it does is kill the CPU.

Maybe i see something wrong, but i sense a huge quality difference with hq sw upscaler when i play SD videos at full hd resolution.
hmm, i just noticed this fix doesn't seem to persist after a reboot. easy enough to run it at boot, but can anyone confirm whether they have found a way to have the change persist without running the command each time the machine boots?

Cheers,
adam.
Put it in /etc/rc.local.
alanwww1 Wrote:Maybe i see something wrong, but i sense a huge quality difference with hq sw upscaler when i play SD videos at full hd resolution.

You noticed improvements when you messed with the cache settings too, didn't you? It's pretty much placebo, though these settings are actually hooked up. The main point is, the costs far outweigh the benefits, as you have noticed.
althekiller Wrote:You noticed improvements when you messed with the cache settings too, didn't you? It's pretty much placebo, though these settings are actually hooked up. The main point is, the costs far outweigh the benefits, as you have noticed.

That is true. The improvements are only hardly visible, specially when there are straight diagonal lines where one can see the pixels. I aggree that just for this there is no sense buying a faster CPU. But if you own one, i sugggest turning it on.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22