37#ifndef __DIRASS_INTERNAL_H_INCLUDED__
38#define __DIRASS_INTERNAL_H_INCLUDED__
52#if !defined(DIRASS_FRAME_SIZE)
53# if defined(FRAME_SIZE)
54# define DIRASS_FRAME_SIZE ( FRAME_SIZE )
56# define DIRASS_FRAME_SIZE ( 1024 )
59#define MAX_DISPLAY_SH_ORDER ( 20 )
60#define MAX_NUM_INPUT_SH_SIGNALS ( (MAX_SH_ORDER+1)*(MAX_SH_ORDER+1) )
61#define MAX_NUM_DISPLAY_SH_SIGNALS ( (MAX_DISPLAY_SH_ORDER+1)*(MAX_DISPLAY_SH_ORDER+1) )
62#define NUM_DISP_SLOTS ( 2 )
64#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
81typedef struct _dirass_codecPars
113typedef struct _dirass
CODEC_STATUS
Current status of the codec.
A sound-field visualiser based on the directional re-assignment of beamformer energy based on local D...
DIRASS_REASS_MODES
Available processing modes.
DIRASS_GRID_OPTIONS
Available scanning grid options.
DIRASS_UPSCALE_ORDERS
Available upscaling orders.
#define MAX_NUM_DISPLAY_SH_SIGNALS
Maximum number of SH signals for the display/upscaling SH output.
#define MAX_NUM_INPUT_SH_SIGNALS
Maximum number of SH signals for the input.
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.
#define DIRASS_FRAME_SIZE
Framesize, in time-domain samples.
#define NUM_DISP_SLOTS
Number of display slots.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
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.
_Atomic_FLOAT32 progressBar0_1
Current (re)initialisation progress, between [0..1].
_Atomic_HFOV_OPTIONS HFOVoption
horizontal field-of-view option
_Atomic_INT32 upscaleOrder
Current target upscale order.
float * pmap
grid_nDirs x 1
_Atomic_CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)
_Atomic_INT32 new_upscaleOrder
New target upscale order.
float fs
host sampling rate
float Wz12_hpf[MAX_NUM_INPUT_SH_SIGNALS][2]
delayed elements used in the HPF
_Atomic_CODEC_STATUS codecStatus
see CODEC_STATUS
_Atomic_INT32 dispSlotIdx
current display slot index
float SHframe_upTD[MAX_NUM_DISPLAY_SH_SIGNALS][DIRASS_FRAME_SIZE]
Upscaled SH signals.
_Atomic_FLOAT32 pmapAvgCoeff
averaging coefficient for the intensity vector per grid direction
float pmap_grid_maxVal
maximum value in pmap
float * pmap_grid[NUM_DISP_SLOTS]
dirass interpolated to grid; interp_nDirs x 1
float Wz12_lpf[MAX_NUM_INPUT_SH_SIGNALS][2]
delayed elements used in the LPF
_Atomic_PROC_STATUS procStatus
see PROC_STATUS
_Atomic_ASPECT_RATIO_OPTIONS aspectRatioOption
aspect ratio option
_Atomic_DIRASS_GRID_OPTIONS gridOption
grid option
_Atomic_STATIC_BEAM_TYPES beamType
beamformer type mode
float pmap_grid_minVal
minimum value in pmap
float SHframeTD[MAX_NUM_INPUT_SH_SIGNALS][DIRASS_FRAME_SIZE]
Input SH signals.
_Atomic_FLOAT32 maxFreq_hz
maximum frequency to include in pmap generation, Hz
_Atomic_INT32 recalcPmap
set this to 1 to generate a new image
_Atomic_DIRASS_REASS_MODES DirAssMode
see DIRASS_REASS_MODES enum
_Atomic_NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
int FIFO_idx
FIFO buffer index.
_Atomic_INT32 inputOrder
Current input/analysis order.
_Atomic_INT32 pmapReady
0: image generation not started yet, 1: image is ready for plotting
dirass_codecPars * pars
codec parameters
_Atomic_FLOAT32 minFreq_hz
minimum frequency to include in pmap generation, Hz
_Atomic_INT32 new_inputOrder
New input/analysis order.
_Atomic_INT32 dispWidth
number of interpolation points on the horizontal
char * progressBarText
Current (re)initialisation step, string.
float inFIFO[MAX_NUM_INPUT_SH_SIGNALS][DIRASS_FRAME_SIZE]
FIFO buffer.