[FFmpeg-devel] [PATCH/DRAFT] MonkeyAudio Demuxer/Decoder

Zuxy Meng zuxy.meng
Sun Jul 8 13:00:56 CEST 2007


Hi,

2007/6/20, Benjamin Zores <ben at geexbox.org>:
> Hi there,
>
> As recently stated on Kostya's blog, a light GPL (plain C) decoder has
> been written by Dave Chapman for Rockbox project.
> I've started porting it to FFMpeg to have a native demuxer/decoder for
> this audio format.
>
> Good news is that demuxer seems _almost_ okay by now.
> Not so bad news is that decoder seems to work a bit: it decodes a few
> samples (too slow however) but then crashes before the end of the
> first frame, and here's where I need a few help.
>
> Well, first thing that bugs me is that MonkeyAudio uses really HUUUUGE frames.
> Though, I redefined the following in avcodec.h:
>
>
> -#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
> +#define AVCODEC_MAX_AUDIO_FRAME_SIZE 384000 // 1 second of 96khz 32bit audio
>
> In order to at least have enough space in buffer to decode all samples
> from one frame. Is this the best way to do (I really doubt so) or what
> else can be done ?
>
> By the way, FFMpeg only supports 16bits audio samples right ? So if
> anything else in found by demuxer (8/24 bits, I can just drop the
> file, right ?)
>
> Then, I'll be glad if someone could review this patch (quickly, no
> need to be exhaustive) to help me find out what can cause the decoder
> to crash after a few samples.
>
> For the record, in its current form, the decoder's implementation
> nearly is a copy/paste from original libdemac.
> That's why it uses a new RangeCoder implementation, makes uses of some
> already existing defines/macros and so on ... it'll be changed later
> on, but first step is to be able to decode with original libdemac
> code.
>
> For those who may wanna test, you can find a MA sample here:
> http://geexbox.org/~ben/test.ape
>
> Thx to whoever can help me out ;-)

What's the status of this?

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the ffmpeg-devel mailing list