summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libcook/cook_fixpoint.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/apps/codecs/libcook/cook_fixpoint.h b/apps/codecs/libcook/cook_fixpoint.h
index 7e3db85..35c3f57 100644
--- a/apps/codecs/libcook/cook_fixpoint.h
+++ b/apps/codecs/libcook/cook_fixpoint.h
@@ -174,14 +174,20 @@ static void scalar_dequant_math(COOKContext *q, int index,
FIXP f;
int i;
- for(i=0 ; i<SUBBAND_SIZE ; i++) {
- f = table[subband_coef_index[i]];
- /* noise coding if subband_coef_index[i] == 0 */
- if (((subband_coef_index[i] == 0) && cook_random(q)) ||
- ((subband_coef_index[i] != 0) && subband_coef_sign[i]))
- f = -f;
-
- mlt_p[i] = (s >= 64) ? 0 : fixp_pow2(f, -(s/2));
+
+ if(s >= 64)
+ mlt_p[i]=0;
+ else
+ {
+ for(i=0 ; i<SUBBAND_SIZE ; i++) {
+ f = table[subband_coef_index[i]];
+ /* noise coding if subband_coef_index[i] == 0 */
+ if (((subband_coef_index[i] == 0) && cook_random(q)) ||
+ ((subband_coef_index[i] != 0) && subband_coef_sign[i]))
+ f = -f;
+
+ mlt_p[i] =fixp_pow2(f, -(s/2));
+ }
}
}