Commit 6b919859 authored by bayers's avatar bayers
Browse files

some cleanup, removed duplication of transport channel buffering

parent 2c794eb6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@ typedef enum
#define MAX_JBM_L_FRAME48k                      1920
#define MAX_JBM_L_FRAME_NS                      40000000L
#define MAX_SPAR_INTERNAL_CHANNELS              FOA_CHANNELS + 2* ( IVAS_MAX_SBA_ORDER -1 )
#define MAX_CLDFB_DIGEST_CHANNELS               4
typedef enum
{
    TC_BUFFER_MODE_FULL=1,
    TC_BUFFER_MODE_RESIDUAL
} TC_BUFFER_MODE;
#endif

/*----------------------------------------------------------------------------------*
+21 −16
Original line number Diff line number Diff line
@@ -814,6 +814,7 @@ ivas_error ivas_jbm_dec_render(
ivas_error 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*/
    int16_t *data                       /* i/o: transport channels/output synthesis signal     */
);

@@ -843,7 +844,20 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ); /* i : IVA
void ivas_jbm_dec_copy_tc(
    Decoder_Struct *st_ivas,            /* i/o: IVAS decoder structure       */
    const int16_t nSamplesForRendering, /* i  : number of samples to digest  */
    float *data_f[]                     /* i  : transport channel samples    */
    int16_t *nSamplesResidual,
    int16_t *data,                      /* i  : transport channel samples    */
    float *data_f[]                     /* i/o: transport channel samples    */
);
ivas_error ivas_jbm_dec_tc_buffer_open(
    Decoder_Struct *st_ivas,
    const TC_BUFFER_MODE tc_buffer_mode,
    const int16_t nchan_transport_jbm,
    const int16_t nchan_transport_internal,
    const int16_t n_samples_granularity 
);

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

@@ -3791,15 +3805,6 @@ void ivas_param_mc_dec_read_BS(
);

#ifdef JBM_TSM_ON_TCS
#ifndef JBM_COMMON_INTERPOLATOR
void ivas_param_mc_dec_compute_interpolator(
    const uint16_t bAttackPresent, /* i  : flag indicating if we have a transient in the current frame */
    const uint16_t attackPos,      /* i  : position of the transient                                   */
    const uint16_t interp_length,  /* i  : number of interpolation values to be calculated             */
    float *interpolator            /* o  : interpolator                                                */
);
#endif

void ivas_param_mc_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         */
@@ -4265,10 +4270,8 @@ void ivas_spar_dec_digest_tc(

ivas_error ivas_sba_dec_digest_tc(
    Decoder_Struct *st_ivas,           /* i/o: IVAS decoder handle          */
    const int16_t nchan_transport,      /* i  : number of transport channels */
    const int16_t nCldfbSlots,     /* i  : number of CLDFB slots        */
    const int16_t nSamplesForRendering, /* i  : number of samples provided   */
    float *data[]                       /* i  : transport channel samples    */
    const int16_t nSamplesForRendering /* i  : number of samples provided   */
);

void ivas_sba_dec_render(
@@ -5064,7 +5067,8 @@ void ivas_ism_get_stereo_gains(
void ivas_mc2sba(
    IVAS_OUTPUT_SETUP hIntSetup,                                /* i  : Format of decoder output                        */
#ifdef JBM_TSM_ON_TCS
    float *buffer_td[],                                         /* i/o: MC signals (on input) and the HOA3 (on output)   */
    float *in_buffer_td[],                                      /* i  : MC signals (on input) and the HOA3 (on output)   */
    float *buffer_td[],                                         /* o  : MC signals (on input) and the HOA3 (on output)   */
#else
    float buffer_td[][L_FRAME48k],                              /* i/o: MC signals (on input) and the HOA3 (on output)   */
#endif
@@ -5166,6 +5170,7 @@ void ivas_ls_setup_conversion(
    Decoder_Struct *st_ivas,                                    /* i  : IVAS decoder structure                          */
    const int16_t output_frame,                                 /* i  : frame length                                    */
#ifdef JBM_TSM_ON_TCS
    float *input[],             /* i  : LS input/output synthesis signal */
    float *output[]             /* i/o: LS input/output synthesis signal */
#else
    float output[][L_FRAME48k] /* i/o: LS input/output synthesis signal */
+0 −2
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@
#define JBM_TSM_ON_TCS                                  /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */
#ifdef JBM_TSM_ON_TCS
/*#define DEBUG_JBM_NO_RENDERING*/
/*#define DIRAC_NO_OMNI_DIFFUSE_COMPENSATION*/
#define JBM_PARAMMC
#define JBM_STEREO
#define JBM_SBA
@@ -174,7 +173,6 @@
#define JBM_PARAM_ISM
/*#define JBM_DIRAC_DEBUG_BE*/
#define JBM_DEV  /*remove after all formats work...*/
#define JBM_COMMON_INTERPOLATOR
#endif
/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+5 −1
Original line number Diff line number Diff line
@@ -177,7 +177,11 @@ float sum2_f(
void set_c(
    int8_t y[],     /* i/o: Vector to set                                   */
    const int8_t a, /* i  : Value to set the vector to                      */
    const int16_t N /* i  : Lenght of the vector                            */
#ifdef JBM_TSM_ON_TCS
    const int32_t N /* i  : Length of the vector                */
#else
    const int16_t N /* i  : Length of the vector                */
#endif
);

void set_s(
+4 −0
Original line number Diff line number Diff line
@@ -210,7 +210,11 @@ float sum2_f(
void set_c(
    int8_t y[],     /* i/o: Vector to set                       */
    const int8_t a, /* i  : Value to set the vector to          */
#ifdef JBM_TSM_ON_TCS
    const int32_t N  /* i  : Length of the vector                */
#else
    const int16_t N /* i  : Length of the vector                */
#endif
)
{
    int16_t i;
Loading