Skip to content

Changes

Summary

  1. codec: make osmo_hr_check_sid() more efficient (details)
Commit e0c63ec8c7233971636c43f00149104b35b3abae by falcon
codec: make osmo_hr_check_sid() more efficient

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
The file was modified src/codec/gsm620.c