PDA

View Full Version : x264 v2145 64bit bug?


chompy
17th January 2012, 08:32
Hi,

First of all I want to say that I have to go to work and I haven't further investigated, but after a quick test with latest x264 v2145 64bit from x264.nl I'm having image corruption as you can see here:

http://img163.imageshack.us/img163/2844/thumnailimage.th.png (http://imageshack.us/photo/my-images/163/thumnailimage.png/)

I've used the usual settings I've being using since long time ago without any problem with previous versions:

x264-64.exe "sample.m2ts" --bluray-compat --preset veryslow --tune film --force-cfr --b-pyramid strict --open-gop --bitrate 20000 --level 4.1 --aud --nal-hrd vbr --pic-struct --sar 1:1 --vbv-bufsize 30000 --keyint 24 --ipratio 1.1 --vbv-maxrate 38000 --threads auto --slices 4 --thread-input --stats "D:\stats.stats" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --pass 1 --output NUL

x264-64.exe "sample.m2ts" --bluray-compat --preset veryslow --tune film --force-cfr --b-pyramid strict --open-gop --bitrate 20000 --level 4.1 --aud --nal-hrd vbr --pic-struct --sar 1:1 --vbv-bufsize 30000 --keyint 24 --ipratio 1.1 --vbv-maxrate 38000 --threads auto --slices 4 --thread-input --stats "D:\stats.stats" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --pass 2 --output "test.264"

Has anybody found the same problem?

mariush
17th January 2012, 08:35
Did you try exporting that m2ts file to a raw YUV file to see if the bug is not in the decoding libraries?

06_taro
17th January 2012, 08:55
Having reported to mail-list already. I believe it to be a bug in CABAC trellis. Use --trellis 0 to turn trellis off and see if those frames are still corrupt or not.

chompy
18th January 2012, 09:39
I've tried with avisynth and I get the same kind of corruptions, so this isn't a problem related to ffmpeg/libav... So as 06_taro has said it seems to be a bug in new CABAC optimizations made in last release.

Magix_995
18th January 2012, 13:06
No problem w/Trellis=2 here ...
Hmmm

chompy
18th January 2012, 16:54
No problem w/Trellis=2 here ...
Hmmm

I'm also using --trellis 2 (default value for veryslow preset), are you using 64bit or 32bit x264?

I've had to return to r2120 to get rid of these corruptions.

Magix_995
18th January 2012, 17:05
I use kmod x64 build from komisar...

Tested on B/W ...

06_taro
18th January 2012, 17:40
Not all the videos encoded by rev2145 with trellis are corrupt. I tested on about 20 clips, and only 4 of them were broken.

shroomM
19th January 2012, 09:24
Fixed:
http://git.videolan.org/gitweb.cgi?p=x264.git;a=commit;h=bcd41dbcaa4430b2118d9f6828c2b9635cf9d58d

Rumbah
19th January 2012, 13:49
Does anyone know if the x264.nl builds are already fixed as the page now lists this fix in the r2145 changelog.

