FreeCalypso > hg > gsm-codec-lib
changeset 526:405a84110997
libgsmfr2: add gsmfr_preproc_bfi_bits()
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 19 Sep 2024 06:54:06 +0000 |
parents | c95e89367321 |
children | f3246d109e2d |
files | libgsmfr2/pp_bad.c libgsmfr2/tw_gsmfr.h |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgsmfr2/pp_bad.c Thu Sep 19 06:42:01 2024 +0000 +++ b/libgsmfr2/pp_bad.c Thu Sep 19 06:54:06 2024 +0000 @@ -136,3 +136,13 @@ return; } } + +void gsmfr_preproc_bfi_bits(struct gsmfr_preproc_state *st, + const uint8_t *bad_frame, int taf, + uint8_t *frame_out) +{ + if (gsmfr_preproc_sid_classify(bad_frame) == 0) + gsmfr_preproc_bfi(st, taf, frame_out); + else + gsmfr_preproc_invalid_sid(st, frame_out); +}
--- a/libgsmfr2/tw_gsmfr.h Thu Sep 19 06:42:01 2024 +0000 +++ b/libgsmfr2/tw_gsmfr.h Thu Sep 19 06:54:06 2024 +0000 @@ -88,6 +88,9 @@ uint8_t *frame); void gsmfr_preproc_bfi(struct gsmfr_preproc_state *state, int taf, uint8_t *frame_out); +void gsmfr_preproc_bfi_bits(struct gsmfr_preproc_state *state, + const uint8_t *bad_frame, int taf, + uint8_t *frame_out); /* utility function */ int gsmfr_preproc_sid_classify(const uint8_t *frame);