[FFmpeg-devel] AMR frame size tables (Was: [PATCH] RTP depacketizer for AMR)

Martin Storsjö martin
Sat Jan 30 20:30:39 CET 2010


On Sat, 30 Jan 2010, Michael Niedermayer wrote:

> On Fri, Jan 29, 2010 at 07:23:47PM -0500, Vitor Sessak wrote:
> > Martin Storsj? wrote:
> >> On Wed, 27 Jan 2010, Ronald S. Bultje wrote:
> >>> On Wed, Jan 27, 2010 at 7:50 AM, Martin Storsj? <martin at martin.st> 
> >>> wrote:
> >>>
> >>>> +static const uint8_t frame_sizes_nb[16] = {
> >>>> +    12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0
> >>>> +};
> >>> Can this be shared with the AMR decoder that is in Vitor's patch? (I
> >>> didn't see it on quick look.)
> >> If we were to share these tables, can they be shared across libavcodec and 
> >> libavformat, or should each library contain their own copy of the tables?
> >> As said, currently this kind of table is in libavformat/amr.c and in 
> >> libavcodec/libopencore-amr.c. If adding an AMR parser to libavcodec, that 
> >> would probably need access to the table, too, and the RTP depacketizer in 
> >> libavformat needs it likewise.
> >
> > Indeed such a table is used in AMR. Both with or without the TOC should be 
> > ok.
> >
> > About how to better share this tables across lavc/lavf, I leave this for 
> > Diego, Mans and Michael.
> 
> things shared between lavf & lavc can be put in lavc but keep in mind this
> is then part of its ABI and all theissues with major ver bumping apply

Ok... I this case, for two tables of 16 bytes each, the burden of 
maintaining it as a stable and public API and ABI, I think it simply is 
easier to keep a separate copy for each of the libs, or what do you think?

// Martin



More information about the ffmpeg-devel mailing list