SAF
Loading...
Searching...
No Matches
saf_hoa_internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Leo McCormack
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
15 */
16
34#ifndef __SAF_HOA_INTERNAL_H_INCLUDED__
35#define __SAF_HOA_INTERNAL_H_INCLUDED__
36
37#include "saf_hoa.h"
38#include "../saf_sh/saf_sh.h" /* for computing the legendre polynamials */
39#include "../saf_vbap/saf_vbap.h" /* for VBAP gains utilised by AllRAD */
40#include "../saf_utilities/saf_utilities.h" /* for linear algebra speed-ups */
41#include "saf_externals.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif /* __cplusplus */
46
47/* ========================================================================== */
48/* Loudspeaker Ambisonic Decoders */
49/* ========================================================================== */
50
71void getEPAD(/* Input Arguments */
72 int order,
73 float* ls_dirs_deg,
74 int nLS,
75 /* Output Arguments */
76 float* decMtx);
77
92void getAllRAD(/* Input Arguments */
93 int order,
94 float* ls_dirs_deg,
95 int nLS,
96 /* Output Arguments */
97 float* decMtx);
98
99
100/* ========================================================================== */
101/* Binaural Ambisonic Decoders */
102/* ========================================================================== */
103
130void getBinDecoder_LS(/* Input Arguments */
131 float_complex* hrtfs,
132 float* hrtf_dirs_deg,
133 int N_dirs,
134 int N_bands,
135 int order,
136 float* weights,
137 /* Output Arguments */
138 float_complex* decMtx);
139
166void getBinDecoder_LSDIFFEQ(/* Input Arguments */
167 float_complex* hrtfs,
168 float* hrtf_dirs_deg,
169 int N_dirs,
170 int N_bands,
171 int order,
172 float* weights,
173 /* Output Arguments */
174 float_complex* decMtx);
175
208void getBinDecoder_SPR(/* Input Arguments */
209 float_complex* hrtfs,
210 float* hrtf_dirs_deg,
211 int N_dirs,
212 int N_bands,
213 int order,
214 float* weights,
215 /* Output Arguments */
216 float_complex* decMtx);
217
264void getBinDecoder_TA(/* Input Arguments */
265 float_complex* hrtfs,
266 float* hrtf_dirs_deg,
267 int N_dirs,
268 int N_bands,
269 int order,
270 float* freqVector,
271 float* itd_s,
272 float* weights,
273 /* Output Arguments */
274 float_complex* decMtx);
275
304void getBinDecoder_MAGLS(/* Input Arguments */
305 float_complex* hrtfs,
306 float* hrtf_dirs_deg,
307 int N_dirs,
308 int N_bands,
309 int order,
310 float* freqVector,
311 float* weights,
312 /* Output Arguments */
313 float_complex* decMtx);
314
315
316#ifdef __cplusplus
317} /* extern "C" */
318#endif /* __cplusplus */
319
320#endif /* __SAF_HOA_INTERNAL_H_INCLUDED__ */
Include header for SAF externals.
Main header for the higher-order Ambisonics module (SAF_HOA_MODULE)
void getBinDecoder_TA(float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *freqVector, float *itd_s, float *weights, float_complex *decMtx)
Computes a binaural ambisonic decoder based on the time-alignment (TA) method described in [1].
void getEPAD(int order, float *ls_dirs_deg, int nLS, float *decMtx)
Computes the Energy preserving Ambisonic decoder (EPAD), as detailed in [1].
void getBinDecoder_LSDIFFEQ(float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx)
Computes a least-squares (LS) binaural ambisonic decoder with diffuse-field equalisation [1].
void getBinDecoder_SPR(float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx)
Computes a binaural ambisonic decoder based on spatial resampling (i.e, virtual loudspeaker decoding)...
void getBinDecoder_LS(float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx)
Computes a standard least-squares (LS) binaural ambisonic decoder.
void getBinDecoder_MAGLS(float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *freqVector, float *weights, float_complex *decMtx)
Computes a binaural ambisonic decoder based on the magnitude least-squares (MagLS) method,...
void getAllRAD(int order, float *ls_dirs_deg, int nLS, float *decMtx)
Computes the All-round Ambisonics decoder (AllRAD), as detailed in [1], which is essentially a spheri...
Main header for the Spherical Harmonic Transform and Spherical Array Processing module (SAF_SH_MODULE...
Main header for the utilities module (SAF_UTILITIES_MODULE)
Main header for the VBAP/MDAP module (SAF_VBAP_MODULE)