Commit f4b3cc16 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept FIX_BASOP_2551_HARM_SCALAR_QUAN

parent 4bfdfbf4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_MSVQ_Interpol_Tran_fx /* FhG: Fix saturation crash in MSVQ_Interpol_Tran_fx() */
#define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT_FIX_2527    /* Fix crash from issue #2527 */
#define FIX_FLOAT_1539_G192_FORMAT_SWITCH               /* VA/Nokia: reintroduce format switching for g192 bitstreams */
#define FIX_BASOP_2551_HARM_SCALAR_QUAN                 /* FhG: issue 2551: Harmonize function pair tcx_scalar_quantization_fx*/
#define HARMONIZE_2564_GetEnergyCldfb                   /* FhG: harmonize GetEnergyCldfb derivates for evs/ivas  */
#define FIX_BASOP_2555_FRAMELEN_CALC                    /* FhG: BASOP issue 2555: Simplify (sub-)framelength calculation in ivas_mdct_core_tns_ns_fx() */
#define FIX_BASOP_2095_REMOVE_TABLES_PT01               /* FhG: BASOP issue 2095: remove unused tables, part 01 */
+0 −13
Original line number Diff line number Diff line
@@ -8493,18 +8493,6 @@ void con_tcx_fx(

void ari_start_encoding_14bits_fx(
    Tastat *s );
#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
void tcx_scalar_quantization_ivas_fx(
    Word32 *x,                     /* i: input coefficients            */
    Word16 x_e,                    /* i: exponent                      */
    Word16 *xq,                    /* o: quantized coefficients        */
    Word16 L_frame,                /* i: frame length                  */
    Word16 gain,                   /* i: quantization gain             */
    Word16 gain_e,                 /* i: quantization gain exponent    */
    Word16 offset,                 /* i: rounding offset (deadzone)    */
    Word8 const *memQuantZeros_fx, /* i: coefficients to be set to 0   */
    const Word16 alfe_flag );
#else
void tcx_scalar_quantization_fx(
    Word32 *x,                     /* i: input coefficients            */
    Word16 x_e,                    /* i: exponent                      */
@@ -8516,7 +8504,6 @@ void tcx_scalar_quantization_fx(
    Word8 const *memQuantZeros_fx, /* i: coefficients to be set to 0   */
    const Word16 alfe_flag,
    const Word16 element_mode );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN


Word16 RCcontextMapping_encode2_estimate_no_mem_s17_LCS_fx(
+0 −42
Original line number Diff line number Diff line
@@ -1438,15 +1438,6 @@ void QuantizeSpectrum_fx(
                                     &sqGain_e,
                                     EVS_MONO );

#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
                tcx_scalar_quantization_fx( OriginalSpectrum, OriginalSpectrum_e,
                                            sqQ,
                                            L_spec,
                                            sqGain, sqGain_e,
                                            hTcxCfg->sq_rounding,
                                            hTcxEnc->memQuantZeros,
                                            tcxonly );
#else
                tcx_scalar_quantization_fx( OriginalSpectrum, OriginalSpectrum_e,
                                            sqQ,
                                            L_spec,
@@ -1455,7 +1446,6 @@ void QuantizeSpectrum_fx(
                                            hTcxEnc->memQuantZeros,
                                            tcxonly,
                                            st->element_mode );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN


                /* Estimate original bitrate */
@@ -1544,15 +1534,6 @@ void QuantizeSpectrum_fx(
                                     EVS_MONO );

                /* Quantize spectrum */
#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
                tcx_scalar_quantization_fx( spectrum, *spectrum_e,
                                            sqQ,
                                            L_spec,
                                            sqGain, sqGain_e,
                                            hTcxCfg->sq_rounding,
                                            hTcxEnc->memQuantZeros,
                                            tcxonly );
#else
                tcx_scalar_quantization_fx( spectrum, *spectrum_e,
                                            sqQ,
                                            L_spec,
@@ -1561,7 +1542,6 @@ void QuantizeSpectrum_fx(
                                            hTcxEnc->memQuantZeros,
                                            tcxonly,
                                            st->element_mode );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN

                /* Estimate bitrate */
                stop = 0;
@@ -1752,15 +1732,6 @@ void QuantizeSpectrum_fx(
            {
                sqGain = tmp1;
                sqGain_e = s;
#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
                tcx_scalar_quantization_fx( spectrum, *spectrum_e,
                                            sqQ,
                                            L_spec,
                                            sqGain, sqGain_e,
                                            hTcxCfg->sq_rounding,
                                            hTcxEnc->memQuantZeros,
                                            tcxonly );
#else
                tcx_scalar_quantization_fx( spectrum, *spectrum_e,
                                            sqQ,
                                            L_spec,
@@ -1770,7 +1741,6 @@ void QuantizeSpectrum_fx(
                                            tcxonly,
                                            st->element_mode );

#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN


                move16();
@@ -3076,11 +3046,7 @@ void QuantizeTCXSpectrum_fx(
            /* Quantize original spectrum */
            sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, ( mult( hTcxEnc->tcx_target_bits_fac, shl( sqTargetBits, 1 ) ) ), L_spec, &sqGain_e, 1 /*signal non-EVS*/ );

#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
            tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly );
#else
            tcx_scalar_quantization_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly, st->element_mode );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN
            /* Estimate original bitrate */
            stop = 0;
            move16();
@@ -3171,11 +3137,7 @@ void QuantizeTCXSpectrum_fx(
                sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e, 1 /*signal non-EVS*/ );
            }
            /* Quantize spectrum */
#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
            tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly );
#else
            tcx_scalar_quantization_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly, st->element_mode );
#endif
            /* Estimate bitrate */
            stop = 0;
            move16();
@@ -3440,11 +3402,7 @@ void QuantizeTCXSpectrum_fx(
            move16();
            sqGain_e = 1;
            move16();
#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
            tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly );
#else
            tcx_scalar_quantization_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly, st->element_mode );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN

            stop = 1;
            IF( st->element_mode > EVS_MONO )
+0 −4
Original line number Diff line number Diff line
@@ -969,12 +969,8 @@ static Word16 QuantSpecEstimateBits_fx(
    Word16 stop, sqBits, nEncoded;
    Word16 lastnz;

#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
    tcx_scalar_quantization_ivas_fx( spec_fx, spec_e, sqQ, length, G_fx, G_e, 16384 /*Q15*/, NULL, 1 );
#else
    // This flag could potentially be anything except EVS_MONO. In case of future errors consider passing down the flag from higher function calls.
    tcx_scalar_quantization_fx( spec_fx, spec_e, sqQ, length, G_fx, G_e, 16384 /*Q15*/, NULL, 1, IVAS_SCE );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN

    stop = 0;
    move16();
+0 −12
Original line number Diff line number Diff line
@@ -1082,18 +1082,6 @@ Word16 SQ_gain_estimate_fx(
    Word16 *gain_e  /* o  : SQ gain exponent          */
);

#ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN
void tcx_scalar_quantization_fx(
    Word32 *x,                  /* i  : i   coefficients              */
    Word16 x_e,                 /* i  : exponent                      */
    Word16 *xq,                 /* o  : quantized coefficients        */
    Word16 L_frame,             /* i  : frame length                  */
    Word16 gain,                /* i  : quantization gain             */
    Word16 gain_e,              /* i  : quantization gain exponent    */
    Word16 offset,              /* i  : rounding offset (deadzone)    */
    Word8 const *memQuantZeros, /* i  : coefficients to be set to 0   */
    const Word16 alfe_flag );
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN


Word16 tcx_scalar_quantization_rateloop_fx(
Loading