view dev/Makefile @ 242:f081a6850fb5

libgsmfrp: new refined implementation The previous implementation exhibited the following defects, which are now fixed: 1) The last received valid SID was cached forever for the purpose of handling future invalid SIDs - we could have received some valid SID ages ago, then lots of speech or NO_DATA, and if we then get an invalid SID, we would resurrect the last valid SID from ancient history - a bad design. In our new design, we handle invalid SID based on the current state, much like BFI. 2) GSM 06.11 spec says clearly that after the second lost SID (received BFI=1 && TAF=1 in CN state) we need to gradually decrease the output level, rather than jump directly to emitting silence frames - we previously failed to implement such logic. 3) Per GSM 06.12 section 5.2, Xmaxc should be the same in all 4 subframes in a SID frame. What should we do if we receive an otherwise valid SID frame with different Xmaxc? Our previous approach would replicate this Xmaxc oddity in every subsequent generated CN frame, which is rather bad. In our new design, the very first CN frame (which can be seen as a transformation of the SID frame itself) retains the original 4 distinct Xmaxc, but all subsequent CN frames are based on the Xmaxc from the last subframe of the most recent SID.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 09 May 2023 05:16:31 +0000
parents bbdefd2ef950
children 56d3fbacd115
line wrap: on
line source

CC=	gcc
CFLAGS=	-O2
PROGS=	a2s-regen efr-bit-packing efr-sid-insert efr-tidsp gsm0611-silence-fr \
	mk-256bytes s2a-regen s2u-regen s2u-regen-plus4 u2s-regen
DATAOUT=a2s-regen.out efr-bit-packing.out efr-sid-insert.out efr-tidsp.out \
	gsm0611-silence-fr.out s2a-regen.out s2u-regen.out s2u-regen-plus4.out \
	u2s-regen.out

all:	${PROGS} ${DATAOUT}

a2s-regen:	a2s-regen.c
	${CC} ${CFLAGS} -o $@ $@.c

a2s-regen.out:	a2s-regen
	./a2s-regen > $@

efr-bit-packing:	efr-bit-packing.c
	${CC} ${CFLAGS} -o $@ $@.c

efr-bit-packing.out:	efr-bit-packing
	./efr-bit-packing > $@

efr-sid-insert:		efr-sid-insert.c
	${CC} ${CFLAGS} -o $@ $@.c

efr-sid-insert.out:	efr-sid-insert
	./efr-sid-insert > $@

efr-tidsp:	efr-tidsp.c
	${CC} ${CFLAGS} -o $@ $@.c

efr-tidsp.out:	efr-tidsp
	./efr-tidsp > $@

gsm0611-silence-fr:	gsm0611-silence-fr.c
	${CC} ${CFLAGS} -o $@ $@.c -lgsm

gsm0611-silence-fr.out:	gsm0611-silence-fr
	./gsm0611-silence-fr > $@

mk-256bytes:	mk-256bytes.c
	${CC} ${CFLAGS} -o $@ $@.c

s2a-regen:	s2a-regen.c
	${CC} ${CFLAGS} -o $@ $@.c

s2a-regen.out:	s2a-regen
	./s2a-regen > $@

s2u-regen:	s2u-regen.c
	${CC} ${CFLAGS} -o $@ $@.c

s2u-regen.out:	s2u-regen
	./s2u-regen > $@

s2u-regen-plus4:	s2u-regen-plus4.c
	${CC} ${CFLAGS} -o $@ $@.c

s2u-regen-plus4.out:	s2u-regen-plus4
	./s2u-regen-plus4 > $@

u2s-regen:	u2s-regen.c
	${CC} ${CFLAGS} -o $@ $@.c

u2s-regen.out:	u2s-regen
	./u2s-regen > $@

clean:
	rm -f *.o *.out ${PROGS}