[Ffmpeg-devel] [RFC] More PCM formats (was: [PATCH] demuxer for dcinema audio)

Reimar Döffinger Reimar.Doeffinger
Thu Sep 1 22:21:57 CEST 2005

On Thu, Sep 01, 2005 at 09:59:10PM +0200, Michael Niedermayer wrote:
> On Thu, Sep 01, 2005 at 07:13:58PM +0200, Reimar D?ffinger wrote:
> > No reply :-(. 
> well, that was because i wasnt entirely happy with it as it converts

No problem, I just like to know if I'm on the right track...

> everything to 16bit in the decoder, we really should finish at least 32bit
> integer and 32bit float audio support ...

I agree, though if you want conversion between all formats you either
need lots of conversions or it will be slow :-(.
MPlayer tries a compromise by having special functions for conversions
that are needed often and a slow function for everything else.

> maybe use av_get_packet() it would make the code 1 or 2 lines shorter

I knew I missed something. I was just copying from wav.c, so I guess
that could be improved as well (line 341).

> > The macros I introduced in pcm.c are just a suggestion too, especially
> IMHO they should be changed to inline functions, as thats cleaner, unless
> of course its slower, that brings us to the next point, it must be
> benchmarked to ensure its not significantly slower

I guess that will depend a lot on the compiler, unfortunately.

> uninitalized bytes are not acceptable, they could messup the regression
> tests

The best way I could thing of was unfortunately doing
if (bps > 2) memset(dst, 0, ...). Or not using a macro/inline function,
but that makes it a huge mess IMO (though more huge than mess).
Not really nice :-(


More information about the ffmpeg-devel mailing list