Mercurial > libavcodec.hg
comparison ra144.c @ 7119:39be110f531d libavcodec
Use sizeof() intead of hardcoding the values
author | vitor |
---|---|
date | Mon, 23 Jun 2008 20:53:05 +0000 |
parents | 83f0d3a52f14 |
children | c98b43981d89 |
comparison
equal
deleted
inserted
replaced
7118:83f0d3a52f14 | 7119:39be110f531d |
---|---|
160 sum >>= 12; | 160 sum >>= 12; |
161 | 161 |
162 new_val = ptr[10] - sum; | 162 new_val = ptr[10] - sum; |
163 | 163 |
164 if (new_val < -32768 || new_val > 32767) { | 164 if (new_val < -32768 || new_val > 32767) { |
165 memset(in, 0, 100); | 165 memset(in, 0, 50*sizeof(*in)); |
166 return; | 166 return; |
167 } | 167 } |
168 | 168 |
169 ptr[10] = new_val; | 169 ptr[10] = new_val; |
170 ptr++; | 170 ptr++; |
222 | 222 |
223 m[1] = ((cb1_base[cb1_idx] >> 4) * gval) >> 8; | 223 m[1] = ((cb1_base[cb1_idx] >> 4) * gval) >> 8; |
224 m[2] = ((cb2_base[cb2_idx] >> 4) * gval) >> 8; | 224 m[2] = ((cb2_base[cb2_idx] >> 4) * gval) >> 8; |
225 | 225 |
226 memmove(ractx->adapt_cb, ractx->adapt_cb + BLOCKSIZE, | 226 memmove(ractx->adapt_cb, ractx->adapt_cb + BLOCKSIZE, |
227 (BUFFERSIZE - BLOCKSIZE) * 2); | 227 (BUFFERSIZE - BLOCKSIZE) * sizeof(*ractx->adapt_cb)); |
228 | 228 |
229 block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE; | 229 block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE; |
230 | 230 |
231 add_wav(gain, cba_idx, m, buffer_a, cb1_vects[cb1_idx], cb2_vects[cb2_idx], | 231 add_wav(gain, cba_idx, m, buffer_a, cb1_vects[cb1_idx], cb2_vects[cb2_idx], |
232 block); | 232 block); |