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

Vladimir Voroshilov voroshil
Fri Jun 26 04:40:13 CEST 2009


2009/6/26 Michael Niedermayer <michaelni at gmx.at>:
> 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

Done. additional patch replaces array with variable in already committed code.

>
> [...]
> --
> 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
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFKQ+XFYR7HhwQLD6sRAhVXAJwIkN593+hKn3OlEgdHsma+ZWQXyACeNzTp
> OEKu6W4Xjs612IGpAP080is=
> =cyRP
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Replace-array-pitch_delay_int-with-one-variable.174.patch
Type: text/x-diff
Size: 1374 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090626/8b5760cb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Pitch-delay-decoding.174.patch
Type: text/x-diff
Size: 2965 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090626/8b5760cb/attachment-0001.patch>



More information about the ffmpeg-devel mailing list