[x264-devel] Threaded slicetype patch
DaKaZ at zenbe.com
Sun Jan 25 16:42:23 CET 2009
On Sat, Jan 24, 2009 at 2:15 PM "Mike Kazmier" <DaKaZ at zenbe.com> wrote:
>Well - it clearly took a lot longer to get it all right - but hey, I learned a lot in the process. Attached is the threaded slice type patch against r1088. This gives identical resutls for threads==1 and identical slicetype decisions for threads>1 with/without lookahead. You do have some slight encoding differences due to the threading, but overall I believe this patch is ready for inclusion in the mainline x264. To use it, simply add the option --lookahead <int> - I have found best results with lookahead >= 1.5*threads.
So, I spoke too soon - Dark Shikari was able to break the patch on his first try :( Turns out that in b-adapt 2 mode, the slice type decide process takes too long, and all threads enter a deadlock state. To fix this, I am going to have to put the main x264_encoder_encode process into its own thread.... stay tuned.
More information about the x264-devel