comparison libgsmhr1/twts002_in.c @ 605:63f774192906

gsmhr_decoder_twts002_in(): set BFI=1 SID=1 for invalid SID When a received TW-TS-002 RTP payload indicates invalid SID, which of the 3 possible BFI/SID combinations should we pass to our internal ETSI-based speech decoder or TFO engine? Our original code passed BFI=0 SID=1, but upon further reflection, BFI=1 SID=1 is a better choice. In the corner case where received invalid SID is fed to a full decoder in homed state, setting BFI=1 allows that decoder to emit zeros on PCM and stay homed, instead of launching into full decoding.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Dec 2025 21:01:46 +0000
parents 45bf34451dd7
children
comparison
equal deleted inserted replaced
604:54f0f1b74c25 605:63f774192906
21 params[18] = 0; /* BFI */ 21 params[18] = 0; /* BFI */
22 params[20] = 0; /* SID */ 22 params[20] = 0; /* SID */
23 break; 23 break;
24 case 1: 24 case 1:
25 memset(params, 0, sizeof(int16_t) * GSMHR_NUM_PARAMS); 25 memset(params, 0, sizeof(int16_t) * GSMHR_NUM_PARAMS);
26 params[18] = 0; /* BFI */ 26 params[18] = 1; /* BFI */
27 params[20] = 1; /* SID */ 27 params[20] = 1; /* SID */
28 break; 28 break;
29 case 2: 29 case 2:
30 gsmhr_unpack_ts101318(payload + 1, params); 30 gsmhr_unpack_ts101318(payload + 1, params);
31 params[18] = 0; /* BFI */ 31 params[18] = 0; /* BFI */