aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libgb
diff options
context:
space:
mode:
authorMychaela N. Falconia <falcon@freecalypso.org>2024-06-13 20:52:14 +0000
committerMychaela N. Falconia <falcon@freecalypso.org>2024-06-14 06:52:57 +0000
commite0c63ec8c7233971636c43f00149104b35b3abae (patch)
tree7e0a0f35d34b911d5cc85d7bb4eff241565cf805 /openbsc/src/libgb
parent10d4d119ed6e9670a9313bc32c581acf85ef4339 (diff)
codec: make osmo_hr_check_sid() more efficientHEADmaster
The operation of checking an HRv1 codec frame for the possibility of a perfect, error-free SID entails checking the last 79 bits out of 112, to see if they are all 1s. This operation can be done much more efficiently without using bitvec. This change also affects the logic of what osmo_hr_check_sid() does when the payload length argument is 0, or otherwise less than the expected 14. The old code had a surely-unintended effect of returning true on a 0-length payload; the new version returns false (the input is not a perfect SID frame) if the payload length is 0 or otherwise shorter than GSM_HR_BYTES. Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd
Diffstat (limited to 'openbsc/src/libgb')
0 files changed, 0 insertions, 0 deletions