Commit f7c09977 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

merge main to branch

parents 866ddacf 29de83b8
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 );
+16 −3
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
/* RETURN ARGUMENTS :                                                    */
/* _ (Word16) tolt_code :  tilt of the code           Q15                */
/*=======================================================================*/
#ifndef CLEANUP_ACELP_ENC
Word16 est_tilt_fx(                         /* o  : tilt of the code              Q15      */
                    const Word16 *exc,      /* i  : adaptive excitation vector      Qx  */
                    const Word16 gain_pit,  /* i  : adaptive gain                   Q14 */
@@ -111,17 +112,25 @@ Word16 est_tilt_fx( /* o : tilt of the code
/* RETURN ARGUMENTS :                                                    */
/* _ (Word16) tolt_code :  tilt of the code           Q15                */
/*=======================================================================*/
#endif

/* o  : tilt of the code Q15 */
#ifdef CLEANUP_ACELP_ENC
Word16 est_tilt_fx(
#else
Word16 est_tilt_ivas_fx(
#endif
    const Word16 *exc,      /* i  : adaptive excitation vector      Qx  */
    const Word16 gain_pit,  /* i  : adaptive gain                   Q14 */
    const Word16 *code,     /* i  : algebraic excitation vector     Q9  */
    const Word32 gain_code, /* i  : algebraic code gain             Q16 */
    Word16 *voice_fac,      /* o  : voicing factor                  Q15 */
    const Word16 Q_exc,     /* i  : Scaling factor of excitation    Q0  */
    const Word16 L_subfr,   /* i  : Sub frame length                    */
    const Word16 L_subfr    /* i  : Sub frame length                    */
#ifndef CLEANUP_ACELP_ENC
    ,
    const Word16 flag_tilt /* i  : flag for special tilt        */
#endif
)
{
    Word16 i, tmp, exp, ener1, exp1, ener2, exp2;
@@ -161,6 +170,9 @@ Word16 est_tilt_ivas_fx(
    *voice_fac = exp;
    move16();

#ifdef CLEANUP_ACELP_ENC
    tilt_code = mac_r( 8192L /*0.25.Q15*/ * 65536 /*1.Q16*/ - 0x8000 /*1.Q15*/, *voice_fac, 8192 /*0.25.Q15*/ ); /*Q15 */
#else
    IF( flag_tilt == 0 )
    {
        /* tilt of code for next subframe: 0.5=voiced, 0=unvoiced */
@@ -180,6 +192,7 @@ Word16 est_tilt_ivas_fx(
        // tilt_code = (float)(0.28f + (*voice_fac + 1.0f) * 0.14f);
        tilt_code = mac_r( 13763L /*0.42.Q15*/ * 65536 /*1.Q16*/ - 0x8000 /*1.Q15*/, *voice_fac, 4588 /*0.14.Q15*/ ); /*Q15 */
    }
#endif

    return tilt_code;
}
+6 −6
Original line number Diff line number Diff line
@@ -2990,7 +2990,7 @@ Word16 ivas_acelp_tcx20_switching_fx(
    const Word16 flag_16k_smc                                   /* i  : flag to indicate if the OL SMC is run at 16 kHz */
);

void encod_gen_2sbfr(
void encod_gen_2sbfr_fx(
    Encoder_State *st,                                          /* i/o: state structure                         */
    const Word16 speech[],                                      /* i  : input speech                            */
    const Word16 Aw[],                                          /* i  : weighted A(z) unquantized for subframes */
@@ -3004,8 +3004,8 @@ void encod_gen_2sbfr(
    Word16 *bwe_exc,                                            /* o  : excitation for SWB TBE                  */
    const Word16 tdm_Pitch_reuse_flag,                          /* i  : primary channel pitch reuse flag        */
    const Word16 tdm_Pri_pitch_buf[],                           /* i  : pitch values for primary channel        */
    Word16 Q_new,
    Word16 shift 
    const Word16 Q_new,                                         /* i  : Scaling factor                          */
    const Word16 shift                                          /* i  : Shift needed to obtain 12 bits vectors  */
);

void acelp_fast_fx(
@@ -4483,7 +4483,7 @@ ivas_error signaling_enc_secondary_fx(
    const Word16 tdm_Pitch_reuse_flag                           /* i  : primary channel pitch reuse flag            */
);

void tdm_low_rate_enc(
void tdm_low_rate_enc_fx(
    Encoder_State *st,                                          /* i/o: State structure                             */
    const Word16 Aq[],                                          /* i  : 12k8 Lp coefficient                         */
    const Word16 *res,                                          /* i  : residual signal                        Q_new*/
@@ -4495,7 +4495,7 @@ void tdm_low_rate_enc(
    const Word16 attack_flag,                                   /* i  : attack flag                                 */
    const Word16 *lsf_new,                                      /* i  : current frame ISF vector              x2.56 */ 
    Word16 *tmp_noise,                                          /* o  : long-term noise energy                   Q8 */
    Word16 Q_new 
    const Word16 Q_new                                          /* i  : Scaling factor                              */
);

void tdm_low_rate_dec_fx(
+4 −1
Original line number Diff line number Diff line
@@ -2962,7 +2962,7 @@ void lsf_syn_mem_backup_fx(
    return;
}


#ifndef CLEANUP_VBR_CAM_ENC
/*-------------------------------------------------------------------*
 * lsf_syn_mem_backup_fx()
 *
@@ -3046,6 +3046,7 @@ void lsf_syn_mem_backup_ivas_fx(

    return;
}
#endif

void lsf_update_memory(
    Word16 narrowband,   /* i  : narrowband flag                             */
@@ -3190,6 +3191,7 @@ void lsf_syn_mem_restore_fx(
    return;
}

#ifndef CLEANUP_VBR_CAM_ENC
void lsf_syn_mem_restore_ivas_fx(
    Encoder_State *st_fx,        /* o: state structure                                                                             */
    Word16 btilt_code_fx,        /* i:                                                     Q15                                     */
@@ -3267,6 +3269,7 @@ void lsf_syn_mem_restore_ivas_fx(

    return;
}
#endif

/* Returns: codebook index */
Word16 tcxlpc_get_cdk(
+5 −0
Original line number Diff line number Diff line
@@ -113,6 +113,10 @@
#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_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 ################################## */
@@ -130,6 +134,7 @@
#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_2297_SBA_SCALING_32KHZ                      /* VA: basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */

/* ##################### End NON-BE switches ########################### */

Loading