Commit 9a338f00 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into ci/trigger-pytest-error-for-exceptions

parents 9ccae1bd 2103d913
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ fi
# Replace only the first occurrence, as "basop" may be present in the later description
# If the format is correct, then before "_basop", only numbers can occur
float_ref_branchname="${branchname/basop/ref}"
git_result=$(git branch -av)
git_result=$(git branch -a)

# If the branch does not exist, default to "float-pc"
if [[ "$git_result" =~ "$float_ref_branchname" ]]; then
+5 −0
Original line number Diff line number Diff line
@@ -172,8 +172,13 @@ typedef enum
#define JBM_CLDFB_SLOTS_IN_SUBFRAME             4
#define MAX_JBM_CLDFB_TIMESLOTS                 32
#define DEFAULT_JBM_CLDFB_TIMESLOTS             16
#ifdef JBM_MEMORY_OPT
#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  */
#else
#define MAX_JBM_L_FRAME48k                      1920
#define MAX_JBM_L_FRAME_NS                      40000000L
#endif
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
#define MAX_CLDFB_DIGEST_CHANNELS               3                           /* == maximum of ParamISM TCs and ParamMC TCs */

+26 −2
Original line number Diff line number Diff line
@@ -259,12 +259,28 @@ uint32_t ivas_syn_output(
    int16_t *synth_out                                          /* o  : integer 16 bits synthesis signal        */
);

#ifdef JBM_MEMORY_OPT
void ivas_buffer_interleaved_to_deinterleaved(
    float *audio,                                               /* i/o: audio buffer                            */
    const int16_t n_channels,                                   /* i  : number of channels                      */
    const int16_t frame_length,                                 /* i  : frame length (one channel)              */
    const int16_t n_samp_full                                   /* i  : full frame length (one channel)         */
);

void ivas_buffer_deinterleaved_to_interleaved(
    float *audio[],                                             /* i  : deinterleaved audio buffer              */
    const int16_t n_channels,                                   /* i  : number of channels                      */
    const int16_t frame_length,                                 /* i  : frame length (one channel)              */
    float *audio_out                                            /* o  : interleaved audio buffer                */
);
#else
void ivas_syn_output_f(
    float *synth[],                                             /* i/o: float synthesis signal                  */
    const int16_t output_frame,                                 /* i  : output frame length (one channel)       */
    const int16_t n_channels,                                   /* i  : number of output channels               */
    float *synth_out                                            /* o  : integer 16 bits synthesis signal        */
);
#endif

void ivas_initialize_handles_enc(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
@@ -832,8 +848,11 @@ ivas_error ivas_jbm_dec_flush_renderer(
void ivas_jbm_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*/
    float *data                                                 /* i/o: transport channels/output synthesis signal                  */
    int16_t *nSamplesResidual                                   /* o  : number of samples not fitting into the renderer grid and buffer for the next call*/
#ifndef JBM_MEMORY_OPT
    ,
    float *data                                                 /* i/o: time-scaled transport channels                              */
#endif
);

void ivas_dec_prepare_renderer(
@@ -3706,8 +3725,13 @@ void ivas_dirac_dec_render_sf(
    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            */
#ifdef FIX_1319_STACK_SBA_DECODER
    float *pppQMfFrame_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX],
    float *pppQMfFrame_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX]
#else
    float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX],
    float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX]
#endif
);

void computeDiffuseness_mdft(
+65 −0
Original line number Diff line number Diff line
@@ -148,6 +148,70 @@ uint32_t ivas_syn_output(
    return noClipping;
}

#ifdef JBM_MEMORY_OPT

/*-------------------------------------------------------------------*
 * ivas_buffer_interleaved_to_deinterleaved()
 *
 * Convert an interleaved buffer of audio channels to deinterleaved one
 *-------------------------------------------------------------------*/

void ivas_buffer_interleaved_to_deinterleaved(
    float *audio,               /* i/o: audio buffer                    */
    const int16_t n_channels,   /* i  : number of channels              */
    const int16_t frame_length, /* i  : frame length (one channel)      */
    const int16_t n_samp_full   /* i  : full frame length (one channel) */
)
{
    int16_t offset, ch, m;
    float buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k];

    for ( ch = 0; ch < n_channels; ch++ )
    {
        for ( m = 0; m < frame_length; m++ )
        {
            buffer[ch][m] = audio[m * n_channels + ch];
        }
    }

    offset = 0;
    for ( ch = 0; ch < n_channels; ch++ )
    {
        mvr2r( buffer[ch], audio + offset, frame_length );
        offset += n_samp_full;
    }

    return;
}


/*-------------------------------------------------------------------*
 * ivas_buffer_deinterleaved_to_interleaved()
 *
 * Convert a deinterleaved buffer of audio channels to interleaved one
 *-------------------------------------------------------------------*/

void ivas_buffer_deinterleaved_to_interleaved(
    float *audio[],             /* i/o: deinterleaved audio buffer      */
    const int16_t n_channels,   /* i  : number of channels              */
    const int16_t frame_length, /* i  : frame length (one channel)      */
    float *audio_out            /* o  : interleaved audio buffer        */
)
{
    int16_t ch, m;

    for ( ch = 0; ch < n_channels; ch++ )
    {
        for ( m = 0; m < frame_length; m++ )
        {
            audio_out[m * n_channels + ch] = audio[ch][m];
        }
    }

    return;
}

#else

/*-------------------------------------------------------------------*
 * ivas_syn_output_f()
@@ -181,6 +245,7 @@ void ivas_syn_output_f(
    return;
}

#endif

/*-------------------------------------------------------------------*
 * mvr2r_inc()
+2 −0
Original line number Diff line number Diff line
@@ -164,6 +164,8 @@
#define FIX_1320_STACK_CPE_DECODER                      /* VA: issue 1320: Optimize the stack memory consumption in the CPE decoder */
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */
#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */
#define FIX_1319_STACK_SBA_DECODER                      /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */
#define JBM_MEMORY_OPT                                  /* VA: issue 916: optimization of RAM in the JBM decoder */

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

Loading