[Ffmpeg-devel] [PATCH] ac3enc mdct data type
Justin Ruggles
jruggle
Tue Apr 11 05:59:09 CEST 2006
Michael Niedermayer wrote:
> Hi
>
> On Mon, Apr 10, 2006 at 09:13:09PM -0400, Justin Ruggles wrote:
>
>>Hello,
>>
>>This probably should have gone along with the last patch I submitted.
>>Now we've determined the range of the MDCT coefficients, they don't need
>>to be int32_t. This patch changes them to int16_t to save a little memory.
>
>
> int16_t is not optimal, use int or int_fast16_t IMHO
I'm not too familiar with int_fastXX_t types. Does this just choose the
fastest int type depending the platform? And if so, why is it not used
more often?
> btw, maybe you want to write an optional floating point based MDCT?
> it would be faster and more accurate on modern cpus ...
>
> [...]
>
I already have...well, sort of :) I'm actually writing a floating-point
based stand-alone AC-3 encoder, derived mostly from FFmpeg, but with a
lot of the code structure re-written. My main motivation is to add more
complex functionality such as that in LAME or FAAC. Right now it's not
even close to release-ready though. I will eventually release it under
LGPL in case there is ever anything useful that might be okay to go back
into FFmpeg.
Anyway...I've never tried to do selectable floating-point/fixed-point
before. From what I gather, I could keep most of the code as-is and
just use #ifdef's and typedef's. Are there any other codecs in FFmpeg
that do this that I could use as a model? FFmpeg already has
floating-point FFT which could possibly be reused. I think the MDCT in
AC-3 is a bit different than the standard MDCT, but I'll double-check that.
-Justin
More information about the ffmpeg-devel
mailing list