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
xbmc.bin is 0
I found this interesting thread at AVS forum. Where someone succesfully having "killa sample" playing with 70% core utilization with Fedora Core 10 and the new 2.6.27-9 kernel. Maybe there is light...

Unfortunatelly i am totally not familiar with Fedora and rpm package management. Can someone try it out if it's really working there ?

This case i think we can really narrow down the problem.

Link: http://www.avsforum.com/avs-vb/showthrea...st15378996
Fedora 10, with updates, and Nvidia 177.82, and SVN XBMC has exactly the same problem... uname -r reports...

2.6.27.9-159.fc10.i686

Edit: The guy in the thread you mentioned is running an Intel CPU, im still wondering if this is an AMD only thing.

Edit2: Found a workaround. Line 152 in xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp reads like this...

PHP Code:
int num_threads std::min(/*MAX_THREADS*/g_cpuInfo.getCPUCount()); 

Change it to this...

PHP Code:
int num_threads std::min(/*MAX_THREADS*/g_cpuInfo.getCPUCount()+2); 

and you should find it using much more CPU, also I found a fairly significant reduction in dropped frames.
No i am having same issues with intel core 2 duo e8400. No

I am really clueless again.
motd2k Wrote:
PHP Code:
int num_threads std::min(/*MAX_THREADS*/g_cpuInfo.getCPUCount()+2); 

and you should find it using much more CPU, also I found a fairly significant reduction in dropped frames.

Thanks, i will test it tonight.
I've just read on Phoronix, that FFMPEG gets mainline VDPAU support. If this could maybe implemented into XBMC than we won't have to worry about multithreaded decoding at all Wink

http://www.phoronix.com/scan.php?page=ne...&px=Njk3MQ
And a simple search on these forums would have found you a thread dedicated to a discussion on vpdau.

Just search for : vpdau.

Magic Smile

If you want more specifics about the technical difficulties, here you go:

http://forum.xbmc.org/showpost.php?p=264...tcount=168
motd2k Wrote:Edit2: Found a workaround. Line 152 in xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp reads like this...

PHP Code:
int num_threads std::min(/*MAX_THREADS*/g_cpuInfo.getCPUCount()); 

Change it to this...

PHP Code:
int num_threads std::min8 /*MAX_THREADS*/g_cpuInfo.getCPUCount()+2); 

and you should find it using much more CPU, also I found a fairly significant reduction in dropped frames.

Did you just do this to the file in your ~/XBMC directory or did you recompile after that?
Of course you need to recompile. That is XBMC source code.
I'm already using a build compiled from source. I didn't use synaptic to install. Can I jus make + make install on top of it or do I have to remove the old install?
tslayer Wrote:If you want more specifics about the technical difficulties, here you go:

http://forum.xbmc.org/showpost.php?p=264...tcount=168

Yes. I know. And sorry that i can not contrubute to XBMC by coding. I really would like to, but have no time and knowledge. I make donations to at least help out developement because i think this really IS the best htpc software out and i want to help as much as i can to make it better.

I know the implementation has difficulities, but as it stands now, with the new kernels for problem-free playback of 1080p content we need some 4ghz cpu to decode the stream (at least if i try killa sample or the Dark Knight BD-rip) and in this case we can't even use any post processing or HD audio decoding.
I think it is not very ideal when someone wants to build a silent htpc for living room.

If at least we could have the same software decoding performance as we have under XBMC running on windows (perfectly even core utilization) than we might be good with a 3Ghz Core 2 Duo processor.
alanwww1

Were you able to try, what motd2k suggested?
Sorry it was 3am i finished compile and ran a test on latest Jaunty kernel, but i have some other problem there, because i have 30% CPU usage when i am on main screen doing nothing. I think it is Video card related as the nvidia properiaty drivers are not yet been recompiled for the new xorg Jaunty has.

So i have to make a real test on Intrepid, but i am at work now, so i can only make it in the evening.

I will instantly inform the forum about the results. I really really hope it works. At least than we will know that there could be some ffmpeg compillation options which need to be tuned for the newer kernels.

Thanks for everyone helping out here, specially the Devs who make excellent work !
Ehem...please check cpu load distribution in top, it's 50/50 to ~60/40 all of the time.

1. Start top in a terminal
2. Press '1' for SMP mode, 'H' to show threads, '>' until "COMMAND" is the sort column.
3. Start XBMC and play your favorite video showing the "bug".

So something is just funky in the CPU load detection as someone else mentioned earlier. This doesn't resolve why playback is so crappy on Intrepid though.
I noticed CPU throttling management sucks in Intrepid. I get dropped frames when using software upscaling if the CPU mode is set on "ondemand". The CPU load doesn't go anywhere near 100%, and it stays throttled, at doesn't kick up to speed even if frames are dropped.

If set the power mode to performance, CPU usage drops, and the frame drops stop.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22