Loading lib_util/ambi_cenvert.c +27 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,30 @@ #include "ivas_cnst.h" #include "ambi_convert.h" #define SQRT_3 1.7320508f #define SQRT_5 2.2360679f #define SQRT_7 2.64575131f #define INV_SQRT_3 0.5773502f #define INV_SQRT_5 0.4472135f #define INV_SQRT_7 0.3779644f #define AMBI_MAX_CHANNELS 16 static const float N3D_SN3D[AMBI_MAX_CHANNELS] = { 1.0f, SQRT_3, SQRT_3, SQRT_3, SQRT_5, SQRT_5, SQRT_5, SQRT_5, SQRT_5, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7 }; static const float SN3D_N3D[AMBI_MAX_CHANNELS] = { 1.0f, INV_SQRT_3, INV_SQRT_3, INV_SQRT_3, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7 }; int16_t convert_ambi_format( float in[][L_FRAME48k], float out[][L_FRAME48k], int16_t order, AMBI_FMT in_format, AMBI_FMT out_format ) { assert( order <= 3 ); Loading Loading @@ -100,6 +124,9 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i { int16_t nchan = ( order + 1 ) * ( order + 1 ); /* conversion factors are aplpied on the channels assuming that they are still/already in ACN order */ return 0; } Loading Loading
lib_util/ambi_cenvert.c +27 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,30 @@ #include "ivas_cnst.h" #include "ambi_convert.h" #define SQRT_3 1.7320508f #define SQRT_5 2.2360679f #define SQRT_7 2.64575131f #define INV_SQRT_3 0.5773502f #define INV_SQRT_5 0.4472135f #define INV_SQRT_7 0.3779644f #define AMBI_MAX_CHANNELS 16 static const float N3D_SN3D[AMBI_MAX_CHANNELS] = { 1.0f, SQRT_3, SQRT_3, SQRT_3, SQRT_5, SQRT_5, SQRT_5, SQRT_5, SQRT_5, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7, SQRT_7 }; static const float SN3D_N3D[AMBI_MAX_CHANNELS] = { 1.0f, INV_SQRT_3, INV_SQRT_3, INV_SQRT_3, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_5, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7, INV_SQRT_7 }; int16_t convert_ambi_format( float in[][L_FRAME48k], float out[][L_FRAME48k], int16_t order, AMBI_FMT in_format, AMBI_FMT out_format ) { assert( order <= 3 ); Loading Loading @@ -100,6 +124,9 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i { int16_t nchan = ( order + 1 ) * ( order + 1 ); /* conversion factors are aplpied on the channels assuming that they are still/already in ACN order */ return 0; } Loading