changeset 278:c94d9a336e8f

libgsmfr2: implement DHF const datum
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Apr 2024 04:10:02 +0000
parents 37dc5c84bbe9
children 4db5fc10fd1a
files libgsmfr2/Makefile libgsmfr2/dhf.c
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmfr2/Makefile	Sun Apr 14 04:00:02 2024 +0000
+++ b/libgsmfr2/Makefile	Sun Apr 14 04:10:02 2024 +0000
@@ -1,10 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
-OBJS=	add.o comfort_noise.o dec_main.o dec_wrap.o ed_state.o enc_homing.o \
-	enc_main.o enc_wrap.o long_term.o lpc.o pack_frame.o pack_frame2.o \
-	pp_bad.o pp_good.o pp_state.o preprocess.o prng.o rpe.o short_term.o \
-	sidclass.o silence_frame.o table.o unpack_frame.o unpack_frame2.o \
-	xmaxc_mean.o
+OBJS=	add.o comfort_noise.o dec_main.o dec_wrap.o dhf.o ed_state.o \
+	enc_homing.o enc_main.o enc_wrap.o long_term.o lpc.o pack_frame.o \
+	pack_frame2.o pp_bad.o pp_good.o pp_state.o preprocess.o prng.o rpe.o \
+	short_term.o sidclass.o silence_frame.o table.o unpack_frame.o \
+	unpack_frame2.o xmaxc_mean.o
 HDRS=	ed_internal.h ed_state.h pp_internal.h pp_state.h tw_gsmfr.h typedef.h
 LIB=	libgsmfr2.a
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgsmfr2/dhf.c	Sun Apr 14 04:10:02 2024 +0000
@@ -0,0 +1,16 @@
+/*
+ * Implementation of the optional decoder homing feature requires matching
+ * the input RTP-encoded GSM-FR frame against the known decoder homing frame.
+ * This C module provides this DHF as an API-exported const array.
+ */
+
+#include <stdint.h>
+#include "tw_gsmfr.h"
+
+const uint8_t gsmfr_decoder_homing_frame[GSMFR_RTP_FRAME_LEN] = {
+	0xD2, 0x57, 0x7A, 0x1C, 0xDA,
+	0x50, 0x00, 0x49, 0x24, 0x92, 0x49, 0x24,
+	0x50, 0x00, 0x49, 0x24, 0x92, 0x49, 0x24,
+	0x50, 0x00, 0x49, 0x24, 0x92, 0x49, 0x24,
+	0x50, 0x00, 0x49, 0x23, 0x92, 0x49, 0x24,
+};