# HG changeset patch # User Mychaela Falconia # Date 1713463212 0 # Node ID 675597e63fd86b652454d9a27f5eac3ae8a4eb5c # Parent ebd064c52fe332effd7637b38221153c900bef4d libtwamr: integrate gray.tab, convert to intermodule linkage diff -r ebd064c52fe3 -r 675597e63fd8 libtwamr/Makefile --- 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 diff -r ebd064c52fe3 -r 675597e63fd8 libtwamr/graytab.c --- /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}; diff -r ebd064c52fe3 -r 675597e63fd8 libtwamr/graytab.h --- /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 diff -r ebd064c52fe3 -r 675597e63fd8 libtwamr/namespace.h --- 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