Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th April 2009, 01:23   #1801  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Quote:
Originally Posted by LoRd_MuldeR View Post
Because testing showed that "threads = 3/2 * cores" works best. And that finding doesn't seem to be random at all

The intuitive solution "threads = cores" would only give optimal performance if no thread ever becomes idle (needs to wait for another thread).
still random. nearly 25% cpu% loss (total % for both cores) just with 2 threads instead of 3. With the same .bat file of course. So you effectively imply in this scenario either one thread is idle 50% of time of both threads idle 25% of time. Suboptimal?
Egh is offline   Reply With Quote
Old 5th April 2009, 01:36   #1802  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Egh View Post
still random. nearly 25% cpu% loss (total % for both cores) just with 2 threads instead of 3. With the same .bat file of course. So you effectively imply in this scenario either one thread is idle 50% of time of both threads idle 25% of time. Suboptimal?
I don't imply anything. I just say that in a "real life" application you cannot assume that threads are working 100% independently of each other. Threads need to synchronize now and then! And that means that any thread unavoidably will have some idle time while waiting for another thread. Also you must keep in mind that the "look ahead" part of x264 is not multi-threaded. Lookahead needs to run each time a new encoder thread is spawned. Now imagine you were running exactly four threads on a quadcore CPU. When the first thread/frame completes, only three encoder threads are left running in parallel. Now lookahead will need to run again before a new thread is spawned. With lookahead and the three encoder thread still all four cores are busy. But if the second thread/frame completes, while lookahead has not completed yet, only two threads are left running in parallel - one CPU core becomes idle. This easily explains why running more encoder threads than cores makes sense. Last but not least the multi-threading in x264 obviously is pretty optimal: When you configure the number of threads properly (cores * 3/2), then x264 will fully utilize a quadcore CPU and give ~4x speed of a single core.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 5th April 2009 at 01:54.
LoRd_MuldeR is offline   Reply With Quote
Old 5th April 2009, 05:58   #1803  |  Link
skystrife
Registered User
 
skystrife's Avatar
 
Join Date: Feb 2007
Posts: 176
x264 r1136 x64 (unpatched) - Alternate Download
gcc 4.3.4 fprofiled build.

-------------------------

x264.1136M.x86.exe - Alternate Download / x264.1136M.x64.exe - Alternate Download
gcc 3.4.5 fprofiled build with -march=pentium2. / gcc 4.3.4 fprofiled build.

Patches used:

x264_hrd_pulldown.11_interlace.diff
x264_win_zone_parse_fix_05.diff
skystrife is offline   Reply With Quote
Old 5th April 2009, 20:02   #1804  |  Link
techouse
Strictly Rhythm
 
techouse's Avatar
 
Join Date: Jul 2007
Location: Ljubljana, Slovenia
Posts: 166
x264_x86_r1136_techouse | INFO
GCC 4.3.3, fprofiled, -march=core2

x264_x64_r1136_techouse | INFO
GCC 4.3.4 20090328 (prerelease) (x64.generic.Komisar), fprofiled, -march=core2

Patches used:

x264_hrd_pulldown.11_interlace.diff
x264_win_zone_parse_fix_05.diff
__________________
techouse is offline   Reply With Quote
Old 7th April 2009, 05:27   #1805  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
According to the GIT, the last patch was added 32 hours ago (faster CABAC RDO), and yet there are no 1137 builds...

www.x264.nl doesn't seem to be autoupdating it, at least quickly?...
burfadel is offline   Reply With Quote
Old 7th April 2009, 06:04   #1806  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by burfadel View Post
According to the GIT, the last patch was added 32 hours ago (faster CABAC RDO), and yet there are no 1137 builds...

www.x264.nl doesn't seem to be autoupdating it, at least quickly?...
the latest patch wasn't released until 5 hours ago.
the devs often keep the patches locally for testing and only push to the global repository after testing is complete.
however the times are from the local repository, not from the global.

if you want the actual times it hits the global, you can check the x264-devel mailing list for subjects that start with 'commit: '
like r1137

as for x264.nl it could either be on hold or there was a problem somewhere.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 7th April 2009, 06:25   #1807  |  Link
skystrife
Registered User
 
skystrife's Avatar
 
Join Date: Feb 2007
Posts: 176
x264 r1137 x64 (unpatched) - Alternate Download
gcc 4.3.4 fprofiled build.

-------------------------

x264.1137M.x86.exe - Alternate Download / x264.1137M.x64.exe - Alternate Download
gcc 3.4.5 fprofiled build with -march=pentium2. / gcc 4.3.4 fprofiled build.

Patches used:

x264_hrd_pulldown.11_interlace.diff
x264_win_zone_parse_fix_05.diff
skystrife is offline   Reply With Quote
Old 7th April 2009, 07:00   #1808  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Quote:
Originally Posted by kemuri-_9 View Post
the latest patch wasn't released until 5 hours ago.
the devs often keep the patches locally for testing and only push to the global repository after testing is complete.
however the times are from the local repository, not from the global.

