[FFmpeg-devel] mjpeg and llvm-gcc

Derk-Jan Hartman hartman
Wed Jun 17 15:16:25 CEST 2009


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 ?


/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/llvmgcc42/llvmgcc42-2056~2/src/configure -- 
disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2  
--mandir=/Developer/usr/llvm-gcc-4.2/share/man --enable- 
languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program- 
transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-gxx-include-dir=/usr/ 
include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 -- 
enable-llvm=/Developer/usr/local --host=i686-apple-darwin9 -- 
target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5555) (LLVM build 2056)


/Developer/usr/bin/gcc-4.2 -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5566~1/src/configure --disable- 
checking --enable-werror --prefix=/usr --mandir=/usr/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 -- 
with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9  
--target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5566)



P.S. I tried testing with ./ffmpeg but it can't seem to find files on  
my filesystem....

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


FFmpeg version SVN-r19214, Copyright (c) 2000-2009 Fabrice Bellard, et  
al.
   configuration: --enable-libmp3lame --enable-libgsm --enable- 
memalign-hack --cc=/Developer/usr/bin/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/bin/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:50:10, gcc: 4.2.1 (Apple Inc. build 5566)
/Users/hartman/Inside_Wikimedia_01-13-09_hires.mov: no such file or  
directory








More information about the ffmpeg-devel mailing list