From 8823261738ae121ec68c68c15f40a6141c273558 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 28 May 2010 18:01:02 -0400 Subject: [PATCH] More simplifications to the Viterbi code --- libcelt/celt.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/libcelt/celt.c b/libcelt/celt.c index c6188372..5ce97f38 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -546,8 +546,8 @@ static void tf_encode(celt_word16 *bandLogE, celt_word16 *oldBandE, int len, int int i, curr; celt_word16 threshold; VARDECL(celt_word16, metric); - VARDECL(celt_word16, cost0); - VARDECL(celt_word16, cost1); + celt_word16 cost0; + celt_word16 cost1; VARDECL(int, path0); VARDECL(int, path1); /* FIXME: lambda should depend on the bit-rate */ @@ -555,8 +555,6 @@ static void tf_encode(celt_word16 *bandLogE, celt_word16 *oldBandE, int len, int SAVE_STACK; ALLOC(metric, len, celt_word16); - ALLOC(cost0, len, celt_word16); - ALLOC(cost1, len, celt_word16); ALLOC(path0, len, int); ALLOC(path1, len, int); for (i=0;i=0;i--) {