Commit f5694d88 authored by vaclav's avatar vaclav
Browse files

updates from MR 212, 236, 254

parent a0a82df6
Loading
Loading
Loading
Loading
Loading
+25 −24
Original line number Diff line number Diff line
@@ -2221,9 +2221,6 @@ static ivas_error decodeG192(
                }

#ifdef FIX_CREND_SIMPLIFY_CODE
                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
                /* Read main parameters from the bitstream to set-up the decoder */
                hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer;
                hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec;
@@ -2235,9 +2232,12 @@ static ivas_error decodeG192(
                /* Placeholder for memory reallocation */
                /* ... */

                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
                    if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        fprintf( stderr, "\nload_hrtf_from_file failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
                    }
                }
@@ -2992,9 +2992,6 @@ static ivas_error decodeVoIP(

#ifdef FIX_CREND_SIMPLIFY_CODE
        if ( bitstreamReadDone == true )
        {
            /* Load HRTF binary file data */
            if ( arg.hrtfReaderEnabled )
        {
            /* Read main parameters from the bitstream to set-up the decoder */
            hHrtf->binaural_renderer_old = hHrtf->binaural_renderer;
@@ -3007,9 +3004,12 @@ static ivas_error decodeVoIP(
            /* Placeholder for memory reallocation */
            /* ... */

            /* Load HRTF binary file data */
            if ( arg.hrtfReaderEnabled )
            {
                if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                    fprintf( stderr, "\nload_hrtf_from_file failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }
            }
@@ -3299,6 +3299,7 @@ cleanup:
    return error;
}


#ifdef FIX_CREND_SIMPLIFY_CODE
/*---------------------------------------------------------------------*
 * load_hrtf_from_file()
+4 −0
Original line number Diff line number Diff line
@@ -693,7 +693,11 @@ static int16_t get_cldfb_in_flag(
    int16_t cldfb_in_flag;

    cldfb_in_flag = 0;
#ifdef FIX_HRTF_LOAD
    if ( renderConfig->split_rend_config.rendererSelection == IVAS_BIN_RENDERER_TYPE_FASTCONV )
#else
    if ( renderConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV )
#endif
    {
#ifdef DEBUGGING
        cldfb_in_flag = 1;
+6 −1
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ typedef enum

} ISAR_SPLIT_REND_CODEC;

#ifndef FIX_HRTF_LOAD
typedef enum
{
    ISAR_SPLIT_REND_RENDERER_SELECTION_CREND,
@@ -283,7 +284,7 @@ typedef enum
    ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT,

} ISAR_SPLIT_REND_RENDERER_SELECTION;

#endif
typedef struct _ISAR_SPLIT_REND_BITS_DATA
{
    uint8_t *bits_buf;
@@ -314,7 +315,11 @@ typedef struct _ISAR_SPLIT_REND_CONFIG
    int16_t codec_frame_size_ms; /* Codec frame size in milliseconds, only relevant with LC3plus */
    ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode;
    ISAR_SPLIT_REND_CODEC codec;
#ifdef FIX_HRTF_LOAD
    IVAS_BIN_RENDERER_TYPE rendererSelection;
#else
    ISAR_SPLIT_REND_RENDERER_SELECTION rendererSelection;
#endif
    int16_t lc3plus_highres;

} ISAR_SPLIT_REND_CONFIG_DATA, *ISAR_SPLIT_REND_CONFIG_HANDLE;
+30 −6
Original line number Diff line number Diff line
@@ -114,9 +114,12 @@ void ivas_masa_prerender_fx(
);

ivas_error ivas_masa_dec_reconfigure_fx(
    Decoder_Struct *st_ivas,   /* i/o: IVAS decoder structure                                     */
    Decoder_Struct *st_ivas    /* i/o: IVAS decoder structure                                     */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesRendered, /* o  : number of samples flushed from the previous frame (JBM)    */
    Word16 *data               /* o  : output synthesis signal                 */
#endif
);

void reconstruct_ism_ratios_fx(
@@ -192,10 +195,15 @@ ivas_error ivas_omasa_ism_metadata_dec_fx(

ivas_error ivas_omasa_dec_config_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
#ifdef FIX_HRTF_LOAD
    Word16 *num_src,
    Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]
#else
    UWord16 *nSamplesRendered,                                  /* o  : number of samples flushed from the previous frame (JBM) */
    Word16 *num_src,
    Word16 SrcInd[MAX_NUM_TDREND_CHANNELS],
    Word16 *data                                                /* o  : output synthesis signal                                 */
#endif
);

void ivas_omasa_modify_masa_energy_ratios_fx(
@@ -2363,9 +2371,12 @@ void ivas_destroy_dec_fx(

ivas_error ivas_ism_dec_config_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    const ISM_MODE last_ism_mode,                               /* i/o: last ISM mode                               */
    const ISM_MODE last_ism_mode                                /* i/o: last ISM mode                               */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesRendered,                                  /* o  : number of samples flushed when the renderer granularity changes */
    Word16 *data                                                /* o  : output synthesis signal                     */
#endif
);

ivas_error ivas_ism_metadata_dec_create_fx(
@@ -2379,9 +2390,12 @@ void ivas_ism_reset_metadata_handle_dec_fx(
);

ivas_error ivas_sba_dec_reconfigure_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesFlushed,                                   /* o  : number of samples flushed                   */
    Word16 *data                                                /* o  : output synthesis signal                     */
#endif
);

ivas_error ivas_spar_md_dec_matrix_open_fx(
@@ -2389,6 +2403,7 @@ ivas_error ivas_spar_md_dec_matrix_open_fx(
    const Word16 num_channels,                                  /* i  : number of internal channels                 */
    const Word16 num_md_sub_frames                              /* i  : number of MD subframes                      */
);

void ivas_spar_md_dec_matrix_close_fx(
    ivas_spar_md_dec_state_t *hMdDecoder,                       /* i/o: SPAR MD decoder handle                      */
    const Word16 num_channels                                   /* i  : number of internal channels                 */
@@ -2416,9 +2431,12 @@ void ivas_omasa_data_close_fx(

ivas_error ivas_mc_dec_config_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    const Word16 idx,                                           /* i  : LS config. index                            */
    const Word16 idx                                            /* i  : LS config. index                            */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesRendered,                                  /* o  : samples flushed from last frame (JBM)       */
    Word16 *data                                                /* o  : output synthesis signal                     */
#endif
);

void ivas_lfe_window_init_fx(
@@ -4034,9 +4052,12 @@ ivas_error ivas_dec_get_format_fx(
);

ivas_error ivas_dec_setup(
    Decoder_Struct *st_ivas,   /* i/o: IVAS decoder structure                                  */
    Decoder_Struct *st_ivas   /* i/o: IVAS decoder structure                                  */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesRendered, /* o  : number of samples flushed from the previous frame (JBM) */
    Word16 *data               /* o  : output synthesis signal                 */
#endif
);

ivas_error create_mct_dec_fx(
@@ -4271,9 +4292,12 @@ ivas_error ivas_ism_metadata_enc_fx(

ivas_error ivas_ism_dec_config(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure              */
    const ISM_MODE last_ism_mode, /* i/o: last ISM mode                       */
    const ISM_MODE last_ism_mode /* i/o: last ISM mode                       */
#ifndef FIX_HRTF_LOAD
    ,
    UWord16 *nSamplesRendered,    /* o  : number of samples flushed when the renderer granularity changes */
    Word16 *data                  /* o  : output synthesis signal                 */
#endif
);

ivas_error ivas_param_ism_dec_open_fx(
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@
#define USE_REVERB_16BIT_ROM                            /* if desactivated old rom hrtf tables is used */
#define USE_TDREND_16BIT_ROM                            /* if desactivated old rom hrtf tables is used.  when active some tests case with 4 ISM fail due to owerflow in round_fixed function */
#define USE_FASTCONV_PARAMBIN_16BIT_ROM                 /* if desactivated old rom hrtf tables is used */
#define FIX_HRTF_LOAD                                   /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */
#endif
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK       /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
Loading