[x264-devel] Wrong instruction

Guillaume Poirier gpoirier at mplayerhq.hu
Tue Oct 23 18:20:55 CEST 2007


Hello,

SIEGERSTEIN wrote:
> Hi! I found, that x264 encoder convert with wrong instruction:
> 
> $ x264 --bitrate=700 --fps=30 --me=umh --merange=32 --subme=7 --analyse=all -o 
> output.mkv colourbars_420.yuv 640x480
> x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2
> x264 [info]: slice I:1     Avg QP:34.00  size: 16866  PSNR Mean Y:34.77 
> U:35.79 V:34.82 Avg:34.93 Global:34.93
> x264 [info]: mb I  I16..4: 26.8%  0.0% 73.2%
> x264 [info]: final ratefactor: 37.49
> x264 [info]: SSIM Mean Y:0.9979993
> x264 [info]: PSNR Mean Y:34.768 U:35.790 V:34.817 Avg:34.931 Global:34.931 
> kb/s:4047.84
> 
> encoded 1 frames, 4.97 fps, 4173.84 kb/s
> $
> 
> I have Intel processor, so there is only MMX but not MMXEXT instruction.
> 
> $ cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 3
> model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
> stepping        : 4
> cpu MHz         : 2998.753
> cache size      : 1024 KB
> physical id     : 0
> siblings        : 2
> core id         : 0
> cpu cores       : 1
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 5
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc 
> pebs bts sync_rdtsc pni monitor ds_cpl cid xtpr
> bogomips        : 6001.69
> clflush size    : 64


MMXExt is supported by your CPU. Your problem must be elsewhere.


[..]


> [encode_x264.so] set display aspect ratio to input
> [encode_x264.so] using SAR=1/1
> [encode_x264.so] using cpu capabilities: MMX MMXEXT SSE SSE2 3DNow!
> 
> Program received signal SIGFPE, Arithmetic exception.
> [Switching to Thread 0xb7bab6c0 (LWP 3313)]
> 0xa5a9b4d0 in get_qscale (h=0x80d47a0, rce=0xbf9d0690, 
> rate_factor=64.667029215144737, frame_num=<value optimized out>) at 
> encoder/ratecontrol.c:1003
> 1003        };
> (gdb) 

Please compile with debug symbols, otherwise we can't help you.


> Now I see +3DNow! instruction:
> 
> [encode_x264.so] using cpu capabilities: MMX MMXEXT SSE SSE2 3DNow!
> 
> I think problem in x264 not in transcode (I'm now devloper :))
> 
> encoder/encoder.c: (x264)
> 
> 675      x264_log( h, X264_LOG_INFO, "using cpu 
> capabilities: %s%s%s%s%s%s%s%s\n",
>    676               param->cpu&X264_CPU_MMX ? "MMX " : "",
>    677               param->cpu&X264_CPU_MMXEXT ? "MMXEXT " : "",
>    678               param->cpu&X264_CPU_SSE ? "SSE " : "",
>    679               param->cpu&X264_CPU_SSE2 ? "SSE2 " : "",
>    680               param->cpu&X264_CPU_SSSE3 ? "SSSE3 " : "",
>    681               param->cpu&X264_CPU_3DNOW ? "3DNow! " : "",
>    682               param->cpu&X264_CPU_ALTIVEC ? "Altivec " : "",
>    683               param->cpu ? "" : "none!" );
> 
> open discussion in transcode mail list:
> http://article.gmane.org/gmane.comp.video.transcode.user/20861


> How compile x264 withOUT 3dnow! & mmxext instruction?

It can't easily be done through a configure switch, so IMHO, first
just try to reproduce your bug with libx264 compile with debug
symbols, then we'll see what we can do for you :)

Guillaume



More information about the x264-devel mailing list