[FFmpeg-devel] [PATCH] G.729A (now fixed-point) decoder
Diego Biurrun
diego
Sat Mar 15 20:02:31 CET 2008
On Sun, Mar 16, 2008 at 12:24:58AM +0600, Vladimir Voroshilov wrote:
>
> Hopefully this version will be better.
build system part OK, some nits below
> --- /dev/null
> +++ b/libavcodec/g729dec.c
> @@ -0,0 +1,2010 @@
> +
> + on presence of hearable artefacts/differences
artIfacts, same below, we are using American English here ;)
> +no prefix : common routines for miscelaneous tasks (e.g. fixed-point math operations)
miscellaneous, please keep lines below 80 chars, same below
> +-------------------------------------------------------------------------------
> + Formats description
format
> +#define L0_BITS 1 ///< Switched MA predictor of LSP quantizer (size in bits)
Please lowercase all those lines.
> +#define L3_BITS 5 ///< First stage hihjer vector of quantizer (size in bits)
higher?
> + uint8_t quantizer_2nd_hi; ///< First stage hihjer vector of quantizer (size in bits)
ditto
> + * After some analisys i found this aproximation:
analysis, I
> + * Sslope used to compute y = cos(x)
Slope
> + * \brief multiplies 32-bit integer by abother 16-bit and divides result by 2^15
another
> + * \todo Better implementation requred
required
> + * \brief Decoding fo the fixed-codebook vector (3.8)
of?
> + * \return 1 if overflow occured, o - otherwise
0?
> + * \param residual (Q0) input data to filtering
filtering input data
> + * \param residual_filt [out] (Q0) speech signal with applied A(z/GAMMA_N) filter
Would it hurt to call this residual_filter?
> + //Downscaling corellaions to fit on 16-bit
Downscale corellations to fit in 16 bit.
> + /* 4.2.1, Equation 82. checking if filter should be disabled */
check
> + /* 4.2.1, Equation 78, reconstructing delayed signal */
reconstruct
> + /* A.4.2.3, Equation A.14, calcuating rh(0) */
calculate
> + /* A.4.2.3, Equation A.14, calcuating rh(1) */
ditto
> + /* A.4.2.3. Equation A.13, applying filter to signal */
apply
> + // Copying data from previous frame
copy
> + // Copying the rest of speech data
copy
> + // Save data for using in next subframe
Save data to use it in the next subframe.
> + * Filtering has following stages:
the following
> + /* Calculating coefficients of A(z/GAMMA_N) filter */
Calculate A(z/GAMMA_N) filter coefficients
same/similar below
> + * \brief decodes polinomial coefficients from LSP
polynomial, same below
I'm getting bored at this point, but I'm sure there are a couple dozen
unnecessary -ing forms below :)
Diego
More information about the ffmpeg-devel
mailing list