[FFmpeg-devel] [PATCH] Fixing NB AMR SID frame sizes.

Reimar Döffinger Reimar.Doeffinger
Wed Mar 4 14:07:03 CET 2009


On Thu, Feb 26, 2009 at 11:08:39AM -0800, Baptiste Coudurier wrote:
> On 2/26/2009 4:47 AM, Haim Alon wrote:
> > This patch sets the proper SID frame sizes for NB AMR.
> > Regards,
> > Haim.
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > Index: libavformat/movenc.c
> > ===================================================================
> > --- libavformat/movenc.c	(revision 17607)
> > +++ libavformat/movenc.c	(working copy)
> > @@ -1721,7 +1721,7 @@
> >      if (enc->codec_id == CODEC_ID_AMR_NB) {
> >          /* We must find out how many AMR blocks there are in one packet */
> >          static uint16_t packed_size[16] =
> > -            {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 0};
> > +            {13, 14, 16, 18, 20, 21, 27, 32, 6, 7, 6, 6, 1, 1, 1, 1};
> >          int len = 0;
> >  
> >          while (len < size && samplesInChunk < 100) {
> 
> Can you please quote specs regarding this ?

Either way this seems to be the values from the other amr files + 1, so
IMO this array should be made available globally and reused (and of
course it should be const, too).




More information about the ffmpeg-devel mailing list