[FFmpeg-devel] [PATCH] G.729 Frame erasure support for LSF decoding
Michael Niedermayer
michaelni
Wed Jun 24 14:30:58 CEST 2009
On Sat, Jun 20, 2009 at 02:26:59PM +0700, Vladimir Voroshilov wrote:
[...]
> diff --git ffmpeg-r19218/libavcodec/g729data.h ffmpeg-r19218_v163/libavcodec/g729data.h
> index a70c705..e202331 100644
> --- ffmpeg-r19218/libavcodec/g729data.h
> +++ ffmpeg-r19218_v163/libavcodec/g729data.h
> @@ -275,4 +275,14 @@ static const int16_t cb_ma_predictor_sum[2][10] = { /* (0.15) */
> {14585, 18333, 19772, 17344, 16426, 16459, 15155, 15220, 16043, 15708}
> };
>
> +/**
> + * 2^27
> + * ff_g729_cb_ma_predictor_sum_inv[j][i] = ---------------------------------
> + * ff_g720_cb_ma_predictor_sum[j][i]
> + */
my guess would be that this is also not really "="
[...]
> - ma_predictor = get_bits(&gb, 1);
> - quantizer_1st = get_bits(&gb, VQ_1ST_BITS);
> - quantizer_2nd_lo = get_bits(&gb, VQ_2ND_BITS);
> - quantizer_2nd_hi = get_bits(&gb, VQ_2ND_BITS);
> +
> + if(frame_erasure) {
> + skip_bits(&gb, 1 + VQ_1ST_BITS + VQ_2ND_BITS + VQ_2ND_BITS);
> +
> + lsf_restore_from_previous(ctx->lsfq, ctx->past_quantizer_outputs,
> + ctx->ma_predictor);
> + } else {
> + uint8_t quantizer_1st; ///< first stage vector of quantizer
> + uint8_t quantizer_2nd_lo; ///< second stage lower vector of quantizer (size in bits)
> + uint8_t quantizer_2nd_hi; ///< second stage higher vector of quantizer (size in bits)
> +
> + ctx->ma_predictor = get_bits(&gb, 1);
> + quantizer_1st = get_bits(&gb, VQ_1ST_BITS);
> + quantizer_2nd_lo = get_bits(&gb, VQ_2ND_BITS);
> + quantizer_2nd_hi = get_bits(&gb, VQ_2ND_BITS);
>
reindent besides i dont like the change, its useless to replace them
by skip
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- 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/20090624/37692dce/attachment.pgp>
More information about the ffmpeg-devel
mailing list