[Ffmpeg-devel] Does FLAC decoder support 24-bit files?
Wed Oct 26 01:39:18 CEST 2005
Dave Chapman wrote:
> Fixing that problem (I'll try and post a patch later, but basically, you
> need a second version of the main loop in that function - with sum a
> 64-bit int, and cast the two values in the multiplication to 64-bit as
> well). With that change, I am now getting bit-perfect 24-bit output
> from the ffmpeg FLAC decoder.
Good catch. That 64-bit math bites us too often. That's why I always
write it like this:
int64_t var64 = var32_a;
var64 *= var32_b;
var64 /= var32_c;
Hey, the compiler is going to reduce it to something like that
More information about the ffmpeg-devel