View Full Version : encraw threading
Ac3Dc3
12th July 2006, 13:21
Hi-
does anybody know the current state of multi-threading in xvid_encraw?
im trying to use it on an HT P4 PC but the it always tells me "detected 0 cpus" and even with the -threads 2 option my cpu usage never goes over 50%. also, the latest vfw builds work fine with multiple threads on this PC
im using the Mar 17 2006 build by squid_80
i couldnt find much info in the encraw forum thread on this issue, so any advice would be great
Ac3Dc3.
celtic_druid
12th July 2006, 13:42
Works fine here. Detects 2 CPU's and uses 2 threads. CPU usage ~90%. Then again I actually have two physical cores.
Using current cvs of both encraw and xvidcore.
Sharktooth
12th July 2006, 14:44
there may be problems with HT...
Ac3Dc3
12th July 2006, 22:14
celtic_druid, would it be possible for you to upload that compiled executable you are using? i'd like to check off one variable, even though it doesnt look like much has been updated
and yeah, it definately looks like a hyper-threading related problem.. but why does vfw encoding work with multiple threads on an HT system, but not the raw encoder?
kurt
12th July 2006, 23:15
here you go for celtic_druids recent xvid builds
http://tirnanog.fate.jp/mirror/XviD/
Sharktooth
13th July 2006, 02:50
and yeah, it definately looks like a hyper-threading related problem.. but why does vfw encoding work with multiple threads on an HT system, but not the raw encoder?
I heard another user having issues with encraw and HT.
shpitz
13th July 2006, 04:54
happened to me as well, turned out i had an older xvid build that didn't support threading.
just get the latest xvid build and you should be ok, it has nothing to do with encraw, it's the xvid build that causes the problem.
squid_80
13th July 2006, 11:42
It is perhaps remotely possible that the encraw<->xvidcore interface is screwing up, since when encraw is built it links statically to xvidcore's import library. In theory this can cause problems if your copy of xvidcore.dll doesn't match this import library exactly, but I'm yet to see this happen. What does encraw say about the xvidcore build version, so we can determine if it actually is a build that supports multi-threading?
Ac3Dc3
13th July 2006, 12:35
thanks for the link kurt and im not sure how to pull that info up, squid_80
i replaced xvidcore.dll and xvid_encraw.exe with the latest versions from celtic_druid and now it detects 2 cpus and tells me its using 2 threads automatically. but my cpu usage still remains at 50%
re the matching of the import library, i dont remember from what build the core.dll i was using was from, but i know for sure i could max out my cpu usage via vfw
also, whats up with the standard error from xvid_encraw? looking at xvid_encraw.c, it seems like regular fprintf(stderr... code, but i cant seem to redirect it properly
squid_80
13th July 2006, 12:45
Maxing out the cpu usage doesn't necessarily mean you're getting the best performance, especially on a HT CPU. Better to measure the FPS or total time with and without multiple threads.
To redirect stderr messages put 2 before >, e.g. "xvid_encraw -i input.avs 2>output.txt"
Ac3Dc3
13th July 2006, 15:17
yeah, i know, although it definately means is that more than one thread is in use..
and about the italics in the post above, it seems that it only stays at 50% for the first pass - the second pass is fine. i get around 40fps using turbo on the first pass, so i'm not that worried about it but do you know why it would limit itself to that?
thanks for the stderr tip, 2>output.txt works great from the command prompt. im also trying to get a .Net app to read it and something ain't right.. i have posted here (http://forum.doom9.org/showthread.php?t=113579) about that problem
shpitz
13th July 2006, 16:41
squid, any new x64 builds by any chance?
thanks
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.