Commit 3b8c3c04 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'ivas-float-update' into 000_ref_mdct-stereo-comfort-noise-fix

parents 6b8d8319 a6f70e20
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -469,11 +469,15 @@
    <ClCompile Include="..\lib_com\ivas_lfe_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_rotation_com.c" />
    <ClCompile Include="..\lib_com\ivas_limiter.c" />
    <ClCompile Include="..\lib_com\ivas_osba_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_rotation_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_limiter.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+9 −9
Original line number Diff line number Diff line
@@ -682,8 +682,8 @@ int main(
    RotFileReader *headRotReader = NULL;
    RotFileReader *externalOrientationFileReader = NULL;
    RotFileReader *referenceRotReader = NULL;
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[RENDERER_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[RENDERER_MAX_INPUT_CHANNELS];
    int16_t cldfb_in_flag, CLDFBframeSize_smpls;
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
    Vector3PairFileReader *referenceVectorReader = NULL;
@@ -3876,7 +3876,7 @@ static ivas_error parseLfePanMtxFile(
       any subsequent issue in file reading will gracefully exit the function */
    for ( lfe_in = 0; lfe_in < RENDERER_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
    {
        for ( i = 0; i < IVAS_MAX_OUTPUT_CHANNELS; i++ )
        for ( i = 0; i < RENDERER_MAX_OUTPUT_CHANNELS; i++ )
        {
            ( *lfePanMtx )[lfe_in][i] = 0.0f;
        }
@@ -3904,7 +3904,7 @@ static ivas_error parseLfePanMtxFile(
            {
                continue;
            }
            if ( ch_out > IVAS_MAX_OUTPUT_CHANNELS )
            if ( ch_out > RENDERER_MAX_OUTPUT_CHANNELS )
            {
                break;
            }
@@ -3945,13 +3945,13 @@ static void convertInputBuffer(
    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numFloatPcmSamples;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
        float fIn[RENDERER_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];

        numFloatPcmSamples = numFloatSamplesPerChannel >> 1;
        numCldfbBands = numFloatPcmSamples / IVAS_CLDFB_NO_COL_MAX;

        /* CLDFB Analysis*/
        assert( numIntSamplesPerChannel <= IVAS_MAX_OUTPUT_CHANNELS * IVAS_MAX_FRAME_SIZE );
        assert( numIntSamplesPerChannel <= RENDERER_MAX_OUTPUT_CHANNELS * IVAS_MAX_FRAME_SIZE );
        for ( smpl = 0; smpl < numFloatPcmSamples; ++smpl )
        {
            for ( chnl = 0; chnl < numChannels; ++chnl )
@@ -4026,9 +4026,9 @@ static void convertOutputBuffer(
    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numPcmSamples, b;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
        float re[IVAS_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];
        float im[IVAS_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];
        float fIn[RENDERER_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
        float re[RENDERER_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];
        float im[RENDERER_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];

        numPcmSamples = numSamplesPerChannel >> 1;
        numCldfbBands = numPcmSamples / IVAS_CLDFB_NO_COL_MAX;
+4 −5
Original line number Diff line number Diff line
@@ -50,8 +50,7 @@
#define IVAS_MAX_BITS_PER_FRAME ( 512000 / IVAS_NUM_FRAMES_PER_SEC )                 /* maximum bits per frame; corresponds to maximum bitrate of 512 kbps */

#define IVAS_MAX_NUM_OBJECTS       4
#define IVAS_MAX_INPUT_CHANNELS    16
#define IVAS_MAX_OUTPUT_CHANNELS   16 /* Note: there is an exception for OSBA and EXT otuput where it can be 20 (HOA3 + 4 ISM channels) */
#define IVAS_MAX_LS_CHANNELS       16
#define IVAS_CLDFB_NO_COL_MAX      16
#define IVAS_CLDFB_NO_CHANNELS_MAX 60

@@ -190,10 +189,10 @@ typedef struct ivas_LS_setup_custom IVAS_LSSETUP_CUSTOM_STRUCT;
typedef struct _IVAS_LS_CUSTOM_LAYOUT
{
    int16_t num_spk;
    float azimuth[IVAS_MAX_OUTPUT_CHANNELS];
    float elevation[IVAS_MAX_OUTPUT_CHANNELS];
    float azimuth[IVAS_MAX_LS_CHANNELS];
    float elevation[IVAS_MAX_LS_CHANNELS];
    int16_t num_lfe;
    int16_t lfe_idx[IVAS_MAX_OUTPUT_CHANNELS];
    int16_t lfe_idx[IVAS_MAX_LS_CHANNELS];

} IVAS_CUSTOM_LS_DATA;

+9 −5
Original line number Diff line number Diff line
@@ -128,12 +128,12 @@ typedef enum
 * IVAS general constants
 *----------------------------------------------------------------------------------*/

#define MAX_INPUT_CHANNELS                      16                          /* Maximum number of input channels (HOA 3rd order), == IVAS_MAX_INPUT_CHANNELS */
#define MAX_INPUT_CHANNELS                      16                          /* Maximum number of input channels (HOA 3rd order or IVAS_MAX_LS_CHANNELS) without separate objects in combined formats */
#define MAX_TRANSPORT_CHANNELS                  12                          /* Maximum number of transport channels */
#define MAX_INTERN_CHANNELS                     16                          /* Maximum number of intern channels (HOA 3rd order) */
#define HEAD_ROTATION_HOA_ORDER                 3                           /* HOA 3rd order */
#define MAX_CICP_CHANNELS                       16                          /* max channels for loudspeaker layouts (16 for custom layouts)*/
#define MAX_OUTPUT_CHANNELS                     16                          /* Maximum number of output channels (HOA 3rd order) without separate objects in combined formats */
#define MAX_LS_CHANNELS                         16                          /* max channels for loudspeaker layouts (16 for custom layouts), == IVAS_MAX_LS_CHANNELS */
#define MAX_OUTPUT_CHANNELS                     16                          /* Maximum number of output channels (HOA 3rd order or IVAS_MAX_LS_CHANNELS) without separate objects in combined formats */
#define MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN     2                           /* Maximum number of output channels with non diegetic panning */

#define BINAURAL_CHANNELS                       2                           /* number of channels for binaural output configuration */
@@ -175,7 +175,11 @@ typedef enum
#define MAX_JBM_L_FRAME48k                      1920
#define MAX_JBM_L_FRAME_NS                      40000000L
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS
#define MAX_CLDFB_DIGEST_CHANNELS               3                           /* == maximum of ParamISM TCs and ParamMC TCs */
#else
#define MAX_CLDFB_DIGEST_CHANNELS               (FOA_CHANNELS + MAX_NUM_OBJECTS)
#endif

typedef enum
{
@@ -1523,7 +1527,7 @@ typedef enum
 * TD Binaural Object renderer
 *----------------------------------------------------------------------------------*/

#define MAX_NUM_TDREND_CHANNELS                 MAX_CICP_CHANNELS           /* max. number of channels in TD renderer (objects or loudspeaker channels) */
#define MAX_NUM_TDREND_CHANNELS                 MAX_LS_CHANNELS             /* max. number of channels in TD renderer (objects or loudspeaker channels) */

#define SFX_SPAT_BIN_MAX_NO_OF_OUTPUT_SAMPLES   288                         /* 288 = 6 msec @ 48 kHz.                                           */
#define HRTF_MODEL_N_SECTIONS                   3                           /* No. sections used in approximate evaluation of model             */
@@ -1626,7 +1630,7 @@ typedef enum

#define IVAS_MAX_FB_MIXER_OUT_CH                IVAS_SPAR_MAX_CH
#define IVAS_MAX_SPAR_FB_MIXER_IN_CH            IVAS_SPAR_MAX_CH
#define IVAS_MAX_FB_MIXER_IN_CH                 MAX_CICP_CHANNELS
#define IVAS_MAX_FB_MIXER_IN_CH                 MAX_LS_CHANNELS

#define MAX_NUM_BANDS_DIFF_NON48K               3

+8 −6
Original line number Diff line number Diff line
@@ -887,12 +887,13 @@ int16_t ivas_jbm_dec_get_num_tc_channels(
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder handle                                         */
);

#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS
void ivas_jbm_dec_copy_tc_no_tsm( 
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                                         */
    float *tc[],                                                /* i  : transport channels                                          */
    const int16_t output_frame                                  /* i  : output frame size                                           */
);

#endif
void ivas_jbm_dec_get_md_map_even_spacing(
    const int16_t len,                                          /* i  : length of the modfied frames in metadata slots              */
    const int16_t subframe_len,                                 /* i  : default length of a subframe                                */
@@ -1141,7 +1142,7 @@ void ivas_ism_dec_digest_tc(
void ivas_param_ism_dec_digest_tc(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                         */
    const uint16_t nCldfbSlots,                                 /* i  : number of CLDFB slots in transport channels */
    float *transport_channels_f[]                               /* i  : synthesized core-coder transport channels/DirAC output  */
    float *p_data_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */
);

void ivas_param_ism_dec_dequant_md(
@@ -1153,13 +1154,14 @@ void ivas_param_ism_dec_prepare_renderer(
    const uint16_t nCldfbSlots                                  /* i  : number of CLDFB slots in transport channels */
);

#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS
void ivas_ism_param_dec_tc_gain_ajust(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                         */
    const uint16_t nSamples,                                    /* i  : number of samples to be compensate          */
    const uint16_t nFadeLength,                                 /* i  : length of the crossfade in samples          */
    float *transport_channels_f[]                               /* i  : synthesized core-coder transport channels/DirAC output  */
);

#endif
void ivas_param_ism_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                         */
    const uint16_t nSamplesAsked,                               /* i  : number of CLDFB slots requested             */
@@ -5327,9 +5329,9 @@ void ivas_ls_setup_conversion_process_mdct_param_mc(
void ivas_lssetupconversion_process_param_mc(
    Decoder_Struct *st_ivas,                                    /* i/o: LS setup conversion renderer handle             */
    const int16_t num_timeslots,                                /* i  : number of time slots to process                 */
    float Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals                                         */
    float Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals                                         */
    int16_t channel_active[MAX_CICP_CHANNELS]                                                                /* i  : bitmap indicating which output channels are active */
    float Cldfb_RealBuffer_InOut[MAX_LS_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals                                         */
    float Cldfb_ImagBuffer_InOut[MAX_LS_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals                                         */
    int16_t channel_active[MAX_LS_CHANNELS]                                                                /* i  : bitmap indicating which output channels are active */
);


Loading