Loading CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -216,11 +216,11 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com) target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar) add_executable(ambi_converter apps/ambi_converter.c) target_link_libraries(ambi_converter lib_util lib_com) target_link_libraries(ambi_converter lib_util lib_com lib_basop) if(UNIX) target_link_libraries(ambi_converter m) endif() target_include_directories(ambi_converter PRIVATE lib_util lib_com) target_include_directories(ambi_converter PRIVATE lib_basop lib_util lib_com lib_debug) if(COPY_EXECUTABLES_FROM_BUILD_DIR) # Optionally copy executables to the same place where Make puts them (useful for tests that expect executables in specific places) Loading apps/ambi_converter.c +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ #include <stdio.h> #include <assert.h> #include <math.h> #include <stdint.h> #include "../lib_util/tinywavein_c.h" #include "../lib_util/tinywaveout_c.h" #include "ambi_convert.h" Loading lib_util/ambi_convert.c +27 −27 Original line number Diff line number Diff line Loading @@ -32,9 +32,9 @@ #include <assert.h> #include <stdio.h> #include "wmc_auto.h" #include "ambi_convert.h" #include "stl.h" #include "ambi_convert.h" #include "wmc_auto.h" #define ONE_1_Q29 536870912l /* 1.0f */ #define ONE_OVER_2_Q29 268435456l /* 1.0f/2.0f */ Loading Loading @@ -99,22 +99,22 @@ static const Word32 FM_SN3D[AMBI_MAX_CHANNELS] = { SQRT_2_Q29, channel re-ordering tables ---------------------------- */ static const int16_t REORDER_FM_ACN[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_FM_ACN[AMBI_MAX_CHANNELS] = { 0, 2, 3, 1, 8, 6, 4, 5, 7, 15, 13, 11, 9, 10, 12, 14 }; static const int16_t REORDER_SID_ACN[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_SID_ACN[AMBI_MAX_CHANNELS] = { 0, 2, 3, 1, 5, 7, 8, 6, 4, 10, 12, 14, 15, 13, 11, 9 }; static const int16_t REORDER_ACN_FM[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_ACN_FM[AMBI_MAX_CHANNELS] = { 0, 3, 1, 2, 6, 7, 5, 8, 4, 12, 13, 11, 14, 10, 15, 9 }; static const int16_t REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, 3, 1, 2, 8, 4, 7, 5, 6, 15, 9, 14, 10, 13, 11, 12 }; Loading @@ -132,7 +132,7 @@ static const int16_t REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, AMBI_CONVERT_ERROR convert_ambi_format( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_FMT in_format, /* i: input ambisonics format */ AMBI_FMT out_format /* i: output ambisonics format */ ) Loading Loading @@ -307,12 +307,12 @@ AMBI_CONVERT_ERROR convert_ambi_format( } ELSE IF( out_format == AMBI_FMT_ACN_SN3D && in_format == AMBI_FMT_ACN_SN3D ) { int16_t i_chan = 0; int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan = 0; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); FOR( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t i_s = 0; Word16 i_s = 0; move16(); FOR( i_s = 0; i_s < L_FRAME48k; i_s++ ) { Loading @@ -338,13 +338,13 @@ AMBI_CONVERT_ERROR convert_ambi_format( AMBI_CONVERT_ERROR renormalize_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_NORM in_format, /* i: input ambisonics format */ AMBI_CHANNEL_NORM out_format /* i: output ambisonics format */ ) { int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); int16_t i_chan, i; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan, i; const Word32 *conversion_table = 0; Word32 minval = 0; Word32 maxval = 0; Loading Loading @@ -436,15 +436,15 @@ AMBI_CONVERT_ERROR renormalize_channels( AMBI_CONVERT_ERROR reorder_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_ORDER in_format, /* i: input ambisonics format */ AMBI_CHANNEL_ORDER out_format /* i: output ambisonics format */ ) { int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); int16_t i_chan, i; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan, i; Word16 tmp[AMBI_MAX_CHANNELS]; const int16_t *idx_table = 0; const Word16 *idx_table = 0; IF( in_format == AMBI_CHANNEL_ORDER_ACN ) { Loading Loading @@ -489,7 +489,7 @@ AMBI_CONVERT_ERROR reorder_channels( { FOR( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t idx = idx_table[i_chan]; Word16 idx = idx_table[i_chan]; move16(); tmp[i_chan] = in[idx][i]; move16(); Loading lib_util/ambi_convert.h +5 −10 Original line number Diff line number Diff line Loading @@ -33,14 +33,9 @@ #ifndef AMBI_CONVERT_H #define AMBI_CONVERT_H #include <stdint.h> #include "options.h" #include "prot_fx.h" #include "ivas_cnst.h" #include <math.h> #include "wmc_auto.h" #include "ivas_prot_fx.h" #include "stl.h" #include "cnst.h" #define L_FRAME48k 960 #define AMBI_MAX_CHANNELS 16 Loading Loading @@ -80,7 +75,7 @@ typedef enum AMBI_CONVERT_ERROR convert_ambi_format( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_FMT in_format, /* i: input ambisonics format */ AMBI_FMT out_format /* i: output ambisonics format */ ); Loading @@ -88,7 +83,7 @@ AMBI_CONVERT_ERROR convert_ambi_format( AMBI_CONVERT_ERROR renormalize_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_NORM in_format, /* i: input ambisonics format */ AMBI_CHANNEL_NORM out_format /* i: output ambisonics format */ ); Loading @@ -96,7 +91,7 @@ AMBI_CONVERT_ERROR renormalize_channels( AMBI_CONVERT_ERROR reorder_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_ORDER in_format, /* i: input ambisonics format */ AMBI_CHANNEL_ORDER out_format /* i: output ambisonics format */ ); Loading Loading
CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -216,11 +216,11 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com) target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar) add_executable(ambi_converter apps/ambi_converter.c) target_link_libraries(ambi_converter lib_util lib_com) target_link_libraries(ambi_converter lib_util lib_com lib_basop) if(UNIX) target_link_libraries(ambi_converter m) endif() target_include_directories(ambi_converter PRIVATE lib_util lib_com) target_include_directories(ambi_converter PRIVATE lib_basop lib_util lib_com lib_debug) if(COPY_EXECUTABLES_FROM_BUILD_DIR) # Optionally copy executables to the same place where Make puts them (useful for tests that expect executables in specific places) Loading
apps/ambi_converter.c +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ #include <stdio.h> #include <assert.h> #include <math.h> #include <stdint.h> #include "../lib_util/tinywavein_c.h" #include "../lib_util/tinywaveout_c.h" #include "ambi_convert.h" Loading
lib_util/ambi_convert.c +27 −27 Original line number Diff line number Diff line Loading @@ -32,9 +32,9 @@ #include <assert.h> #include <stdio.h> #include "wmc_auto.h" #include "ambi_convert.h" #include "stl.h" #include "ambi_convert.h" #include "wmc_auto.h" #define ONE_1_Q29 536870912l /* 1.0f */ #define ONE_OVER_2_Q29 268435456l /* 1.0f/2.0f */ Loading Loading @@ -99,22 +99,22 @@ static const Word32 FM_SN3D[AMBI_MAX_CHANNELS] = { SQRT_2_Q29, channel re-ordering tables ---------------------------- */ static const int16_t REORDER_FM_ACN[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_FM_ACN[AMBI_MAX_CHANNELS] = { 0, 2, 3, 1, 8, 6, 4, 5, 7, 15, 13, 11, 9, 10, 12, 14 }; static const int16_t REORDER_SID_ACN[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_SID_ACN[AMBI_MAX_CHANNELS] = { 0, 2, 3, 1, 5, 7, 8, 6, 4, 10, 12, 14, 15, 13, 11, 9 }; static const int16_t REORDER_ACN_FM[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_ACN_FM[AMBI_MAX_CHANNELS] = { 0, 3, 1, 2, 6, 7, 5, 8, 4, 12, 13, 11, 14, 10, 15, 9 }; static const int16_t REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, static const Word16 REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, 3, 1, 2, 8, 4, 7, 5, 6, 15, 9, 14, 10, 13, 11, 12 }; Loading @@ -132,7 +132,7 @@ static const int16_t REORDER_ACN_SID[AMBI_MAX_CHANNELS] = { 0, AMBI_CONVERT_ERROR convert_ambi_format( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_FMT in_format, /* i: input ambisonics format */ AMBI_FMT out_format /* i: output ambisonics format */ ) Loading Loading @@ -307,12 +307,12 @@ AMBI_CONVERT_ERROR convert_ambi_format( } ELSE IF( out_format == AMBI_FMT_ACN_SN3D && in_format == AMBI_FMT_ACN_SN3D ) { int16_t i_chan = 0; int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan = 0; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); FOR( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t i_s = 0; Word16 i_s = 0; move16(); FOR( i_s = 0; i_s < L_FRAME48k; i_s++ ) { Loading @@ -338,13 +338,13 @@ AMBI_CONVERT_ERROR convert_ambi_format( AMBI_CONVERT_ERROR renormalize_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_NORM in_format, /* i: input ambisonics format */ AMBI_CHANNEL_NORM out_format /* i: output ambisonics format */ ) { int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); int16_t i_chan, i; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan, i; const Word32 *conversion_table = 0; Word32 minval = 0; Word32 maxval = 0; Loading Loading @@ -436,15 +436,15 @@ AMBI_CONVERT_ERROR renormalize_channels( AMBI_CONVERT_ERROR reorder_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_ORDER in_format, /* i: input ambisonics format */ AMBI_CHANNEL_ORDER out_format /* i: output ambisonics format */ ) { int16_t n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); int16_t i_chan, i; Word16 n_chan = i_mult2( add( order, 1 ), add( order, 1 ) ); Word16 i_chan, i; Word16 tmp[AMBI_MAX_CHANNELS]; const int16_t *idx_table = 0; const Word16 *idx_table = 0; IF( in_format == AMBI_CHANNEL_ORDER_ACN ) { Loading Loading @@ -489,7 +489,7 @@ AMBI_CONVERT_ERROR reorder_channels( { FOR( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t idx = idx_table[i_chan]; Word16 idx = idx_table[i_chan]; move16(); tmp[i_chan] = in[idx][i]; move16(); Loading
lib_util/ambi_convert.h +5 −10 Original line number Diff line number Diff line Loading @@ -33,14 +33,9 @@ #ifndef AMBI_CONVERT_H #define AMBI_CONVERT_H #include <stdint.h> #include "options.h" #include "prot_fx.h" #include "ivas_cnst.h" #include <math.h> #include "wmc_auto.h" #include "ivas_prot_fx.h" #include "stl.h" #include "cnst.h" #define L_FRAME48k 960 #define AMBI_MAX_CHANNELS 16 Loading Loading @@ -80,7 +75,7 @@ typedef enum AMBI_CONVERT_ERROR convert_ambi_format( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_FMT in_format, /* i: input ambisonics format */ AMBI_FMT out_format /* i: output ambisonics format */ ); Loading @@ -88,7 +83,7 @@ AMBI_CONVERT_ERROR convert_ambi_format( AMBI_CONVERT_ERROR renormalize_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_NORM in_format, /* i: input ambisonics format */ AMBI_CHANNEL_NORM out_format /* i: output ambisonics format */ ); Loading @@ -96,7 +91,7 @@ AMBI_CONVERT_ERROR renormalize_channels( AMBI_CONVERT_ERROR reorder_channels( Word16 *in[], /* i: input ambisonics channels, Q0 */ Word16 *out[], /* o: output ambisonics channels, Q0 */ int16_t order, /* i: ambisonics order */ Word16 order, /* i: ambisonics order */ AMBI_CHANNEL_ORDER in_format, /* i: input ambisonics format */ AMBI_CHANNEL_ORDER out_format /* i: output ambisonics format */ ); Loading