Loading apps/renderer.c +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #include "split_rend_bfi_file_reader.h" #include "vector3_pair_file_reader.h" #include "wmc_auto.h" #include "basop32.h" #define WMC_TOOL_SKIP Loading lib_com/basop32.c +1 −1 Original line number Diff line number Diff line Loading @@ -1268,7 +1268,7 @@ Word16 round_fx( Word32 L_var1 ) Word32 L_rounded; BASOP_SATURATE_WARNING_OFF L_rounded = L_add( L_var1, (Word32) 0x00008000L ); L_rounded = L_add_sat( L_var1, (Word32) 0x00008000L ); BASOP_SATURATE_WARNING_ON var_out = extract_h( L_rounded ); Loading lib_com/basop_util.c +21 −0 Original line number Diff line number Diff line Loading @@ -2085,6 +2085,8 @@ Word32 norm_llQ31( /* o : normalized result Q31 */ return L_sum; } #ifndef FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW /* note: now available in basop_util.h */ Word32 w_norm_llQ31( Word64 L_sum, Word16 *exp ); Word32 w_norm_llQ31( /* o : normalized result Q31 */ Word64 L_sum, /* i : upper and lower bits of accu, unsigned Q31 */ Loading @@ -2111,6 +2113,7 @@ Word32 w_norm_llQ31( /* o : normalized result Q31 */ L_tmp = W_extract_h( L64_inp64 ); return L_tmp; } #endif Word32 Dot_product16HQ( /* o : normalized result Q31 */ const Word32 L_off, /* i : initial sum value Qn */ Loading @@ -2135,6 +2138,24 @@ Word32 Dot_product16HQ( /* o : normalized result return L_sum; } Word32 sum_array_norm( /* o : normalized result Q31 */ const Word32 x[], /* i : x vector Qn */ const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ) { Word16 i; Word64 W_tmp = 0; Word32 L_tmp; FOR( i = 0; i < lg; i++ ) { W_tmp = W_add( W_tmp, x[i] ); /*Q31*/ } L_tmp = w_norm_llQ31( W_tmp, exp ); /*Q31 - *exp*/ return L_tmp; } Word32 Norm32Norm( const Word32 *x, const Word16 headroom, const Word16 length, Word16 *result_e ) { Word32 L_tmp, L_tmp2; Loading lib_com/basop_util.h +31 −0 Original line number Diff line number Diff line Loading @@ -612,6 +612,20 @@ Word32 Dot_product16HQ( /*<! o : normalized result Word16 *exp /*<! o : exponent of result in [-32,31] Q0 */ ); /*------------------------------------------------------------------* * sum_array_norm: * * \brief Compute array summation of x[] using 64-bit accumulator. * * Performs normalization of the result, returns the exponent * Note: no headroom is required for data in x[] *------------------------------------------------------------------*/ Word32 sum_array_norm( /* o : normalized result Q31 */ const Word32 x[], /* i : x vector Qn */ const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ); /*------------------------------------------------------------------* * norm_llQ31: * Loading @@ -627,6 +641,23 @@ Word32 norm_llQ31( /* o : normalized result Q31 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ); #ifdef FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW /*------------------------------------------------------------------* * w_norm_llQ31: * * \brief Compute normalized Q31 Values out of overflowed Q31 value * using 64-bit operators *------------------------------------------------------------------*/ static inline Word32 w_norm_llQ31( Word64 L64_var1, Word16 *S_var2 ) /*Q31 - L_tmp_exp*/ { Word32 L_result; Word16 sh = W_norm( L64_var1 ); L_result = W_extract_h( W_shl( L64_var1, sh ) ); *S_var2 = ( L_result == 0 ) ? -32 : 32 - sh; return L_result; } #endif /** * \brief Compute dot product of 1 32 bit vectors with itself * \param x input vector 1 Loading lib_com/ivas_prot_fx.h +17 −6 Original line number Diff line number Diff line Loading @@ -2336,6 +2336,9 @@ void ivas_dirac_dec_read_BS_fx( Word16 *nb_bits, /* o : number of bits read */ const Word16 last_bit_pos, /* i : last read bitstream position */ const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif Word16 *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -2496,6 +2499,13 @@ Word16 ivas_sba_get_nchan_metadata_fx( const Word32 ivas_total_brate /* i : IVAS total bitrate */ ); #ifdef NONBE_FIX_1052_SBA_EXT /*! r: number of bits in SPAR SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ ); #endif void ivas_sba_get_spar_hoa_ch_ind_fx( const Word16 num_md_chs, /* i : number of MD channels */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ Loading Loading @@ -3500,6 +3510,9 @@ void ivas_qmetadata_enc_sid_encode_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *q_metadata, /* i/o: metadata handle */ const Word16 masa_sid_descriptor, /* i : description of MASA SID coding structure*/ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif const Word16 ivas_format /* i : ivas format */ ); void ivas_param_mc_enc_fx( Loading Loading @@ -4974,11 +4987,6 @@ Word16 ivas_sba_get_nchan_metadata( const Word32 ivas_total_brate /* i : IVAS total bitrate */ ); void ivas_sba_get_spar_hoa_ch_ind( const Word16 num_md_chs, /* i : number of MD channels */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ Word16 HOA_md_ind[IVAS_SPAR_MAX_CH] ); /*! r: flag indicating to code SPAR HOA MD for all bands */ void ivas_sba_get_spar_hoa_md_flag( const Word16 sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -5838,6 +5846,9 @@ ivas_error ivas_dirac_enc_fx( const Word16 input_frame, /* i : input frame length */ const Word16 dtx_vad, /* i : DTX vad flag */ const IVAS_FORMAT ivas_format, /* i : ivas format */ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 shift ); Loading Loading
apps/renderer.c +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #include "split_rend_bfi_file_reader.h" #include "vector3_pair_file_reader.h" #include "wmc_auto.h" #include "basop32.h" #define WMC_TOOL_SKIP Loading
lib_com/basop32.c +1 −1 Original line number Diff line number Diff line Loading @@ -1268,7 +1268,7 @@ Word16 round_fx( Word32 L_var1 ) Word32 L_rounded; BASOP_SATURATE_WARNING_OFF L_rounded = L_add( L_var1, (Word32) 0x00008000L ); L_rounded = L_add_sat( L_var1, (Word32) 0x00008000L ); BASOP_SATURATE_WARNING_ON var_out = extract_h( L_rounded ); Loading
lib_com/basop_util.c +21 −0 Original line number Diff line number Diff line Loading @@ -2085,6 +2085,8 @@ Word32 norm_llQ31( /* o : normalized result Q31 */ return L_sum; } #ifndef FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW /* note: now available in basop_util.h */ Word32 w_norm_llQ31( Word64 L_sum, Word16 *exp ); Word32 w_norm_llQ31( /* o : normalized result Q31 */ Word64 L_sum, /* i : upper and lower bits of accu, unsigned Q31 */ Loading @@ -2111,6 +2113,7 @@ Word32 w_norm_llQ31( /* o : normalized result Q31 */ L_tmp = W_extract_h( L64_inp64 ); return L_tmp; } #endif Word32 Dot_product16HQ( /* o : normalized result Q31 */ const Word32 L_off, /* i : initial sum value Qn */ Loading @@ -2135,6 +2138,24 @@ Word32 Dot_product16HQ( /* o : normalized result return L_sum; } Word32 sum_array_norm( /* o : normalized result Q31 */ const Word32 x[], /* i : x vector Qn */ const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ) { Word16 i; Word64 W_tmp = 0; Word32 L_tmp; FOR( i = 0; i < lg; i++ ) { W_tmp = W_add( W_tmp, x[i] ); /*Q31*/ } L_tmp = w_norm_llQ31( W_tmp, exp ); /*Q31 - *exp*/ return L_tmp; } Word32 Norm32Norm( const Word32 *x, const Word16 headroom, const Word16 length, Word16 *result_e ) { Word32 L_tmp, L_tmp2; Loading
lib_com/basop_util.h +31 −0 Original line number Diff line number Diff line Loading @@ -612,6 +612,20 @@ Word32 Dot_product16HQ( /*<! o : normalized result Word16 *exp /*<! o : exponent of result in [-32,31] Q0 */ ); /*------------------------------------------------------------------* * sum_array_norm: * * \brief Compute array summation of x[] using 64-bit accumulator. * * Performs normalization of the result, returns the exponent * Note: no headroom is required for data in x[] *------------------------------------------------------------------*/ Word32 sum_array_norm( /* o : normalized result Q31 */ const Word32 x[], /* i : x vector Qn */ const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ); /*------------------------------------------------------------------* * norm_llQ31: * Loading @@ -627,6 +641,23 @@ Word32 norm_llQ31( /* o : normalized result Q31 */ Word16 *exp /* o : exponent of result in [-32,31] Q0 */ ); #ifdef FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW /*------------------------------------------------------------------* * w_norm_llQ31: * * \brief Compute normalized Q31 Values out of overflowed Q31 value * using 64-bit operators *------------------------------------------------------------------*/ static inline Word32 w_norm_llQ31( Word64 L64_var1, Word16 *S_var2 ) /*Q31 - L_tmp_exp*/ { Word32 L_result; Word16 sh = W_norm( L64_var1 ); L_result = W_extract_h( W_shl( L64_var1, sh ) ); *S_var2 = ( L_result == 0 ) ? -32 : 32 - sh; return L_result; } #endif /** * \brief Compute dot product of 1 32 bit vectors with itself * \param x input vector 1 Loading
lib_com/ivas_prot_fx.h +17 −6 Original line number Diff line number Diff line Loading @@ -2336,6 +2336,9 @@ void ivas_dirac_dec_read_BS_fx( Word16 *nb_bits, /* o : number of bits read */ const Word16 last_bit_pos, /* i : last read bitstream position */ const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif Word16 *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -2496,6 +2499,13 @@ Word16 ivas_sba_get_nchan_metadata_fx( const Word32 ivas_total_brate /* i : IVAS total bitrate */ ); #ifdef NONBE_FIX_1052_SBA_EXT /*! r: number of bits in SPAR SID frame */ Word16 ivas_sba_spar_sid_bitlen_fx( const Word16 nchan_transport /* i : number of transport channels */ ); #endif void ivas_sba_get_spar_hoa_ch_ind_fx( const Word16 num_md_chs, /* i : number of MD channels */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ Loading Loading @@ -3500,6 +3510,9 @@ void ivas_qmetadata_enc_sid_encode_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *q_metadata, /* i/o: metadata handle */ const Word16 masa_sid_descriptor, /* i : description of MASA SID coding structure*/ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif const Word16 ivas_format /* i : ivas format */ ); void ivas_param_mc_enc_fx( Loading Loading @@ -4974,11 +4987,6 @@ Word16 ivas_sba_get_nchan_metadata( const Word32 ivas_total_brate /* i : IVAS total bitrate */ ); void ivas_sba_get_spar_hoa_ch_ind( const Word16 num_md_chs, /* i : number of MD channels */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ Word16 HOA_md_ind[IVAS_SPAR_MAX_CH] ); /*! r: flag indicating to code SPAR HOA MD for all bands */ void ivas_sba_get_spar_hoa_md_flag( const Word16 sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -5838,6 +5846,9 @@ ivas_error ivas_dirac_enc_fx( const Word16 input_frame, /* i : input frame length */ const Word16 dtx_vad, /* i : DTX vad flag */ const IVAS_FORMAT ivas_format, /* i : ivas format */ #ifdef NONBE_FIX_1052_SBA_EXT const Word16 nchan_transport, /* i : number of transport channels */ #endif const Word16 hodirac_flag, /* i : hodirac flag */ const Word16 shift ); Loading