aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-10-30 12:26:39 +0200
committerMartin Storsjö <martin@martin.st>2012-10-30 16:51:12 +0200
commit9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9 (patch)
tree13a3c52d895581b3bd67eaa7fd1fec9d38028296
parentd16c4aebba1ba611e10d86aa02be4cdfd3fbc3c5 (diff)
downloadffmpeg-9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9.tar.gz
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@martin.st>
-rw-r--r--libavcodec/cngdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index c22fd5577c..8cfe9cfdbd 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];