[FFmpeg-devel] [PATCH] NellyMoser audio decoder v2

Pascal LOYAN Pascal.LOYAN
Thu Oct 18 17:08:03 CEST 2007


 
> De : ffmpeg-devel-bounces at mplayerhq.hu 
> [mailto:ffmpeg-devel-bounces at mplayerhq.hu] De la part de 
> Benjamin Larsson
> Envoy? : jeudi 18 octobre 2007 16:31
> ? : FFmpeg development discussions and patches
> Objet : Re: [FFmpeg-devel] [PATCH] NellyMoser audio decoder v2
> 
> Pascal LOYAN wrote:
> > No segfault with disable-opts + disable-mmx, it works fine. 
> Can I help more ?
> >   
> 
> Stop top posting and supply a backtrace from the ffmpeg_g 
> binary with optimizations on.
> 
> It didn't crash for me on amd64 at least.
> 
> MvH
> Benjamin Larsson
> 

$gdb ffmpeg_g
GNU gdb Red Hat Linux (6.3.0.0-1.138.el3rh)
Copyright 2004 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 "i386-redhat-linux-gnu"...Using host libthread_db
lib
rary "/lib/tls/libthread_db.so.1".

(gdb) r -y -i input.flv output.wav
Starting program: /usr/svidev/src/ffmpeg-svn/ffmpeg_g -y -i input.flv
output.wav
FFmpeg version SVN-r10773, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --disable-strip
  libavutil version: 49.5.0
  libavcodec version: 51.46.0
  libavformat version: 51.15.0
  built on Oct 18 2007 16:55:43, gcc: 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
Input #0, flv, from 'input.flv':
  Duration: 00:00:08.4, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: flv, yuv420p, 176x132, 1000.00 fps(r)
  Stream #0.1: Audio: nellymoser, 11025 Hz, mono
Output #0, wav, to 'output.wav':
  Stream #0.0: Audio: pcm_s16le, 11025 Hz, mono, 176 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
Press [q] to stop encoding

Program received signal SIGSEGV, Segmentation fault.
0x0838ada9 in ff_fft_calc_sse (s=0x93f0fbc, z=0x93ef4b4) at i386/fft_sse.c:63
63          asm volatile(
(gdb) bt
#0  0x0838ada9 in ff_fft_calc_sse (s=0x93f0fbc, z=0x93ef4b4)
    at i386/fft_sse.c:63
#1  0x082afd95 in nelly_decode_block (s=0x943b2d0, block=0xb7528008 "",
    audio=0x93ef4b0) at dsputil.h:623
#2  0x082b072c in decode_tag (avctx=0x1e0, data=0x40, data_size=0xbfff7e1c,
    buf=0x80ea12d "?CP\203? ??\215v", buf_size=1) at nellymoserdec.c:456
#3  0x00031d08 in ?? ()
#4  0x093ef4b4 in ?? ()
#5  0x00000001 in ?? ()
#6  0x093ef140 in ?? ()
#7  0xbfff7e1c in ?? ()
#8  0x00000040 in ?? ()
#9  0xbfff7e1c in ?? ()
#10 0x080ea12d in avcodec_decode_audio2 (avctx=0x93ef4b0, samples=0xc0c322,
    frame_size_ptr=0x943b2d0, buf=0x3e8 <Address 0x3e8 out of bounds>,
    buf_size=155120820) at utils.c:970
#11 0x09422790 in ?? ()
#12 0x093ef050 in ?? ()
#13 0x00031d00 in ?? ()
#14 0x0805eee3 in output_packet (ist=0x3e8, ist_index=0, ost_table=0x5,
    nb_ostreams=0, pkt=0x9422790) at ffmpeg.c:1061
