[x264-devel] Segmentation Fault compiled with icc and encoding with deblocking filter

trueice trueice at gmail.com
Thu Jun 12 07:04:20 CEST 2008


On Wed, Jun 11, 2008 at 7:21 PM, Gabriel Bouvigne <
gabriel.bouvigne at joost.com> wrote:

> trueice a écrit :
>
> > Is there any compiling options to avoid the alignment issue without
> > modifying the code?
> Don't know, I'm not using ICC.
>


>  > There may be many similar problems when using ICC, I found another when
> > encoding with b frames:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 1768266640 (LWP 11654)]
> > 0x6fa36b62 in x264_pixel_avg_weight_w8_sse2 ()
>
> Could you please try to reproduce it using x264 as a stand-alone app?
> (not linked with ffmpeg)


$ ffmpeg -i input.flv -an -f rawvideo -s 320x240 -pix_fmt yuv420p -y
output_video.yuv
... ...

$ x264 --progress --deblock 0:0 --keyint 250 --bitrate 512000 --bframes 1
--b-pyramid --weightb --b-rdo --mixed-refs --8x8dct --partitions
p8x8,b8x8,i8x8,i4x4 --output 2.mkv output_video.yuv 320x240
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
Segmentation fault (core dumped)21.33 fps, eta 0:00:02

if either--weightb or bframe is removed, it runs ok.
(My actual program uses lower level options from libavcodec, which opens
weightb + b_adapt, either removed will work)

Gdb info in detail:

(gdb) r --progress --deblock 0:0 --keyint 250 --bitrate 512000 --bframes 1
--b-pyramid --weightb --b-rdo --mixed-refs --8x8dct --partitions
p8x8,b8x8,i8x8,i4x4 --output 2.mkv output_video.yuv 320x240
Starting program: /usr/local/media/bin/x264 --progress --deblock 0:0
--keyint 250 --bitrate 512000 --bframes 1 --b-pyramid --weightb --b-rdo
--mixed-refs --8x8dct --partitions p8x8,b8x8,i8x8,i4x4 --output 2.mkv
output_video.yuv 320x240
[Thread debugging using libthread_db enabled]
[New Thread 1874135232 (LWP 27811)]
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
encoded frames: 17/306 (5.5%), 154.14 fps, eta 0:00:01
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1874135232 (LWP 27811)]
0x0809d662 in x264_pixel_avg_weight_w8_sse2 ()
(gdb) bt
#0  0x0809d662 in x264_pixel_avg_weight_w8_sse2 ()
#1  0x0809945b in x264_pixel_avg_weight_8x4_sse2 (dst=0x20 <Address 0x20 out
of bounds>, i_dst=2006297424,
    src=0x10 <Address 0x10 out of bounds>, i_src=32, i_weight_dst=4) at
common/x86/mc-c.c:90
#2  0x080610a5 in x264_mb_mc (h=0x80c43b0) at common/macroblock.c:821
#3  0x08078078 in x264_macroblock_analyse (h=0x80522e4) at
encoder/analyse.c:2593
#4  0x080522e4 in x264_slice_write (h=0x7795ced8) at encoder/encoder.c:1053
#5  0x080552f4 in x264_stack_align ()
#6  0x080534d2 in x264_encoder_encode (h=0x7795d308, pp_nal=0x804a6e6,
pi_nal=0x80c43b0, pic_in=0x7795cfa4, pic_out=0x7795cfa8)
    at encoder/encoder.c:1458
