Commit 7ca22f62 authored by bayers's avatar bayers
Browse files

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

Merge remote-tracking branch 'remotes/origin/main' into 904-jbm-sba-rs-to-foa-decoding-triggers-assert
parents bfa0ef1b 064ed4ee
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2875,7 +2875,7 @@ static void parseOption(
            assert( numOptionValues == 1 );
            if ( !parseRenderFramesize( optionValues[0], &args->render_framesize ) )
            {
                fprintf( stderr, "Unknown or invalid option for LFE position: %s\n", optionValues[0] );
                fprintf( stderr, "Unknown or invalid option for frame size: %s\n", optionValues[0] );
                exit( -1 );
            }

+33 −7
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ void stereo_dmx_evs_close_encoder(

ivas_error ivas_dec(
    Decoder_Struct *st_ivas,                                    /* i  : IVAS decoder structure                  */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#if( defined SPLIT_REND_WITH_HEAD_ROT && !defined NONBE_UNIFIED_DECODING_PATHS_FIX )
    const PCM_RESOLUTION pcm_resolution,                        /* i  : type for the decoded PCM resolution     */
    void *data                                                  /* o  : output synthesis signal                 */
#else
@@ -3726,13 +3726,14 @@ void ivas_dirac_dec_set_md_map(
    const int16_t nCldfbTs                                      /* i  : number of CLDFB time slots              */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
void ivas_dirac_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
    float *output_f[],                                          /* i/o: synthesized core-coder transport channels/DirAC output  */
    const int16_t nchan_transport,                              /* i  : number of transport channels                            */
    const int16_t num_subframes                                 /* i  : number of subframes to render           */
);

#endif
void ivas_dirac_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const int16_t nchan_transport,                              /* i  : number of transport channels            */
@@ -3814,11 +3815,12 @@ void ivas_mc_paramupmix_enc_close(
    const int32_t input_Fs                                      /* i  : input sampling rate                             */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
void ivas_mc_paramupmix_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                                     */
    float *output_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */
);

#endif
ivas_error ivas_mc_paramupmix_dec_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                          */
);
@@ -4178,12 +4180,13 @@ void ivas_spar_config(
    const int16_t sid_format                                    /* i  : IVAS format indicator from SID frame    */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
ivas_error ivas_sba_upmixer_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder struct                     */
    float *output[],                                            /* i/o: transport/output audio channels         */
    const int16_t output_frame                                  /* i  : output frame length                     */
);

#endif
ivas_error ivas_sba_linear_renderer(
    float *output_f[],                                          /* i/o: synthesized core-coder transport channels/DirAC output  */
    const int16_t output_frame,                                 /* i  : output frame length per channel                         */
@@ -5296,12 +5299,13 @@ void ivas_ism_renderer_close(
    ISM_RENDERER_HANDLE *hIsmRendererData                       /* i/o: ISM renderer handle                             */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS
void ivas_ism_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                          */
    float *output_f[],                                          /* i/o: core-coder transport channels/object output     */
    const int16_t output_frame                                  /* i  : output frame length per channel                 */
);

#endif
void ivas_ism_render_sf(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                          */
    float *output_f[],                                          /* i/o: core-coder transport channels/object output     */
@@ -5334,6 +5338,7 @@ void ivas_param_mc_mc2sba_cldfb(
    const float gain_lfe                                                          /* i  : gain applied to LFE                                        */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
void ivas_ism2sba(
    float *buffer_td[],                                         /* i/o: TD signal buffers                               */
    ISM_RENDERER_HANDLE hIsmRendererData,                       /* i/o: renderer data                                   */
@@ -5343,6 +5348,7 @@ void ivas_ism2sba(
    const int16_t sba_order                                     /* i  : SBA order                                       */
);

#endif
void ivas_ism2sba_sf(
    float *buffer_in[],                                         /* i  : TC buffer                                       */
    float *buffer_out[],                                        /* o  : TD signal buffers                               */
@@ -5691,11 +5697,13 @@ ivas_error ivas_osba_dirac_td_binaural_jbm(
    float *output_f[]                                           /* o  : rendered time signal                    */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
ivas_error ivas_osba_dirac_td_binaural(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float *output[],                                            /* o  : output synthesis signal                 */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);
#endif

ivas_error ivas_osba_ism_metadata_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
@@ -5704,11 +5712,21 @@ ivas_error ivas_osba_ism_metadata_dec(
    int16_t nb_bits_metadata[]                                  /* o  : number of ISM metadata bits             */
);

#ifdef NONBE_UNIFIED_DECODING_PATHS_FIX
ivas_error ivas_osba_render_sf(
    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 *nSamplesAvailableNext,                            /* o  : number of CLDFB slots still to render   */
    float *output_f[]                                           /* o  : rendered time signal                    */
);
#else
ivas_error ivas_osba_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
    float *output_f[],                                          /* i/o: core-coder transport channels/object output */
    const int16_t output_frame                                  /* i  : output frame length per channel             */
);
#endif

void ivas_osba_data_close(
    SBA_ISM_DATA_HANDLE *hSbaIsmData                            /* i/o: OSBA rendering handle                   */
@@ -5847,12 +5865,13 @@ ivas_error ivas_omasa_ism_metadata_dec(
    int16_t nb_bits_metadata[]                                  /* o  : number of ISM metadata bits             */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS
ivas_error ivas_omasa_dirac_td_binaural(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float *output[],                                            /* o  : output synthesis signal                 */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);

#endif
ivas_error ivas_omasa_dirac_td_binaural_jbm(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const uint16_t nSamplesAsked,                               /* i  : number of samples requested             */
@@ -5862,12 +5881,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm(
    float *output_f[]                                           /* o  : rendered time signal                    */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
void ivas_omasa_dirac_rend(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float *output[],                                            /* o  : output synthesis signal                 */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);

#endif
void ivas_omasa_rearrange_channels(
    float *output[],                                            /* o  : output synthesis signal                 */
    const int16_t nchan_transport_ism,                          /* i  : number of ISM TCs                       */
@@ -5899,6 +5920,7 @@ void ivas_omasa_separate_object_renderer_close(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

#ifndef NONBE_UNIFIED_DECODING_PATHS_FIX
void ivas_omasa_separate_object_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float input_f[][L_FRAME48k],                                /* i  : separated object signal                 */
@@ -5906,9 +5928,13 @@ void ivas_omasa_separate_object_render(
    const int16_t output_frame                                  /* i  : output frame length per channel         */
);

#endif
void ivas_omasa_separate_object_render_jbm(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const uint16_t nSamplesRendered,                            /* i  : number of samples rendered              */
#ifdef NONBE_UNIFIED_DECODING_PATHS_FIX
    float input_f[][L_FRAME48k],                                /* i  : separated object signal                 */
#endif
    float *output_f[],                                          /* o  : rendered time signal                    */
    const int16_t subframes_rendered,                           /* i  : number of subframes rendered            */
    const int16_t slots_rendered                                /* i  : number of CLDFB slots rendered          */
+6 −0
Original line number Diff line number Diff line
@@ -163,7 +163,13 @@

#define NONBE_FIX_856_TCX_LTP_SYNTH_FILTER                    /* FhG: issue 856: correct filtering length for tcx-ltp synth filtering*/
#define NONBE_UNIFIED_DECODING_PATHS                          /* FhG: unify decoding paths   */
#ifdef NONBE_UNIFIED_DECODING_PATHS
#define NONBE_UNIFIED_DECODING_PATHS_FIX                      /* VA: issue 876: fixes within NONBE_UNIFIED_DECODING_PATHS */
#endif
#define NONBE_FIX_874_OMASA_BRSW_2TD                          /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/
#define NONBE_FIX_871_ACELP_CRASH_IN_OSBA                     /* FhG: isse 871: crash in ACELP core encoder with OSBA */
#define NONBE_FIX_906_SBA_LBR_SMOOTHING                       /* FhG: issue #906: fix SBA low bit rate smoothing for HOA2/HOA3 output */
#define NONBE_FIX_878_RS_FEC_STEREO_CNG                       /* Eri: Frame loss and Unified Stereo CNG may cause false BER detection which results in corrupt bitstream decoding */
#define NONBE_FIX_904_JBM_SBA_RS_FOA                          /* FhG: issue #904: fix JBM SBA RS to FOA decoding */
/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -248,6 +248,10 @@ ivas_error ivas_cpe_dec(
            {
                nb_bits -= SID_FORMAT_NBITS;
                sts[1]->bit_stream -= SID_FORMAT_NBITS;
#ifdef NONBE_FIX_878_RS_FEC_STEREO_CNG
                /* set total bitrate of Stereo CNG parameters for BER detection */
                sts[1]->total_brate = IVAS_SID_5k2 - SID_2k40;
#endif
            }

            if ( ( ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE ) || ( st_ivas->ivas_format == MASA_ISM_FORMAT && cpe_brate < MASA_STEREO_MIN_BITRATE ) ) && ivas_total_brate > IVAS_SID_5k2 )
+14 −0
Original line number Diff line number Diff line
@@ -51,6 +51,19 @@
 * Principal IVAS decoder routine
 *--------------------------------------------------------------------------*/

#ifdef NONBE_UNIFIED_DECODING_PATHS_FIX
ivas_error ivas_dec(
    Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure      */
    int16_t *data            /* o  : output synthesis signal     */
)
{
    // TODO: move here function ivas_jbm_dec_tc() and rename it to ivas_dec()
    st_ivas->ivas_format = UNDEFINED_FORMAT; // temp. to avoid compilation warnings
    data[0] = 0;                             // temp. to avoid compilation warnings

    return IVAS_ERR_OK;
}
#else
ivas_error ivas_dec(
    Decoder_Struct *st_ivas,             /* i/o: IVAS decoder structure      */
#ifdef SPLIT_REND_WITH_HEAD_ROT
@@ -1163,3 +1176,4 @@ ivas_error ivas_dec(
    pop_wmops();
    return IVAS_ERR_OK;
}
#endif
Loading