[FFmpeg-devel] mjpeg and llvm-gcc
Alexander Strange
astrange
Thu Jun 18 03:48:17 CEST 2009
On Jun 17, 2009, at 9:16 AM, Derk-Jan Hartman wrote:
> For VLC media player Mac OS X, we were working on using llvm-gcc for
> the new binaries. VLC and FFmpeg was behaving very well with it, but
> recently I noticed it crashed in ff_mjpeg_decode_sos() for almost
> all MJPEGs.
>
> Example file: http://samples.mplayerhq.hu/V-codecs/MJPEGs/angels_480-mjpegcompress.avi
>
> This file (and other mjpeg files) was producing "error dc" errors,
> and eventually crashed.
> I have been able to determine that when I switch from llvm-gcc-4.2
> back to gcc-4.2, the crash disappeared. I have little experience
> trying to track causes to things like this, so if anyone has any
> tips on how to proceed, I would welcome them. If someone could try
> with llvm on Linux, that might be useful as well. I guess this might
> possibly be a compiler bug ? Should I try different optimization
> settings ?
It disappears for me if I disable x86 code (using --arch=none). I
believe llvm has trouble with some inline asm - some configuration
makes llvm-gcc and clang crash on h264, I can't remember which - so
you might try hunting those down and disabling them individually.
By the way, where did "--enable-memalign-hack" and "-mtune=prescott"
come from? The first should be unnecessary on OS X and the second is
worse than defaults.
> [..]
> FFmpeg version SVN-r19206, Copyright (c) 2000-2009 Fabrice Bellard,
> et al.
> configuration: --enable-libmp3lame --enable-libgsm --enable-
> memalign-hack --cc=/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 --
> arch=i386 --disable-libfaac --enable-gpl --enable-postproc --disable-
> ffserver --enable-ffmpeg --enable-ffplay --disable-devices --disable-
> protocols --disable-network --prefix=/Users/hartman/Development/vlc-
> old/extras/contrib --extra-cflags='-I/Users/hartman/Development/vlc-
> old/extras/contrib/include -march=pentium-m -mtune=prescott -arch
> i386 -DMACOSX_DEPLOYMENT_TARGET=10.5 -isysroot /Developer/SDKs/
> MacOSX10.5.sdk -mmacosx-version-min=10.5 -isystem /Users/hartman/
> Development/vlc-old/extras/contrib/include -DHAVE_LRINTF -
> DRUNTIME_CPUDETECT' --extra-ldflags='-L/Users/hartman/Development/
> vlc-old/extras/contrib/lib -arch i386 -isysroot /Developer/SDKs/
> MacOSX10.5.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk' --
> enable-libmp3lame --enable-libgsm --enable-memalign-hack --cc=/
> Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 --arch=i386 --disable-
> libfaac --enable-gpl --enable-postproc --disable-ffserver --enable-
> ffmpeg --enable-ffplay --disable-devices --disable-protocols --
> disable-network --disable-shared --enable-static
> libavutil 50. 3. 0 / 50. 3. 0
> libavcodec 52.31. 2 / 52.31. 2
> libavformat 52.34. 0 / 52.34. 0
> libavdevice 52. 2. 0 / 52. 2. 0
> libswscale 0. 7. 1 / 0. 7. 1
> libpostproc 51. 2. 0 / 51. 2. 0
> built on Jun 17 2009 14:23:53, gcc: 4.2.1 (Based on Apple Inc.
> build 5555) (LLVM build 2056)
> /Users/hartman/angels_480-mjpegcompress.avi: no such file or directory
More information about the ffmpeg-devel
mailing list