if you want the actual times it hits the global, you can check the x264-devel mailing list for subjects that start with 'commit: '
like r1137

as for x264.nl it could either be on hold or there was a problem somewhere.

Ah ok! that makes sense
burfadel is offline   Reply With Quote
Old 8th April 2009, 17:34   #1809  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
Serious Corrupt Problem

I'm getting this on Phenom with latest

Quote:
x264.1137M.x86.exe --pass 1 --bitrate 1270 --stats ".stats" --progress --keyint 250 --bframes 16 --qpmin 10 --qpmax 51 --aq-mode 0 --psy-rd 0.8:0 --no-psnr --no-ssim --no-fast-pskip --mixed-refs --b-adapt 0 --trellis 2 --ref 9 --no-deblock --subme 7 --direct auto --me umh --merange 32 --nf --weightb --b-pyramid --partitions all --8x8dct --threads auto --thread-input --no-dct-decimate --level 41 --output NUL "t.avs"
Original image size 844*480

Second Pass has identical parameters

Same result with --no-asm too



EDIT:
About the same glitches (not exactly the same) i obtain with previous versions too back to about 1113

These types of glitches are present randomly on all the video

Tested with CoreAVC, MPC Decoder and with MPC, graphedit etc...

Last edited by 3ngel; 8th April 2009 at 17:40.
3ngel is offline   Reply With Quote
Old 8th April 2009, 17:41   #1810  |  Link
komisar
Registered User
 
komisar's Avatar
 
Join Date: Aug 2008
Location: Minsk, Belarus
Posts: 235
3ngel, what/whose build you use? Can you repeat this "bug" with other builds?
__________________
..::[I am live here]..::..[My x264 CLI/VFW builds and tools]::..

Last edited by komisar; 8th April 2009 at 17:44.
komisar is offline   Reply With Quote
Old 8th April 2009, 17:42   #1811  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
http://skystrife.com/x264/x264.1137M.x86.exe
3ngel is offline   Reply With Quote
Old 8th April 2009, 17:45   #1812  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
post the sample you're encoding so i can do testing on my phenom computers when i get off work.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 8th April 2009, 18:19   #1813  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
@3ngel
Your artifacts are definitely produced by a median-predicted lossless codec, such as ffvhuff or lagarith. Either a decoder bug or a corrupt bitstream.
mpeg-like codecs do not have failure modes that look like that.

Last edited by akupenguin; 9th April 2009 at 20:17.
akupenguin is offline   Reply With Quote
Old 8th April 2009, 18:44   #1814  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
Mmm... i see.
I've tested the script in VDub before feeding to encoder, and it's a regular not corrupted lagarith. Moreover playing the .avs (and the lags .avi within) all is regular.
Now i'm doing a new encoding.
3ngel is offline   Reply With Quote
Old 8th April 2009, 18:47   #1815  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
I've seen that before as well--in a broken lagarith decode.
Dark Shikari is offline   Reply With Quote
Old 8th April 2009, 18:52   #1816  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
But if it can be a lagarith issue, why i don't see the same in vdub?
Both VDub and avs use the same decoding routine (and i see both fine).
3ngel is offline   Reply With Quote
Old 8th April 2009, 19:14   #1817  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by 3ngel View Post
But if it can be a lagarith issue, why i don't see the same in vdub?
Both VDub and avs use the same decoding routine (and i see both fine).
Try converting your video to HuffYUV or FFv1 in VirtualDub. Then try to feed that into x264...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 8th April 2009, 19:17   #1818  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
Yes, doing that right now (doing uncompressed).
3ngel is offline   Reply With Quote
Old 8th April 2009, 23:08   #1819  |  Link
techouse
Strictly Rhythm
 
techouse's Avatar
 
Join Date: Jul 2007
Location: Ljubljana, Slovenia
Posts: 166
x264_x86_r1137_techouse | INFO
GCC 4.3.3, fprofiled, -march=core2

x264_x64_r1137_techouse | INFO
GCC 4.3.4 20090408 (prerelease) (x64.core2.Komisar), fprofiled, -march=core2

Patches used:

x264_hrd_pulldown.11_interlace.diff
x264_win_zone_parse_fix_05.diff
__________________

Last edited by techouse; 9th April 2009 at 00:09.
techouse is offline   Reply With Quote
Old 9th April 2009, 02:00   #1820  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Quote:
Originally Posted by LoRd_MuldeR View Post
Also you must keep in mind that the "look ahead" part of x264 is not multi-threaded. Lookahead needs to run each time a new encoder thread is spawned.
Your explanation is very good, however can you describe in more detail how lookahead works? For instance, how much time or cpu% is spent for lookahead thread. As well, how do the things work in non-multithreaded mode, on single core?
Egh is offline   Reply With Quote
Reply

Tags
h.264, x264, x264 builds, x264 patches, x264 unofficial builds

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.