Commit d2e4835a authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into nokia/masa-diff-tool

parents ef858620 123f351a
Loading
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -481,12 +481,10 @@ int main(
            goto cleanup;
        }

#ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR
        if ( !arg.renderConfigEnabled && ( arg.render_num_subframes != asked_num_subframes ) )
        {
            fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" );
        }
#endif
    }

    /*------------------------------------------------------------------------------------------*
+0 −39
Original line number Diff line number Diff line
@@ -48,9 +48,6 @@
#include "rotation_file_reader.h"
#include "aeid_file_reader.h"
#include "split_render_file_read_write.h"
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
#include "split_rend_bfi_file_reader.h"
#endif
#include "vector3_pair_file_reader.h"
#ifdef DEBUGGING
#include "debug.h"
@@ -170,9 +167,6 @@ typedef struct
    int16_t numInMetadataFiles;
    char outMetadataFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    char splitRendBFIFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#endif
    char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char externalOrientationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
@@ -223,9 +217,6 @@ typedef enum
    CmdLnOptionId_listFormats,
    CmdLnOptionId_inputGain,
    CmdLnOptionId_outputMetadata,
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    CmdLnOptionId_SplitRendBFIFile,
#endif
    CmdLnOptionId_referenceVectorFile,
    CmdLnOptionId_exteriorOrientationFile,
    CmdLnOptionId_framing,
@@ -284,14 +275,6 @@ static const CmdLnParser_Option cliOptions[] = {
        .matchShort = "om",
        .description = "coded metadata file for BINAURAL_SPLIT_PCM output mode",
    },
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    {
        .id = CmdLnOptionId_SplitRendBFIFile,
        .match = "post_rend_bfi_file",
        .matchShort = "prbfi",
        .description = "Split rendering option: bfi file",
    },
#endif
    {
        .id = CmdLnOptionId_refRotFile,
        .match = "reference_rotation_file",
@@ -696,9 +679,6 @@ int main(
    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;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
#endif
    Vector3PairFileReader *referenceVectorReader = NULL;
    hrtfFileReader *hrtfFileReader = NULL;
    IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL;
@@ -829,13 +809,6 @@ int main(
        }
    }

#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    if ( !isEmptyString( args.splitRendBFIFilePath ) )
    {
        convert_backslash( args.splitRendBFIFilePath );
        SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader );
    }
#endif

    if ( !isEmptyString( args.externalOrientationFilePath ) )
    {
@@ -2080,9 +2053,6 @@ cleanup:
    }

    split_rend_reader_writer_close( &hSplitRendFileReadWrite );
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    SplitRendBFIFileReader_close( &splitRendBFIReader );
#endif

    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
    {
@@ -2699,9 +2669,6 @@ static CmdlnArgs defaultArgs(

    clearString( args.headRotationFilePath );
    clearString( args.outMetadataFilePath );
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    clearString( args.splitRendBFIFilePath );
#endif
    clearString( args.referenceVectorFilePath );
    clearString( args.referenceRotationFilePath );
    clearString( args.customHrtfFilePath );
@@ -2808,12 +2775,6 @@ static void parseOption(
            assert( numOptionValues == 1 );
            strncpy( args->outMetadataFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
        case CmdLnOptionId_SplitRendBFIFile:
            assert( numOptionValues == 1 );
            strncpy( args->splitRendBFIFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
#endif
        case CmdLnOptionId_referenceVectorFile:
            assert( numOptionValues == 1 );
            strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
+0 −4
Original line number Diff line number Diff line
@@ -3580,10 +3580,6 @@ void ivas_sba_dirac_stereo_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float *output[CPE_CHANNELS],                                /* o  : output synthesis signal                 */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const int16_t mcmasa                                        /* i  : McMASA flag                             */
#endif
);

void ivas_sba_dirac_stereo_config(
+0 −8
Original line number Diff line number Diff line
@@ -162,14 +162,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
#define FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR    /* Dolby: Fix for issue 1449: renderer frame size unclear in ISAR */
#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: remove unused noise generator from ISAR */
#define FIX_1495_INCORRECT_FREAD_CALL                   /* Eri: Switched size and number of elements in fread call. */
#define FIX_1494_SET_SPLITBFI_UNUSED                    /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */
#define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE          /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define REMOVE_CAM_FROM_IVAS                            /* VA: basop issue 210: remove obsoelte CAM code from IVAS */
#define FIX_2344_ALIGN_PREPROC                          /* VA: basop issue 2344: Align pre_proc_ivas() between FLP and BASOP */
#define FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA              /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */

+1 −45
Original line number Diff line number Diff line
@@ -106,24 +106,6 @@ ivas_error ivas_dec(
     * Decoding + pre-rendering
     *----------------------------------------------------------------*/

#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    if ( st_ivas->bfi && st_ivas->ini_frame == 0 )
    {
        /* zero output when first frame(s) is lost */
        for ( n = 0; n < nchan_out; n++ )
        {
            set_f( p_output[n], 0.0f, output_frame );
        }

#ifdef DEBUG_MODE_INFO
        create_sce_dec( st_ivas, 0, ivas_total_brate );
        output_debug_mode_info_dec( st_ivas->hSCE[0]->hCoreCoder, 1, output_frame, NULL );
        destroy_sce_dec( st_ivas->hSCE[0] );
        st_ivas->hSCE[0] = NULL;
#endif
    }
    else
#endif
    if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
        st_ivas->hCPE[0]->element_brate = ivas_total_brate;
@@ -270,11 +252,7 @@ ivas_error ivas_dec(
                ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );
            }

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
            ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame );
#else
            ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, st_ivas->ivas_format == MC_FORMAT );
#endif
        }
        else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) )
        {
@@ -476,11 +454,7 @@ ivas_error ivas_dec(

            ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
            ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame );
#else
            ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame, 0 );
#endif
        }

        /* HP filtering */
@@ -706,11 +680,7 @@ ivas_error ivas_dec(

            if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */
            {
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
                ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame );
#else
                ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, 1 );
#endif
            }

            /* HP filtering */
@@ -1417,9 +1387,7 @@ ivas_error ivas_jbm_dec_flush_renderer(
    int16_t n_samples_still_available;
    int16_t n_slots_still_available;
    int16_t n_samples_to_render;
#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    int16_t ch_idx;
#endif
    int16_t n_samples_granularity;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
    float *p_output[MAX_LS_CHANNELS + MAX_NUM_OBJECTS];
@@ -1429,12 +1397,10 @@ ivas_error ivas_jbm_dec_flush_renderer(
        return IVAS_ERR_OK;
    }

#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
    {
        p_output[ch_idx] = st_ivas->p_output_f[ch_idx];
    }
#endif

    *nSamplesRendered = 0;
    hTcBuffer = st_ivas->hTcBuffer;
@@ -1453,10 +1419,6 @@ ivas_error ivas_jbm_dec_flush_renderer(

    if ( n_slots_still_available )
    {
#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        int16_t ch_idx;

#endif
        /* render available full slots (with new lower granularity) */
        for ( ch_idx = 0; ch_idx < max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); ch_idx++ )
        {
@@ -1476,12 +1438,6 @@ ivas_error ivas_jbm_dec_flush_renderer(
        hTcBuffer->n_samples_flushed = n_samples_to_render;
        hTcBuffer->n_samples_rendered = 0;

#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
        {
            p_output[ch_idx] = st_ivas->p_output_f[ch_idx];
        }
#endif

        if ( st_ivas->ivas_format == ISM_FORMAT )
        {
Loading