Add 'restrict' to another parameter
[openal-soft.git] / Alc / mixer_defs.h
blob8b934c58a7601958f025c43bb67180d7aba2352a
1 #ifndef MIXER_DEFS_H
2 #define MIXER_DEFS_H
4 #include "AL/alc.h"
5 #include "AL/al.h"
6 #include "alMain.h"
7 #include "alu.h"
9 struct MixGains;
11 struct MixHrtfParams;
12 struct HrtfState;
14 /* C resamplers */
15 const ALfloat *Resample_copy32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
16 const ALfloat *Resample_point32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
17 const ALfloat *Resample_lerp32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
18 const ALfloat *Resample_fir4_32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
19 const ALfloat *Resample_fir8_32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
20 const ALfloat *Resample_bsinc32_C(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen);
23 /* C mixers */
24 void MixHrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint lidx, ALuint ridx,
25 const ALfloat *data, ALuint Counter, ALuint Offset, ALuint OutPos,
26 const ALuint IrSize, const struct MixHrtfParams *hrtfparams,
27 struct HrtfState *hrtfstate, ALuint BufferSize);
28 void Mix_C(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[BUFFERSIZE],
29 struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize);
30 void MixRow_C(ALfloat *OutBuffer, const ALfloat *Mtx, ALfloat (*restrict data)[BUFFERSIZE],
31 ALuint InChans, ALuint BufferSize);
33 /* SSE mixers */
34 void MixHrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint lidx, ALuint ridx,
35 const ALfloat *data, ALuint Counter, ALuint Offset, ALuint OutPos,
36 const ALuint IrSize, const struct MixHrtfParams *hrtfparams,
37 struct HrtfState *hrtfstate, ALuint BufferSize);
38 void Mix_SSE(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[BUFFERSIZE],
39 struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize);
40 void MixRow_SSE(ALfloat *OutBuffer, const ALfloat *Mtx, ALfloat (*restrict data)[BUFFERSIZE],
41 ALuint InChans, ALuint BufferSize);
43 /* SSE resamplers */
44 inline void InitiatePositionArrays(ALuint frac, ALuint increment, ALuint *frac_arr, ALuint *pos_arr, ALuint size)
46 ALuint i;
48 pos_arr[0] = 0;
49 frac_arr[0] = frac;
50 for(i = 1;i < size;i++)
52 ALuint frac_tmp = frac_arr[i-1] + increment;
53 pos_arr[i] = pos_arr[i-1] + (frac_tmp>>FRACTIONBITS);
54 frac_arr[i] = frac_tmp&FRACTIONMASK;
58 const ALfloat *Resample_bsinc32_SSE(const BsincState *state, const ALfloat *src, ALuint frac,
59 ALuint increment, ALfloat *restrict dst, ALuint dstlen);
61 const ALfloat *Resample_lerp32_SSE2(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
62 ALfloat *restrict dst, ALuint numsamples);
63 const ALfloat *Resample_lerp32_SSE41(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
64 ALfloat *restrict dst, ALuint numsamples);
66 const ALfloat *Resample_fir4_32_SSE3(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
67 ALfloat *restrict dst, ALuint numsamples);
68 const ALfloat *Resample_fir4_32_SSE41(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
69 ALfloat *restrict dst, ALuint numsamples);
71 const ALfloat *Resample_fir8_32_SSE3(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
72 ALfloat *restrict dst, ALuint numsamples);
73 const ALfloat *Resample_fir8_32_SSE41(const BsincState *state, const ALfloat *src, ALuint frac, ALuint increment,
74 ALfloat *restrict dst, ALuint numsamples);
76 /* Neon mixers */
77 void MixHrtf_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint lidx, ALuint ridx,
78 const ALfloat *data, ALuint Counter, ALuint Offset, ALuint OutPos,
79 const ALuint IrSize, const struct MixHrtfParams *hrtfparams,
80 struct HrtfState *hrtfstate, ALuint BufferSize);
81 void Mix_Neon(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[BUFFERSIZE],
82 struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize);
83 void MixRow_Neon(ALfloat *OutBuffer, const ALfloat *Mtx, ALfloat (*restrict data)[BUFFERSIZE],
84 ALuint InChans, ALuint BufferSize);
86 #endif /* MIXER_DEFS_H */