[FFmpeg-devel] [PATCH] LATM Parser & LATM/AAC Decoder

Paul Kendall paul
Wed Apr 22 06:48:46 CEST 2009


On Tuesday 21 April 2009 03:59:56 am Alex Converse wrote:
> On Mon, Apr 20, 2009 at 3:11 AM, Paul Kendall <paul at kcbbs.gen.nz> wrote:
> > After a long delay and some thinking...
> > The first patch is for a LATM Parser and LATM/AAC Decoder using
> > libfaad2. The second patch is to add support for LATM to mpegts &
> > mpeg.
> >
> > Please comment and I'll endeavor to to get any fixes done ASAP.
>

[...]

> > +
> > +#include <stdio.h>
>
> What for?
>
removed

[...]

> > +
> > +static inline int64_t latm_get_value(GetBitContext *b)
>
> Seems like this can fit in an unsigned 32-bit int.
>
done

[...]

> > +    if (audioObjectType == 6 || audioObjectType == 20) {
>
> There is an AOT enum in mpeg4audio.h
>
Changed all these to use AOT enum

[...]

> > +   
> > //-----------------------------------------------------------------------
> >--
>
> These big separators are generally frowned upon.
>
removed

[...]

> > //-----------------------------------------------------------------------
> >-- +    NeAACDecFrameInfo    info;
>
> Should be declared at the top of its scope.
moved

[...]

> > +    faac_cfg = NeAACDecGetCurrentConfiguration(decoder->aac_decoder);
> > +    if (faac_cfg) {
> > +        faac_cfg->outputFormat = FAAD_FMT_16BIT;
> > +        faac_cfg->defSampleRate = (!avctx->sample_rate) ? 44100 :
> > avctx->sample_rate; +        faac_cfg->defObjectType = LC;
>
> This should use the AOT fished out of the AudioSpecificConfig

done again

[...]

>
> Regards,
> Alex Converse

Thanks for your comments.
Diego, I have made the changes you suggested as well.

I have also merged a few lines, removed a few more useless variables and
added comments where data is taken from the stream and copied over
in a single line so you know what the data is.

More comments welcome.

Cheers,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: latm1-try2.patch
Type: text/x-patch
Size: 17643 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090422/ce0957cb/attachment.bin>



More information about the ffmpeg-devel mailing list