[FFmpeg-devel] MMX function crash with icc -fp-stack-check
Tue Mar 24 21:44:09 CET 2009
On Tue, Mar 24, 2009 at 3:03 PM, Yves Lefebvre
<yves.lefebvre at vantrix.com> wrote:
>> We would need the correct svn revision, ie not custom.
> Yesterday trace where done with a fresh git clone. I just retry with today
> svn snapshot :
> Starting program: /home/yves/ffmpeg-export-2009-03-24/ffmpeg_g -i test.avi
> -vcodec rawvideo -an -deinterlace out2.avi
> FFmpeg version SVN-r18177-snapshot, Copyright (c) 2000-2009 Fabrice Bellard,
> et al.
> ?configuration: --prefix=/home/yves/ffmpeg-export-2009-03-24/install
> --cc=icc -fp-stack-check
> ?libavutil ? ? 50. 2. 0 / 50. 2. 0
> ?libavcodec ? ?52.22. 3 / 52.22. 3
> ?libavformat ? 52.32. 0 / 52.32. 0
> ?libavdevice ? 52. 1. 0 / 52. 1. 0
> ?libswscale ? ? 0. 7. 1 / ?0. 7. 1
> ?built on Mar 24 2009 09:09:24, gcc: Intel(R) C++ gcc 4.2 mode
> Input #0, avi, from 'test.avi':
> ?Duration: 00:00:00.66, start: 0.000000, bitrate: 9133 kb/s
> ? Stream #0.0: Video: rawvideo, yuv420p, 176x144, 30 tbr, 30 tbn, 30 tbc
> Output #0, avi, to 'out2.avi':
> ? Stream #0.0: Video: rawvideo, yuv420p, 176x144, q=2-31, 200 kb/s, 30 tbn,
> 30 tbc
> Stream mapping:
> ?Stream #0.0 -> #0.0
> Press [q] to stop encoding
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000555d3e in avpicture_deinterlace (dst=0x3a613b0, src=0x3a57f20,
> pix_fmt=61177808, width=61177632, height=176)
> ? at libavcodec/imgconvert.c:1578
> 1578 ? ? ? ? ? ? ? ?deinterlace_bottom_field(dst->data[i],dst->linesize[i],
This is the intendend behaviour (so to speak). -fp-stack-check will
rightfully crash if an MMX code has been called without clearing the
FPU state afterwards.
However, if you read the code of libavcodec/imgconvert.c::int
you'll see that emms_c() is called after deinterlace_bottom_field() or
deinterlace_bottom_field_inplace() is called on all planes.
See, EMMS instruction used to be quite expensive on older CPUs (I
don't know about current ones), so it's a good idea to avoid using it
Short answer: don't shoot yourself in the foot and don't used that
Only a very small fraction of our DNA does anything; the rest is all
comments and ifdefs.
Fred Allen - "The first time I sang in the church choir; two hundred
people changed their religion."
More information about the ffmpeg-devel