Commit 30632c9d authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fxd_subfuncs_integration_16' into 'main'

Integration of fixed point sub-functions 16

See merge request !245
parents e6911975 ce8071db
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ enum{
#define INV_LOG_2                       1.442695040888963f /* 1/log(2)  */
#define INV_SQRT_2                      0.70710676908493f  /* 1/sqrt(2) */
#define INV_SQRT_2_Q15                  23170  /* 1/sqrt(2) in Q15 */
#define INV_SQRT_2_Q31                  1.51850022e+09  /* 1/sqrt(2) in Q31 */
#define INV_SQRT_2_Q31                  (Word32)1.51850022e+09  /* 1/sqrt(2) in Q31 */

#define MAX_V_MULT_MAT                  100             /* maximum array length for the function v_mult_mat() */

+24 −309

File changed.

Preview size limit exceeded, changes collapsed.

+7 −7
Original line number Diff line number Diff line
@@ -489,8 +489,8 @@ void hp20_fix32(
		b2_fx = 535877975l /* 0.998150511190452 Q29*/;
	}

	Qprev_y1 = mem_fx[4];
	Qprev_y2 = mem_fx[5];
	Qprev_y1 = extract_l(mem_fx[4]);
	Qprev_y2 = extract_l(mem_fx[5]);
	y1_fx64 = mem_fx[0];
	y2_fx64 = mem_fx[1];
	x0_fx64 = mem_fx[2];
@@ -547,7 +547,7 @@ void hp20_fix32(
		y0_fx64 = (y0_fx64 >> (min(Qy1, Qy2) - Qmin)) + (R3 >> (Qx0 - Qmin)) + (R4 >> (Qx1 - Qmin)) + (R5 >> (Qx2 - Qmin));
		y0_fx64 = y0_fx64 >> 29;

		signal_fx[i] = W_shr(y0_fx64, Qmin);
		signal_fx[i] = W_extract_l(W_shr(y0_fx64, Qmin));

		y2_fx64 = y1_fx64;
		y1_fx64 = y0_fx64;
@@ -567,10 +567,10 @@ void hp20_fix32(
		Qprev_y2 -= (32 - Qy2);
	}

	mem_fx[0] = y1_fx64;
	mem_fx[1] = y2_fx64;
	mem_fx[2] = x0_fx64;
	mem_fx[3] = x1_fx64;
	mem_fx[0] = W_extract_l(y1_fx64);
	mem_fx[1] = W_extract_l(y2_fx64);
	mem_fx[2] = W_extract_l(x0_fx64);
	mem_fx[3] = W_extract_l(x1_fx64);
	mem_fx[4] = Qprev_y1;
	mem_fx[5] = Qprev_y2;

+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@
#include "math.h"
#include "prot.h"
#include "wmc_auto.h"
#ifdef IVAS_FLOAT_FIXED
#include "ivas_prot_fx.h"
#endif


/*-----------------------------------------------------------------------------------------*
+20 −4
Original line number Diff line number Diff line
@@ -373,6 +373,13 @@ ivas_error mct_dec_reconfigure(
    const uint16_t b_nchan_change                               /* i  : flag indicating different channel count */
);

#ifdef IVAS_FLOAT_FIXED
ivas_error mct_dec_reconfigure_fx(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure                  */
    const UWord16 b_nchan_change /* i  : flag indicating different channel count */
);
#endif

#ifndef IVAS_FLOAT_FIXED
void destroy_sce_dec(
    SCE_DEC_HANDLE hSCE                                         /* i/o: SCE decoder structure                   */
@@ -535,8 +542,7 @@ void decod_gen_2sbfr_ivas_fx(
    Word16 *bwe_exc,                     /* o  : excitation for SWB TBE                    */
    Word16 *gain_buf,                    /* o  : floating pitch gain for each subframe     */
    const Word16 tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag          */
    const Word16 tdm_Pri_pitch_buf[],     /* i  : pitch values for primary channel          */
    Word16 Q_exc
    const Word16 tdm_Pri_pitch_buf[]     /* i  : pitch values for primary channel          */
);
#endif

@@ -2425,8 +2431,7 @@ void tdm_low_rate_dec_fx(
    Word16 *exc,           /* i/o: adapt. excitation exc                   */
    Word16 *exc2,          /* i/o: adapt. excitation/total exc             */
    Word16 *bwe_exc,       /* o  : excitation for SWB TBE                  */
    const Word16 *lsf_new,  /* i  : ISFs at the end of the frame            */
    Word16 Q_exc
    const Word16 *lsf_new  /* i  : ISFs at the end of the frame            */
);
#endif

@@ -4731,6 +4736,13 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open(
    const float *proto_matrix                                         /* i  : the prototype (upmix) matrix (only used if mode == 1)                                                 */
);

#ifdef IVAS_FLOAT_FIXED
void ivas_dirac_dec_output_synthesis_get_interpolator_fx(
    DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params, /* i/o: handle for the covariance synthesis parameters  */
    const UWord16 interp_length                                     /* i  : interpolator length                             */
);
#endif

void ivas_dirac_dec_output_synthesis_get_interpolator(
    DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params, /* i/o: handle for the covariance synthesis parameters                  */
    const uint16_t interp_length                                    /* i  : interpolator length                                             */
@@ -5695,14 +5707,18 @@ void pca_dec_s3(
    const int32_t index, 
    float *q 
);

#ifdef IVAS_FLOAT_FIXED
void pca_dec_s3_fx(
  const Word32 index,
  Word16 *q);
#endif

#ifndef IVAS_FLOAT_FIXED
int16_t ivas_get_bits_to_encode( 
    int32_t val 
);
#endif

void ivas_huffman_encode(
    ivas_huffman_cfg_t *huff_cfg,
Loading