Commit 47eb8411 authored by vaclav's avatar vaclav
Browse files

port float MR

parent 829228ec
Loading
Loading
Loading
Loading
Loading
+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;

+5 −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 */
@@ -1522,7 +1522,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             */
@@ -1625,7 +1625,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

+3 −3
Original line number Diff line number Diff line
@@ -5328,9 +5328,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 */
);


+1 −1
Original line number Diff line number Diff line
@@ -1826,7 +1826,7 @@ const int16_t param_mc_coding_band_mapping_10[10] =
    1, 1, 1, 1, 1, 0, 0, 0, 0, 0
};
const int16_t Param_MC_index[MAX_CICP_CHANNELS] =
const int16_t Param_MC_index[MAX_LS_CHANNELS] =
{
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
};
Loading