Mercurial > libavcodec.hg
comparison ra144.c @ 7834:b9a26c7e64ef libavcodec
Normalize triplets in gain_val_tab[][] so gain_exp_tab[] can be just an
one-dimensional array.
author | vitor |
---|---|
date | Mon, 08 Sep 2008 18:51:33 +0000 |
parents | 3da762190370 |
children | 5a114f24632a |
comparison
equal
deleted
inserted
replaced
7833:52d04dea9491 | 7834:b9a26c7e64ef |
---|---|
134 int i; | 134 int i; |
135 int v[3]; | 135 int v[3]; |
136 | 136 |
137 v[0] = 0; | 137 v[0] = 0; |
138 for (i=!skip_first; i<3; i++) | 138 for (i=!skip_first; i<3; i++) |
139 v[i] = (gain_val_tab[n][i] * m[i]) >> (gain_exp_tab[n][i] + 1); | 139 v[i] = (gain_val_tab[n][i] * m[i]) >> gain_exp_tab[n]; |
140 | 140 |
141 for (i=0; i < BLOCKSIZE; i++) | 141 for (i=0; i < BLOCKSIZE; i++) |
142 dest[i] = (s1[i]*v[0] + s2[i]*v[1] + s3[i]*v[2]) >> 12; | 142 dest[i] = (s1[i]*v[0] + s2[i]*v[1] + s3[i]*v[2]) >> 12; |
143 } | 143 } |
144 | 144 |