LoRd_MuldeR
19th January 2012, 14:09
x264.nl has just updated to r2146 (try F5, if you can't see it yet).

Rumbah
19th January 2012, 14:17
Ah, thanks, now I can see it.

jpsdr
19th January 2012, 14:29
Can someone with broken results (chompy and/or 06_taro) confirm that new 2146 version fix the problem ?
As one of the files modified is an asm x64 specific file, one confirmation of fix should at least be with an x64 version.

06_taro
19th January 2012, 14:40
Confirmed. All the broken frames are fine with rev2146.

chompy
19th January 2012, 20:35
With my test file r2146 also works ok, no more corruption.

Rumbah
20th January 2012, 00:14
Wow, the speed increase is great, for my typical PSP encode it's 36% for the 32bit version. Only 11% for the 64bit version but as my Q9650 is only used by three quartes I guess another part of x264 aside from CABAC is the bottleneck there. Probably b-adapt 2 with 8 b-frames (preset veryslow).

jassenjj
21st January 2012, 07:13
Can you please compare the speed in the 32 and the 64bit versions? I always use the 64bit version but with your numbers of speed increase what's the final result?

Rumbah
21st January 2012, 15:15
I used an uncompressed 480x272 YV12 file off a RAM disk.
The results are:
r2106 RAM
Source: Q:\AviSynth Script (neu) (2).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 56.57 fps, 220.19 kb/s
encoded 7001 frames, 55.51 fps, 220.19 kb/s
encoded 7001 frames, 56.64 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 62.16 fps, 220.19 kb/s
encoded 7001 frames, 76.56 fps, 220.19 kb/s
encoded 7001 frames, 73.28 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 76.37 fps, 220.19 kb/s
encoded 7001 frames, 76.61 fps, 220.19 kb/s
encoded 7001 frames, 77.51 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 77.55 fps, 220.19 kb/s
encoded 7001 frames, 77.30 fps, 220.19 kb/s
encoded 7001 frames, 77.64 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 77.54 fps, 220.19 kb/s
encoded 7001 frames, 76.99 fps, 220.19 kb/s
encoded 7001 frames, 77.50 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 62.41 fps, 220.19 kb/s
encoded 7001 frames, 77.04 fps, 220.19 kb/s
encoded 7001 frames, 77.00 fps, 220.19 kb/s

r2146 RAM

Source: Q:\AviSynth Script (neu) (2).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 75.10 fps, 220.19 kb/s
encoded 7001 frames, 75.65 fps, 220.19 kb/s
encoded 7001 frames, 76.23 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 86.33 fps, 220.19 kb/s
encoded 7001 frames, 86.78 fps, 220.19 kb/s
encoded 7001 frames, 86.76 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 86.58 fps, 220.19 kb/s
encoded 7001 frames, 72.98 fps, 220.19 kb/s
encoded 7001 frames, 86.79 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 86.54 fps, 220.19 kb/s
encoded 7001 frames, 86.40 fps, 220.19 kb/s
encoded 7001 frames, 72.94 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 73.35 fps, 220.19 kb/s
encoded 7001 frames, 73.17 fps, 220.19 kb/s
encoded 7001 frames, 75.01 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 74.16 fps, 220.19 kb/s
encoded 7001 frames, 86.93 fps, 220.19 kb/s
encoded 7001 frames, 86.84 fps, 220.19 kb/s

jassenjj
21st January 2012, 16:45
Wow, this is what I call an answer!
Thank you very much - this is really informative...

It is a little bit strange that with bigger pipe buffer some of the results are worse, but I won't make big conclusions from this.

shroomM
22nd January 2012, 15:03
Wow, a great answer, indeed!

The speed difference between the 32-bit and 64-bit with 2MB Pipe Buffer Size is definitely noticeable.

Dark Shikari
22nd January 2012, 18:38
encoded 7001 frames, 74.16 fps, 220.19 kb/s
encoded 7001 frames, 86.93 fps, 220.19 kb/s
The standard deviation of these results is too high to be trustworthy or make any real conclusions.

Rumbah
23rd January 2012, 07:43
I just used lord_Mulders Simple x264 launcher with the benchmark function. I started it and then went to read a book so there was no user interaction, browsing or anything similar.

I'm courious, too, why there is this deviation of about 10-15 frames sometimes, as the source came from a RAM disk. But I got it throughout the benches, seemingly at random. I did four different runs of the benchmark, here are the results:
"C:\Program Files (x86)\MuldeR\Simple x264 Launcher\pipebuf.exe" "C:\Program Files (x86)\MuldeR\Simple x264 Launcher\avs2yuv.exe" "P:\film\AviSynth Script (neu).avs" - : "C:\Program Files (x86)\MuldeR\Simple x264 Launcher\x264_x64.exe" --preset veryslow --tune film --profile main --crf 24.0 --level 3 --ref 3 --b-pyramid none --output P:\film\Output.mkv --frames 7001 --demuxer y4m --stdin y4m - : 4

r2106 bilinear
Source: P:\film\AviSynth Script (neu).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 48.84 fps, 220.19 kb/s
encoded 7001 frames, 48.58 fps, 220.19 kb/s
encoded 7001 frames, 48.82 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 52.91 fps, 220.19 kb/s
encoded 7001 frames, 53.02 fps, 220.19 kb/s
encoded 7001 frames, 44.72 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 52.87 fps, 220.19 kb/s
encoded 7001 frames, 53.03 fps, 220.19 kb/s
encoded 7001 frames, 53.16 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 53.17 fps, 220.19 kb/s
encoded 7001 frames, 53.14 fps, 220.19 kb/s
encoded 7001 frames, 45.47 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 53.12 fps, 220.19 kb/s
encoded 7001 frames, 52.82 fps, 220.19 kb/s
encoded 7001 frames, 53.08 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 53.22 fps, 220.19 kb/s
encoded 7001 frames, 53.00 fps, 220.19 kb/s
encoded 7001 frames, 53.21 fps, 220.19 kb/s

r2106 lancsoz4
Source: P:\film\AviSynth Script (neu).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 39.26 fps, 229.92 kb/s
encoded 7001 frames, 39.24 fps, 229.92 kb/s
encoded 7001 frames, 46.65 fps, 229.92 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 43.08 fps, 229.92 kb/s
encoded 7001 frames, 50.85 fps, 229.92 kb/s
encoded 7001 frames, 51.00 fps, 229.92 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 51.10 fps, 229.92 kb/s
encoded 7001 frames, 51.09 fps, 229.92 kb/s
encoded 7001 frames, 51.13 fps, 229.92 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 42.84 fps, 229.92 kb/s
encoded 7001 frames, 51.17 fps, 229.92 kb/s
encoded 7001 frames, 51.08 fps, 229.92 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 51.06 fps, 229.92 kb/s
encoded 7001 frames, 51.11 fps, 229.92 kb/s
encoded 7001 frames, 51.11 fps, 229.92 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 51.28 fps, 229.92 kb/s
encoded 7001 frames, 51.15 fps, 229.92 kb/s
encoded 7001 frames, 42.91 fps, 229.92 kb/s

r2106 RAM
Source: Q:\AviSynth Script (neu) (2).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 56.57 fps, 220.19 kb/s
encoded 7001 frames, 55.51 fps, 220.19 kb/s
encoded 7001 frames, 56.64 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 62.16 fps, 220.19 kb/s
encoded 7001 frames, 76.56 fps, 220.19 kb/s
encoded 7001 frames, 73.28 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 76.37 fps, 220.19 kb/s
encoded 7001 frames, 76.61 fps, 220.19 kb/s
encoded 7001 frames, 77.51 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 77.55 fps, 220.19 kb/s
encoded 7001 frames, 77.30 fps, 220.19 kb/s
encoded 7001 frames, 77.64 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 77.54 fps, 220.19 kb/s
encoded 7001 frames, 76.99 fps, 220.19 kb/s
encoded 7001 frames, 77.50 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 62.41 fps, 220.19 kb/s
encoded 7001 frames, 77.04 fps, 220.19 kb/s
encoded 7001 frames, 77.00 fps, 220.19 kb/s

r2146 RAM

Source: Q:\AviSynth Script (neu) (2).avs
Preset: Veryslow
Tuning: Film
Profile: Main
Params: --level 3 --ref 3 --b-pyramid none

[Type: 32-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 75.10 fps, 220.19 kb/s
encoded 7001 frames, 75.65 fps, 220.19 kb/s
encoded 7001 frames, 76.23 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 0 MByte]
encoded 7001 frames, 86.33 fps, 220.19 kb/s
encoded 7001 frames, 86.78 fps, 220.19 kb/s
encoded 7001 frames, 86.76 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 1 MByte]
encoded 7001 frames, 86.58 fps, 220.19 kb/s
encoded 7001 frames, 72.98 fps, 220.19 kb/s
encoded 7001 frames, 86.79 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 2 MByte]
encoded 7001 frames, 86.54 fps, 220.19 kb/s
encoded 7001 frames, 86.40 fps, 220.19 kb/s
encoded 7001 frames, 72.94 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 4 MByte]
encoded 7001 frames, 73.35 fps, 220.19 kb/s
encoded 7001 frames, 73.17 fps, 220.19 kb/s
encoded 7001 frames, 75.01 fps, 220.19 kb/s

