aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_sse.c
Commit message (Collapse)AuthorAgeFilesLines
* Add casts for assigning the SSE bsinc filter pointersChris Robinson2017-10-071-4/+4
|
* Avoid some extraneous load callsChris Robinson2017-08-301-14/+12
| | | | | This likely doesn't change anything given a working optimizer, but it cleans up the code some.
* Constify some pointersChris Robinson2017-08-231-1/+1
|
* Store the sinc4 table in the filter stateChris Robinson2017-08-161-3/+3
| | | | Also rename the resampler functions to remove the unnecessary '32' token.
* Simplify bsinc filter storage in the filter stateChris Robinson2017-08-161-4/+5
| | | | | | | Rather than storing individual pointers to filter, scale delta, phase delta, and scale phase delta entries, per phase index, the new table layout makes it trivial to access the per-phase filter and delta entries given the base offset and coefficient count.
* Add a mixing function to blend HRIRsChris Robinson2017-05-031-0/+1
| | | | | | This is a bit more efficient than calling the normal HRTF mixing function twice, and helps solve the problem of the values generated from convolution not being consistent with the new HRIR.
* Handle the source offset fraction as an ALsizeiChris Robinson2017-04-081-1/+1
|
* Rework HRTF coefficient fadingChris Robinson2017-03-111-66/+1
| | | | | | | | | | | | | | | This improves fading between HRIRs as sources pan around. In particular, it improves the issue with individual coefficients having various rounding errors in the stepping values, as well as issues with interpolating delay values. It does this by doing two mixing passes for each source. First using the last coefficients that fade to silence, and then again using the new coefficients that fade from silence. When added together, it creates a linear fade from one to the other. Additionally, the gain is applied separately so the individual coefficients don't step with rounding errors. Although this does increase CPU cost since it's doing two mixes per source, each mix is a bit cheaper now since the stepping is simplified to a single gain value, and the overall quality is improved.
* Put BsincState in a generic unionChris Robinson2017-02-131-8/+8
|
* Porperly check for and use __builtin_assume_alignedChris Robinson2017-02-131-6/+7
|
* Clean up the bsinc mixer a bitChris Robinson2017-02-121-20/+22
|
* Use ALsizei and ALint for sizes and offsets with resamplers and filtersChris Robinson2017-01-161-5/+4
|
* Use ALsizei for sizes and offsets with the mixerChris Robinson2017-01-161-24/+24
| | | | | | Unsigned 32-bit offsets actually have some potential overhead on 64-bit targets for pointer/array accesses due to rules on integer wrapping. No idea how much impact it has in practice, but it's nice to be correct about it.
* Add some more 'restrict' keywordsChris Robinson2016-10-061-2/+3
|
* Pass current and target gains directly for mixingChris Robinson2016-10-051-7/+10
|
* Make some pointer-to-array parameters constChris Robinson2016-10-041-3/+3
|
* Rename MatrixMixerFunc to RowMixerFuncChris Robinson2016-09-021-2/+2
|
* Use a more specialized mixer function for B-Format to HRTFChris Robinson2016-08-121-0/+1
|
* Use SSE for applying the HQ B-Format decoder matricesChris Robinson2016-05-311-0/+25
|
* Calculate HRTF stepping params right before mixingChris Robinson2016-02-141-17/+0
| | | | | This means we track the current params and the target params, rather than the target params and the stepping. This closer matches the non-HRTF mixers.
* Manually inline and condense the bsinc resamplerChris Robinson2015-11-051-43/+36
|
* Implement a band-limited sinc resamplerChris Robinson2015-11-051-0/+66
| | | | | | | | This is essentially a 12-point sinc resampler, unless it's resampling to a rate higher than the output, at which point it will vary between 12 and 24 points and do anti-aliasing to avoid/reduce frequencies going over nyquist. Code provided by Christopher Fitzgerald.
* Use the correct position in the SSE resamplers for left-over processingChris Robinson2015-10-251-0/+4
|
* Use the correct realignment size for post-stepping mixingChris Robinson2015-10-181-1/+1
|
* Avoid double-checks for the stepping mixer loopsChris Robinson2015-09-301-5/+9
|
* Define MixHrtf directly instead of through a SUFFIX macroChris Robinson2015-08-151-2/+2
|
* Remove some IN_IDE_PARSER usesChris Robinson2014-12-241-7/+0
|
* Use linear gain steppingChris Robinson2014-11-251-7/+7
|
* Use a separate method to set initial HRTF coefficientsChris Robinson2014-11-241-0/+17
|
* Partially revert "Use a different method for HRTF mixing"Chris Robinson2014-11-231-0/+62
| | | | | | | | | | | | The sound localization with virtual channel mixing was just too poor, so while it's more costly to do per-source HRTF mixing, it's unavoidable if you want good localization. This is only partially reverted because having the virtual channel is still beneficial, particularly with B-Format rendering and effect mixing which otherwise skip HRTF processing. As before, the number of virtual channels can potentially be customized, specifying more or less channels depending on the system's needs.
* Use a different method for HRTF mixingChris Robinson2014-11-221-62/+0
| | | | | | | | | | | | | | | | | | | | | | | This new method mixes sources normally into a 14-channel buffer with the channels placed all around the listener. HRTF is then applied to the channels given their positions and written to a 2-channel buffer, which gets written out to the device. This method has the benefit that HRTF processing becomes more scalable. The costly HRTF filters are applied to the 14-channel buffer after the mix is done, turning it into a post-process with a fixed overhead. Mixing sources is done with normal non-HRTF methods, so increasing the number of playing sources only incurs normal mixing costs. Another benefit is that it improves B-Format playback since the soundfield gets mixed into speakers covering all three dimensions, which then get filtered based on their locations. The main downside to this is that the spatial resolution of the HRTF dataset does not play a big role anymore. However, the hope is that with ambisonics- based panning, the perceptual position of panned sounds will still be good. It is also an option to increase the number of virtual channels for systems that can handle it, or maybe even decrease it for weaker systems.
* Check the absolute gain value for silenceChris Robinson2014-10-311-1/+1
| | | | | Future B-Format support will be using negative gains, which still need to be applied.
* Combine the direct and send mixersChris Robinson2014-06-131-85/+26
|
* Combine some dry and wet path typesChris Robinson2014-06-131-9/+9
|
* The lower value of the gain vector contains the closest target valueChris Robinson2014-05-211-2/+2
|
* Don't pass the SendParams to the wet-path mixerChris Robinson2014-05-181-8/+6
|
* Don't pass the DirectParams to the dry-path mixerChris Robinson2014-05-181-7/+6
|
* Pass some DirectParams as function parametersChris Robinson2014-05-181-4/+3
|
* Use _mm_setr_ps instead of _mm_set_psChris Robinson2014-05-181-4/+4
| | | | | Apparently _mm_set_ps loads in reverse order compared to _mm_load_ps, so _mm_setr_ps should give what we really want.
* Remove unnecessary ifdefsChris Robinson2014-05-041-2/+0
| | | | | mixer_sse.c and mixer_neon.c are only compiled when the relavent headers are found anyway.
* Always use the current gains when mixingChris Robinson2014-05-041-7/+8
| | | | | | The current gain gets explicitly set to the target when the stepping is finished to ensure the target is still used. This way, however, will allow for asynchronously 'canceling' a fade by setting the counter to 0.
* Make sure all gain steps are applied with the SSE and Neon mixersChris Robinson2014-05-031-12/+13
|
* Use _mm_set_ps() to set an __m128 instead of {}Chris Robinson2014-04-261-2/+2
|
* Remove the click removal buffers for auxiliary effect slotsChris Robinson2014-03-231-1/+1
|
* Add gain stepping to the send mixersChris Robinson2014-03-231-23/+52
|
* Remove the now-unneeded click removal buffers for the deviceChris Robinson2014-03-231-1/+1
| | | | | | They are still there for auxiliary sends. However, they should go away soon enough too, and then we won't have to mess around with calculating extra "predictive" samples in the mixer.
* Step mixing gains per-sample for non-HRTF mixingChris Robinson2014-03-231-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | This fades the dry mixing gains using a logarithmic curve, which should produce a smoother transition than a linear one. It functions similarly to a linear fade except that step = (target - current) / numsteps; ... gain += step; becomes step = powf(target / current, 1.0f / numsteps); ... gain *= step; where 'target' and 'current' are clamped to a lower bound that is greater than 0 (which makes no sense on a logarithmic scale). Consequently, the non-HRTF direct mixers do not do not feed into the click removal and pending click buffers, as this per-sample fading would do an adequate job of stopping clicks and pops caused by extreme gain changes. These buffers should be removed shortly.
* Store the HrtfState directly in the DirectParamsChris Robinson2014-03-231-2/+2
|
* Use a union to combine HRTF and non-HRTF mixer paramsChris Robinson2014-03-191-1/+1
|
* Revert "Apply HRTF coefficient stepping separately"Chris Robinson2014-02-231-7/+53
| | | | | | | | | This reverts commit 25b9c3d0c15e959d544f5d0ac7ea507ea5f6d69f. Conflicts: Alc/mixer_neon.c Unfortunately this also undoes the Neon-enhanced ApplyCoeffsStep method.