Loading lib_util/ambi_cenvert.c +19 −3 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include <stdint.h> #include <assert.h> #include "ivas_cnst.h" #include "ambi_convert.h" Loading Loading @@ -181,7 +182,7 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i { int16_t n_chan = ( order + 1 ) * ( order + 1 ); int16_t i_chan, i; const float *conversion_table; const float *conversion_table = 0; /* conversion factors are aplpied on the channels assuming that they are still/already in ACN order */ Loading Loading @@ -234,8 +235,10 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i int16_t reorder_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], int16_t order, AMBI_CHANNEL_ORDER in_format, AMBI_CHANNEL_ORDER out_format ) { int16_t nchan = ( order + 1 ) * ( order + 1 ); int16_t *idx_table; int16_t n_chan = ( order + 1 ) * ( order + 1 ); int16_t i_chan, i; float tmp[AMBI_MAX_CHANNELS]; const int16_t *idx_table = 0; if ( in_format == AMBI_CHANNEL_ORDER_ACN ) { Loading Loading @@ -272,5 +275,18 @@ int16_t reorder_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], int16 assert( 0 && "Conversion only supported to and from ACN-SN3D" ); } for ( i = 0; i < L_FRAME48k; i++ ) { for ( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t idx = idx_table[i_chan]; tmp[i_chan] = in[idx][i]; } for ( i_chan = 0; i_chan < n_chan; i_chan++ ) { out[i_chan][i] = tmp[i_chan]; } } return 0; } scripts/check-format.sh +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ if [ ! -d "lib_com" ]; then exit 255 fi CLANG_FORMAT=clang-format CLANG_FORMAT=./clang-format.exe CLANG_FORMAT_REQUIRED_VERSION="13.0" # list (with space between entries) of substrings that are excluded from the file list, e.g. very large files Loading Loading
lib_util/ambi_cenvert.c +19 −3 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include <stdint.h> #include <assert.h> #include "ivas_cnst.h" #include "ambi_convert.h" Loading Loading @@ -181,7 +182,7 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i { int16_t n_chan = ( order + 1 ) * ( order + 1 ); int16_t i_chan, i; const float *conversion_table; const float *conversion_table = 0; /* conversion factors are aplpied on the channels assuming that they are still/already in ACN order */ Loading Loading @@ -234,8 +235,10 @@ int16_t renormalize_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], i int16_t reorder_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], int16_t order, AMBI_CHANNEL_ORDER in_format, AMBI_CHANNEL_ORDER out_format ) { int16_t nchan = ( order + 1 ) * ( order + 1 ); int16_t *idx_table; int16_t n_chan = ( order + 1 ) * ( order + 1 ); int16_t i_chan, i; float tmp[AMBI_MAX_CHANNELS]; const int16_t *idx_table = 0; if ( in_format == AMBI_CHANNEL_ORDER_ACN ) { Loading Loading @@ -272,5 +275,18 @@ int16_t reorder_channels( float in[][L_FRAME48k], float out[][L_FRAME48k], int16 assert( 0 && "Conversion only supported to and from ACN-SN3D" ); } for ( i = 0; i < L_FRAME48k; i++ ) { for ( i_chan = 0; i_chan < n_chan; i_chan++ ) { int16_t idx = idx_table[i_chan]; tmp[i_chan] = in[idx][i]; } for ( i_chan = 0; i_chan < n_chan; i_chan++ ) { out[i_chan][i] = tmp[i_chan]; } } return 0; }
scripts/check-format.sh +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ if [ ! -d "lib_com" ]; then exit 255 fi CLANG_FORMAT=clang-format CLANG_FORMAT=./clang-format.exe CLANG_FORMAT_REQUIRED_VERSION="13.0" # list (with space between entries) of substrings that are excluded from the file list, e.g. very large files Loading