[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [4/7] - G.729 core
Diego Biurrun
diego
Fri May 9 09:58:21 CEST 2008
On Fri, May 09, 2008 at 01:40:29PM +0700, Vladimir Voroshilov wrote:
> Diego Biurrun wrote:
> > On Fri, May 02, 2008 at 06:45:53PM +0700, Vladimir Voroshilov wrote:
> > > Patch contains latest version of G.729 decoder (without tables and postfilter).
>
> [...]
>
> > Diego
>
> Updated and synced with latest version of common routines.
>
> --- /dev/null
> +++ b/libavcodec/g729.h
> @@ -0,0 +1,136 @@
> +
> +/// moving Average (MA) Prediction order
If you abbreviate MA with uppercase letters, you should capitalize
"Moving Average", but I see no reason to capitalize prediction.
> +extern const int16_t ff_g729_cb_lsp_1st[1<<VQ_1ST_BITS][10];
> +extern const int16_t ff_g729_cb_lsp_2nd[1<<VQ_2ND_BITS][10];
> +extern const uint8_t ff_g729_fixed_codebook_8k[40];
> +extern const uint8_t ff_g729_fixed_codebook_4k4[80];
> +extern const int16_t ff_g729_cb_gain_1st_8k[GC_1ST_SIZE_8K][2];
> +extern const int16_t ff_g729_cb_gain_2nd_8k[GC_2ND_SIZE_8K][2];
> +extern const int16_t ff_g729_cb_ma_predictor[2][MA_NP][10];
> +extern const int16_t ff_g729_cb_ma_predictor_sum[2][10];
> +extern const int16_t ff_g729_cb_ma_predictor_sum_inv[2][10];
> +extern const uint16_t ff_g729_ma_prediction_coeff[4];
> +extern const int16_t ff_g729_lq_init[10];
> +extern const int16_t ff_g729_lsp_init[10];
These could be aligned.
> --- /dev/null
> +++ b/libavcodec/g729dec.c
> @@ -0,0 +1,667 @@
> +
> +Validation results on ITU test vectors for Fixed-point G729.A:
fixed-point
> + Results are bit-exact equal with reference fixed-point G729.A decoder
equal to
> + int16_t gain_pitch; ///< (Q14) Pitch gain of previous subframe (3.8) [SHARP_MIN ... SHARP_MAX]
pitch
> + int16_t gain_code; ///< (Q1) Gain code of previous subframe
gain
> + * \brief Check parity bit (3.7.2)
.
> + * \param ac_index_1st Adaptive codebook index for first subframe
adaptive
> + * \param parity Parity bit for P1
parity
> + * \return 1 if parity check is ok, 0 - otherwise
OK, .
> + * \brief save quantized LSF coefficients for use in next frame.
Capitalize.
> + * \brief Restore LSP parameters using previous frame data
.
> + * \param lsfq [out] (Q13) Decoded LSF coefficients
decoded
> + * \return 0 if success, non-zero otherwise
s/if/on/
> + * \brief decode one G.729 frame into PCM samples
Capitalize, add period.
> + int16_t fc[MAX_SUBFRAME_SIZE]; // fixed codebooc vector
> + int16_t synth[MAX_SUBFRAME_SIZE+10]; // fixed codebooc vector
codebooK
> + /* save LSP coefficients for using in next frame */
use
> + //Overflow occured, downscale excitation signal...
occuRRed
> + * \brief decodes one G.729 frame (10 bytes long) into parameters vector
Capitalize, add period.
Diego
More information about the ffmpeg-devel
mailing list