Home | History | Annotate | Download | only in libaudioprocessing

Lines Matching refs:TO

10  * Unless required by applicable law or agreed to in writing, software
57 /* variant for output type TO = int32_t output samples */
64 /* variant for output type TO = float output samples */
75 * Using a recursive template rather than an array of TO[] for the accumulator
79 template<int CHANNELS, typename TO>
80 class Accumulator : public Accumulator<CHANNELS-1, TO> // recursive
85 Accumulator<CHANNELS-1, TO>::clear();
90 Accumulator<CHANNELS-1, TO>::acc(coef, data);
92 inline void volume(TO*& out, TO gain) {
94 Accumulator<CHANNELS-1, TO>::volume(out, gain);
97 TO value; // one per recursive inherited base class
100 template<typename TO>
101 class Accumulator<0, TO> {
108 inline void volume(TO*& out __unused, TO gain __unused) {
168 * Use fir() to compute the proper coefficient pointers for a polyphase
177 template <int CHANNELS, int STRIDE, typename TFUNC, typename TC, typename TI, typename TO,
180 void ProcessBase(TO* const out,
187 const TO* const volumeLR)
192 // TO accum[CHANNELS];
193 Accumulator<CHANNELS, TO> accum;
201 const TI *tmp_data = sP; // tmp_ptr seems to work better
216 TO *tmp_out = out; // may remove if const out definition changes.
219 TO l = 0;
220 TO r = 0;
232 TO l = 0;
249 template <int CHANNELS, int STRIDE, typename TC, typename TI, typename TO>
251 void ProcessL(TO* const out,
257 const TO* const volumeLR)
266 * @param out should point to the output buffer with space for at least one output frame.
269 * use symmetry in filter coefficients to evaluate two dot products.
272 * to the positive sP.
275 * to the negative sN.
290 * @param volumeLR is a pointer to an array of two 32 bit volume values, one per stereo channel,
292 * The pointer volumeLR should be aligned to a minimum of 8 bytes.
293 * A typical value for volume is 0x1000 to align to a unity gain output of 20.12.
295 template <int CHANNELS, int STRIDE, typename TC, typename TI, typename TO, typename TINTERP>
297 void Process(TO* const out,
306 const TO* const volumeLR)
316 * functions to do the appropriate dot products.
318 * @param out should point to the output buffer with space for at least one output frame.
332 * @param coefs is the polyphase filter bank, starting at from polyphase index 0, and ranging to
334 * (due to symmetry). The total size of the filter bank in coefficients is
337 * The filter bank coefs should be aligned to a minimum of 16 bytes (preferrably to cache line).
339 * The coefs should be attenuated (to compensate for passband ripple)
343 * sample array with respect to the FIR filter:
344 * the negative half of the filter is dot product from samples+1 to samples+halfNumCoefs;
345 * the positive half of the filter is dot product from samples to samples-halfNumCoefs+1.
347 * @param volumeLR is a pointer to an array of two 32 bit volume values, one per stereo channel,
349 * The pointer volumeLR should be aligned to a minimum of 8 bytes.
350 * A typical value for volume is 0x1000 to align to a unity gain output of 20.12.
352 * In between calls to filterCoefficient, the phase is incremented by phaseIncrement, where
355 * The filter polyphase index is given by indexP = phase >> coefShift. Due to
369 * For floating point, lerpP is the fractional phase scaled to [0.0, 1.0):
374 template<int CHANNELS, bool LOCKED, int STRIDE, typename TC, typename TI, typename TO>
376 void fir(TO* const out,
379 const TI* const samples, const TO* const volumeLR)
383 // to generate far less efficient code.
412 // to clear the appropriate bits and align to the appropriate level
422 static const TC scale = 1. / (65536. * 65536.); // scale phase bits to [0.0, 1.0)