[FFmpeg-devel] [RFC] Monkey's Audio decoder

Kostya kostya.shishkov
Tue Sep 11 09:22:54 CEST 2007


On Tue, Sep 11, 2007 at 12:10:54AM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Mon, Sep 10, 2007 at 03:28:59PM +0300, Kostya wrote:
> > Here's Monkey's Audio decoder made from libdemac by Benjamin Zores
> > and made working by me.
> > 
> > Please comment on decoder/demuxer structure
> > (ape.c is demuxer, apedec.c is decoder).
> 
> just a incomplete review as the code is too messy for my taste and this
> wasnt a real submission but just RFC ...

Now here's an updated version with most issues addressed (aligning, comments,
some functions, extradata is also in portable format).

And notes on design:
  APE container resembles Musepack in the container design - data is stored
in 32-bit little-endian words and there is no padding between frames, so
in order to decode demuxer must read several bytes before actual start and
send offset to decoder, which bswap()s input, skips tail of the previous frame
and begins decoding.
  Another distinct feature is that single frame may contain several megabytes
of audio, which is clearly unusable. So this decoder (like demac does) decodes
frame by 4608*channels samples. As it is impossible to detect their boundaries
within frame data, demuxer sends first packet with frame data and then empty
packets and decoder decodes only this fixed block of data per each call.
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ape.patch.bz2
Type: application/x-bzip2
Size: 10648 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070911/faba4d69/attachment.bin>



More information about the ffmpeg-devel mailing list