Commit dc8ae241 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into...

- Merge remote-tracking branch 'remotes/origin/main' into basop-2313-missing-hf-synth-reset-for-output-at-16-khz
parents 5ef21d56 b11563c0
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -172,7 +172,9 @@ 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,7 +225,9 @@ typedef enum
    CmdLnOptionId_listFormats,
    CmdLnOptionId_inputGain,
    CmdLnOptionId_outputMetadata,
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    CmdLnOptionId_SplitRendBFIFile,
#endif
    CmdLnOptionId_referenceVectorFile,
    CmdLnOptionId_exteriorOrientationFile,
    CmdLnOptionId_framing,
@@ -282,12 +286,14 @@ 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",
@@ -763,7 +769,9 @@ 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;
@@ -893,11 +901,13 @@ 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 ) )
    {
        if ( RotationFileReader_open( args.externalOrientationFilePath, &externalOrientationFileReader ) != IVAS_ERR_OK )
@@ -2183,7 +2193,9 @@ 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 )
    {
@@ -2785,7 +2797,9 @@ 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 );
@@ -2892,10 +2906,12 @@ 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 );
+3 −0
Original line number Diff line number Diff line
@@ -595,6 +595,9 @@ void cldfbAnalysis_ts_fx_var_q(
    IF( NE_16( h_cldfb->Q_cldfb_state, *q_cldfb ) )
    {
        Word16 norm_st = L_norm_arr( timeBuffer_fx, offset );
#ifdef FIX_2257_INCR_GUARD_BITS
        norm_st = sub( norm_st, find_guarded_bits_fx( shr( h_cldfb->no_channels, 2 ) ) );
#endif
        IF( GE_16( norm_st, sub( *q_cldfb, h_cldfb->Q_cldfb_state ) ) )
        {
            scale_sig32( timeBuffer_fx, offset, sub( *q_cldfb, h_cldfb->Q_cldfb_state ) );
+41 −31
Original line number Diff line number Diff line
@@ -1193,7 +1193,10 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
             *--------------------------------------------------------------------------------------*/
            idx_g_fx = (Word16) get_next_indice_fx( st_fx, 5 );
            VDQ_vec_fx( y_gainQ_fx, YGain_mean_LR_fx, YGain_dic1_LR_fx, idx_g_fx, 3 );

#ifdef FIX_2312_CONDITION_MISSING_GSC_DEC_LR
            IF( !( coder_type == INACTIVE && st_fx->tdm_LRTD_flag == 0 && EQ_16( st_fx->idchan, 1 ) ) || GT_32( st_fx->core_brate, GSC_LRES_GAINQ_LIMIT ) )
            {
#endif
                idx_g_fx = (Word16) get_next_indice_fx( st_fx, 5 );
                VDQ_vec_fx( y_gainQ_fx + 3, YGain_mean_LR_fx + 3, YGain_dic2_LR_fx, idx_g_fx, 4 );

@@ -1232,6 +1235,13 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
                move16();
                y_gainQ_fx[14] = y_gain_tmp3_fx[3]; /*Q12*/
                move16();
#ifdef FIX_2312_CONDITION_MISSING_GSC_DEC_LR
            }
            ELSE
            {
                set16_fx( y_gainQ_fx + 3, 0, MBANDS_GN16k - 3 );
            }
#endif
        }
        ELSE
        {
+6 −0
Original line number Diff line number Diff line
@@ -113,9 +113,12 @@
#define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR              /* Dolby: Remove unused psNoiseGen from ISAR */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX  /* FhG/VA: init nb_bits_metadata to zero */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
#define FIX_2290_COPY_OF_UNINIT_DATA                    /* VA: prevent the copy of un-initialized data */
#define CLEANUP_ACELP_ENC                               /* VA: basop issue 2304: Remove duplicated code in excitation encoding in the ACELP core */
#define CLEANUP_VBR_CAM_ENC                             /* VA: basop issue 2299: Remove unused core-encoder VBR and CAM code */
#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 */

/* #################### End BE switches ################################## */

@@ -132,7 +135,10 @@
#define FIX_1381_BWD                                    /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */
#define FIX_2285_CODE_DECODER_INIT_BW                   /* VA: basop issue 2285: fix core-decoder initialization bandwidth */
#define FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN      /* Dolby: Fix missing update of low-rate pitch gain in the S/M classifier */
#define FIX_2257_INCR_GUARD_BITS                        /* FhG: take correct rendering frame-size into account for guard-bits calculation */
#define FIX_2297_SBA_SCALING_32KHZ                      /* VA: basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */
#define FIX_2315_AGC_MEMORY_RESET                       /* VA: basop issue 2315: fix reset of the AGC memory */
#define FIX_2312_CONDITION_MISSING_GSC_DEC_LR           /* VA: basop issue 2297: addition of condition missing in the GSC gain decoder at low-rate */
#define FIX_2313_HF_RESET_16KHZ                         /* VA: basop issue 2313: Call hf_synth_reset_fx() also for 16 kHz output_Fs */

/* ##################### End NON-BE switches ########################### */
+6 −0
Original line number Diff line number Diff line
@@ -2495,8 +2495,14 @@ ivas_error core_switching_pre_dec_ivas_fx(
            /* Last frame was Stereo CNG and the synthesis memory is outdated -- reset */
            set16_fx( st->hTcxDec->old_syn_Overl, 0, L_FRAME32k / 2 );
            set16_fx( st->hFdCngDec->hFdCngCom->olapBufferAna_fx, 0, FFTLEN );
#ifndef FIX_2315_AGC_MEMORY_RESET
            set16_fx( st->agc_mem_fx, 0, 2 );
#endif
        }

#ifdef FIX_2315_AGC_MEMORY_RESET
        set16_fx( st->agc_mem_fx, 0, 2 );
#endif
        st->mem_deemph_fx = 0;
        move16();
        IF( !st->last_con_tcx )
Loading