[FFmpeg-devel] [PATCH] Frame erasure case of pitch delay decoding

Michael Niedermayer michaelni
Sat Jun 27 01:20:18 CEST 2009


On Sat, Jun 27, 2009 at 01:49:49AM +0700, Vladimir Voroshilov wrote:
> Updated patch.
> 
> 
> -- 
> Regards,
> Vladimir Voroshilov     mailto:voroshil at gmail.com
> JID: voroshil at gmail.com, voroshil at jabber.ru
> ICQ: 95587719

>  g729dec.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> c66e04bc9abc50854d2bd35ac5299ae0e4b28637  0005-Frame-erasure-support-for-pitch-delay-decoding.176.patch
> From aa4b23873bc3c5e103a5756ade017558bda12961 Mon Sep 17 00:00:00 2001
> From: Vladimir Voroshilov <voroshil at gmail.com>
> Date: Thu, 11 Jun 2009 13:51:28 +0700
> Subject: [PATCH 05/25] Frame erasure support for pitch delay decoding
> 
> 
> diff --git ffmpeg-r19281/libavcodec/g729dec.c ffmpeg-r19281_v176/libavcodec/g729dec.c
> index b937235..f193123 100644
> --- ffmpeg-r19281/libavcodec/g729dec.c
> +++ ffmpeg-r19281_v176/libavcodec/g729dec.c
> @@ -306,7 +306,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
>          gc_1st_index  = get_bits(&gb, format.gc_1st_index_bits);
>          gc_2nd_index  = get_bits(&gb, format.gc_2nd_index_bits);
>  
> -        if(!i) {
> +        if (frame_erasure)
> +            pitch_delay_3x   = 3 * ctx->pitch_delay_int_prev;
> +        else if(!i) {
>              if (bad_pitch)
>                  pitch_delay_3x   = 3 * ctx->pitch_delay_int_prev;

if(!i || frame_erasure)

also, i think bad_pitch and frame_erasure are redundant that is the same
either your frame is damaged or not
If you disagree, id like to hear which real life system uses g729 and
can suffer from single bit errors not passing through a FEC code
(that stuff might exist but my gut feeling says it does not, so unless
 you have an example i prefer the simpler code)

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

> ... defining _GNU_SOURCE...
For the love of all that is holy, and some that is not, don't do that.
-- Luca & Mans
-------------- 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/20090627/9bf93769/attachment.pgp>



More information about the ffmpeg-devel mailing list