Commit 38ff332b authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch '1438_basop_ivas_fl_mr_1230' into 'main-pc'

[allow-regression][non-BE] BASOP porting: fix for issue 1438

See merge request !1329
parents f9caa3f4 2f7f5400
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#        cmake --build . --config Release


cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10)

set(CMAKE_C_STANDARD 99)

@@ -121,7 +121,7 @@ if(WMOPS)
  add_definitions("-DWMOPS=1")
endif()

project(stereo-evs)
project(stereo-evs LANGUAGES C)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # make Visual Studio projects look nicer
include(CTest)

+34 −9
Original line number Diff line number Diff line
@@ -223,11 +223,19 @@ ivas_error ivas_dirac_config_fx(
    IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) )
    {
        // 100861_dirac_dec
#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
        ivas_dirac_config_bands_fx( band_grouping, IVAS_MAX_NUM_BANDS, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft, 1 );
#else
        ivas_dirac_config_bands_fx( band_grouping, IVAS_MAX_NUM_BANDS, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft );
#endif
    }
    ELSE
    {
#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
        ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft, 1 );
#else
        ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft );
#endif
    }

    return error;
@@ -235,11 +243,22 @@ ivas_error ivas_dirac_config_fx(


/*-------------------------------------------------------------------------
 * ivas_dirac_sba_config_bands()
 * ivas_dirac_config_bands_fx()
 *
 * DirAC Configuration freq. band function; used also in MASA decoder
 *------------------------------------------------------------------------*/

#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
void ivas_dirac_config_bands_fx(
    Word16 *band_grouping,             /* o  : band grouping                           */
    const Word16 nbands,               /* i  : number of bands                         */
    const Word16 max_band,             /* i  : maximal band index +1                   */
    Word16 *dirac_to_spar_md_bands,    /* o  : mapping of DirAC parameter band index to SPAR FB band index */
    const Word8 useLowerBandRes,       /* i  : flag indicating lower band resolution for DirAC             */
    const Word16 enc_param_start_band, /* i  : band index of first DirAC parameter band                    */
    IVAS_FB_MIXER_HANDLE hFbMdft,
    const Word8 BandGroupLowRes )
#else
void ivas_dirac_config_bands_fx(
    Word16 *band_grouping, /* o  : band grouping                          */
    const Word16 nbands,   /* i  : number of bands                        */
@@ -248,6 +267,7 @@ void ivas_dirac_config_bands_fx(
    const Word8 useLowerBandRes,
    const Word16 enc_param_start_band,
    IVAS_FB_MIXER_HANDLE hFbMdft )
#endif
{
    Word16 i;
    {
@@ -307,6 +327,10 @@ void ivas_dirac_config_bands_fx(
                Word16 step = DIRAC_LOW_BANDRES_STEP;
                move16();
                Word16 reduced_band;
#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
                IF( BandGroupLowRes )
#endif
                {
                    FOR( ( band = enc_param_start_band + 2, reduced_band = enc_param_start_band + 1 ); band <= DIRAC_MAX_NBANDS; ( band += step, reduced_band++ ) )
                    {
                        band_grouping[reduced_band] = band_grouping[band];
@@ -317,6 +341,7 @@ void ivas_dirac_config_bands_fx(
                        band_grouping[reduced_band] = max_band;
                        move16();
                    }
                }
                FOR( ( band = enc_param_start_band + ( DIRAC_MAX_NBANDS - enc_param_start_band ) / 2 - 1, reduced_band = DIRAC_MAX_NBANDS - 1 ); band >= enc_param_start_band; ( band--, reduced_band -= step ) )
                {
                    dirac_to_spar_md_bands[reduced_band] = dirac_to_spar_md_bands[band];
+12 −0
Original line number Diff line number Diff line
@@ -4985,6 +4985,17 @@ void ivas_sba2mc_cldfb_fixed(
    const Word32 *hoa_dec_mtx                                                /* i  : HOA decoding mtx                */
);

#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
void ivas_dirac_config_bands_fx(
    Word16 *band_grouping,             /* o  : band grouping                           */
    const Word16 nbands,               /* i  : number of bands                         */
    const Word16 max_band,             /* i  : maximal band index +1                   */
    Word16 *dirac_to_spar_md_bands,    /* o  : mapping of DirAC parameter band index to SPAR FB band index */
    const Word8 useLowerBandRes,       /* i  : flag indicating lower band resolution for DirAC             */
    const Word16 enc_param_start_band, /* i  : band index of first DirAC parameter band                    */
    IVAS_FB_MIXER_HANDLE hFbMdft,
    const Word8 BandGroupLowRes );
#else
void ivas_dirac_config_bands_fx(
    Word16 *band_grouping,             /* o  : band grouping                           */
    const Word16 nbands,               /* i  : number of bands                         */
@@ -4993,6 +5004,7 @@ void ivas_dirac_config_bands_fx(
    const Word8 useLowerBandRes,       /* i  : flag indicating lower band resolution for DirAC             */
    const Word16 enc_param_start_band, /* i  : band index of first DirAC parameter band                    */
    IVAS_FB_MIXER_HANDLE hFbMdft );
#endif

void ivas_dirac_dec_close_fx(
    DIRAC_DEC_HANDLE *hDirAC_out );
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@
#define FIX_929_RENDERER_CMDL                   /* Nokia: issue #929: renderer command line option */
#define NONBE_FIX_BINAURAL_ROOM_IR_REVERBERATOR               /* FhG: re-enable acidentially disabled reverberator for BINAURAL_ROOM_IR */
#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM   /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */
#define NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING           /* Dlb: issue 907: fix for band mapping at VLBR */  

/* #################### End BASOP porting switches ############################ */

+8 −1
Original line number Diff line number Diff line
@@ -1624,7 +1624,11 @@ void ivas_qmetadata_to_dirac_fx(
            move16();
            hDirAC->hConfig->nbands = 5;
            move16();
#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
            ivas_dirac_config_bands_fx( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, NULL, 0, 0, NULL, 1 );
#else
            ivas_dirac_config_bands_fx( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, NULL, 0, 0, NULL );
#endif
            nbands = 5;
            move16();
        }
@@ -1643,8 +1647,11 @@ void ivas_qmetadata_to_dirac_fx(
                move16();
            }

#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING
            ivas_dirac_config_bands_fx( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hDirAC->hConfig->enc_param_start_band, hDirAC->hFbMdft, 0 );
#else
            ivas_dirac_config_bands_fx( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hDirAC->hConfig->enc_param_start_band, hDirAC->hFbMdft );

#endif
            nbands = hDirAC->hConfig->nbands;
            move16();
            if ( hQMetaData->q_direction[0].cfg.nblocks == 0 )
Loading