summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-codec/g722/g722_dec.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-03-17 14:07:53 +0000
committerBenny Prijono <bennylp@teluu.com>2008-03-17 14:07:53 +0000
commite14e1fddbedf8c03df686ecd7c7af0c0ca0f52c6 (patch)
tree8ae1ae5d648b62b7fe49cd738e1103e91ac5b310 /pjmedia/src/pjmedia-codec/g722/g722_dec.h
parent685aef52bcf830cb591798cd0814dd4a10605497 (diff)
Ticket #507: committed and tested g722 patch on Windows
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1870 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-codec/g722/g722_dec.h')
-rw-r--r--pjmedia/src/pjmedia-codec/g722/g722_dec.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia-codec/g722/g722_dec.h b/pjmedia/src/pjmedia-codec/g722/g722_dec.h
new file mode 100644
index 00000000..1494d297
--- /dev/null
+++ b/pjmedia/src/pjmedia-codec/g722/g722_dec.h
@@ -0,0 +1,78 @@
+/* $Id$ */
+/*
+ * Copyright (C)2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+/*
+ * Based on implementation found in Carnegie Mellon Speech Group Software
+ * depository (ftp://ftp.cs.cmu.edu/project/fgdata/index.html). No copyright
+ * was claimed in the original source codes.
+ */
+#ifndef __PJMEDIA_CODEC_G722_DEC_H__
+#define __PJMEDIA_CODEC_G722_DEC_H__
+
+#include <pjmedia-codec/types.h>
+
+/* Decoder state */
+typedef struct g722_dec_t {
+ /* PCM low band */
+ int slow;
+ int detlow;
+ int spl;
+ int szl;
+ int rlt [3];
+ int al [3];
+ int apl [3];
+ int plt [3];
+ int dlt [7];
+ int bl [7];
+ int bpl [7];
+ int sgl [7];
+ int nbl;
+
+ /* PCM high band*/
+ int shigh;
+ int dethigh;
+ int sph;
+ int szh;
+ int rh [3];
+ int ah [3];
+ int aph [3];
+ int ph [3];
+ int dh [7];
+ int bh [7];
+ int bph [7];
+ int sgh [7];
+ int nbh;
+
+ /* QMF signal history */
+ int xd[12];
+ int xs[12];
+} g722_dec_t;
+
+
+PJ_DECL(pj_status_t) g722_dec_init(g722_dec_t *dec);
+
+PJ_DECL(pj_status_t) g722_dec_decode(g722_dec_t *dec,
+ void *in,
+ pj_size_t in_size,
+ pj_int16_t out[],
+ pj_size_t *nsamples);
+
+PJ_DECL(pj_status_t) g722_dec_deinit(g722_dec_t *dec);
+
+#endif /* __PJMEDIA_CODEC_G722_DEC_H__ */
+