Lines Matching refs:i
77 int i; in alaw2linear() local
81 i = ((alaw & 0x0F) << 4) + 8 /* rounding error */; in alaw2linear()
84 i = (i + 0x100) << (seg - 1); in alaw2linear()
85 return (short int) ((alaw & 0x80) ? i : -i); in alaw2linear()
143 int i; in dsp_audio_generate_law_tables() local
144 for (i = 0; i < 256; i++) in dsp_audio_generate_law_tables()
145 dsp_audio_alaw_to_s32[i] = alaw2linear(bitrev8((u8)i)); in dsp_audio_generate_law_tables()
147 for (i = 0; i < 256; i++) in dsp_audio_generate_law_tables()
148 dsp_audio_ulaw_to_s32[i] = ulaw2linear(bitrev8((u8)i)); in dsp_audio_generate_law_tables()
150 for (i = 0; i < 256; i++) { in dsp_audio_generate_law_tables()
151 dsp_audio_alaw_to_ulaw[i] = in dsp_audio_generate_law_tables()
152 linear2ulaw(dsp_audio_alaw_to_s32[i]); in dsp_audio_generate_law_tables()
153 dsp_audio_ulaw_to_alaw[i] = in dsp_audio_generate_law_tables()
154 linear2alaw(dsp_audio_ulaw_to_s32[i]); in dsp_audio_generate_law_tables()
161 int i; in dsp_audio_generate_s2law_table() local
165 for (i = -32768; i < 32768; i++) { in dsp_audio_generate_s2law_table()
166 dsp_audio_s16_to_law[i & 0xffff] = in dsp_audio_generate_s2law_table()
167 bitrev8(linear2ulaw(i)); in dsp_audio_generate_s2law_table()
171 for (i = -32768; i < 32768; i++) { in dsp_audio_generate_s2law_table()
172 dsp_audio_s16_to_law[i & 0xffff] = in dsp_audio_generate_s2law_table()
173 bitrev8(linear2alaw(i)); in dsp_audio_generate_s2law_table()
193 int i, j, k; in dsp_audio_generate_seven() local
198 for (i = 0; i < 256; i++) { in dsp_audio_generate_seven()
202 < dsp_audio_alaw_to_s32[i]) in dsp_audio_generate_seven()
205 sorted_alaw[j] = i; in dsp_audio_generate_seven()
209 for (i = 0; i < 256; i++) { in dsp_audio_generate_seven()
211 spl = i; in dsp_audio_generate_seven()
213 spl = dsp_audio_ulaw_to_alaw[i]; in dsp_audio_generate_seven()
220 dsp_audio_law2seven[i] = j >> 1; in dsp_audio_generate_seven()
222 for (i = 0; i < 128; i++) { in dsp_audio_generate_seven()
223 spl = sorted_alaw[i << 1]; in dsp_audio_generate_seven()
226 dsp_audio_seven2law[i] = spl; in dsp_audio_generate_seven()
241 int i, j; in dsp_audio_generate_mix_table() local
244 i = 0; in dsp_audio_generate_mix_table()
245 while (i < 256) { in dsp_audio_generate_mix_table()
248 sample = dsp_audio_law_to_s32[i]; in dsp_audio_generate_mix_table()
254 dsp_audio_mix_law[(i << 8) | j] = in dsp_audio_generate_mix_table()
258 i++; in dsp_audio_generate_mix_table()
307 int i; in dsp_audio_generate_volume_changes() local
311 i = 0; in dsp_audio_generate_volume_changes()
312 while (i < 256) { in dsp_audio_generate_volume_changes()
313 dsp_audio_reduce8[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
314 (dsp_audio_law_to_s32[i] * denum[7] / num[7]) & 0xffff]; in dsp_audio_generate_volume_changes()
315 dsp_audio_reduce7[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
316 (dsp_audio_law_to_s32[i] * denum[6] / num[6]) & 0xffff]; in dsp_audio_generate_volume_changes()
317 dsp_audio_reduce6[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
318 (dsp_audio_law_to_s32[i] * denum[5] / num[5]) & 0xffff]; in dsp_audio_generate_volume_changes()
319 dsp_audio_reduce5[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
320 (dsp_audio_law_to_s32[i] * denum[4] / num[4]) & 0xffff]; in dsp_audio_generate_volume_changes()
321 dsp_audio_reduce4[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
322 (dsp_audio_law_to_s32[i] * denum[3] / num[3]) & 0xffff]; in dsp_audio_generate_volume_changes()
323 dsp_audio_reduce3[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
324 (dsp_audio_law_to_s32[i] * denum[2] / num[2]) & 0xffff]; in dsp_audio_generate_volume_changes()
325 dsp_audio_reduce2[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
326 (dsp_audio_law_to_s32[i] * denum[1] / num[1]) & 0xffff]; in dsp_audio_generate_volume_changes()
327 dsp_audio_reduce1[i] = dsp_audio_s16_to_law[ in dsp_audio_generate_volume_changes()
328 (dsp_audio_law_to_s32[i] * denum[0] / num[0]) & 0xffff]; in dsp_audio_generate_volume_changes()
329 sample = dsp_audio_law_to_s32[i] * num[0] / denum[0]; in dsp_audio_generate_volume_changes()
334 dsp_audio_increase1[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
335 sample = dsp_audio_law_to_s32[i] * num[1] / denum[1]; in dsp_audio_generate_volume_changes()
340 dsp_audio_increase2[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
341 sample = dsp_audio_law_to_s32[i] * num[2] / denum[2]; in dsp_audio_generate_volume_changes()
346 dsp_audio_increase3[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
347 sample = dsp_audio_law_to_s32[i] * num[3] / denum[3]; in dsp_audio_generate_volume_changes()
352 dsp_audio_increase4[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
353 sample = dsp_audio_law_to_s32[i] * num[4] / denum[4]; in dsp_audio_generate_volume_changes()
358 dsp_audio_increase5[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
359 sample = dsp_audio_law_to_s32[i] * num[5] / denum[5]; in dsp_audio_generate_volume_changes()
364 dsp_audio_increase6[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
365 sample = dsp_audio_law_to_s32[i] * num[6] / denum[6]; in dsp_audio_generate_volume_changes()
370 dsp_audio_increase7[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
371 sample = dsp_audio_law_to_s32[i] * num[7] / denum[7]; in dsp_audio_generate_volume_changes()
376 dsp_audio_increase8[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
378 i++; in dsp_audio_generate_volume_changes()
394 int i, ii; in dsp_change_volume() local
412 i = 0; in dsp_change_volume()
416 while (i < ii) { in dsp_change_volume()
419 i++; in dsp_change_volume()