Mercurial > hg > audiostuff
comparison spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bitstream.h @ 5:f762bf195c4b
import spandsp-0.0.3
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 16:00:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:26cd8f1ef0b1 | 5:f762bf195c4b |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * bitstream.h - Bitstream composition and decomposition routines. | |
5 * | |
6 * Written by Steve Underwood <steveu@coppice.org> | |
7 * | |
8 * Copyright (C) 2006 Steve Underwood | |
9 * | |
10 * All rights reserved. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License version 2, as | |
14 * published by the Free Software Foundation. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 * | |
25 * $Id: bitstream.h,v 1.3 2006/10/24 13:45:28 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_BITSTREAM_H_) | |
31 #define _BITSTREAM_H_ | |
32 | |
33 /*! \page bitstream_page Bitstream composition and decomposition | |
34 \section bitstream_page_sec_1 What does it do? | |
35 | |
36 \section bitstream_page_sec_2 How does it work? | |
37 */ | |
38 | |
39 typedef struct | |
40 { | |
41 unsigned int bitstream; | |
42 unsigned int residue; | |
43 } bitstream_state_t; | |
44 | |
45 | |
46 #ifdef __cplusplus | |
47 extern "C" { | |
48 #endif | |
49 | |
50 bitstream_state_t *bitstream_init(bitstream_state_t *s); | |
51 | |
52 void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits); | |
53 | |
54 void bitstream_flush(bitstream_state_t *s, uint8_t **c); | |
55 | |
56 void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits); | |
57 | |
58 void bitstream_flush2(bitstream_state_t *s, uint8_t **c); | |
59 | |
60 unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits); | |
61 | |
62 unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits); | |
63 | |
64 #ifdef __cplusplus | |
65 } | |
66 #endif | |
67 | |
68 #endif | |
69 /*- End of file ------------------------------------------------------------*/ |