Commit 91384ecb authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'ivas_mono_dmx_rend_fxd_conv' into 'main'

Functions in ivas_mono_dmx_renderer converted to fixed point.

See merge request !101
parents 82566f11 489187a1
Loading
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -5449,7 +5449,11 @@ Word16 find_guarded_bits_fx( Word32 n )
                      : n <= 256   ? 8
                      : n <= 512   ? 9
                      : n <= 1024  ? 10
                                : 11;
                      : n <= 2048  ? 11
	                  : n <= 4096  ? 12
	                  : n <= 8192  ? 13
	                  : n <= 16384 ? 14
	                               : 15;
}

Word16 L_norm_arr( Word32 *arr, Word16 size )
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@
#define INV_SQRT2                               7.071067811865475e-1f /* 1/sqrt(2) */
#define INV_SQRT3                               0.577350269189626f    /* 1/sqrt(3) */

#ifdef IVAS_FLOAT_FIXED
#define INV_SQRT2_FX                            23170                 /* 1/sqrt(2) Q15*/
#endif

#define LOG_10                                  2.30258509299f


+25 −0
Original line number Diff line number Diff line
@@ -836,4 +836,29 @@ void stereo_decoder_tcx_fx(
    const Word16 tmp_plc_upmix,        /* i  : indicates temp upmix for PLC decision   */
    Word16 *q_x_ch2,
    Word16 *q_x_ch1 );
void v_multc_acc_32_16(
  const Word32 x[], /* i  : Input vector                                     */
  const Word16 c,   /* i  : Constant                                         */
  Word32 y[],       /* o  : Output vector that contains y + c*x              */
  const Word16 N  /* i  : Vector length                                    */
);

void ivas_mono_stereo_downmix_mcmasa_fx(
  Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure                                          */
  Word32 *output_f_fx[],   /* i/o: synthesized core-coder transport channels/mono or stereo output */
  Word16 output_frame      /* i  : output frame length per channel                                 */
);

void ivas_apply_non_diegetic_panning_fx(
  Word32 *output_f_fx[],                 /* i/o: core-coder transport mono channel/stereo output  */
  const Word16 non_diegetic_pan_gain_fx, /* i  : non-diegetic panning gain                        */
  const Word16 output_frame         /* i  : output frame length per channel                  */
);

void ivas_mono_downmix_render_passive_fx(
  Decoder_Struct *st_ivas,  /* i/o: IVAS decoder structure                                */
  Word32 *output_f_fx[],    /* i/o: synthesized core-coder transport channels/mono output */
  const Word16 output_frame /* i  : output frame length                                   */
);

#endif
+19 −0
Original line number Diff line number Diff line
@@ -1092,6 +1092,25 @@ void v_multc_acc(
    return;
}

#ifdef IVAS_FLOAT_FIXED
void v_multc_acc_32_16(
    const Word32 x[], /* i  : Input vector                                     */
    const Word16 c,   /* i  : Constant                                         */
    Word32 y[],       /* o  : Output vector that contains y + c*x              */
    const Word16 N  /* i  : Vector length                                    */
)
{
    Word16 i;

    FOR ( i = 0; i < N; i++ )
    {
        y[i] = L_add(y[i],Mpy_32_16_1(x[i],c));
    }

    return;
}
#endif

/*---------------------------------------------------------------------*
 * lls_interp_n()
 *
+6 −0
Original line number Diff line number Diff line
@@ -5144,6 +5144,12 @@ void v_multc_fixed(
    Word32 y[],       /* o  : Output vector that contains c*x                  */
    const Word16 N    /* i  : Vector length                                    */
);
void v_multc_fixed_16(
    const Word32 x[], /* i  : Input vector                                     */
    const Word16 c,   /* i  : Constant                                         */
    Word32 y[],       /* o  : Output vector that contains c*x                  */
    const Word16 N    /* i  : Vector length                                    */
);

void v_add_fixed(
    const Word32 x1[], /* i  : Input vector 1                                   */
Loading