changeset 317:675597e63fd8

libtwamr: integrate gray.tab, convert to intermodule linkage
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 18 Apr 2024 18:00:12 +0000
parents ebd064c52fe3
children 6fd6c5fc1aa4
files libtwamr/Makefile libtwamr/graytab.c libtwamr/graytab.h libtwamr/namespace.h
diffstat 4 files changed, 41 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libtwamr/Makefile	Thu Apr 18 17:49:02 2024 +0000
+++ b/libtwamr/Makefile	Thu Apr 18 18:00:12 2024 +0000
@@ -1,8 +1,8 @@
 CC=	gcc
 CFLAGS=	-O2
 OBJS=	a_refl.o agc.o autocorr.o az_lsp.o b_cn_cod.o basicop2.o bgnscd.o \
-	bitno.o bits2prm.o cor_h.o gmed_n.o inv_sqrt.o oper_32b.o prmno.o \
-	s10_8pf.o set_sign.o sqrt_l.o tls_flags.o window.o
+	bitno.o bits2prm.o cor_h.o gmed_n.o graytab.o inv_sqrt.o oper_32b.o \
+	prmno.o s10_8pf.o set_sign.o sqrt_l.o tls_flags.o window.o
 LIB=	libtwamr.a
 
 INSTALL_PREFIX=	/usr/local
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libtwamr/graytab.c	Thu Apr 18 18:00:12 2024 +0000
@@ -0,0 +1,23 @@
+/*
+********************************************************************************
+*
+*      GSM AMR-NB speech codec   R98   Version 7.6.0   December 12, 2001
+*                                R99   Version 3.3.0                
+*                                REL-4 Version 4.1.0                
+*
+********************************************************************************
+*
+*      File             : gray.tab
+*      Purpose          : gray encoding and decoding tables
+*      $Id $
+*
+*
+********************************************************************************
+*/
+
+#include "namespace.h"
+#include "typedef.h"
+#include "graytab.h"
+
+const Word16 gray[8]  = {0, 1, 3, 2, 6, 4, 5, 7};
+const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libtwamr/graytab.h	Thu Apr 18 18:00:12 2024 +0000
@@ -0,0 +1,14 @@
+/*
+ * This header file holds extern declarations for the tiny tables
+ * that have been moved from gray.tab to graytab.c with intermodule linkage.
+ */
+
+#ifndef	graytab_h
+#define	graytab_h
+
+#include "typedef.h"
+
+extern const Word16 gray[8];
+extern const Word16 dgray[8];
+
+#endif
--- a/libtwamr/namespace.h	Thu Apr 18 17:49:02 2024 +0000
+++ b/libtwamr/namespace.h	Thu Apr 18 18:00:12 2024 +0000
@@ -84,6 +84,8 @@
 #define	bitno		AMR__bitno
 #define	prmno		AMR__prmno
 #define	prmnofs		AMR__prmnofs
+#define	gray		AMR__gray
+#define	dgray		AMR__dgray
 #define	window_200_40	AMR__window_200_40
 #define	window_160_80	AMR__window_160_80
 #define	window_232_8	AMR__window_232_8