From a66c32087102e6d288c73c19322c7f09a2e81d51 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 16 Apr 2008 10:43:32 +1000 Subject: [PATCH] optimisation: reworked intra_prediction() so that yy is computed fully only once and then updated for each iteration --- libcelt/vq.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/libcelt/vq.c b/libcelt/vq.c index a59f40ef..f34079af 100644 --- a/libcelt/vq.c +++ b/libcelt/vq.c @@ -280,6 +280,7 @@ 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; + celt_word32_t yy=0; VARDECL(celt_norm_t, Xr); SAVE_STACK; @@ -293,21 +294,21 @@ void intra_prediction(celt_norm_t *x, celt_mask_t *W, int N, int K, celt_norm_t for (j=0;j