Unverified Commit 98cba803 authored by norvell's avatar norvell
Browse files

Remove crend from allocation functions. sub added for Q-value

parent 7ef95346
Loading
Loading
Loading
Loading
Loading
+42 −2
Original line number Diff line number Diff line
@@ -175,11 +175,19 @@ ivas_error ivas_HRTF_CRend_binary_open_fx(
}


#ifdef FIX_2235_TD_RENDERER_WORD16
/*-----------------------------------------------------------------------*
 * ivas_HRTF_CRend_binary_open_buffers_int16()
 *
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
#else
/*-----------------------------------------------------------------------*
 * ivas_HRTF_CRend_binary_open_buffers_int16()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/
#endif
ivas_error ivas_HRTF_binary_open_buffers_int16(
    Word16 **buffer,       /* o  : buffer to allocate      */
    const UWord32 mem_size /* i  : size of buffer          */
@@ -195,11 +203,19 @@ ivas_error ivas_HRTF_binary_open_buffers_int16(
    return IVAS_ERR_OK;
}

#ifdef FIX_2235_TD_RENDERER_WORD16
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_uint16()
 *
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
#else
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_uint16()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/
#endif
ivas_error ivas_HRTF_binary_open_buffers_uint16(
    UWord16 **buffer,       /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
@@ -215,11 +231,19 @@ ivas_error ivas_HRTF_binary_open_buffers_uint16(
    return IVAS_ERR_OK;
}

#ifdef FIX_2235_TD_RENDERER_WORD16
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32()
 *
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
#else
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/
#endif
ivas_error ivas_HRTF_binary_open_buffers_int32(
    Word32 **buffer,        /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
@@ -235,11 +259,19 @@ ivas_error ivas_HRTF_binary_open_buffers_int32(
    return IVAS_ERR_OK;
}

#ifdef FIX_2235_TD_RENDERER_WORD16
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32_ptr()
 *
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
#else
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32_ptr()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/
#endif
ivas_error ivas_HRTF_binary_open_buffers_int32_ptr(
    Word32 ***buffer,       /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
@@ -259,7 +291,7 @@ ivas_error ivas_HRTF_binary_open_buffers_int32_ptr(
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int16_ptr_const()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
ivas_error ivas_HRTF_binary_open_buffers_int16_ptr_const(
    const Word16 ***buffer, /* o  : buffer to allocate      */
@@ -279,7 +311,7 @@ ivas_error ivas_HRTF_binary_open_buffers_int16_ptr_const(
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int16_ptr()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
ivas_error ivas_HRTF_binary_open_buffers_int16_ptr(
    Word16 ***buffer,       /* o  : buffer to allocate      */
@@ -297,11 +329,19 @@ ivas_error ivas_HRTF_binary_open_buffers_int16_ptr(
}
#endif

#ifdef FIX_2235_TD_RENDERER_WORD16
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32_ptr_const()
 *
 * Allocate buffer with dynamic length for HRTF binary handle
 *-----------------------------------------------------------------------*/
#else
/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int32_ptr_const()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/
#endif
ivas_error ivas_HRTF_binary_open_buffers_int32_ptr_const(
    const Word32 ***buffer, /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
+3 −3
Original line number Diff line number Diff line
@@ -716,7 +716,7 @@ static void getPeriodicBSplineSampVec_fx(
        d = sub( d0, imult1616( ( sub( add( i, nI ), 1 ) ), SegSamples ) ); /* offset of knot_interval */
        d = sub( d0, imult1616( sub( add( i, nI ), 1 ), SegSamples ) );
#ifdef FIX_2235_TD_RENDERER_WORD16
        BfVec_fx[i] = L_shl( L_deposit_l( azimBsShape_fx[i_mult( abs_s( d ), subSampFactor )] ), 30 - Q15 );
        BfVec_fx[i] = L_shl( L_deposit_l( azimBsShape_fx[i_mult( abs_s( d ), subSampFactor )] ), Q30 - Q15 );
#else
        BfVec_fx[i] = azimBsShape_fx[i_mult( abs_s( d ), subSampFactor )];
#endif
@@ -776,7 +776,7 @@ static void getStandardBSplineSampVec_fx(
    tmp32 = L_deposit_h( BASOP_Util_Divide3216_Scale( knot_interval_fx, SegSamples, &tmp_e2 ) );
    tmp_e2 = add( tmp_e2, sub( tmp_e1, 15 ) );
#ifdef FIX_2235_TD_RENDERER_WORD16
    tmp32 = L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( t_fx, L_shl( L_deposit_l( KSeq_fx[0] ), 22 - KSeq_Q_fx ) ), tmp32, &tmp_e3 ) );
    tmp32 = L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( t_fx, L_shl( L_deposit_l( KSeq_fx[0] ), sub( 22, KSeq_Q_fx ) ) ), tmp32, &tmp_e3 ) );
#else
    tmp32 = L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( t_fx, KSeq_fx[0] ), tmp32, &tmp_e3 ) );
#endif
@@ -816,7 +816,7 @@ static void getStandardBSplineSampVec_fx(
        }
#ifdef FIX_2235_TD_RENDERER_WORD16
        assert( d >= 0 && d < BsLen[shape_idx] );
        BfVec_fx[i] = L_shl( L_deposit_l( BsShape_fx[add( BsStart[shape_idx], d )] ), 30 - Q15 ); /* Q30 */
        BfVec_fx[i] = L_shl( L_deposit_l( BsShape_fx[add( BsStart[shape_idx], d )] ), Q30 - Q15 ); /* Q30 */
#else
        BfVec_fx[i] = BsShape_fx[add( BsStart[shape_idx], abs_s( d ) )]; /*TT, verify if abs is needed */
        move32();