# HG changeset patch # User Mychaela Falconia # Date 1726728846 0 # Node ID 405a84110997f431cd6ca534d588e48436a776e2 # Parent c95e893673213da4fc2ce09e64d811d84ae5ceec libgsmfr2: add gsmfr_preproc_bfi_bits() diff -r c95e89367321 -r 405a84110997 libgsmfr2/pp_bad.c --- 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); +} diff -r c95e89367321 -r 405a84110997 libgsmfr2/tw_gsmfr.h --- 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);