Commit 991344dd authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'vbap_cleanup_rend_fixes' into 'main'

Clean-up for intermediate in vbap and fix for renderer failures

See merge request !138
parents ebfa1fa8 11680408
Loading
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -947,8 +947,7 @@ static ivas_error ivas_dirac_rend_config_fx(

    return error;
}
#endif

#else
static ivas_error ivas_dirac_rend_config(
    Decoder_Struct *st_ivas,                 /* i/o: IVAS decoder structure  */
    const DIRAC_CONFIG_FLAG flag_config_inp, /* i/ : Flag determining if we open or reconfigure the DirAC decoder */
@@ -1372,7 +1371,6 @@ static ivas_error ivas_dirac_rend_config(
        {
            vbap_free_data(&(st_ivas->hVBAPdata));
        }

        if ((error = vbap_init_data(&(st_ivas->hVBAPdata), ls_azimuth, ls_elevation, nchan_out_woLFE, st_ivas->ivas_format)) != IVAS_ERR_OK)
        {
            return error;
@@ -1580,7 +1578,7 @@ static ivas_error ivas_dirac_rend_config(

    return error;
}

#endif
/*-------------------------------------------------------------------------
 * ivas_dirac_dec_config()
 *
+2 −0
Original line number Diff line number Diff line
@@ -1623,8 +1623,10 @@ ivas_error ivas_init_decoder(
                }
                ELSE
                {
#ifndef IVAS_FLOAT_FIXED
                    /*TODO/observation : not hit by decoder tests*/
                    vbap_determine_gains( st_ivas->hVBAPdata, st_ivas->hLsSetupCustom->separate_ch_gains, 0, 0, 0 );
#endif
                }
            }

+20 −20
Original line number Diff line number Diff line
@@ -242,25 +242,6 @@ void efap_determine_gains_fixed(
 * Amplitude Panning VBAP prototypes
 *----------------------------------------------------------------------------------*/

ivas_error vbap_init_data(
    VBAP_HANDLE *hVBAPdata,                                     /* i/o: handle for VBAP data structure that will be initialized  */
    const float *speaker_node_azi_deg,                          /* i  : vector of speaker node azimuths (positive left)          */
    const float *speaker_node_ele_deg,                          /* i  : vector of speaker node elevations (positive up)          */
    const int16_t num_speaker_nodes,                            /* i  : number of speaker nodes in the set                       */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                              */
);

void vbap_free_data(
    VBAP_HANDLE *hVBAPdata                                      /* i/o: VBAP handle to be freed                                  */
);

void vbap_determine_gains(
    const VBAP_HANDLE hVBAPdata,                                /* i  : VBAP structure                                           */
    float *gains,                                               /* o  : gain vector for speaker nodes for given direction        */
    const int16_t azi_deg,                                      /* i  : azimuth in degrees for panning direction (positive left) */
    const int16_t ele_deg,                                      /* i  : elevation in degrees for panning direction (positive up) */
    const int16_t use_object_mode                               /* i  : select between object mode panning and spatial mode panning */
);
#ifdef IVAS_FLOAT_FIXED
ivas_error vbap_init_data_fx(
    VBAP_HANDLE *hVBAPdata,                                     /* i/o: handle for VBAP data structure that will be initialized  */
@@ -269,7 +250,6 @@ ivas_error vbap_init_data_fx(
    const Word16 num_speaker_nodes,                            /* i  : number of speaker nodes in the set                       */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                              */
);

void vbap_determine_gains_fx(
    const VBAP_HANDLE hVBAPdata,  /* i  : prepared VBAP structure                                       */
    Word32 *gains_fx,                 /* o  : gain vector for loudspeakers for given direction              */
@@ -280,6 +260,26 @@ void vbap_determine_gains_fx(
void vbap_free_data_fx(
    VBAP_HANDLE *hVBAPdata                                      /* i/o: VBAP handle to be freed                                  */
);
#else
ivas_error vbap_init_data(
    VBAP_HANDLE *hVBAPdata,                                     /* i/o: handle for VBAP data structure that will be initialized  */
    const float *speaker_node_azi_deg,                          /* i  : vector of speaker node azimuths (positive left)          */
    const float *speaker_node_ele_deg,                          /* i  : vector of speaker node elevations (positive up)          */
    const int16_t num_speaker_nodes,                            /* i  : number of speaker nodes in the set                       */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                              */
);

void vbap_determine_gains(
    const VBAP_HANDLE hVBAPdata,                                /* i  : VBAP structure                                           */
    float *gains,                                               /* o  : gain vector for speaker nodes for given direction        */
    const int16_t azi_deg,                                      /* i  : azimuth in degrees for panning direction (positive left) */
    const int16_t ele_deg,                                      /* i  : elevation in degrees for panning direction (positive up) */
    const int16_t use_object_mode                               /* i  : select between object mode panning and spatial mode panning */
);

void vbap_free_data(
    VBAP_HANDLE *hVBAPdata                                      /* i/o: VBAP handle to be freed                                  */
);
#endif


+7 −6
Original line number Diff line number Diff line
@@ -600,12 +600,6 @@ typedef struct vbap_data_structure
    int16_t top_virtual_speaker_node_index; /* These indices can be negative */
    int16_t bottom_virtual_speaker_node_index;
    int16_t back_virtual_speaker_node_index;
    float *bottom_virtual_speaker_node_division_gains;
    float *top_virtual_speaker_node_division_gains;
    float *back_virtual_speaker_node_division_gains;
    float *object_mode_bottom_virtual_speaker_node_division_gains;
    float *object_mode_top_virtual_speaker_node_division_gains;
    float *object_mode_back_virtual_speaker_node_division_gains;
#ifdef IVAS_FLOAT_FIXED
    Word16 *bottom_virtual_speaker_node_division_gains_fx;
    Word16 *top_virtual_speaker_node_division_gains_fx;
@@ -613,6 +607,13 @@ typedef struct vbap_data_structure
    Word16 *object_mode_bottom_virtual_speaker_node_division_gains_fx;
    Word16 *object_mode_top_virtual_speaker_node_division_gains_fx;
    Word16 *object_mode_back_virtual_speaker_node_division_gains_fx;
#else
    float *bottom_virtual_speaker_node_division_gains;
    float *top_virtual_speaker_node_division_gains;
    float *back_virtual_speaker_node_division_gains;
    float *object_mode_bottom_virtual_speaker_node_division_gains;
    float *object_mode_top_virtual_speaker_node_division_gains;
    float *object_mode_back_virtual_speaker_node_division_gains;
#endif
} VBAP_DATA, *VBAP_HANDLE;

+508 −731

File changed.

Preview size limit exceeded, changes collapsed.

Loading