[FFmpeg-devel] ADPCM task (was Re: files in incoming)
Thu Jan 29 20:40:53 CET 2009
Mike Melanson wrote:
> 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
I am not sure how to interpret this sentence. I currently
file it under irony :)
> 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:
> 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
> Linux / x86_64 / gcc svn
> Linux / x86_32 / gcc 4.3.2
This is the platform I happen to use and indeed playback was broken.
The attached patch fixes it for me.
The reason is that the + operator does not constitute a sequence point,
thus the side-effects of the bytestream_get_x calls, i.e. incrementing
src, can actually take place before reading src as the left operand.
In case that explanation is correct, you have to thank Mans for
teaching me this particular insight into C programming.
Independent of my patch, I think the pointer srcC should get some
sanity checking at that point?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel