Yearly Archives: 2008

ccache Makes gcc Crash

Well this is mildly disconcerting: ccache can make gcc crash. Now, I am the first person to extol the virtues of ccache; the tool dramatically decreases the amount of time that the FATE farm has to spend rebuilding FFmpeg. But the crash is quite reproducible.

If you have kept up with FATE for any length of time, you know that there is a chronic problem with compiling FFmpeg using SVN versions of gcc on PowerPC — in particular, the build phase tends to crash with an internal compiler error. Last night, I upgraded the gcc-SVN compilers on all the FATE machines. Tonight, I was determined to sit down and finally go through all the steps to submit the highest quality gcc bug report I could. I thought it would be prudent to report the full command line without the ccache command. Wouldn’t you know, the problem file compiles fine. From there, it takes over 20 minutes instead under 5 to compile the whole tree. Running the FATE test suite also passes with flying colors.

So there’s a bug here. Where do you think the problem lies? ccache or gcc? I have a bad feeling that this is the kind of problem both camps are likely to blame on the other. All I know is that the following command:

$ /usr/bin/ccache /usr/local/gcc-138544-20080801/bin/gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I. -I”/home/melanson/ffmpeg/ffmpeg-main” -fomit-frame-pointer -maltivec -mabi=altivec -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -O3 -fno-math-errno -fno-signed-zeros -fPIC -DPIC -c -o libavcodec/imc.o /home/melanson/ffmpeg/ffmpeg-main/libavcodec/imc.c

yields the output:

/home/melanson/ffmpeg/ffmpeg-main/libavcodec/imc.c: In function ‘imc_decode_init’:
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/imc.c:146: warning: assignment from incompatible pointer type
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/imc.c: In function ‘imc_decode_frame’:
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/imc.c:808: internal compiler error: in tree_node_structure, at tree.c:2412
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

Removing the prepended /usr/bin/ccache command makes the internal compiler error go away. For the time being, I have removed ccache, but only from the problematic FATE configuration. The PowerPC machine will not be nearly as efficient at performing FATE work, but at least it will keep abreast of gcc-SVN changes.

Update, 2008-08-05: Great news: Recent revisions of FFmpeg have been causing the gcc-SVN copy for PPC crash, and without ccache. It looks like I will be able to pin this on gcc after all.

Followup:

Ultimate DVD Demo

I scavenged this from a spent shop today:


Ultimate DVD Demo -- main menu

“The Ultimate DVD Demo” alleges to flex the full capabilities of a DVD player (all kinds of audio tracks, audio encodings, viewing angles, subtitles– basically everything that your DVD remote has a button for). I wish I possessed this back when I was first heavily involved in xine development circa 2002; it would have been handy for testing and verification.

AOL ART Format

I can’t believe I haven’t heard of this still image format before — it’s called ART and was apparently used in earlier incarnations of America OnLine’s service. All that anyone knows about it is that it is based on compression techniques licensed from an outfit named Johnson-Grace, a firm that AOL later purchased.

The Wikipedia page implies that this format is to still image formats what Bink is to video codecs — if the marketing literature is to be believed, the compressor analyzes the data to be compressed and selects from a number of coding methods based on the assessed characteristics. The Wikipedia page also links to several J-G patents, none of which I have read.

A colleague sent me a bevy of samples for study. Where to start with a reverse engineering effort? There seems to be plenty of ancient programs that can work with the format. However, it seems reasonable that the code for decoding ART files must live on any of the billions of free AOL signup disks known to exist.

VP3 In The Wild

I can’t believe I actually found a usage of On2’s VP3 video codec in the wild– on a 2006 Windows game called Time To Ride: Saddles and Stables. The most amazing part about this is that software based on my FFmpeg VP3 decoder plays one of the files correctly while the official VP3 decoder installed with the game exhibits some serious bugs.

Official decoder, distributed with the game:


VP3 incorrect decoding

Same file, played with FFmpeg’s FFplay (it’s supposed to have a grainy film feel to it):


VP3 looks right

This makes me almost as proud as finding that an Apple QuickTime trailer for a particular 2000 movie that used to work in QT 4 was able to play with my xine QuickTime demuxer but not with QT 6. (To be fair, the same trailer works again under QT 7.)