Loading lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1593,6 +1593,9 @@ typedef enum #define DEG_360_IN_Q22 ( 360 << Q22 ) /* Q22 */ #define DEG_180_IN_Q22 ( 180 << Q22 ) /* Q22 */ #define DEG_90_IN_Q22 ( 90 << Q22 ) /* Q22 */ #ifdef FIX_2235_TD_RENDERER_WORD16 #define DEG_90_IN_Q8 ( 90 << Q8 ) /* Q8 */ #endif #define ONE_BY_360_Q31 ( 5965232 ) /* Q31 */ #define ONE_BY_360_Q15 ( 91 ) /* Q15 */ #define ONE_BY_180_Q31 ( 11930465 ) /* Q31 */ Loading lib_rend/ivas_objectRenderer_hrFilt_fx.c +6 −6 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ static void GenerateFilter_fx( Word16 tmp_hrfModR_e, tmp_hrfModL_e; #ifdef FIX_2235_TD_RENDERER_WORD16 getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, model->elevKSeq_Q_fx, getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, Q8, model->elevSegSamples, model->elevBsLen, model->elevBsStart, model->elevBsShape_fx, model->elevBsShape_Q_fx ); #else getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, Loading Loading @@ -473,7 +473,7 @@ static void GenerateITD_fx( IF( NE_32( L_abs( elev_fx ), DEG_90_IN_Q22 ) ) { #ifdef FIX_2235_TD_RENDERER_WORD16 getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, model->elevKSeq_Q_fx, getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, Q8, model->elevSegSamples, model->elevBsLen, model->elevBsStart, model->elevBsShape_fx, model->elevBsShape_Q_fx ); #else getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, Loading Loading @@ -530,7 +530,7 @@ static void GenerateITD_fx( elev_offset = 0; move16(); #ifdef FIX_2235_TD_RENDERER_WORD16 if ( EQ_16( model->elevKSeq_fx[0], shl( -90, model->elevKSeq_Q_fx ) ) ) if ( EQ_16( model->elevKSeq_fx[0], -DEG_90_IN_Q8 ) ) #else if ( EQ_32( model->elevKSeq_fx[0], -DEG_90_IN_Q22 ) ) #endif Loading @@ -546,7 +546,7 @@ static void GenerateITD_fx( test(); test(); #ifdef FIX_2235_TD_RENDERER_WORD16 IF( EvIdx[p] == 0 && EQ_16( model->elevKSeq_fx[EvIdx[p]], shl( -90, model->elevKSeq_Q_fx ) ) ) IF( EvIdx[p] == 0 && EQ_16( model->elevKSeq_fx[EvIdx[p]], -DEG_90_IN_Q8 ) ) #else IF( EvIdx[p] == 0 && EQ_32( model->elevKSeq_fx[EvIdx[p]], -DEG_90_IN_Q22 ) ) #endif Loading @@ -558,7 +558,7 @@ static void GenerateITD_fx( qp = add( qp, 1 ); } #ifdef FIX_2235_TD_RENDERER_WORD16 ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_16( model->elevKSeq_fx[sub( EvIdx[p], 2 )], shl( 90, model->elevKSeq_Q_fx ) ) ) ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_16( model->elevKSeq_fx[sub( EvIdx[p], 2 )], DEG_90_IN_Q8 ) ) #else ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_32( model->elevKSeq_fx[sub( EvIdx[p], 2 )], DEG_90_IN_Q22 ) ) #endif Loading Loading @@ -587,7 +587,7 @@ static void GenerateITD_fx( /* Compute ITD */ AlphaN = add( imult1616( model->elevDim3, model->azimDim3 ), elev_offset ); #ifdef FIX_2235_TD_RENDERER_WORD16 if ( EQ_16( model->elevKSeq_fx[sub( model->elevDim3, 3 )], shl( 90, model->elevKSeq_Q_fx ) ) ) /* Constant azimuth basis function */ if ( EQ_16( model->elevKSeq_fx[sub( model->elevDim3, 3 )], DEG_90_IN_Q8 ) ) /* Constant azimuth basis function */ #else if ( EQ_32( model->elevKSeq_fx[sub( model->elevDim3, 3 )], DEG_90_IN_Q22 ) ) /* Constant azimuth basis function */ #endif Loading lib_rend/ivas_objectRenderer_mix_fx.c +0 −3 Original line number Diff line number Diff line Loading @@ -416,7 +416,6 @@ static ivas_error DefaultBSplineModel_fx( #ifdef FIX_2235_TD_RENDERER_WORD16 model->elevKSeq_fx = defaultHRIR_rom_elevKSeq_fx; model->elevKSeq_Q_fx = defaultHRIR_rom_elevKSeq_Q_fx; #else model->elevKSeq_dyn_fx = (Word32 *) malloc( ( model->elevDim3 - 2 ) * sizeof( Word32 ) ); IF( model->elevKSeq_dyn_fx == NULL ) Loading Loading @@ -676,8 +675,6 @@ static ivas_error DefaultBSplineModel_fx( #ifdef FIX_2235_TD_RENDERER_WORD16 modelITD->elevKSeq_fx = defaultHRIR_rom_ITD_elevKSeq_fx; move16(); modelITD->elevKSeq_Q_fx = defaultHRIR_rom_ITD_elevKSeq_Q_fx; move16(); #else modelITD->elevKSeq_dyn_fx = (Word32 *) malloc( sizeof( defaultHRIR_rom_ITD_elevKSeq_fx ) * sizeof( Word32 ) / sizeof( Word16 ) ); IF( modelITD->elevKSeq_dyn_fx == NULL ) Loading lib_rend/ivas_rom_TdBinauralRenderer.h +4 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,9 @@ extern const Word16 defaultHRIR_rom_azim_start_idx[15]; extern const Word16 defaultHRIR_rom_azimSegSamples[1]; extern const Word16 defaultHRIR_rom_azimShapeIdx[15]; extern const Word16 defaultHRIR_rom_azimShapeSampFactor[15]; #ifndef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_elevKSeq_Q_fx; #endif extern const Word16 defaultHRIR_rom_elevKSeq_fx[13]; #ifdef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_azimKSeq_Q_fx; Loading Loading @@ -90,7 +92,9 @@ extern const Word16 defaultHRIR_rom_ITD_azimKSeq_Q_fx; extern const Word16 defaultHRIR_rom_ITD_azimKSeq_fx[19]; extern const Word16 defaultHRIR_rom_ITD_elevBsShape_Q_fx; extern const Word16 defaultHRIR_rom_ITD_elevBsShape_fx[28]; #ifndef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_ITD_elevKSeq_Q_fx; #endif extern const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16]; extern const Word16 defaultHRIR_rom_ITD_model_configuration[4]; extern const Word16 defaultHRIR_rom_ITD_elevBsLen[4]; Loading lib_rend/ivas_rom_TdBinauralRenderer_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -84,10 +84,16 @@ const Word16 defaultHRIR_rom_azimShapeIdx[15] = { const Word16 defaultHRIR_rom_azimShapeSampFactor[15] = { -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, }; #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_elevKSeq_fx [13] = { -23040, -19200, -15360, -11520, -7680, -3840, 0, 3840, 7680, 11520, 15360, 19200, 23040, }; /* Q8 */ #else const Word16 defaultHRIR_rom_elevKSeq_Q_fx = 8; const Word16 defaultHRIR_rom_elevKSeq_fx [13] = { -23040, -19200, -15360, -11520, -7680, -3840, 0, 3840, 7680, 11520, 15360, 19200, 23040, }; #endif #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_azimKSeq_Q_fx = 6; #endif Loading Loading @@ -10203,10 +10209,17 @@ const Word16 defaultHRIR_rom_ITD_elevBsShape_fx[28] = { 32767,9709,1214,0,0,18508,16991,8192,2427,303,0,0,4349,12945,19115,18002,12035,5461,1618,202,0,0,202,1618,5461, 12136,18811,21845, }; #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16] = { -23040, -19968, -16896, -13824, -10752, -7680, -4608, -1536, 1536, 4608, 7680, 10752, 13824, 16896, 19968, 23040, }; /* Q8 */ #else const Word16 defaultHRIR_rom_ITD_elevKSeq_Q_fx = 8; const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16] = { -23040, -19968, -16896, -13824, -10752, -7680, -4608, -1536, 1536, 4608, 7680, 10752, 13824, 16896, 19968, 23040, }; #endif #undef WMC_TOOL_SKIP Loading
lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1593,6 +1593,9 @@ typedef enum #define DEG_360_IN_Q22 ( 360 << Q22 ) /* Q22 */ #define DEG_180_IN_Q22 ( 180 << Q22 ) /* Q22 */ #define DEG_90_IN_Q22 ( 90 << Q22 ) /* Q22 */ #ifdef FIX_2235_TD_RENDERER_WORD16 #define DEG_90_IN_Q8 ( 90 << Q8 ) /* Q8 */ #endif #define ONE_BY_360_Q31 ( 5965232 ) /* Q31 */ #define ONE_BY_360_Q15 ( 91 ) /* Q15 */ #define ONE_BY_180_Q31 ( 11930465 ) /* Q31 */ Loading
lib_rend/ivas_objectRenderer_hrFilt_fx.c +6 −6 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ static void GenerateFilter_fx( Word16 tmp_hrfModR_e, tmp_hrfModL_e; #ifdef FIX_2235_TD_RENDERER_WORD16 getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, model->elevKSeq_Q_fx, getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, Q8, model->elevSegSamples, model->elevBsLen, model->elevBsStart, model->elevBsShape_fx, model->elevBsShape_Q_fx ); #else getStandardBSplineSampVec_fx( modelEval->elevBfVec_fx, EvIdx, &num_ev_idx, model->elevDim3, elev, model->elevKSeq_fx, Loading Loading @@ -473,7 +473,7 @@ static void GenerateITD_fx( IF( NE_32( L_abs( elev_fx ), DEG_90_IN_Q22 ) ) { #ifdef FIX_2235_TD_RENDERER_WORD16 getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, model->elevKSeq_Q_fx, getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, Q8, model->elevSegSamples, model->elevBsLen, model->elevBsStart, model->elevBsShape_fx, model->elevBsShape_Q_fx ); #else getStandardBSplineSampVec_fx( modelEval->elevBfVecITD_fx, EvIdx, &num_ev_idx, model->elevDim3, elev_fx, model->elevKSeq_fx, Loading Loading @@ -530,7 +530,7 @@ static void GenerateITD_fx( elev_offset = 0; move16(); #ifdef FIX_2235_TD_RENDERER_WORD16 if ( EQ_16( model->elevKSeq_fx[0], shl( -90, model->elevKSeq_Q_fx ) ) ) if ( EQ_16( model->elevKSeq_fx[0], -DEG_90_IN_Q8 ) ) #else if ( EQ_32( model->elevKSeq_fx[0], -DEG_90_IN_Q22 ) ) #endif Loading @@ -546,7 +546,7 @@ static void GenerateITD_fx( test(); test(); #ifdef FIX_2235_TD_RENDERER_WORD16 IF( EvIdx[p] == 0 && EQ_16( model->elevKSeq_fx[EvIdx[p]], shl( -90, model->elevKSeq_Q_fx ) ) ) IF( EvIdx[p] == 0 && EQ_16( model->elevKSeq_fx[EvIdx[p]], -DEG_90_IN_Q8 ) ) #else IF( EvIdx[p] == 0 && EQ_32( model->elevKSeq_fx[EvIdx[p]], -DEG_90_IN_Q22 ) ) #endif Loading @@ -558,7 +558,7 @@ static void GenerateITD_fx( qp = add( qp, 1 ); } #ifdef FIX_2235_TD_RENDERER_WORD16 ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_16( model->elevKSeq_fx[sub( EvIdx[p], 2 )], shl( 90, model->elevKSeq_Q_fx ) ) ) ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_16( model->elevKSeq_fx[sub( EvIdx[p], 2 )], DEG_90_IN_Q8 ) ) #else ELSE IF( EQ_16( EvIdx[p], sub( model->elevDim3, 1 ) ) && EQ_32( model->elevKSeq_fx[sub( EvIdx[p], 2 )], DEG_90_IN_Q22 ) ) #endif Loading Loading @@ -587,7 +587,7 @@ static void GenerateITD_fx( /* Compute ITD */ AlphaN = add( imult1616( model->elevDim3, model->azimDim3 ), elev_offset ); #ifdef FIX_2235_TD_RENDERER_WORD16 if ( EQ_16( model->elevKSeq_fx[sub( model->elevDim3, 3 )], shl( 90, model->elevKSeq_Q_fx ) ) ) /* Constant azimuth basis function */ if ( EQ_16( model->elevKSeq_fx[sub( model->elevDim3, 3 )], DEG_90_IN_Q8 ) ) /* Constant azimuth basis function */ #else if ( EQ_32( model->elevKSeq_fx[sub( model->elevDim3, 3 )], DEG_90_IN_Q22 ) ) /* Constant azimuth basis function */ #endif Loading
lib_rend/ivas_objectRenderer_mix_fx.c +0 −3 Original line number Diff line number Diff line Loading @@ -416,7 +416,6 @@ static ivas_error DefaultBSplineModel_fx( #ifdef FIX_2235_TD_RENDERER_WORD16 model->elevKSeq_fx = defaultHRIR_rom_elevKSeq_fx; model->elevKSeq_Q_fx = defaultHRIR_rom_elevKSeq_Q_fx; #else model->elevKSeq_dyn_fx = (Word32 *) malloc( ( model->elevDim3 - 2 ) * sizeof( Word32 ) ); IF( model->elevKSeq_dyn_fx == NULL ) Loading Loading @@ -676,8 +675,6 @@ static ivas_error DefaultBSplineModel_fx( #ifdef FIX_2235_TD_RENDERER_WORD16 modelITD->elevKSeq_fx = defaultHRIR_rom_ITD_elevKSeq_fx; move16(); modelITD->elevKSeq_Q_fx = defaultHRIR_rom_ITD_elevKSeq_Q_fx; move16(); #else modelITD->elevKSeq_dyn_fx = (Word32 *) malloc( sizeof( defaultHRIR_rom_ITD_elevKSeq_fx ) * sizeof( Word32 ) / sizeof( Word16 ) ); IF( modelITD->elevKSeq_dyn_fx == NULL ) Loading
lib_rend/ivas_rom_TdBinauralRenderer.h +4 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,9 @@ extern const Word16 defaultHRIR_rom_azim_start_idx[15]; extern const Word16 defaultHRIR_rom_azimSegSamples[1]; extern const Word16 defaultHRIR_rom_azimShapeIdx[15]; extern const Word16 defaultHRIR_rom_azimShapeSampFactor[15]; #ifndef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_elevKSeq_Q_fx; #endif extern const Word16 defaultHRIR_rom_elevKSeq_fx[13]; #ifdef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_azimKSeq_Q_fx; Loading Loading @@ -90,7 +92,9 @@ extern const Word16 defaultHRIR_rom_ITD_azimKSeq_Q_fx; extern const Word16 defaultHRIR_rom_ITD_azimKSeq_fx[19]; extern const Word16 defaultHRIR_rom_ITD_elevBsShape_Q_fx; extern const Word16 defaultHRIR_rom_ITD_elevBsShape_fx[28]; #ifndef FIX_2235_TD_RENDERER_WORD16 extern const Word16 defaultHRIR_rom_ITD_elevKSeq_Q_fx; #endif extern const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16]; extern const Word16 defaultHRIR_rom_ITD_model_configuration[4]; extern const Word16 defaultHRIR_rom_ITD_elevBsLen[4]; Loading
lib_rend/ivas_rom_TdBinauralRenderer_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -84,10 +84,16 @@ const Word16 defaultHRIR_rom_azimShapeIdx[15] = { const Word16 defaultHRIR_rom_azimShapeSampFactor[15] = { -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, }; #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_elevKSeq_fx [13] = { -23040, -19200, -15360, -11520, -7680, -3840, 0, 3840, 7680, 11520, 15360, 19200, 23040, }; /* Q8 */ #else const Word16 defaultHRIR_rom_elevKSeq_Q_fx = 8; const Word16 defaultHRIR_rom_elevKSeq_fx [13] = { -23040, -19200, -15360, -11520, -7680, -3840, 0, 3840, 7680, 11520, 15360, 19200, 23040, }; #endif #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_azimKSeq_Q_fx = 6; #endif Loading Loading @@ -10203,10 +10209,17 @@ const Word16 defaultHRIR_rom_ITD_elevBsShape_fx[28] = { 32767,9709,1214,0,0,18508,16991,8192,2427,303,0,0,4349,12945,19115,18002,12035,5461,1618,202,0,0,202,1618,5461, 12136,18811,21845, }; #ifdef FIX_2235_TD_RENDERER_WORD16 const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16] = { -23040, -19968, -16896, -13824, -10752, -7680, -4608, -1536, 1536, 4608, 7680, 10752, 13824, 16896, 19968, 23040, }; /* Q8 */ #else const Word16 defaultHRIR_rom_ITD_elevKSeq_Q_fx = 8; const Word16 defaultHRIR_rom_ITD_elevKSeq_fx[16] = { -23040, -19968, -16896, -13824, -10752, -7680, -4608, -1536, 1536, 4608, 7680, 10752, 13824, 16896, 19968, 23040, }; #endif #undef WMC_TOOL_SKIP