[FFmpeg-soc] [soc]: r2875 - aac/aac.c

superdump subversion at mplayerhq.hu
Mon Jul 28 10:57:37 CEST 2008


Author: superdump
Date: Mon Jul 28 10:57:37 2008
New Revision: 2875

Log:
Avoid conducting two loops in the unsigned codebook case


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Mon Jul 28 10:57:37 2008
@@ -1272,12 +1272,13 @@ static int decode_spectrum(AACContext * 
                         const int coef_idx = (group << 7) + k;
                         const int8_t *vq_ptr = &codebook_vectors[cur_band_type - 1][index * dim];
                         int j;
-                        for (j = 0; j < dim; j++)
-                            icoef[coef_idx + j] = 1;
                         if (is_cb_unsigned) {
                             for (j = 0; j < dim; j++)
-                                if (vq_ptr[j] && get_bits1(gb))
-                                    icoef[coef_idx + j] = -1;
+                                if (vq_ptr[j])
+                                    icoef[coef_idx + j] = 1 - 2*get_bits1(gb);
+                        }else {
+                        for (j = 0; j < dim; j++)
+                            icoef[coef_idx + j] = 1;
                         }
                         if (cur_band_type == ESC_BT) {
                             for (j = 0; j < 2; j++) {



More information about the FFmpeg-soc mailing list