[FFmpeg-devel] [PATCH] add initial suncc support

Michael Kostylev michael.kostylev
Wed Oct 28 17:53:42 CET 2009


On Wed Oct 28 15:56:06 2009
M?ns Rullg?rd wrote:

>>>> Suncc ignores or doesn't accept some standard gcc options, so we must
>>>> provide the alternatives:
>>> You could use a flag filter function for that.  See tms470 for reference.
>>
>> Ok. `make test' fails if ffmpeg is compiled with -O[2-5], how this should
>> be handled:
>
> The bug (probably in the compiler) should be fixed.  There is no point
> compiling with -O1.  You're probably better off using gcc then.

Gcc is notably better for at least two different reasons.

> What is failing?

% gdb64 --args ./ffmpeg_g -v 0 -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact -qscale 10 -f image2 -vcodec pgmyuv -i ./tests/vsynth1/%02d.pgm -an -vcodec asv1 ././tests/data/a-asv1.avi
...
Program received signal SIGSEGV, Segmentation fault.
0x00000000004a658f in asv1_put_level ()
(gdb) bt
#0  0x00000000004a658f in asv1_put_level ()
#1  0x00000000004a6b97 in asv1_encode_block ()
#2  0x00000000004a6f1d in encode_mb ()
#3  0x00000000004a78a9 in encode_frame ()
#4  0x0000000000488758 in avcodec_encode_video ()
#5  0x00000000004055ff in do_video_out ()
#6  0x0000000000406ab7 in output_packet ()
#7  0x0000000000408c86 in av_encode ()
#8  0x000000000040c70a in main ()
(gdb) disas $pc-32 $pc+8
Dump of assembler code from 0x4a656f to 0x4a6597:
0x00000000004a656f <asv1_put_level+31>: mov    $0x15,%dh
0x00000000004a6571 <asv1_put_level+33>: test   $0x48001d22,%eax
0x00000000004a6576 <asv1_put_level+38>: mov    %ebx,%edi
0x00000000004a6578 <asv1_put_level+40>: callq  0x4a61fc <put_bits>
0x00000000004a657d <asv1_put_level+45>: mov    %rbx,%rdi
0x00000000004a6580 <asv1_put_level+48>: mov    $0x8,%esi
0x00000000004a6585 <asv1_put_level+53>: mov    %r12d,%edx
0x00000000004a6588 <asv1_put_level+56>: callq  0x4a6280 <put_sbits>
0x00000000004a658d <asv1_put_level+61>: jmp    0x4a65a9 <asv1_put_level+89>
0x00000000004a658f <asv1_put_level+63>: movzbl 0x67881f(%r12,%r12,1),%esi
End of assembler dump.
(gdb) info reg
rax            0x2      2
rbx            0xe57808 15038472
rcx            0x5      5
rdx            0xd      13
rsi            0xffffffff       4294967295
rdi            0xe57808 15038472
rbp            0x7fffffffd4b0   0x7fffffffd4b0
rsp            0x7fffffffd4a0   0x7fffffffd4a0
r8             0x6      6
r9             0xfffffffffffffff1       -15
r10            0xffffffff       4294967295
r11            0x2      2
r12            0xffffffff       4294967295
r13            0x10     16
r14            0x0      0
r15            0x4      4
rip            0x4a658f 0x4a658f <asv1_put_level+63>
eflags         0x10297  [ CF PF AF SF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]

Michael



More information about the ffmpeg-devel mailing list