[FFmpeg-devel] [PATCH] ALS decoder

Justin Ruggles justin.ruggles
Sun Aug 23 13:41:22 CEST 2009

Thilo Borgmann wrote:

>> i see, still at least the declarations could be moved in the loop
> Ok.
>> and f course if something can be done about the 64bit that would be great
>> speedwise ...
> Unfortunately, the reference decoder also uses 64-bit for them.

The specification indicates 64-bit as well.  I'm not sure if it is
possible, but if you can somehow get bit-exact results using 32-bit then
you should.

>>>>>> +        if (sconf->resolution == 2 || sconf->floating)
>>>>>> +            const_val_bits = 24;
>>>>>> +        else
>>>>>> +            const_val_bits = avctx->bits_per_raw_sample;
>>>>> why would const_val_bits != avctx->bits_per_raw_sample ?
>>>> bits_per_raw_sample = 32 for floating sconf->floating.
>>> To explain this further... The way floating-point in ALS works is that
>>> it has a 24-bit integer part and a floating-point difference part.  So
>>> the final output is 32-bit, even though the integer part decoded here is
>>> only 24-bit.
>> the sconf->resolution == 2 still is useless?
> The output format in that case is also set to SAMPLE_FMT_S32.

Even though the output sample format is S32, bits_per_raw_sample should
still reflect the source bit depth, I think.


More information about the ffmpeg-devel mailing list