From 381b29c2d2234b5941b14af78f91c3b4307b8082 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 10 Apr 2008 11:00:51 +1000 Subject: [PATCH] fixed ordering of the channels in the intra prediction. --- libcelt/vq.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/libcelt/vq.c b/libcelt/vq.c index 73255c83..c2e5e924 100644 --- a/libcelt/vq.c +++ b/libcelt/vq.c @@ -262,7 +262,7 @@ static const celt_word16_t pg[11] = {1.f, .75f, .65f, 0.6f, 0.6f, .6f, .55f, .55 void intra_prediction(celt_norm_t *x, celt_mask_t *W, int N, int K, celt_norm_t *Y, celt_norm_t * restrict P, int B, int N0, ec_enc *enc) { - int i,j; + int i,j,c; int best=0; celt_word32_t best_num=-SHR32(VERY_LARGE32,4); celt_word16_t best_den=0; @@ -271,9 +271,22 @@ void intra_prediction(celt_norm_t *x, celt_mask_t *W, int N, int K, celt_norm_t celt_word32_t E; celt_word16_t pred_gain; int max_pos = N0-N; + VARDECL(spx_norm_t, Xr); + SAVE_STACK; + + ALLOC(Xr, B*N, celt_norm_t); + if (max_pos > MAX_INTRA) max_pos = MAX_INTRA; + for (c=0;c