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 7th September 2008, 22:54   #981  |  Link
MasterNobody
Registered User
 
Join Date: Aug 2007
Posts: 512
kemuri-_9
Try to make 2pass encoding of small sample (500 frames is enough) with --threads 128 (128 because more threads more visible is quality degradation of few frames after 30-frame) without and with this patch. Probably than you will see the difference at frames 31 and few others.
MasterNobody is offline   Reply With Quote
Old 7th September 2008, 23:40   #982  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
and why would i realistically do that insane number of threads besides seeing at how many resources are being wasted by threads that can't be executed on my processors (being held in wait state)?
and not to mention all the processing time overhead from the thread swapping since the scheduler will probably swap them frequently with that large of a number of them.
__________________
custom x264 builds & patches | F@H | My Specs

Last edited by kemuri-_9; 7th September 2008 at 23:47.
kemuri-_9 is offline   Reply With Quote
Old 8th September 2008, 00:47   #983  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
You are right, kemuri, most of us can't use that many threads. Still, I do know people who run their encodes on Sun's servers (when they are idling at their workplace), which do run 128 threads per box, so they would care about that.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 8th September 2008, 01:37   #984  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Oh yeah, and if you could explain x264_32x32samples_crash.r870.diff, forgot about that one. Thanks again.

Doing a few tests now...
Ranguvar is offline   Reply With Quote
Old 8th September 2008, 02:07   #985  |  Link
MasterNobody
Registered User
 
Join Date: Aug 2007
Posts: 512
Quote:
Originally Posted by kemuri-_9 View Post
and why would i realistically do that insane number of threads besides seeing at how many resources are being wasted by threads that can't be executed on my processors (being held in wait state)?
and not to mention all the processing time overhead from the thread swapping since the scheduler will probably swap them frequently with that large of a number of them.
This is only the example where you can see the difference easily. This bug (incorrect bitrate prediction) also exist with only 2-3 threads but it is not so visible.
Quote:
Originally Posted by Ranguvar View Post
Oh yeah, and if you could explain x264_32x32samples_crash.r870.diff, forgot about that one. Thanks again.

