[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [5/7] - G.729 tables
Michael Niedermayer
michaelni
Wed Sep 17 04:31:02 CEST 2008
On Wed, Sep 03, 2008 at 12:07:54PM +0700, Vladimir Voroshilov wrote:
> 2008/9/2 Michael Niedermayer <michaelni at gmx.at>:
> > On Wed, Aug 27, 2008 at 03:09:38AM +0700, Vladimir Voroshilov wrote:
>
> >> +/**
> >> + * gain codebook (second stage), 8k mode (3.9.2 of G.729)
> >> + */
> >> +static const int16_t cb_gain_2nd_8k[1<<GC_2ND_IDX_BITS_8K][2] =
> >> +{ /*(1.14) (2.13) */
> >> + { 5142 , 592 },
> >> + { 17299 , 1861 },
> >> + { 6160 , 2395 },
> >> + { 16112 , 3392 },
> >> + { 826 , 2005 },
> >> + { 18973 , 5935 },
> >> + { 1994 , 0 },
> >> + { 15434 , 237 },
> >> + { 10573 , 2966 },
> >> + { 15132 , 4914 },
> >> + { 11569 , 1196 },
> >> + { 14194 , 1630 },
> >> + { 8091 , 4861 },
> >> + { 15161 , 14276 },
> >> + { 9120 , 525 },
> >> + { 13260 , 3256 },
> >
> > 2.13 is wrong
>
> Sign.
> 1.13 of course.
> Rechecked remaining twice. Looks correct
>
>
> --
> Regards,
> Vladimir Voroshilov mailto:voroshil at gmail.com
> JID: voroshil at gmail.com, voroshil at jabber.ru
> ICQ: 95587719
> diff --git a/libavcodec/g729data.h b/libavcodec/g729data.h
> index 09b3a47..4abb56c 100644
> --- a/libavcodec/g729data.h
> +++ b/libavcodec/g729data.h
> @@ -225,4 +225,83 @@ static const int16_t cb_gain_1st_8k[1<<GC_1ST_IDX_BITS_8K][2] =
> { 356 , 14756 },
> { 57 , 5404 },
> };
> +
> +/**
> + * gain codebook (second stage), 8k mode (3.9.2 of G.729)
> + */
> +static const int16_t cb_gain_2nd_8k[1<<GC_2ND_IDX_BITS_8K][2] =
> +{ /*(1.14) (1.13) */
> + { 5142 , 592 },
> + { 17299 , 1861 },
> + { 6160 , 2395 },
> + { 16112 , 3392 },
> + { 826 , 2005 },
> + { 18973 , 5935 },
> + { 1994 , 0 },
> + { 15434 , 237 },
> + { 10573 , 2966 },
> + { 15132 , 4914 },
> + { 11569 , 1196 },
> + { 14194 , 1630 },
> + { 8091 , 4861 },
> + { 15161 , 14276 },
> + { 9120 , 525 },
> + { 13260 , 3256 },
> +};
> +
> +/**
> + * 4th order Moving Average (MA) Predictor codebook (3.2.4 of G.729)
> + */
> +static const int16_t cb_ma_predictor[2][MA_NP][10] =
> +{ /* (0.15) */
> + {
> + { 8421, 9109, 9175, 8965, 9034, 9057, 8765, 8775, 9106, 8673},
> + { 7018, 7189, 7638, 7307, 7444, 7379, 7038, 6956, 6930, 6868},
> + { 5472, 4990, 5134, 5177, 5246, 5141, 5206, 5095, 4830, 5147},
> + { 4056, 3031, 2614, 3024, 2916, 2713, 3309, 3237, 2857, 3473}
> + },
> + {
> + { 7733, 7880, 8188, 8175, 8247, 8490, 8637, 8601, 8359, 7569},
> + { 4210, 3031, 2552, 3473, 3876, 3853, 4184, 4154, 3909, 3968},
> + { 3214, 1930, 1313, 2143, 2493, 2385, 2755, 2706, 2542, 2919},
> + { 3024, 1592, 940, 1631, 1723, 1579, 2034, 2084, 1913, 2601}
> + }
> +};
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080917/58b0912f/attachment.pgp>
More information about the ffmpeg-devel
mailing list