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

accept FIX_580_PARAMMC_ENER_BURSTS

parent ba792e58
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1427,9 +1427,7 @@ typedef enum
#define PARAM_MC_ENER_LIMIT_INTRAFRAME          (1.5f)
#define PARAM_MC_ENER_LIMIT_INTERFRAME          (2.0f)
#define PARAM_MC_ENER_LIMIT_MAX_DELTA_FAC       (15.0f)
#ifdef FIX_580_PARAMMC_ENER_BURSTS
#define PARAM_MC_NUM_ATTACK_ILD_THRESH          (3)
#endif
#define PARAM_MC_LFE_ON_THRESH                  (8000.0f)
#define PARAM_MC_BAND_TO_MDCT_BAND_RATIO        16                          /* Ratio of resolution of CLDFB Bands to MDCT Bands */
#define PARAM_MC_SLOT_ENC_NS                    2500000L
+0 −1
Original line number Diff line number Diff line
@@ -161,7 +161,6 @@
#define FIX_550_FIRST_FRAME_ACCESS                      /* Eri: Issue 550: TD Object renderer: first frame accesses wrong transport channel offsets */
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */
#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */
#define FIX_595_SHL_NOGLOB                              /* FhG: Issue 595: compilation with BASOP_NOGLOB disabled */
#define UPDATE_FASTCONV_SBA_FILTER                      /* Dlb: Issue 584: Update SBA CLDFB-Domain HRTFs */
#define FIX_570_SF_EXT_ORIENTATION
+0 −13
Original line number Diff line number Diff line
@@ -35,9 +35,7 @@
#include "options.h"
#include "cnst.h"
#include "rom_enc.h"
#ifdef FIX_580_PARAMMC_ENER_BURSTS
#include "ivas_rom_enc.h"
#endif
#include "rom_com.h"
#include "prot.h"
#include "ivas_prot.h"
@@ -215,13 +213,11 @@ ivas_error ivas_param_mc_enc_open(
    /* Init total/dmx ener factors */
    set_f( hParamMC->ener_fac, 0.0f, PARAM_MC_MAX_PARAMETER_BANDS );

#ifdef FIX_580_PARAMMC_ENER_BURSTS
    /* init previous ILDs */
    for ( i = 0; i < PARAM_MC_MAX_PARAMETER_BANDS; i++ )
    {
        set_zero( hParamMC->prev_ilds[i], PARAM_MC_SZ_ILD_MAP );
    }
#endif

    st_ivas->hParamMC = hParamMC;

@@ -494,9 +490,6 @@ void ivas_param_mc_enc(
                hParamMC->hMetadataPMC.attackIndex = 0;
            }

#ifndef FIX_580_PARAMMC_ENER_BURSTS
            band_step = hParamMC->hMetadataPMC.bAttackPresent ? PARAM_MC_TRANSIENT_BAND_STEP : 1;
#endif
        }
        break;
#ifdef DEBUGGING
@@ -509,9 +502,7 @@ void ivas_param_mc_enc(
    /* parameter estimation*/
    ivas_param_mc_param_est_enc( hParamMC, data_f, Cy_sum, Cx_sum, input_frame, nchan_inp, st_ivas->nchan_transport );

#ifdef FIX_580_PARAMMC_ENER_BURSTS
    band_step = hParamMC->hMetadataPMC.bAttackPresent ? PARAM_MC_TRANSIENT_BAND_STEP : 1;
#endif


    /* ILD parameter quantization */
@@ -847,7 +838,6 @@ static void ivas_param_mc_param_est_enc(
        }
    }

#ifdef FIX_580_PARAMMC_ENER_BURSTS
    if ( !hParamMC->hMetadataPMC.bAttackPresent )
    {
        const PARAM_MC_ILD_MAPPING *h_ild_mapping;
@@ -903,7 +893,6 @@ static void ivas_param_mc_param_est_enc(
            hParamMC->hMetadataPMC.bAttackPresent = 1;
        }
    }
#endif


    if ( hParamMC->hMetadataPMC.bAttackPresent )
@@ -1356,13 +1345,11 @@ static void ivas_param_mc_quantize_ilds(
            ref_ener += Cx[ref_channel_idx][ref_channel_idx];
        }
        ILD[k] = 10.0f * log10f( ( Nrg[h_ild_mapping->ild_index[k]] + EPSILON ) / ( hParamMC->hMetadataPMC.ild_factors[k] * ref_ener + EPSILON ) );
#ifdef FIX_580_PARAMMC_ENER_BURSTS
        hParamMC->prev_ilds[freq_idx][k] = ILD[k];
        if ( hParamMC->hMetadataPMC.bAttackPresent && ( ( freq_idx + 1 ) < hParamMC->hMetadataPMC.nbands_coded ) )
        {
            hParamMC->prev_ilds[freq_idx + 1][k] = ILD[k];
        }
#endif
    }


+0 −2
Original line number Diff line number Diff line
@@ -837,13 +837,11 @@ const HUFF_TABLE huff_beta_table[2] =

const int16_t mc_paramupmix_fb_remix_order[4] = {0, 1, 2, 3};

#ifdef FIX_580_PARAMMC_ENER_BURSTS
/*----------------------------------------------------------------------------------*
 * ParamMC ROM tables
 *----------------------------------------------------------------------------------*/
const float param_mc_ild_diff_threshold[20] = { 8.0f, 8.0f, 10.0f, 20.0f,
                                     20.0f, 20.0f, 20.0f, 20.0f,
                                     20.0f, 20.0f, 20.0f, 20.0f };
#endif

/* clang-format on */
+0 −2
Original line number Diff line number Diff line
@@ -130,12 +130,10 @@ extern const HUFF_TABLE huff_alpha_table[2];
extern const HUFF_TABLE huff_beta_table[2];
extern const int16_t mc_paramupmix_fb_remix_order[4];

#ifdef FIX_580_PARAMMC_ENER_BURSTS
/*----------------------------------------------------------------------------------*
 * ParamMC ROM tables
 *----------------------------------------------------------------------------------*/
extern const float param_mc_ild_diff_threshold[20];
#endif


#endif
Loading