Commit 6ddc15e7 authored by Jan Brouwer's avatar Jan Brouwer
Browse files

Merge branch 'main' into philips/contribution-38-control-metadata-reverb

parents 29e345c2 528fa2d3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -990,7 +990,12 @@ ivas_error check_ind_list_limits(
    if ( ( &hBstr->ind_list[hBstr->nb_ind_tot] - ivas_ind_list_zero ) >= *( hBstr->ivas_max_num_indices ) )
    {
#ifdef DEBUGGING
#ifdef DEBUG_IND_LIST_MEMORY
        /* TODO: replace with the warning message below before the finalization of the IVAS codec */
        assert( 0 && "The maximum number of indices has been exceeded! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata()." );
#else
        fprintf( stderr, "Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n", *( hBstr->ivas_max_num_indices ), frame );
#endif
#endif

        /* reallocate the buffer of indices with increased limit */
@@ -1022,7 +1027,12 @@ ivas_error check_ind_list_limits(
            if ( hBstr->ind_list >= ivas_ind_list_last )
            {
#ifdef DEBUGGING
#ifdef DEBUG_IND_LIST_MEMORY
                /* TODO: replace with the warning message below before the finalization of the IVAS codec */
                assert( 0 && "The maximum number of indices has been exceeded! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata()." );
#else
                fprintf( stderr, "Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n", *( hBstr->ivas_max_num_indices ), frame );
#endif
#endif

                /* no available empty slot -> need to re-allocate the buffer */
+2 −0
Original line number Diff line number Diff line
@@ -2237,11 +2237,13 @@ enum
    VOIP_RTPDUMP
};

#ifndef JBM_PARAMUPMIX
typedef enum _COV_SMOOTHING_TYPE
{
    COV_SMOOTH_SPAR,
    COV_SMOOTH_MC
} COV_SMOOTHING_TYPE;
#endif

/* clang-format on */
#endif /* CNST_H */
+16 −0
Original line number Diff line number Diff line
@@ -1335,6 +1335,14 @@ typedef enum
#define MC_PARAMUPMIX_NCH                  2           /* number of channels to combine into 1 */
#define MC_PARAMUPMIX_MIN_CLDFB            8

#ifdef JBM_PARAMUPMIX
typedef enum _COV_SMOOTHING_TYPE
{
    COV_SMOOTH_SPAR,
    COV_SMOOTH_MC
} COV_SMOOTHING_TYPE;
#endif

typedef struct {
    const int32_t *value;
    const uint16_t *length;
@@ -1574,14 +1582,22 @@ typedef enum
typedef enum
{
    TDREND_POSTYPE_ABSOLUTE,                                                /* The source position is in absolute coordinates  */
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_POSTYPE_NON_DIEGETIC                                             /* The source position is non-diegetic */
#else
    TDREND_POSTYPE_RELATIVE_TO_LISTENER                                     /* The source position is relative to the listener */
#endif
} TDREND_PosType_t;

typedef enum
{
    TDREND_PLAYSTATUS_INITIAL,
#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_PLAYSTATUS_PLAYING,
    TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC
#else
    TDREND_PLAYSTATUS_PLAYING
#endif
} TDREND_PlayStatus_t;

typedef enum
+37 −2
Original line number Diff line number Diff line
@@ -837,6 +837,10 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(
/*! r: render granularity */
int16_t ivas_jbm_dec_get_render_granularity(
    const RENDERER_TYPE rendererType,                           /* i  : renderer type                                               */
#ifdef JBM_PARAMUPMIX
    const IVAS_FORMAT ivas_format,                              /* i  : ivas format                                                 */
    const MC_MODE mc_mode,                                      /* i  : MC mode                                                     */
#endif
   const int32_t output_Fs                                     /* i  : sampling rate                                               */
);

@@ -3877,6 +3881,23 @@ void ivas_mc_paramupmix_dec_read_BS(
    int16_t *nb_bits                                            /* o  : number of bits written                          */
);

#ifdef JBM_PARAMUPMIX
void ivas_mc_paramupmix_dec_digest_tc(
    Decoder_Struct *st_ivas,                                        /* i/o: IVAS decoder handle                            */
    const uint8_t nCldfbSlots,                                      /* i : number of CLFBS slots in the transport channels */
    const int16_t nSamplesForRendering                              /* i  : number of samples provided   */
);

void ivas_mc_paramupmix_dec_render(
    Decoder_Struct *st_ivas,                                        /* i/o: IVAS decoder handle                       */
    const uint16_t nSamplesAsked,                                   /* i  : number of CLDFB slots requested           */
    uint16_t *nSamplesRendered,                                     /* o  : number of CLDFB slots rendered            */
    uint16_t *nSamplesAvailable,                                    /* o  : number of CLDFB slots still to render     */
    float *input_f[],                                               /* i: core-coder transport channels  */
    float *output_f[]                                               /* i/o: synthesized core-coder transport channels */
);
#endif

void ivas_param_mc_metadata_open(
    const MC_LS_SETUP mc_ls_setup,                              /* i  : MC ls setup                                         */
    const int16_t lfe_index,                                    /* i  : channel index of LFE                                */
@@ -5144,6 +5165,19 @@ void ivas_binRenderer_close(
    BINAURAL_RENDERER_HANDLE *hBinRenderer                      /* i/o: decoder binaural renderer handle                */
);

#ifdef JBM_PARAMUPMIX
void ivas_binaural_cldfb(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
    float *output_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */
);

void ivas_binaural_cldfb_sf(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
    const int16_t n_samples_to_render,                          /* i  : output frame length per channel                         */
    const int16_t slot_size,                                    /* i  : JBM slot size                                           */
    float *output_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */
);
#else
#ifdef DEBUGGING
void ivas_binaural_cldfb(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
@@ -5156,8 +5190,9 @@ void ivas_binaural_cldfb_sf(
    float *output_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */

);

#endif
#endif

void ivas_binRenderer(
    BINAURAL_RENDERER_HANDLE hBinRenderer,                      /* i/o: fastconv binaural renderer handle                       */
    COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,       /* i  : combined head and external orientation handle           */

lib_com/options.h

100644 → 100755
+5 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@
/*#define DEBUG_AGC_ENCODER_CMD_OPTION*/        /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */
#define DEBUG_JBM_CMD_OPTION                    /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */
#define VARIABLE_SPEED_DECODING                 /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */

#define DEBUG_IND_LIST_MEMORY                   /* raise assert() when ind_list[] runs out of memory */
#endif

/* #################### End DEBUGGING switches ############################ */
@@ -166,6 +166,9 @@
#define FIX_UNCLR_ISSUE                                 /* VoiceAge: issue 574: Fix UNCLR mis-classifications in noisy speech stereo */
#define FIX_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */
#define FIX_575_LOW_OVERLAP_PLC_RECOVERY                /* FhG: Issue 575 fix for PLC and transistion to TCX5*/
#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 ISM_FB_16k4                                     /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */
#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */
#define UPDATE_FASTCONV_SBA_FILTER                      /* Dlb: Issue 584: Update SBA CLDFB-Domain HRTFs */
@@ -175,6 +178,7 @@
#define NONBE_FIX_589_JBM_TC_OFFSETS                    /* FhG: issue 589: wrong offset into the TC buffers is used in some rendering paths in the JBM main rendering function */
#define FIX_MEM_REALLOC_IND_LIST                        /* VA: issue 601: failure of the automatic memory re-allocation mechanism when ind_list[] buffer is depleted in MASA mode with 2 TC*/
#define FIX_581_CLANG_OFFSET_TO_NULL                    /* FhG: issue 581: fix CLANG error about applying an offset to a NULL pointer */
#define JBM_PARAMUPMIX                                  /* Dlb: Issue 471: Integrate the Multichannel Parametric Upmix into the JBM path */

/* ################## End BE DEVELOPMENT switches ######################### */

Loading