#7  0x0804a6e6 in Encode_frame (h=0x0, hout=0xd51f, pic=0x11) at x264.c:731
#8  0x0804a979 in Encode (param=0x6ff29ce0, opt=0x0) at x264.c:813
#9  0x08049808 in main (argc=135021104, argv=0x80c4008) at x264.c:107
(gdb) disass $pc-50 $pc+50
Dump of assembler code from 0x809d630 to 0x809d694:
0x0809d630 <x264_pixel_avg_weight_w16_mmxext+192>:      jno    0x809d612
<x264_pixel_avg_weight_w16_mmxext+162>
0x0809d632 <x264_pixel_avg_weight_w16_mmxext+194>:      push   %es
0x0809d633 <x264_pixel_avg_weight_w16_mmxext+195>:      pmaxsw %mm7,%mm0
0x0809d636 <x264_pixel_avg_weight_w16_mmxext+198>:      packuswb %mm0,%mm0
0x0809d639 <x264_pixel_avg_weight_w16_mmxext+201>:      movd
%mm0,0xc(%eax)
0x0809d63d <x264_pixel_avg_weight_w16_mmxext+205>:      add    %ecx,%eax
0x0809d63f <x264_pixel_avg_weight_w16_mmxext+207>:      add    %ebx,%edx
0x0809d641 <x264_pixel_avg_weight_w16_mmxext+209>:      dec    %esi
0x0809d642 <x264_pixel_avg_weight_w16_mmxext+210>:      jg     0x809d5a0
<x264_pixel_avg_weight_w16_mmxext+48>
0x0809d648 <x264_pixel_avg_weight_w16_mmxext+216>:      pop    %esi
0x0809d649 <x264_pixel_avg_weight_w16_mmxext+217>:      pop    %ebx
0x0809d64a <x264_pixel_avg_weight_w16_mmxext+218>:      ret
0x0809d64b <x264_pixel_avg_weight_w16_mmxext+219>:      nop
0x0809d64c <x264_pixel_avg_weight_w16_mmxext+220>:      lea
0x0(%esi),%esi
0x0809d650 <x264_pixel_avg_weight_w8_sse2+0>:   push   %ebx
0x0809d651 <x264_pixel_avg_weight_w8_sse2+1>:   push   %esi
0x0809d652 <x264_pixel_avg_weight_w8_sse2+2>:   mov    0xc(%esp),%eax
0x0809d656 <x264_pixel_avg_weight_w8_sse2+6>:   mov    0x10(%esp),%ecx
0x0809d65a <x264_pixel_avg_weight_w8_sse2+10>:  mov    0x14(%esp),%edx
0x0809d65e <x264_pixel_avg_weight_w8_sse2+14>:  mov    0x18(%esp),%ebx
0x0809d662 <x264_pixel_avg_weight_w8_sse2+18>:  pshuflw
$0x0,0x1c(%esp),%xmm4
0x0809d669 <x264_pixel_avg_weight_w8_sse2+25>:  movlhps %xmm4,%xmm4
0x0809d66c <x264_pixel_avg_weight_w8_sse2+28>:  movaps 0x80be890,%xmm5
0x0809d673 <x264_pixel_avg_weight_w8_sse2+35>:  psubw  %xmm4,%xmm5
0x0809d677 <x264_pixel_avg_weight_w8_sse2+39>:  movaps 0x80be880,%xmm6
0x0809d67e <x264_pixel_avg_weight_w8_sse2+46>:  pxor   %xmm7,%xmm7
0x0809d682 <x264_pixel_avg_weight_w8_sse2+50>:  mov    0x20(%esp),%esi
0x0809d686 <x264_pixel_avg_weight_w8_sse2+54>:  movq   (%eax),%xmm0
0x0809d68a <x264_pixel_avg_weight_w8_sse2+58>:  movq   (%edx),%xmm1
0x0809d68e <x264_pixel_avg_weight_w8_sse2+62>:  punpcklbw %xmm7,%xmm0
0x0809d692 <x264_pixel_avg_weight_w8_sse2+66>:  punpcklbw %xmm7,%xmm1
End of assembler dump.


> --
> Gabriel
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>



-- 
truly yours
ice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.videolan.org/pipermail/x264-devel/attachments/20080612/14af33ec/attachment-0001.htm 


More information about the x264-devel mailing list