[FFmpeg-devel] ADPCM task (was Re: files in incoming)

Mike Melanson mike
Wed Jan 28 06:28:29 CET 2009


Stefan Gehrer wrote:
> 2.) incoming/xbox-adpcm-wav/*
> Peter Ross posted a patch for supporting these in November.
> Since I just had my first experience with an ADPCM format
> I thought I could look at that too.

Working with ADPCM for the first time can be a very moving experience, I 
know. While you're waiting for Peter to re-upload those samples, perhaps 
you might wish to study adpcm_ea_r2. Check out these 2 files:

http://samples.mplayerhq.hu/game-formats/ea-mad/THX_logo.mad
http://samples.mplayerhq.hu/game-formats/ea-mpc/THX_logo.mpc

and probably other files from those 2 directories. Decode the audio using:

   ffmpeg -i <file> out.wav

The problem is that gcc 4.3.2 and gcc 4.4-svn decode the file in a very 
wrong way. And they each do it differently for each platform; 3 CPUs * 2 
  compilers => 6 different outputs:

(using 'ffmpeg -i <file> -f crc -'

   Linux / x86_64 / gcc 4.3.2
CRC=0x6c49e01a

   Linux / x86_64 / gcc svn
CRC=0x7dbbbe76

   Linux / x86_32 / gcc 4.3.2
CRC=0x78e518ec

   Linux / x86_32 / gcc svn
CRC=0x007ad110

   Linux / PPC / gcc 4.3.2
CRC=0xf270fbfc

   Linux / PPC / gcc svn
CRC=0xd47409ca

For comparison, the following configurations all agree on the CRC, and 
it sounds correct:

   Linux / x86_32 / icc
   Linux / x86_32 / gcc 2.95.3
   Linux / x86_32 / gcc 3.4.6
   Linux / x86_32 / gcc 4.0.4
   Linux / x86_32 / gcc 4.1.2
   Linux / x86_32 / gcc 4.2.4
   Linux / x86_64 / gcc 4.0.4
   Linux / x86_64 / gcc 4.1.2
   Linux / x86_64 / gcc 4.2.4
   Linux / PPC / gcc 4.0.4
   Linux / PPC / gcc 4.1.2
   Linux / PPC / gcc 4.2.4
   Mac OS X / x86_64 / gcc 4.0.1
   Mac OS X / PPC / gcc 4.0.1
CRC=0xa1158634

-- 
     -Mike Melanson




More information about the ffmpeg-devel mailing list