[FFmpeg-cvslog] cngdec: Update the LPC coefficients after averaging the reflection coefficients

Martin Storsjö git at videolan.org
Wed Oct 31 13:47:06 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Oct 30 12:26:39 2012 +0200| [9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9] | committer: Martin Storsjö

cngdec: Update the LPC coefficients after averaging the reflection coefficients

I somehow messed up the placement of this one.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9
---

 libavcodec/cngdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index c22fd55..8cfe9cf 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -112,12 +112,12 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
         for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
             p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
         }
-        make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
     }
 
     p->energy = p->energy / 2 + p->target_energy / 2;
     for (i = 0; i < p->order; i++)
         p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
+    make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
 
     for (i = 0; i < p->order; i++)
         e *= 1.0 - p->refl_coef[i]*p->refl_coef[i];



More information about the ffmpeg-cvslog mailing list