Commit 7394f462 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch 'main' into 774-osba-bitrate-switching-crashes-with-mono-output

parents 53ebd8be e4023bf9
Loading
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -180,7 +180,11 @@ $(LIB_LIBREND): $(OBJS_LIBREND)
	$(QUIET_AR)$(AR) rcs $@ $^

$(LIB_LC3PLUS): $(OBJS_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_AR)$(AR) rcs $@ $^
else
	
endif

$(LIB_LIBUTIL): $(OBJS_LIBUTIL)
	$(QUIET_AR)$(AR) rcs $@ $^
@@ -189,10 +193,18 @@ $(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(L
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC)

$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug -llc3plus $(LDLIBS) -o $(CLI_APIDEC)
else
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIDEC)
endif

$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom -llc3plus $(LDLIBS) -o $(CLI_APIREND)
else
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom $(LDLIBS) -o $(CLI_APIREND)
endif

libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LC3PLUS) $(LIB_LIBUTIL)

+32 −9
Original line number Diff line number Diff line
@@ -1003,14 +1003,6 @@ int main(
#endif
    const int16_t frameSize_smpls = (int16_t) ( ( args.framing_5ms ? 5 : 20 ) * args.sampleRate / 1000 );

    IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 };
    IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 };
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 };
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 };
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS] = { 0 };
#endif

    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
@@ -1157,6 +1149,37 @@ int main(
        }
    }

    IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS];
    IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS];
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS];
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS];
#endif

    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; i++ )
    {
        mcIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; i++ )
    {
        ismIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; i++ )
    {
        sbaIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; i++ )
    {
        masaIds[i] = 0u;
    }
#ifdef SPLIT_REND_WITH_HEAD_ROT
    for ( i = 0; i < RENDERER_MAX_BIN_INPUTS; i++ )
    {
        splitBinIds[i] = 0u;
    }
#endif

    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    {
        if ( ( error = IVAS_REND_AddInput( hIvasRend, args.inConfig.multiChannelBuses[i].audioConfig, &mcIds[i] ) ) != IVAS_ERR_OK )
@@ -3281,7 +3304,6 @@ static void parseObjectPosition(
    int16_t read_values;
    float meta_prm[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f };


    readNextMetadataChunk( line, "," );
    *positionDuration = (uint16_t) strtol( line, &endptr, 10 );
    readNextMetadataChunk( line, "\n" );
@@ -3300,6 +3322,7 @@ static void parseObjectPosition(
    position->yaw = meta_prm[5];
    position->pitch = meta_prm[6];
    position->non_diegetic_flag = (int16_t) meta_prm[7];

    return;
}

+5 −5
Original line number Diff line number Diff line
@@ -3244,7 +3244,7 @@ static void DoRTFT600(
)
{
    float scratch[1200], cmplx[1200];
    int16_t factors[3] = { 25, 8, 3 };
    const int16_t factors[3] = { 25, 8, 3 };

    fftf_interleave( x, y, cmplx, 600 );
    pfaDFT( cmplx, 600, scratch, 3, factors );
@@ -3259,7 +3259,7 @@ static void DoRTFT400(
)
{
    float scratch[800], cmplx[800];
    int16_t factors[2] = { 25, 16 };
    const int16_t factors[2] = { 25, 16 };

    fftf_interleave( x, y, cmplx, 400 );
    pfaDFT( cmplx, 400, scratch, 2, factors );
@@ -3275,7 +3275,7 @@ static void DoRTFT240(
)
{
    float scratch[480], cmplx[480];
    int16_t factors[3] = { 16, 5, 3 };
    const int16_t factors[3] = { 16, 5, 3 };

    fftf_interleave( x, y, cmplx, 240 );
    pfaDFT( cmplx, 240, scratch, 3, factors );
@@ -3290,7 +3290,7 @@ static void DoRTFT200(
)
{
    float scratch[400], cmplx[400];
    int16_t factors[2] = { 25, 8 };
    const int16_t factors[2] = { 25, 8 };

    fftf_interleave( x, y, cmplx, 200 );
    pfaDFT( cmplx, 200, scratch, 2, factors );
@@ -3305,7 +3305,7 @@ static void DoRTFT100(
)
{
    float scratch[200], cmplx[200];
    int16_t factors[2] = { 25, 4 };
    const int16_t factors[2] = { 25, 4 };

    fftf_interleave( x, y, cmplx, 100 );
    pfaDFT( cmplx, 100, scratch, 2, factors );
+4 −8
Original line number Diff line number Diff line
@@ -1131,13 +1131,9 @@ PvqEntry mpvq_encode_vec(
)
{
    PvqEntry result;
    uint32_t h_mem[1 + KMAX_NON_DIRECT + 1]; /* allocate max offset memory  for dim 6    */
    /* OPT: actually only 1+k_val_in+1 needed ) */
    uint32_t h_mem[1 + KMAX_NON_DIRECT + 1]; /* allocate max offset memory  for dim 6    */ /* OPT: actually only 1+k_val_in+1 needed ) */
    uint32_t lead_sign_ind;

    VEC2INDFUNCM vec2mind_f[1 + N_OPT] = { NULL, vec2mind_one, vec2mind_two, vec2mind_three, vec2mind_four, vec2mind_five };
    /* VEC2INDFUNCM can be a static global  */

    const VEC2INDFUNCM vec2mind_f[1 + N_OPT] = { NULL, vec2mind_one, vec2mind_two, vec2mind_three, vec2mind_four, vec2mind_five }; /* VEC2INDFUNCM can be a static global  */

    result.k_val = k_val_local;
    result.dim = dim_in;
@@ -1202,8 +1198,7 @@ void mpvq_decode_vec(
)
{
    int16_t i, leading_sign;
    IND2VECFUNCM mind2vec_f[N_OPT + 1] = { NULL, mind2vec_one, mind2vec_two, mind2vec_three, mind2vec_four, mind2vec_five };
    /*IND2VECFUNCM vector can be static global  */
    const IND2VECFUNCM mind2vec_f[N_OPT + 1] = { NULL, mind2vec_one, mind2vec_two, mind2vec_three, mind2vec_four, mind2vec_five }; /*IND2VECFUNCM vector can be static global  */

    for ( i = 0; i < entry->dim; i++ )
    {
@@ -1229,6 +1224,7 @@ void mpvq_decode_vec(
            ( mind2vec_f[entry->dim] )( entry->k_val, leading_sign, entry->index, vec_out );
        }
    }

    return;
}

+11 −0
Original line number Diff line number Diff line
@@ -282,6 +282,17 @@ void ivas_destroy_enc(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);

#ifdef FIX_803_SCE_MD_HANDLE
ivas_error ivas_initialize_MD_bstr_enc(
    BSTR_ENC_HANDLE *hBstr,                                     /* o  : encoder MD bitstream handle             */
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);

void ivas_destroy_MD_bstr_enc(
    BSTR_ENC_HANDLE *hMetaData                                  /* i/o: encoder MD bitstream handle             */
);
#endif

ivas_error ivas_init_decoder_front(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);
Loading