diff --git a/evs/etsi-ts-126.442-3gpp-ts-26.442-v17.0.0/patch b/evs/etsi-ts-126.442-3gpp-ts-26.442-v17.0.0/patch index 496b0ea7f..c7f0d7631 100644 --- a/evs/etsi-ts-126.442-3gpp-ts-26.442-v17.0.0/patch +++ b/evs/etsi-ts-126.442-3gpp-ts-26.442-v17.0.0/patch @@ -69,19 +69,20 @@ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h void destroy_encoder_fx( Encoder_State_fx *st_fx ); -@@ -654,6 +659,8 @@ Word16 gp_clip_fx( +@@ -654,6 +659,9 @@ Word16 gp_clip_fx( void init_decoder_fx( Decoder_State_fx *st_fx /* o: Decoder static variables structure */ ); +unsigned long decoder_size(void); +void decoder_set_Fs(Decoder_State_fx *st_fx, unsigned long Fs); ++void decoder_inc_ini_frame(Decoder_State_fx *st); void destroy_decoder( Decoder_State_fx *st_fx /* o: Decoder static variables structure */ diff --git a/lib_dec/init_dec_fx.c b/lib_dec/init_dec_fx.c --- a/lib_dec/init_dec_fx.c +++ b/lib_dec/init_dec_fx.c -@@ -965,3 +965,12 @@ void destroy_decoder( +@@ -965,3 +965,16 @@ void destroy_decoder( return; } @@ -94,6 +95,10 @@ diff --git a/lib_dec/init_dec_fx.c b/lib_dec/init_dec_fx.c +void decoder_set_Fs(Decoder_State_fx *st_fx, unsigned long Fs) { + st_fx->output_Fs_fx = Fs; +} ++void decoder_inc_ini_frame(Decoder_State_fx *st) { ++ if (st->ini_frame_fx < MAX_FRAME_COUNTER) ++ st->ini_frame_fx++; ++} diff --git a/lib_enc/init_enc_fx.c b/lib_enc/init_enc_fx.c --- a/lib_enc/init_enc_fx.c +++ b/lib_enc/init_enc_fx.c diff --git a/evs/etsi-ts-126.443-3gpp-ts-26.443-v17.0.0/patch b/evs/etsi-ts-126.443-3gpp-ts-26.443-v17.0.0/patch index 5b2436856..40676a988 100644 --- a/evs/etsi-ts-126.443-3gpp-ts-26.443-v17.0.0/patch +++ b/evs/etsi-ts-126.443-3gpp-ts-26.443-v17.0.0/patch @@ -69,19 +69,20 @@ diff --git a/lib_com/prot.h b/lib_com/prot.h short findpulse( /* o : pulse position */ const short L_frame, /* i : length of the frame */ -@@ -651,6 +656,8 @@ void preemph( +@@ -651,6 +656,9 @@ void preemph( const short L, /* i : vector size */ float *mem /* i/o: memory (x[-1]) */ ); +unsigned long decoder_size(void); +void decoder_set_Fs(Decoder_State *st, unsigned long Fs); ++void decoder_inc_ini_frame(Decoder_State *st); void cb_shape( const short preemphFlag, /* i : flag for pre-emphasis */ diff --git a/lib_dec/init_dec.c b/lib_dec/init_dec.c --- a/lib_dec/init_dec.c +++ b/lib_dec/init_dec.c -@@ -653,3 +653,12 @@ void destroy_decoder( +@@ -653,3 +653,16 @@ void destroy_decoder( return; } @@ -94,6 +95,10 @@ diff --git a/lib_dec/init_dec.c b/lib_dec/init_dec.c +void decoder_set_Fs(Decoder_State *st, unsigned long Fs) { + st->output_Fs = Fs; +} ++void decoder_inc_ini_frame(Decoder_State *st) { ++ if (st->ini_frame < MAX_FRAME_COUNTER) ++ st->ini_frame++; ++} diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c diff --git a/lib/codeclib.c b/lib/codeclib.c index 923049b29..da84c8daf 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -121,6 +121,7 @@ static void (*evs_enc_out)(void *, unsigned char *buf, uint16_t *len); static void (*evs_dec_in)(void *, char *in, uint16_t len, uint16_t amr_mode, uint16_t core_mode, uint16_t q_bit, uint16_t partial_frame, uint16_t next_type); static void (*evs_dec_out)(void *, void *, int frame_mode); // frame_mode=1: missing +static void (*evs_dec_inc_frame)(void *); static void (*evs_amr_dec_out)(void *, void *); static void (*evs_syn_output)(float *in, const uint16_t len, int16_t *out); static void (*evs_reset_enc_ind)(void *); @@ -4535,6 +4536,8 @@ static int evs_decoder_input(decoder_t *dec, const str *data, GQueue *out) { evs_amr_dec_out(dec->evs, frame->extended_data[0]); } + evs_dec_inc_frame(dec->evs); + pts += n_samples; g_queue_push_tail(out, frame); } @@ -4624,6 +4627,7 @@ static void evs_load_so(const char *path) { evs_set_encoder_opts = dlsym_assert(evs_lib_handle, "encoder_set_opts", path); evs_set_encoder_brate = dlsym_assert(evs_lib_handle, "encoder_set_brate", path); evs_set_decoder_Fs = dlsym_assert(evs_lib_handle, "decoder_set_Fs", path); + evs_dec_inc_frame = dlsym_assert(evs_lib_handle, "decoder_inc_ini_frame", path); // all ok