[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [4/7] - G.729 core
Diego Biurrun
diego
Fri Jul 4 17:44:30 CEST 2008
On Tue, Jul 01, 2008 at 03:06:40AM +0700, Vladimir Voroshilov wrote:
>
> Updated patch is attached.
>
> --- /dev/null
> +++ b/libavcodec/g729.h
> @@ -0,0 +1,126 @@
> +
> +/**
> + * maximum gain pitch value (3.8, Equation 47)
> + * 0.7945 in Q14
> + * (EE) This does not comply with specification.
with the
> +/**
> + * maximum size of one subframe over supported formats
huh?
> + uint8_t fc_indexes_bits; ///< Size (in bits) of fixed-codebook index entry
size
> --- /dev/null
> +++ b/libavcodec/g729dec.c
> @@ -0,0 +1,707 @@
> +
> +Parameters:
> +[out] : all data in array will be overwritten regardless of previous value
> +[in/out] : array is filled using previously stored data
> +no mark : input data only
> +
> +Misc:
> +Q<n> : Means "value * (1<<n)" (i.e. fixed-point value with 2^n base)
> +
> +*/
> +
> + //Parity is calculated on six most significant bits of P1
.
> + /* 3.2.4 Equation 19 */
equation
> + /* 3.2.4, Equation 20 */
ditto
> + //Save LSF for use when error occurrs in next frames
occurs
> + //Restore LSF from previous frame
.
> + /* 4.4.1, Equation 92 */
equation
more below
> + /* Rotate lq_prev */
.
> + av_log(avctx, AV_LOG_ERROR, "Sample rate %d is not supported\n", avctx->sample_rate);
.
> + av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d)\n", avctx->channels);
.
> + /* Decoder initialization. 4.3, Table 9 */
lowercase
> + int16_t synth[MAX_SUBFRAME_SIZE+10]; // fixed-codebooc vector
codebooK
> + //Convert LSF to LSP
.
> +AVCodec g729_decoder =
> +{
> + "g729",
> + CODEC_TYPE_AUDIO,
> + CODEC_ID_G729,
> + sizeof(G729_Context),
> + ff_g729_decoder_init,
> + NULL,
> + NULL,
> + ff_g729_decode_frame,
> +};
The codec long is missing.
Diego
More information about the ffmpeg-devel
mailing list