[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [5/7] - G.729 tables
Michael Niedermayer
michaelni
Tue Aug 26 03:07:39 CEST 2008
On Sat, Aug 23, 2008 at 08:40:35PM +0700, Vladimir Voroshilov wrote:
> Update after recent changes in SVN
>
> --
> 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 5334e48..d1b69dd 100644
> --- a/libavcodec/g729data.h
> +++ b/libavcodec/g729data.h
> @@ -24,8 +24,16 @@
>
> #include <stdint.h>
>
> -/// Moving Average (MA) prediction order
> -#define MA_NP 4
> +#define MA_NP 4 ///< Moving Average (MA) prediction order
ok
> +
> +#define VQ_1ST_BITS 7 ///< first stage vector of quantizer (size in bits)
> +#define VQ_2ND_BITS 5 ///< second stage vector of quantizer (size in bits)
> +
> +#define GC_1ST_IDX_BITS_8K 3 ///< gain codebook (first stage) index, 8k mode (size in bits)
> +#define GC_2ND_IDX_BITS_8K 4 ///< gain codebook (second stage) index, 8k mode (size in bits)
> +
> +#define GC_1ST_IDX_BITS_6K4 3 ///< gain codebook (first stage) index, 6.4k mode (size in bits)
> +#define GC_2ND_IDX_BITS_6K4 3 ///< gain codebook (second stage) index, 6.4k mode (size in bits)
>
> /**
> * first stage LSP codebook
ok
> @@ -203,4 +211,97 @@ static const int16_t cb_lsp_2nd[1<<VQ_2ND_BITS][10] =
> { -163, 674, -11, -886, 531, -1125, -265, -242, 724, 934}
> };
>
> +/**
> + * gain codebook (first stage), 8k mode (3.9.2 of G.729)
> + */
> +static const int16_t cb_gain_1st_8k[1<<GC_1ST_IDX_BITS_8K][2] =
> +{ /*(1.14) (2.13) */
> + { 3242 , 9949 }, //5
> + { 1551 , 2425 }, //1
> + { 2678 , 27162 }, //7
> + { 1921 , 9291 }, //4
> + { 1831 , 5022 }, //2
> + { 1 , 1516 }, //0
> + { 356 , 14756 }, //6
> + { 57 , 5404 }, //3
> +};
1.14 is wrong
and what do the comments on the right mean?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20080826/abc8272c/attachment.pgp>
More information about the ffmpeg-devel
mailing list