[FFmpeg-cvslog] r10223 - in trunk/libavcodec/i386: dsputil_mmx.c snowdsp_mmx.c

Benoit Fouet benoit.fouet
Mon Aug 27 11:19:45 CEST 2007


michael wrote:
> Author: michael
> Date: Sat Aug 25 17:20:56 2007
> New Revision: 10223
>
> Log:
> update mmx code to latest snow changes
> note, the code likely can overflow and thus needs some more changes
> sse2 updated too but disabled as its untested
>
>   

i don't know if that can help you, but i enabled it and ran the
regression test, i got a segmentation fault.
here is the debugger info:

gdb --args ./ffmpeg_g -y -flags +bitexact -dct fastint -idct simple -y
-i ./tests/data/a-snow.avi -f rawvideo -s 352x288 ./tests/data/out.yuv
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/bfouet/env/open_sources/ffmpeg/ffmpeg_g -y
-flags +bitexact -dct fastint -idct simple -y -i ./tests/data/a-snow.avi
-f rawvideo -s 352x288 ./tests/data/out.yuv
[Thread debugging using libthread_db enabled]
[New Thread -1216002384 (LWP 11246)]
FFmpeg version SVN-r10246, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-libmp3lame --enable-libxvid
--enable-libogg --enable-libvorbis --enable-libx264 --enable-libfaad
--enable-libfaac --enable-libamr-nb --enable-libamr-wb --enable-pp
--disable-strip --prefix=/usr --mandir=/usr/share/man --enable-x11grab
--disable-ffserver --enable-libtheora --enable-liba52
  libavutil version: 49.5.0
  libavcodec version: 51.42.0
  libavformat version: 51.12.2
  built on Aug 27 2007 10:46:50, gcc: 3.4.6 (Gentoo 3.4.6-r1,
ssp-3.4.5-1.0, pie-8.7.9)
Input #0, avi, from './tests/data/a-snow.avi':
  Duration: 00:00:02.0, start: 0.000000, bitrate: 626 kb/s
  Stream #0.0: Video: snow, yuv420p, 128x64, 25.00 fps(r)
Output #0, rawvideo, to './tests/data/out.yuv':
  Stream #0.0: Video: rawvideo, yuv420p, 352x288, q=2-31, 200 kb/s,
25.00 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216002384 (LWP 11246)]
0x0834bbfa in ff_snow_horizontal_compose97i_sse2 (b=0x85577b0, width=64)
at i386/snowdsp_mmx.c:155
155                 asm volatile(
(gdb) bt
#0  0x0834bbfa in ff_snow_horizontal_compose97i_sse2 (b=0x85577b0,
width=64) at i386/snowdsp_mmx.c:155
#1  0x082c75d7 in spatial_compose97i_dy_buffered (dsp=0xb75bb240,
cs=0xbfd7d944, sb=0xb77c70e4, width=64, height=32, stride_line=2)
    at snow.c:1220
#2  0x082df5fd in decode_frame (avctx=0x8527d90, data=0xbfd7df30,
data_size=0xbfd7d560, buf=0xbfd7d560 "\220}R\b???,
    buf_size=-1076374176) at snow.c:1314
#3  0x080cd32e in avcodec_decode_video (avctx=0x8527d90,
picture=0xbfd7d560, got_picture_ptr=0xbfd7dbd0,
    buf=0xbfd7d560 "\220}R\b???, buf_size=-1076371664) at utils.c:937
