[FFmpeg-devel] [PATCH] DVB LATM parser

Robert Swain robert.swain
Thu Jul 3 15:52:37 CEST 2008

2008/7/3 Paul Kendall <paul at kcbbs.gen.nz>:
> Hi attached is a patch that provides a AAC LATM parser CODEC_ID_AAC_LATM I
> have been working on. The libfaad decoder is also patched to provide another
> codec the decoding for this codec id. There are minor patches to mpeg.c &
> mpegts.c to send stream id 0x11 to this codec id.
> With this patch I can get audio working perfectly for NZ DVB-T using the stock
> unpatched libfaad2 library.
> I would welcome comments and suggestions so this can be included in the ffmpeg
> codebase.

I know you're probably aware of some of these comments and I'll let
someone more experienced/knowledgeable comment but I have a few
comments of my own which they and you may wish to consider:

- I don't think it should be implemented as a codec but rather as a
bitstream parser or demuxer as appropriate. I need to reread the spec
for LATM but at the moment I'm not sure if generic LATM can handle
multiple audio streams. I understand the DVB implementation only uses
one. If it can use more then ideally they should be presentable in the
output of `ffmpeg -i infile` like other streams. This may decide
whether a bitstream parser or demuxer is better.

- I suspect some of the functions (GASpecificConfig,
AudioSpecificConfig, etc) should be shared. Some may exist in our own
AAC decoder (not yet in SVN, only in SoC SVN so you can't be held
accountable for not coding with this in mind :)) and others in
libavcodec/aac_parser.c, libavcodec/mpeg4audio.c or so. It would
probably be better to add the LATM functionality to what we have than
to duplicate these functions with slight alterations for LATM.

- Is using get_bits and put_bits the best approach for this? It seems
a little weird to me to parse the stream, rewrite it, then parse it
again but maybe this is best.


More information about the ffmpeg-devel mailing list