Mercurial > libavcodec.hg
comparison ra144.c @ 7118:83f0d3a52f14 libavcodec
Simplify
author | vitor |
---|---|
date | Mon, 23 Jun 2008 20:46:42 +0000 |
parents | f5ca0e18d5de |
children | 39be110f531d |
comparison
equal
deleted
inserted
replaced
7117:f5ca0e18d5de | 7118:83f0d3a52f14 |
---|---|
181 int x; | 181 int x; |
182 unsigned int res = 0x10000; | 182 unsigned int res = 0x10000; |
183 int b = 0; | 183 int b = 0; |
184 | 184 |
185 for (x=0; x<10; x++) { | 185 for (x=0; x<10; x++) { |
186 res = (((0x1000000 - (*data) * (*data)) >> 12) * res) >> 12; | 186 res = (((0x1000000 - data[x]*data[x]) >> 12) * res) >> 12; |
187 | 187 |
188 if (res == 0) | 188 if (res == 0) |
189 return 0; | 189 return 0; |
190 | 190 |
191 while (res <= 0x3fff) { | 191 while (res <= 0x3fff) { |
192 b++; | 192 b++; |
193 res <<= 2; | 193 res <<= 2; |
194 } | 194 } |
195 data++; | |
196 } | 195 } |
197 | 196 |
198 res = t_sqrt(res); | 197 res = t_sqrt(res); |
199 | 198 |
200 res >>= (b + 10); | 199 res >>= (b + 10); |