Commit e5433582 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into float-1487-clang18-msan-use-of-uninitialized-value-in-lib_dec-ivas_jbm_dec-c-145-28
parents 57f7ea02 aec21e44
Loading
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -589,11 +589,19 @@ void highband_exc_dct_in(

    if ( bfi || core_brate < 6000 || ( core_brate < 8600 && coder_type == UNVOICED ) )
    {
#ifndef FIX_1478_UNINIT_ON_BFI
        set_f( noisepb, 0.4f, MBANDS_GN );
#else
        set_f( noisepb, 0.4f, last_bin );
#endif
    }
    else if ( GSC_IVAS_mode == 3 || ( GSC_IVAS_mode > 0 && GSC_noisy_speech == 1 ) )
    {
#ifndef FIX_1478_UNINIT_ON_BFI
        set_f( noisepb, 0.4f, MBANDS_GN16k );
#else
        set_f( noisepb, 0.4f, last_bin );
#endif
    }
    else
    {
@@ -607,7 +615,11 @@ void highband_exc_dct_in(

    if ( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && element_mode <= IVAS_SCE )
    {
#ifndef FIX_1478_UNINIT_ON_BFI
        set_f( noisepb, 0.1f, MBANDS_GN );
#else
        set_f( noisepb, 0.1f, last_bin );
#endif
    }

    if ( core_brate < 6000 && coder_type <= UNVOICED )
+6 −1
Original line number Diff line number Diff line
@@ -130,7 +130,12 @@ void ifft_rel(
            id = 4 * id;
        }
        step = N_MAX_FFT / n2;

#ifdef FIX_2268_OOB_INDEXING_IN_IFFT
        if ( n8 < 2 )
        {
            continue;
        }
#endif
        s = sincos_t_ext + step;
        c = s + N_MAX_FFT / 4;
        s3 = sincos_t_ext + 3 * step;
+5 −5
Original line number Diff line number Diff line
@@ -167,11 +167,11 @@ typedef enum
#define IVAS_NUM_SUPPORTED_FS                   3                           /* number of supported sampling-rates in IVAS */

#define CLDFB_SLOT_NS                           1250000L                    /* 1.25ms: CLDFB slot length */
#define MAX_JBM_SUBFRAMES_5MS                   8
#define DEFAULT_JBM_SUBFRAMES_5MS               4
#define JBM_CLDFB_SLOTS_IN_SUBFRAME             4
#define MAX_JBM_CLDFB_TIMESLOTS                 32
#define DEFAULT_JBM_CLDFB_TIMESLOTS             16
#define DEFAULT_JBM_SUBFRAMES_5MS               4                           /* == IVAS_MAX_PARAM_SPATIAL_SUBFRAMES */
#define MAX_JBM_SUBFRAMES_5MS                   ( DEFAULT_JBM_SUBFRAMES_5MS * 2 )
#define JBM_CLDFB_SLOTS_IN_SUBFRAME             4                           /* == IVAS_MAX_PARAM_SPATIAL_SUBFRAMES */
#define DEFAULT_JBM_CLDFB_TIMESLOTS             CLDFB_NO_COL_MAX
#define MAX_JBM_CLDFB_TIMESLOTS                 ( DEFAULT_JBM_CLDFB_TIMESLOTS * 2 )
#define MAX_JBM_L_FRAME48k                      ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920:  max. time-scaled frame buffer length (per channel) in samples */
#define MAX_JBM_L_FRAME_NS                      40000000L                   /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k  */
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
+39 −39
Original line number Diff line number Diff line
@@ -322,11 +322,24 @@ void stereo_dmx_evs_close_encoder(
    STEREO_DMX_EVS_ENC_HANDLE *hStereoDmxEVS                    /* i/o: Stereo downmix for EVS encoder handle   */
);

ivas_error ivas_dec(
    Decoder_Struct *st_ivas,                                    /* i  : IVAS decoder structure                  */
ivas_error ivas_dec_tmp( // this will be removed in the following step
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    int16_t *data                                               /* o  : output synthesis signal                 */
);

ivas_error ivas_dec(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

ivas_error ivas_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const uint16_t nSamplesAsked,                               /* i  : number of samples wanted                */
    uint16_t *nSamplesRendered,                                 /* o  : number of samples rendered              */
    uint16_t *nSamplesAvailableNext,                            /* o  : number of samples still available in the rendering pipeline */
    const PCM_RESOLUTION pcm_resolution,                        /* i  : type for the decoded PCM resolution     */
    void *data                                                  /* o  : output synthesis signal                 */
);

ivas_error ivas_dec_get_format(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);
@@ -813,22 +826,9 @@ void QuaternionInverse(


/*----------------------------------------------------------------------------------*
 * JBM prototypes
 * Internal rendering prototypes
 *----------------------------------------------------------------------------------*/

ivas_error ivas_jbm_dec_tc(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);

ivas_error ivas_jbm_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const uint16_t nSamplesAsked,                               /* i  : number of samples wanted                                    */
    uint16_t *nSamplesRendered,                                 /* o  : number of samples rendered                                  */
    uint16_t *nSamplesAvailableNext,                            /* o  : number of samples still available in the rendering pipeline */
    const PCM_RESOLUTION pcm_resolution,                        /* i  : type for the decoded PCM resolution                         */
    void *data                                                  /* o  : output synthesis signal                                     */
);

ivas_error ivas_jbm_dec_flush_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const int16_t tc_granularity_new,                           /* i  : new renderer granularity                                    */
@@ -842,7 +842,7 @@ ivas_error ivas_jbm_dec_flush_renderer(
    void *data                                                  /* o  : output synthesis signal                                     */
);

void ivas_jbm_dec_feed_tc_to_renderer(
void ivas_dec_feed_tc_to_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const int16_t nSamplesForRendering,                         /* i  : number of TC samples available for rendering                */
    int16_t *nSamplesResidual                                   /* o  : number of samples not fitting into the renderer grid and buffer for the next call*/
@@ -856,77 +856,77 @@ ivas_error ivas_jbm_dec_set_discard_samples(
    Decoder_Struct *st_ivas                                     /* i/o: main IVAS decoder structre                                  */
);

void ivas_jbm_dec_get_adapted_linear_interpolator(
void ivas_dec_get_adapted_linear_interpolator(
    const int16_t default_interp_length,                        /* i  : default length of the (full-frame) interpolator             */
    const int16_t interp_length,                                /* i  : length of the interpolator to be created                    */
    float *interpolator                                         /* o  : the interpolator                                            */
);

void ivas_jbm_dec_get_adapted_subframes(
void ivas_dec_get_adapted_subframes(
    const int16_t nCldfbTs,                                     /* i  : number of time slots in the current frame                   */
    int16_t *subframe_nbslots,                                  /* i/o: subframe grid                                               */
    int16_t *nb_subframes                                       /* i/o: number of subframes in the frame                            */
);

void ivas_jbm_dec_get_md_map(
void ivas_dec_get_md_map(
    const int16_t default_len,                                  /* i  : default frame length in metadata slots                      */
    const int16_t len,                                          /* i  : length of the modfied frames in metadata slots              */
    const int16_t len,                                          /* i  : length of the modified frames in metadata slots             */
    const int16_t subframe_len,                                 /* i  : default length of a subframe                                */
    const int16_t offset,                                       /* i  : current read offset into the md buffer                      */
    const int16_t offset,                                       /* i  : current read offset into the MD buffer                      */
    const int16_t buf_len,                                      /* i  : length of the metadata buffer                               */
    int16_t *map                                                /* o  : metadata index map                                          */
);

int16_t ivas_jbm_dec_get_num_tc_channels( 
int16_t ivas_dec_get_num_tc_channels( 
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder handle                                         */
);

void ivas_jbm_dec_get_md_map_even_spacing(
    const int16_t len,                                          /* i  : length of the modfied frames in metadata slots              */
void ivas_dec_get_md_map_even_spacing(
    const int16_t len,                                          /* i  : length of the modefied frames in metadata slots             */
    const int16_t subframe_len,                                 /* i  : default length of a subframe                                */
    const int16_t offset,                                       /* i  : current read offset into the md buffer                      */
    const int16_t offset,                                       /* i  : current read offset into the MD buffer                      */
    const int16_t buf_len,                                      /* i  : length of the metadata buffer                               */
    int16_t *map                                                /* o  : metadata index map                                          */
);

TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(
TC_BUFFER_MODE ivas_dec_get_tc_buffer_mode(
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder handle                                         */
);

/*! r: render granularity */
int16_t ivas_jbm_dec_get_render_granularity(
int16_t ivas_dec_get_render_granularity(
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                                               */
    const RENDERER_TYPE renderer_type_sec,                      /* i  : secondary renderer type                                     */
    const int32_t output_Fs                                     /* i  : sampling rate                                               */
);

ivas_error ivas_jbm_dec_tc_buffer_open(
ivas_error ivas_dec_tc_buffer_open(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const TC_BUFFER_MODE tc_buffer_mode,                        /* i  : buffer mode                                                 */
    const int16_t nchan_transport_jbm,                          /* i  : number of real transport channels                           */
    const int16_t nchan_transport_rend,                         /* i  : new number of TCs for rendering                             */
    const int16_t nchan_transport_internal,                     /* i  : number of totally buffered channels                         */
    const int16_t nchan_full,                                   /* i  : number of channels to fully store                           */
    const int16_t n_samples_granularity                         /* i  : granularity of the renderer/buffer                          */
);

ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
ivas_error ivas_dec_tc_buffer_reconfigure(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                      */
    const TC_BUFFER_MODE tc_buffer_mode,                        /* i  : new buffer mode                                             */
    const int16_t nchan_transport_jbm,                          /* i  : new number of real transport channels                       */
    const int16_t nchan_transport_rend,                         /* i  : new number of TCs for rendering                             */
    const int16_t nchan_transport_internal,                     /* i  : new number of totally buffered channels                     */
    const int16_t nchan_full,                                   /* i  : new number of channels to fully store                       */
    const int16_t n_samples_granularity                         /* i  : new granularity of the renderer/buffer                      */
);

void ivas_jbm_dec_tc_buffer_close(
void ivas_dec_tc_buffer_close(
    DECODER_TC_BUFFER_HANDLE *phTcBuffer                        /* i/o: TC buffer handle                                            */
);

void ivas_jbm_dec_td_renderers_adapt_subframes(
void ivas_dec_td_renderers_adapt_subframes(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);

ivas_error ivas_jbm_dec_metadata_open(
ivas_error ivas_jbm_dec_masa_metadata_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);

@@ -5578,7 +5578,7 @@ ivas_error ivas_osba_data_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder handle                     */
);

ivas_error ivas_osba_dirac_td_binaural_jbm(
ivas_error ivas_osba_dirac_td_binaural(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const uint16_t nSamplesAsked,                               /* i  : number of CLDFB slots requested         */
    uint16_t *nSamplesRendered,                                 /* o  : number of CLDFB slots rendered          */
@@ -5746,7 +5746,7 @@ ivas_error ivas_omasa_ism_metadata_dec(
    int16_t nb_bits_metadata[]                                  /* o  : number of ISM metadata bits             */
);

ivas_error ivas_omasa_dirac_td_binaural_jbm(
ivas_error ivas_omasa_dirac_td_binaural(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const uint16_t nSamplesAsked,                               /* i  : number of samples requested             */
    uint16_t *nSamplesRendered,                                 /* o  : number of samples rendered              */
@@ -5790,7 +5790,7 @@ void ivas_omasa_gain_masa_tc(
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);

void ivas_omasa_dirac_rend_jbm(
void ivas_omasa_dirac_rend(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const uint16_t nSamplesAsked,                               /* i  : number of samples requested             */
    uint16_t *nSamplesRendered,                                 /* o  : number of samples rendered              */
@@ -5815,7 +5815,7 @@ void ivas_omasa_separate_object_renderer_close(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

void ivas_omasa_separate_object_render_jbm(
void ivas_omasa_separate_object_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const uint16_t nSamplesRendered,                            /* i  : number of samples rendered              */
    float input_f[][L_FRAME48k],                                /* i  : separated object signal                 */
+2 −0
Original line number Diff line number Diff line
@@ -171,9 +171,11 @@
#define FIX_2274_OOB_INDEXING_IN_CORRMATRIX             /* FhG: fix OOB indexing complaint */
#define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */
#define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE       /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */
#define FIX_2268_OOB_INDEXING_IN_IFFT                   /* VA: Fix for issue 2268, to silence clang18 */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR    /* Dolby: Fix for issue 1449: renderer frame size unclear in ISAR */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: remove unused noise generator from ISAR */
#define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX  /* FhG/VA: init nb_bits_metadata to zero */

Loading