[FFmpeg-devel] [PATCH] G.729 Pitch delay decoding & frame erasure case

Michael Niedermayer michaelni
Thu Jun 25 23:01:59 CEST 2009


On Fri, Jun 26, 2009 at 02:08:55AM +0700, Vladimir Voroshilov wrote:
> 2009/6/26 Michael Niedermayer <michaelni at gmx.at>:
[...]
> >> diff --git ffmpeg-r19260/libavcodec/g729dec.c ffmpeg-r19260_v172/libavcodec/g729dec.c
> >> index 367e0ab..c9b8009 100644
> >> --- ffmpeg-r19260/libavcodec/g729dec.c
> >> +++ ffmpeg-r19260_v172/libavcodec/g729dec.c
> >> @@ -81,6 +81,8 @@ typedef struct {
> >> ?} G729FormatDescription;
> >>
> >> ?typedef struct {
> >> + ? ?int pitch_delay_int_prev; ? ///< integer part of previous subframe's pitch delay (4.1.3)
> >> +
> >> ? ? ?/// (2.13) LSP quantizer outputs
> >> ? ? ?int16_t ?past_quantizer_output_buf[MA_NP + 1][10];
> >> ? ? ?int16_t* past_quantizer_outputs[MA_NP + 1];
> >> @@ -238,6 +240,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
> >> ? ? ?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)
> >>
> >> + ? ?int pitch_delay_int[2]; ? ? ?// pitch delay, integer part
> >
> > why an array of 2 instead of a single value?
> 
> Future postfilter (called in each iteration of for loop) will use
> pitch_delay_int[0] (pitch delay of first subframe) in each iteration,
> while all other code uses pitch_delay_int[i] (pitch delay of current
> subframe).
> 
> If you wish i can replace array with one value and convert it back in
> postfilter patch.

yes, i slightly prefer that

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20090625/717aca7d/attachment.pgp>



More information about the ffmpeg-devel mailing list