[Type: 64-Bit, Pipe Buffer Size: 8 MByte]
encoded 7001 frames, 74.16 fps, 220.19 kb/s
encoded 7001 frames, 86.93 fps, 220.19 kb/s
encoded 7001 frames, 86.84 fps, 220.19 kb/s

jpsdr
23rd January 2012, 19:05
Some results with an i7@980.

Command line used :

REM Set of max bitrate
set MAX_BR=15000

REM Set of Buffer
set BUF_BR=15000

REM pass 1
x264_x64.exe --profile "high" --preset "placebo" --tune %TUNING% --pass 1 --bitrate %BITRATE% --stats %STAT_FILE% --level "4.0" --vbv-maxrate %MAX_BR% --vbv-bufsize %BUF_BR% --keyint 48 --min-keyint 1 --mvrange 511 --ref 6 --bframe 3 --b-pyramid "strict" --open-gop --bluray-compat --fade-compensate 0.8 --subme 7 --me "umh" --aq-mode 3 --aud --nal-hrd "vbr" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --videoformat "ntsc" --sar 1:1 --qpfile %CHAPTERS% --threads 0 --thread-input --output NUL %E_SRC% 2> %LOG_FILE_1%

REM pass2
x264_x64.exe --profile "high" --preset "placebo" --tune %TUNING% --pass 2 --bitrate %BITRATE% --stats %STAT_FILE% --level "4.0" --vbv-maxrate %MAX_BR% --vbv-bufsize %BUF_BR% --keyint 48 --min-keyint 1 --mvrange 511 --ref 6 --bframe 3 --b-pyramid "strict" --open-gop --bluray-compat --fade-compensate 0.8 --subme 10 --aq-mode 3 --aud --nal-hrd "vbr" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --videoformat "ntsc" --sar 1:1 --qpfile %CHAPTERS% --threads 0 --thread-input --output %E_DST% %E_SRC% 2> %LOG_FILE_2%


TUNING : Animation
bitrate :
4197 with v2120
4252 with v2146

Video : 1280x720

Version 2120 x64 (Windows XP64 SP2)
File 1 157560 frames
pass 1 : 37.42fps / pass 2 : 13.49fps
File 2 157584 frames
pass 1 : 37.52fps / pass 2 : 13.52fps
File 3 157584 frames
pass 1 : 37.84fps / pass 2 : 13.82fps
File 4 157584 frames
pass 1 : 37.63fps / pass 2 : 13.63fps

Version 2146 x64 (Windows XP64 SP2)
File 1 157560 frames
pass 1 : 41.27fps / pass 2 : 15.57fps
File 2 157584 frames
pass 1 : 41.27fps / pass 2 : 15.67fps
File 3 157584 frames
pass 1 : 41.52fps / pass 2 : 16.04fps
File 4 157584 frames
pass 1 : 41.52fps / pass 2 : 15.79fps