#4  0x0805caa5 in output_packet (ist=0x8531ad0, ist_index=0,
ost_table=0x8531b20, nb_ostreams=1, pkt=0xbfd7e1f0) at ffmpeg.c:1079
#5  0x08063656 in main (argc=139664080, argv=0xbfd7d560) at ffmpeg.c:1953
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x834bbda to 0x834bc1a:
0x0834bbda <ff_snow_horizontal_compose97i_sse2+954>:    jne    0x834bbb4
<ff_snow_horizontal_compose97i_sse2+916>
0x0834bbdc <ff_snow_horizontal_compose97i_sse2+956>:    cmp    %ebx,%esi
0x0834bbde <ff_snow_horizontal_compose97i_sse2+958>:    jmp    0x834bc37
<ff_snow_horizontal_compose97i_sse2+1047>
0x0834bbe0 <ff_snow_horizontal_compose97i_sse2+960>:    mov   
0x8(%ebp),%esi
0x0834bbe3 <ff_snow_horizontal_compose97i_sse2+963>:    add    %eax,%eax
0x0834bbe5 <ff_snow_horizontal_compose97i_sse2+965>:    lea   
(%eax,%edi,1),%ecx
0x0834bbe8 <ff_snow_horizontal_compose97i_sse2+968>:    lea   
(%eax,%esi,1),%edx
0x0834bbeb <ff_snow_horizontal_compose97i_sse2+971>:    mov   
0xffffffe4(%ebp),%esi
0x0834bbee <ff_snow_horizontal_compose97i_sse2+974>:    add    %esi,%eax
0x0834bbf0 <ff_snow_horizontal_compose97i_sse2+976>:    movdqu
0x2(%edx),%xmm2
0x0834bbf5 <ff_snow_horizontal_compose97i_sse2+981>:    movdqu
0x12(%edx),%xmm6
0x0834bbfa <ff_snow_horizontal_compose97i_sse2+986>:    paddw  (%edx),%xmm2
0x0834bbfe <ff_snow_horizontal_compose97i_sse2+990>:    paddw 
0x10(%edx),%xmm6
0x0834bc03 <ff_snow_horizontal_compose97i_sse2+995>:    movdqu (%ecx),%xmm0
0x0834bc07 <ff_snow_horizontal_compose97i_sse2+999>:    movdqu
0x10(%ecx),%xmm4
0x0834bc0c <ff_snow_horizontal_compose97i_sse2+1004>:   paddw  %xmm2,%xmm0
0x0834bc10 <ff_snow_horizontal_compose97i_sse2+1008>:   paddw  %xmm6,%xmm4
0x0834bc14 <ff_snow_horizontal_compose97i_sse2+1012>:   psraw  $0x1,%xmm2
0x0834bc19 <ff_snow_horizontal_compose97i_sse2+1017>:   psraw  $0x1,%xmm6
End of assembler dump.
(gdb) info all-registers
eax            0xbfd7d560       -1076374176
ecx            0x8557808        139819016
edx            0x85577c8        139818952
ebx            0xc      12
esp            0xbfd7d540       0xbfd7d540
ebp            0xbfd7d5c8       0xbfd7d5c8
esi            0xbfd7d548       -1076374200
edi            0x85577f0        139818992
eip            0x834bbfa        0x834bbfa
<ff_snow_horizontal_compose97i_sse2+986>
eflags         0x10296  [ PF AF SF IF RF ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51
st0            0        (raw 0x00000000000000000000)
st1            0        (raw 0x00000000000000000000)
st2            0        (raw 0x00000000000000000000)
st3            0        (raw 0x00000000000000000000)
st4            0.00390625       (raw 0x3ff78000000000000000)
st5            1.000000000000000015902891109759918e+100 (raw
0x414b924d692ca61be800)
st6            0        (raw 0x00000000000000000000)
st7            10000000 (raw 0x40169896800000000000)
fctrl          0x37f    895
fstat          0x121    289
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
mxcsr          0x1f80   [ IM DM ZM OM UM PM ]
mm0            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm1            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm2            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm3            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm4            {uint64 = 0x8000000000000000, v2_int32 = {0x0,
0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x80}}
mm5            {uint64 = 0x924d692ca61be800, v2_int32 = {0xa61be800,
0x924d692c}, v4_int16 = {0xe800, 0xa61b, 0x692c, 0x924d},
  v8_int8 = {0x0, 0xe8, 0x1b, 0xa6, 0x2c, 0x69, 0x4d, 0x92}}
---Type <return> to continue, or q <return> to quit---
mm6            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm7            {uint64 = 0x9896800000000000, v2_int32 = {0x0,
0x98968000}, v4_int16 = {0x0, 0x0, 0x8000, 0x9896}, v8_int8 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x80, 0x96, 0x98}}


-- 
Ben
Purple Labs S.A.
www.purplelabs.com




More information about the ffmpeg-cvslog mailing list