Doing a few tests now...
It is simply fix the crash (division by zero) when width or height of the source is 32 (17-32) when you encode with B-frames (and don't use --no-b-adapt).
MasterNobody is offline   Reply With Quote
Old 8th September 2008, 02:32   #986  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Thanks.

But this is very annoying... the patches are a mess of dependencies. Still trying to get it working, but jeez.

EDIT: Alright, I admit defeat. Every damn patch wants to bring in its friends, or it'll whine at me. komisar, if you read this, please help give me a way to test/use...

I only want:

x264_dll_alignment_fix.01.diff (no problem with your patches)
999.log_param.diff
x264_progress.indication_r957.diff
x264_32x32samples_crash.r870.diff
x264_multithreading_Nth_pass_ratecontrol.r870.diff (maybe)
bm_x264_thread_pool.r870.diff (maybe)
x264_hrd_pulldown.09_interlace.diff
x264_psy_rdo_0.6_r956.diff
x264_new_bframe_decision_04.7.diff


However, there are tons of dependencies... I really don't want to use the VAQ2mod, or fix_stats_file_work, or your version of the new b-frame decision patch...

Thanks

Last edited by Ranguvar; 8th September 2008 at 02:45.
Ranguvar is offline   Reply With Quote
Old 8th September 2008, 05:25   #987  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
some of these, like the 32x32sample and Npass ratecontrol patches,
are fixes and I think the developers should look into implementing them into the repository.
(granted they work as intended still)
the logfile patch would be a feature they could add in if they whimmed it.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 8th September 2008, 05:51   #988  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,689
Yes, I agree; such fixes should not be used in custom builds but rather should just be committed if useful or not committed if not useful.
Dark Shikari is offline   Reply With Quote
Old 8th September 2008, 08:47   #989  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
Quote:
Originally Posted by kemuri-_9 View Post
looked at it again and it's definitely complexing up the bitrate approximation/ratecontrol so it should be more accurate.
that is, bitrate aiming in multi-threading should be more accurate (though i don't usually have a problem with this in x264 as is)
Could someone please point me at this patch?
Gabriel_Bouvigne is offline   Reply With Quote
Old 8th September 2008, 08:51   #990  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 567
http://komisar.gin.by/x.patch/last.u...trol.r870.diff
Underground78 is offline   Reply With Quote
Old 8th September 2008, 12:04   #991  |  Link
komisar
Registered User
 
komisar's Avatar
 
Join Date: Aug 2008
Location: Minsk, Belarus
Posts: 235
My used patches:
Quote:
# Write to log encoding settings
999.log_param.diff (wo dep)

# Simply fix the crash (division by zero) when width or height of the source is 32 (17-32) when you encode with B-frames (and don't use --no-b-adapt)
x264_32x32samples_crash.r870.diff (wo dep)

# Fix incorrect Nth-pass ratecontrol work with multithreading
x264_multithreading_Nth_pass_ratecontrol.r870.diff (wo dep)

# More accurate calculation of i_frame, more correct workaround for VFW Nth-pass ratecontrol
k.20.x264_fix_stats_file_work.r877.diff (wo dep)

# Modified thread pool patch
bm_x264_thread_pool.r870.diff (dep: "fix_stats_file_work", "multithreading_Nth_pass_ratecontrol")

# Write encoder outputs to file
k.41.x264_log_file.01k.r928.diff (wo dep)

# Change precision of CRF-value in encoder settings
k.38.cosmetic.diff (wo dep)

# Add some addition task to profiling
999.profiled.01.diff (wo dep)

# Workaround of incorrect profiling of VFW (gcc 4.4)
k.vfw.01.dummy-log.diff (wo dep)

# Helper for make profiled build of VFW
k.vfw.02.profile.diff (wo dep)

# Add ability to call external gui for VFW
k.vfw.03.external_config.01.diff (wo dep)
Ranguvar
x264_psy_rdo_0.6_r956.diff
x264_new_bframe_decision_04.7.diff
x264_hrd_pulldown.09_interlace.diff
Some as posted in this thread. I only make this compatible with my patched build.

P.S. I add prefix "k.XX...." because this patches (in original) not clear apply and I make them more compatible. Or I make this patch by myself.

P.P.S. Original version of some patches "by MasterNobody/BugMaster" found here: [x264-devel] BugMaster's patches (fix various problems)

And mirror of MasterNobody/BugMaster patches (next message) found here: http://komisar.gin.by/x.patch/BugMaster/20080908/
__________________
..::[I am live here]..::..[My x264 CLI/VFW builds and tools]::..

Last edited by komisar; 8th September 2008 at 15:04.
komisar is offline   Reply With Quote
Old 8th September 2008, 13:25   #992  |  Link
MasterNobody
Registered User
 
Join Date: Aug 2007
Posts: 512
Here are updated versions of my patches (which I use to build x264vfw): http://stashbox.org/208351/bm_x264_p...ction.r965.zip
In this archive you will find independent versions of some patches (for example, x264_thread_pool.r965.diff)

List of patches in collection:
Code:
01_x264_32x32samples_crash.r965.diff
01_x264_cosmetic.r965.diff
01_x264_debug_defines.r965.diff
01_x264_fix_stats_file_work.r965.diff
01_x264_multithreading_bug_check.r965.diff
01_x264_multithreading_Nth_pass_ratecontrol.r965.diff
02_bm_x264_error_memoryleaks.02.r965.diff
03_bm_x264_thread_pool.r965.diff
04_bm_x264_vaqmod.01.r965.diff
05_bm_x264_psy_rdo_0.6.r965.diff
06_bm_x264_new_bframes_decision.04.7.r965.diff

Independent\
   x264_32x32samples_crash.r965.diff
   x264_cosmetic.r965.diff
   x264_debug_defines.r965.diff
   x264_error_memoryleaks.02.r965.diff
   x264_fix_stats_file_work.r965.diff
   x264_multithreading_bug_check.r965.diff
   x264_multithreading_Nth_pass_ratecontrol.r965.diff
   x264_thread_pool.r965.diff
   x264_vaqmod.01.r965.diff
MasterNobody is offline   Reply With Quote
Old 8th September 2008, 13:55   #993  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
The 32x32 fix seems really strange, especially the "pmb = -imb;" line. Did you intended to have a negative number of P MB ?
Gabriel_Bouvigne is offline   Reply With Quote
Old 8th September 2008, 17:11   #994  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Thanks very much, BugMaster - that may be what I'm looking for. I'll test ASAP.

Will all your updated patches be here always? http://komisar.gin.by/x.patch/BugMaster/

Last edited by Ranguvar; 8th September 2008 at 17:14.
Ranguvar is offline   Reply With Quote
Old 8th September 2008, 18:02   #995  |  Link
stanjr
Linux Encoder
 
Join Date: Feb 2004
Posts: 78
I am compiling/encoding on a 64-bit Ubuntu quad-core machine.

Using x264_new_bframe_decision_04.7.diff causes the following error:
libx264.c: In function 'X264_init':
libx264.c: 165: error: X264_param_t has no member named 'b_bframe_adaptive'
(after compiling x264 and then when compiling mplayer to use x264 with mencoder)

Have I done something wrong?
stanjr is offline   Reply With Quote
Old 8th September 2008, 18:47   #996  |  Link
recover
Registered User
 
recover's Avatar
 
Join Date: Dec 2006
Posts: 32
I just wanted to let you know that there is an updated version of the progress indication patch here.
The difference is only that the code is now enclosed in #ifdef _WIN32 so that it can compile on other OS.
I guess you have to fix this updated version the same way you've done with the previous version as well.
recover is offline   Reply With Quote
Old 8th September 2008, 18:54   #997  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
it's useless for him since he's on ubuntu
Sharktooth is offline   Reply With Quote
Old 8th September 2008, 19:04   #998  |  Link
stanjr
Linux Encoder
 
Join Date: Feb 2004
Posts: 78
What about the 'b_bframe_adaptive' error?
stanjr is offline   Reply With Quote
Old 8th September 2008, 19:07   #999  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
was the patching successfull?
Sharktooth is offline   Reply With Quote
Old 8th September 2008, 19:28   #1000  |  Link
stanjr
Linux Encoder
 
Join Date: Feb 2004
Posts: 78
Yeah, patching x264 was successful and it compiled fine. It was only when I then got to compiling mplayer that I got the error. If you need more info, I can try to get what you need when I get home later.
stanjr 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 01:14.


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