#15 0x00000000 in ?? ()
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x838ad89 to 0x838adc9:
0x0838ad89 <ff_fft_calc_sse+29>:        movaps 0x844a2d0,%xmm4
0x0838ad90 <ff_fft_calc_sse+36>:        movaps (%eax),%xmm5
0x0838ad93 <ff_fft_calc_sse+39>:        movl   $0x8,(%esp)
0x0838ad9a <ff_fft_calc_sse+46>:        mov    %dl,%cl
0x0838ad9c <ff_fft_calc_sse+48>:        shll   %cl,(%esp)
0x0838ad9f <ff_fft_calc_sse+51>:        mov    (%esp),%eax
0x0838ada2 <ff_fft_calc_sse+54>:        mov    0x24(%esp),%ecx
0x0838ada6 <ff_fft_calc_sse+58>:        sub    $0x20,%eax
0x0838ada9 <ff_fft_calc_sse+61>:        movaps (%eax,%ecx,1),%xmm0
0x0838adad <ff_fft_calc_sse+65>:        movaps %xmm0,%xmm1
0x0838adb0 <ff_fft_calc_sse+68>:        shufps $0x4e,%xmm0,%xmm0
0x0838adb4 <ff_fft_calc_sse+72>:        xorps  %xmm4,%xmm1
0x0838adb7 <ff_fft_calc_sse+75>:        addps  %xmm1,%xmm0
0x0838adba <ff_fft_calc_sse+78>:        movaps 0x10(%eax,%ecx,1),%xmm2
0x0838adbf <ff_fft_calc_sse+83>:        movaps %xmm2,%xmm3
0x0838adc2 <ff_fft_calc_sse+86>:        shufps $0x4e,%xmm2,%xmm2
0x0838adc6 <ff_fft_calc_sse+90>:        xorps  %xmm4,%xmm3
End of assembler dump.
(gdb) info all-registers
eax            0x1e0    480
ecx            0x93ef4b4        155120820
edx            0x6      6
ebx            0x93f0fbc        155127740
esp            0xbfff7690       0xbfff7690
ebp            0x93ef4b4        0x93ef4b4
esi            0x85527e0        139798496
edi            0x93f0fbc        155127740
eip            0x838ada9        0x838ada9
eflags         0x10202  66050
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x33     51
st0            -nan(0x7f7f7f7f7f7f7f7f) (raw 0xffff7f7f7f7f7f7f7f7f)
st1            -nan(0x7f7f7f7f7f7f7f7f) (raw 0xffff7f7f7f7f7f7f7f7f)
st2            -nan(0x7f7f7f7f7f7f7f7f) (raw 0xffff7f7f7f7f7f7f7f7f)
st3            0        (raw 0x00000000000000000000)
st4            27.805912437677989146322943270206451     (raw
0x4003de7282385a220000)
st5            6.8262873563126049702987074851989746     (raw
0x4001da70f22e8ec00000)
st6            21.507483997945882947533391416072845     (raw
0x4003ac0f53c5335e0000)
st7            -48.647302820709910520236007869243622    (raw
0xc004c296d68cf63b0000)
fctrl          0x37f    895
fstat          0x220    544
ftag           0xffff   65535
fiseg          0x23     35
fioff          0x82afd69        137035113
foseg          0x2b     43
fooff          0x93ef5b8        155121080
fop            0x1c9    457
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 11 times>, 0x80, 0x0, 0x0, 0x0, 0x80}, v8_int16 =
{
    0x0, 0x0, 0x0, 0x0, 0x0, 0x8000, 0x0, 0x8000}, v4_int32 = {0x0, 0x0,
    0x80000000, 0x80000000}, v2_int64 = {0x0, 0x8000000080000000},
  uint128 = 0x80000000800000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 11 times>, 0x80, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0x8000, 0x0, 0x0}, v4_int32 = {0x0, 0x0,
    0x80000000, 0x0}, v2_int64 = {0x0, 0x80000000},
  uint128 = 0x00000000800000000000000000000000}
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   8064
mm0            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
    0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 =
{0x7f,
    0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
mm1            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
    0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 =
{0x7f,
    0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
mm2            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
    0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 =
{0x7f,
    0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
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 = 0xde7282385a220000, v2_int32 = {0x5a220000,
    0xde728238}, v4_int16 = {0x0, 0x5a22, 0x8238, 0xde72}, v8_int8 = {0x0,
    0x0, 0x22, 0x5a, 0x38, 0x82, 0x72, 0xde}}
mm5            {uint64 = 0xda70f22e8ec00000, v2_int32 = {0x8ec00000,
    0xda70f22e}, v4_int16 = {0x0, 0x8ec0, 0xf22e, 0xda70}, v8_int8 = {0x0,
    0x0, 0xc0, 0x8e, 0x2e, 0xf2, 0x70, 0xda}}
mm6            {uint64 = 0xac0f53c5335e0000, v2_int32 = {0x335e0000,
    0xac0f53c5}, v4_int16 = {0x0, 0x335e, 0x53c5, 0xac0f}, v8_int8 = {0x0,
    0x0, 0x5e, 0x33, 0xc5, 0x53, 0xf, 0xac}}
mm7            {uint64 = 0xc296d68cf63b0000, v2_int32 = {0xf63b0000,
    0xc296d68c}, v4_int16 = {0x0, 0xf63b, 0xd68c, 0xc296}, v8_int8 = {0x0,
    0x0, 0x3b, 0xf6, 0x8c, 0xd6, 0x96, 0xc2}}
(gdb)




More information about the ffmpeg-devel mailing list