55 int i, j, N_azi, N_ele, nSH_order, order, nSH_sec, order_sec, order_up, nSH_up, geosphere_ico_freq, td_degree;
56 float hfov, vfov, fi, aspectRatio;
57 float *grid_x_axis, *grid_y_axis, *c_n;
62 nSH_order = (order+1)*(order+1);
63 nSH_up = (order_up+1)*(order_up+1);
101 geosphere_ico_freq = 6;
110 geosphere_ico_freq = 8;
115 geosphere_ico_freq = 9;
120 geosphere_ico_freq = 10;
125 geosphere_ico_freq = 12;
134 case HFOV_360: hfov = 360.0f;
break;
135 case HFOV_180: hfov = 180.0f;
break;
136 case HFOV_90: hfov = 90.0f;
break;
137 case HFOV_60: hfov = 60.0f;
break;
146 N_ele = (int)((
float)pData->
dispWidth/aspectRatio + 0.5f);
147 grid_x_axis =
malloc1d(N_azi *
sizeof(
float));
148 grid_y_axis =
malloc1d(N_ele *
sizeof(
float));
149 vfov = hfov/aspectRatio;
150 for(fi = -hfov/2.0f, i = 0; i<N_azi; fi+=hfov/N_azi, i++)
152 for(fi = -vfov/2.0f, i = 0; i<N_ele; fi+=vfov/N_ele, i++)
156 for(i = 0; i<N_ele; i++){
157 for(j=0; j<N_azi; j++){
173 nSH_sec = (order_sec+1)*(order_sec+1);
174 A_xyz =
malloc1d(nSH_order*nSH_sec*3*
sizeof(float_complex));
175 c_n =
malloc1d((order_sec+1)*
sizeof(
float));
194 c_n =
malloc1d((order+1)*
sizeof(
float));
208 c_n =
malloc1d((order_up+1)*
sizeof(
float));
@ STATIC_BEAM_TYPE_MAX_EV
hyper-cardioid with max_rE weighting
@ STATIC_BEAM_TYPE_HYPERCARDIOID
hyper-cardioid
@ STATIC_BEAM_TYPE_CARDIOID
cardioid
CODEC_STATUS
Current status of the codec.
@ CODEC_STATUS_NOT_INITIALISED
Codec has not yet been initialised, or the codec configuration has changed.
@ CODEC_STATUS_INITIALISING
Codec is currently being initialised, input audio should not be processed.
@ ASPECT_RATIO_4_3
ASPECT_RATIO_4_3 - 4:3.
@ ASPECT_RATIO_16_9
ASPECT_RATIO_16_9 - 16:9.
@ ASPECT_RATIO_2_1
ASPECT_RATIO_2_1 - 2:1.
A sound-field visualiser based on the directional re-assignment of beamformer energy based on local D...
@ GRID_GEOSPHERE_10
GRID_GEOSPHERE_10 - 1002 points.
@ T_DESIGN_9
T_DESIGN_9 - 48 points.
@ T_DESIGN_3
T_DESIGN_3 - 6 points.
@ T_DESIGN_13
T_DESIGN_13 - 94 points.
@ T_DESIGN_6
T_DESIGN_6 - 24 points.
@ GRID_GEOSPHERE_9
GRID_GEOSPHERE_9 - 812 points.
@ GRID_GEOSPHERE_8
GRID_GEOSPHERE_8 - 642 points.
@ GRID_GEOSPHERE_6
GRID_GEOSPHERE_6 - 362 points.
@ T_DESIGN_30
T_DESIGN_30 - 480 points.
@ T_DESIGN_18
T_DESIGN_18 - 180 points.
@ T_DESIGN_4
T_DESIGN_4 - 12 points.
@ GRID_GEOSPHERE_12
GRID_GEOSPHERE_12 - 1442 points.
void dirass_setCodecStatus(void *const hDir, CODEC_STATUS newStatus)
Sets codec status (see CODEC_STATUS enum)
void dirass_initAna(void *const hDir)
Intialises the codec variables, based on current global/user parameters.
A sound-field visualiser based on the directional re-assignment of beamformer energy based on local D...
#define DIRASS_FRAME_SIZE
Framesize, in time-domain samples.
#define NUM_DISP_SLOTS
Number of display slots.
void beamWeightsVelocityPatternsReal(int order, float *b_n, float azi_rad, float elev_rad, float_complex *A_xyz, float *velCoeffs)
Generates beamforming coefficients for velocity patterns (REAL)
void beamWeightsCardioid2Spherical(int N, float *b_n)
Generates spherical coefficients for generating cardioid beampatterns.
void beamWeightsMaxEV(int N, float *b_n)
Generates beamweights in the SHD for maximum energy-vector beampatterns.
void rotateAxisCoeffsReal(int order, float *c_n, float theta_0, float phi_0, float *c_nm)
Generates spherical coefficients for a rotated axisymmetric pattern (REAL)
void beamWeightsHypercardioid2Spherical(int N, float *b_n)
Generates beamweights in the SHD for hypercardioid beampatterns.
void computeVelCoeffsMtx(int sectorOrder, float_complex *A_xyz)
Computes the matrices which generate the coefficients of a beampattern of order (sectorOrder+1) that ...
#define SAF_PI
pi constant (single precision)
const float * __HANDLES_Tdesign_dirs_deg[21]
minimum T-design HANDLES (up to degree 21 only).
const int __geosphere_ico_nPoints[17]
3LD geosphere number of points (freq = [0 0], [1 0],..., [16 0])
const float __Tdesign_degree_30_dirs_deg[480][2]
Directions [azimuth, Elevation] in degrees, for minimum Tdesign degree: 30.
const int __Tdesign_nPoints_per_degree[21]
Number of points in each t-design (up to degree 21 only).
const float * __HANDLES_geosphere_ico_dirs_deg[17]
3LD geosphere HANDLES (freq = [0 0], [1 0],..., [16 0])
void generateVBAPgainTable3D_srcs(float *src_dirs_deg, int S, float *ls_dirs_deg, int L, int omitLargeTriangles, int enableDummies, float spread, float **gtable, int *N_gtable, int *nTriangles)
Generates a 3-D VBAP [1] gain table based on specified source and loudspeaker directions,...
void VBAPgainTable2InterpTable(float *vbap_gtable, int nTable, int nDirs)
Renormalises a VBAP gain table (in-place) so it may be utilised for interpolation of data (for exampl...
void * malloc1d(size_t dim1_data_size)
1-D malloc (same as malloc, but with error checking)
void * realloc1d(void *ptr, size_t dim1_data_size)
1-D realloc (same as realloc, but with error checking)
Contains variables for scanning grids, and sector beamforming.
float * ss
beamformer sector signals; FLAT: grid_nDirs x DIRASS_FRAME_SIZE
float * interp_table
interpolation table (spherical->rectangular grid); FLAT: interp_nDirs x grid_nDirs
float * interp_dirs_deg
interpolation directions, in degrees; FLAT: interp_nDirs x 2
float * grid_dirs_deg
scanning grid directions; FLAT: grid_nDirs x 2
float * est_dirs
estimated DoA per grid direction; grid_nDirs x 2
float * Cxyz
beamforming weights for velocity patterns; FLAT: nDirs x (order+1)^2 x 3
int interp_nTri
number of triangles in the spherical scanning grid mesh
float * prev_energy
previous energy (for averaging); FLAT: grid_nDirs x 1
int * est_dirs_idx
DoA indices, into the interpolation directions; grid_nDirs x 1.
float * prev_intensity
previous intensity vectors (for averaging); FLAT: grid_nDirs x 3
float * w
beamforming weights; FLAT: nDirs x (order+1)^2
float * Cw
beamforming weights; FLAT: nDirs x (order)^2
int grid_nDirs
number of grid directions
float * Uw
beamforming weights; FLAT: nDirs x (upscaleOrder+1)^2
int interp_nDirs
number of interpolation directions
float * interp_dirs_rad
interpolation directions, in radians; FLAT: interp_nDirs x 2
float * ssxyz
beamformer velocity signals; FLAT: 3 x DIRASS_FRAME_SIZE
float * Y_up
real SH weights for upscaling; FLAT: (upscaleOrder+1)^2 x grid_nDirs
Main structure for dirass.
int inputOrder
Current input/analysis order.
float * pmap
grid_nDirs x 1
int upscaleOrder
Current target upscale order.
STATIC_BEAM_TYPES beamType
beamformer type mode
float progressBar0_1
Current (re)initialisation progress, between [0..1].
float * pmap_grid[NUM_DISP_SLOTS]
dirass interpolated to grid; interp_nDirs x 1
int new_upscaleOrder
New target upscale order.
ASPECT_RATIO_OPTIONS aspectRatioOption
aspect ratio option
int new_inputOrder
New input/analysis order.
CODEC_STATUS codecStatus
see CODEC_STATUS
DIRASS_GRID_OPTIONS gridOption
grid option
int dispWidth
number of interpolation points on the horizontal
dirass_codecPars * pars
codec parameters
char * progressBarText
Current (re)initialisation step, string.
HFOV_OPTIONS HFOVoption
horizontal field-of-view option