Commit 7d2f94e1 authored by Arash Azizi's avatar Arash Azizi
Browse files

issue: 2457 Editorial changes to function signature and input arguments....

issue: 2457 Editorial changes to function signature and input arguments. removing suc structures of Decoder state. Passing only The whole structure to the Function. Changing function instances according to this change
parent 22209f31
Loading
Loading
Loading
Loading
Loading
+11 −18
Original line number Diff line number Diff line
@@ -6751,29 +6751,22 @@ void generate_comfort_noise_dec_ivas_fx(
    const Word16 nchan_out /* i  : number of output channels     */
);

#ifndef FIX_BASOP_2457_HARM_GEN
void generate_comfort_noise_dec_hf_fx(
    Word32 **bufferReal, /* o   : matrix to real part of i   bands */
    Word32 **bufferImag, /* o   : matrix to imaginary part of i   bands */
    Word16 *bufferScale, /* o   : pointer to scalefactor for real and imaginary part of i   bands */
    Decoder_State *stdec );
#endif
#ifndef FIX_BASOP_2457_HARM_GEN
void generate_comfort_noise_dec_hf_ivas_fx(
#else
void generate_comfort_noise_dec_hf_fx(
#endif
    Word32 **bufferReal, /* o   : matrix to real part of input bands */
    Word32 **bufferImag, /* o   : matrix to imaginary part of input bands */
    Word32** bufferReal, /* o   : matrix to real part of input bands   bufferScale*/
    Word32** bufferImag, /* o   : matrix to imaginary part of input bands  bufferScale*/
    Word16* bufferScale, /* o   : pointer to scalefactor for real and imaginary part of input bands */
#ifdef FIX_BASOP_2457_HARM_GEN
    Decoder_State *st,
#endif // FIX_BASOP_2457_HARM_GEN
#ifndef FIX_BASOP_2457_HARM_GEN
    HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables  */
#endif
    const Word16 cng_coh_flag /* i  : CNG Flag for coherence handling                        Q0*/
);
#endif

void generate_comfort_noise_dec_hf_fx(
    Word32** bufferReal, /* o   : matrix to real part of input bands   bufferScale*/
    Word32** bufferImag, /* o   : matrix to imaginary part of input bands  bufferScale*/
    Word16* bufferScale, /* o   : pointer to scalefactor for real and imaginary part of input bands */
    Decoder_State* st
);

/* Generate the comfort noise based on the target noise level */
void generate_masking_noise_fx(
+2 −2
Original line number Diff line number Diff line
@@ -1842,7 +1842,7 @@ ivas_error acelp_core_dec_fx(
            generate_comfort_noise_dec_hf_fx( realBuffer_fx, imagBuffer_fx, &scaleFactor.hb_scale, st );

#else
            generate_comfort_noise_dec_hf_fx( realBuffer_fx, imagBuffer_fx, &scaleFactor.hb_scale, st, st->cng_ism_flag );
            generate_comfort_noise_dec_hf_fx( realBuffer_fx, imagBuffer_fx, &scaleFactor.hb_scale, st );

#endif // !FIX_BASOP_2457_HARM_GEN

@@ -2013,7 +2013,7 @@ ivas_error acelp_core_dec_fx(
#ifndef FIX_BASOP_2457_HARM_GEN
                    generate_comfort_noise_dec_hf_ivas_fx( realBuffer_fx, imagBuffer_fx, /*realBuffer, imagBuffer,*/ &tmpBufferScale, st->hFdCngDec->hFdCngCom, st->cng_ism_flag );
#else
                    generate_comfort_noise_dec_hf_fx( realBuffer_fx, imagBuffer_fx, /*realBuffer, imagBuffer,*/ &tmpBufferScale, st, st->cng_ism_flag );
                    generate_comfort_noise_dec_hf_fx( realBuffer_fx, imagBuffer_fx, /*realBuffer, imagBuffer,*/ &tmpBufferScale, st );
#endif // !FIX_BASOP_2457_HARM_GEN


+12 −11
Original line number Diff line number Diff line
@@ -3508,20 +3508,20 @@ void generate_comfort_noise_dec_hf_fx(

#ifndef FIX_BASOP_2457_HARM_GEN
void generate_comfort_noise_dec_hf_ivas_fx(
#else
void generate_comfort_noise_dec_hf_fx(
#endif                   // !FIX_BASOP_2457_HARM_GEN
    Word32** bufferReal, /* o   : matrix to real part of input bands   bufferScale*/
    Word32** bufferImag, /* o   : matrix to imaginary part of input bands  bufferScale*/
    Word16* bufferScale, /* o   : pointer to scalefactor for real and imaginary part of input bands */
#ifdef FIX_BASOP_2457_HARM_GEN
    Decoder_State *st,
#endif // FIX_BASOP_2457_HARM_GEN
#ifndef FIX_BASOP_2457_HARM_GEN
    HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables  */
#endif
    const Word16 cng_coh_flag /* i  : CNG Flag for coherence handling                        Q0*/
)
#else
void generate_comfort_noise_dec_hf_fx(
    Word32** bufferReal, /* o   : matrix to real part of input bands   bufferScale*/
    Word32** bufferImag, /* o   : matrix to imaginary part of input bands  bufferScale*/
    Word16* bufferScale, /* o   : pointer to scalefactor for real and imaginary part of input bands */
    Decoder_State *st
)
#endif
{
    Word16 i, j, s, sc, sn;
    Word16 scaleCLDFB;
@@ -3536,6 +3536,7 @@ void generate_comfort_noise_dec_hf_fx(
    Word32 tmp1, tmp2;
#ifdef FIX_BASOP_2457_HARM_GEN
    HANDLE_FD_CNG_COM hFdCngCom = st->hFdCngDec->hFdCngCom;
    Word16 cng_coh_flag = st->cng_ism_flag;
#endif // FIX_BASOP_2457_HARM_GEN

    cngNoiseLevel = hFdCngCom->cngNoiseLevel + sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand ); /*Q31 - hFdCngCom->cngNoiseLevelExp*/