58 Commits

Author SHA1 Message Date
Chris Robinson
5e7513d0a0 Accumulate ambisonic upsampler gains using double-precision 2018-05-18 18:59:27 -07:00
Chris Robinson
9575eebac4 Move the bnad-splitter filters to a separate source 2018-04-21 23:23:46 -07:00
Chris Robinson
880d555060 Combine two loops 2018-03-29 16:11:46 -07:00
Chris Robinson
091e676db3 Move mixer sources into a sub-directory 2018-03-22 05:06:15 -07:00
Chris Robinson
7dafac0c34 Avoid duplicating some scale tables 2018-02-18 23:56:51 -08:00
Chris Robinson
59768674f1 Use an alternate ambisonic HRTF decode layout
Similar to the previous, but includes the top and bottom HRTF responses. The
higher-order decode (for the "basic" HRTF output) also now uses 2H1P mixed-
order instead of 2H1V, which seems more stable.
2018-02-13 03:03:26 -08:00
Chris Robinson
2cb49e51a0 Fix NULL pointer dereference 2018-02-12 22:20:43 -08:00
Chris Robinson
6b76eddbe3 Supply HF coefficient scales with a single-band ambisonic matrix 2018-02-12 21:24:58 -08:00
Chris Robinson
59934b47de Avoid using an enum for array indices 2018-02-12 20:58:39 -08:00
Chris Robinson
4d417f3dd4 Make bformatdec_free and ambiup_free clear the freed pointer 2018-02-12 20:48:28 -08:00
Chris Robinson
dce497fbca Use a bitfield for enabled bformatdec channels 2018-02-12 20:33:31 -08:00
Chris Robinson
c346baff5b Clarify some macro names using ambisonic mixed-mode notation 2018-02-09 18:43:34 -08:00
Chris Robinson
e80b016cbe Use a global RowMixerFunc 2018-01-16 12:18:59 -08:00
Chris Robinson
0152bc0d10 Remove the SAFE_CONST macro
Seems compilers are now allowing a pointer-to-type-array to implicitly convert
to pointer-to-const-type-array.
2018-01-14 08:51:03 -08:00
Chris Robinson
78cb70a5f9 Replace some freq_mult variable names with f0norm
The latter is a bit more descriptive as f0 is often used to denote the
reference frequency of a filter, so f0norm indicates the normalized reference
frequency (ref_freq / sample_rate).
2018-01-13 09:14:46 -08:00
Chris Robinson
2873abcbc0 Fix up some types for MSVC 2018-01-11 10:55:35 -08:00
Chris Robinson
15f9d15ba0 Avoid using macros to access anonymous structures 2018-01-11 03:45:23 -08:00
Chris Robinson
fea74124c8 Add an all-pass filter that replicates the band splitter's phase shift 2017-07-19 02:48:01 -07:00
Chris Robinson
6f2a30dea2 Remove an unneeded function 2017-02-28 19:48:44 -08:00
Chris Robinson
652ef2b7fd Remove an unused function 2017-02-23 20:40:16 -08:00
Chris Robinson
bb4726d520 Avoid duplicating device buffer layout logic 2017-02-20 16:57:25 -08:00
Chris Robinson
3761336e6c Apply distance compensation when writing to the output 2017-02-19 22:47:59 -08:00
Chris Robinson
9da152a9c8 Don't use periphonic FOA when the HOA decoder is not periphonic 2017-02-19 17:45:27 -08:00
Chris Robinson
071b83ba52 Replace more ALuint with ALsizei 2017-01-29 16:42:02 -08:00
Chris Robinson
1ebfce4cac Improve the ambisonic upscaling methods
This now takes advantage of the differences seen in generated decoder matrices
for first-order compared to second- and third-order, such that with the
appropriate frequency-dependent scaling applied to first-order content, the
result is identical with a higher-order decoder matrix compared to a first-
order matrix for the same layout.
2017-01-24 19:03:51 -08:00
Chris Robinson
bfb7a6e4c8 Small update for the "virtual" Ambi2DDecoder coefficients 2017-01-17 11:35:19 -08:00
Chris Robinson
e9009968fb More ALsizei, with the B-Format decoder 2017-01-16 09:37:55 -08:00
Chris Robinson
959812ee13 Use ALsizei in a few more places 2017-01-16 08:59:08 -08:00
Chris Robinson
ea82a6d19e Use a function to generate the up-sampler transcode matrix 2016-11-24 21:29:53 -08:00
Chris Robinson
9349ee9002 Make some pointer-to-array parameters const 2016-10-04 16:25:43 -07:00
Chris Robinson
1d9d1958db Make the SelectMixer function sharable 2016-09-06 13:21:11 -07:00
Chris Robinson
b1f70b5b78 Rename some variables for clarity 2016-09-06 03:10:38 -07:00
Chris Robinson
564030ffa4 Use more correct cube decoder matrices 2016-09-05 10:33:52 -07:00
Chris Robinson
cf0ef500ec Rename MatrixMixerFunc to RowMixerFunc 2016-09-02 00:29:46 -07:00
Chris Robinson
7428636071 Use MixMatrixRow to upsample the split frequency bands to the output 2016-09-01 07:08:52 -07:00
Chris Robinson
8d3a286577 Simplify the ambisonic up-sampler
It still behaves the same, although now combines the separate decode+encode
matrices into a transcode matrix (one per frequency band).
2016-08-30 04:21:57 -07:00
Chris Robinson
846cdd472d Band-split the HRIRs when building the ambisonic decoder filters
This allows each HRIR to contribute a frequency-dependent response, essentially
acting like a dual-band decoder playing over the cube speaker array.
2016-08-21 03:05:42 -07:00
Chris Robinson
33a84f17ac Add a stand-alone upsampler for higher-order ambisonic oputput 2016-07-30 09:29:21 -07:00
Chris Robinson
84ca38ba95 Make a MAX_AMBI2D_COEFFS macro instead of a magic number 2016-07-17 00:46:18 -07:00
Chris Robinson
35cbecabf9 Repack the ambisonic dual-band decoder matrices
The decoders use a row of the HF decoder matrix followed by a row of the LF
decoder matrix, for each given output channel in turn. Packing the two matrices
accordingly results in less memory hopping.
2016-07-17 00:29:43 -07:00
Chris Robinson
b7da69510c Implement a Neon-enhanced MixRow 2016-06-01 23:39:13 -07:00
Chris Robinson
c63d468d4c Use a macro to specify the ambisonic periphonic channel mask 2016-06-01 05:30:06 -07:00
Chris Robinson
5e64882be9 Use SSE for applying the HQ B-Format decoder matrices 2016-05-31 10:18:34 -07:00
Chris Robinson
72d2febccb Don't access the band splitter fields in the processing loops
perf shows a 5% drop in relative execution time on the alffplay example with an
audio-only file (20% to 15%). Kinda figured the optimizer would handle it
better, but I guess not.
2016-05-31 07:50:23 -07:00
Chris Robinson
f0871c8cfc Improve radius behavior with scaling of ambisonic coefficients 2016-04-24 21:42:59 -07:00
Chris Robinson
7bdd68ddbe Use frequency-dependent processing for the ambisonic up-sampler 2016-04-09 13:10:52 -07:00
Chris Robinson
2ccc1d1d8a Move the aligned malloc functions to the common lib 2016-03-29 00:44:58 -07:00
Chris Robinson
34539bc973 Skip unused output channels for the HQ decode 2016-03-28 14:50:18 -07:00
Chris Robinson
33cd3834ac Align the ChannelMix buffer and use it for up-sampling 2016-03-27 13:23:37 -07:00
Chris Robinson
b4a1ba9d3f Include the distance gain compensation in the decoder matrix 2016-03-26 18:06:36 -07:00