bitstream.h

00001 /*
00002  * broadvoice - a library for the BroadVoice 16 and 32 codecs
00003  *
00004  * bitstream.c - 
00005  *
00006  * Copyright 2009 by Steve Underwood <steveu@coppice.org>
00007  *
00008  * All rights reserved.
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU Lesser General Public License version 2.1,
00012  * as published by the Free Software Foundation.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  *
00023  * $Id: bitstream.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
00024  */
00025 
00026 #if !defined(_BITSTREAM_H_)
00027 #define _BITSTREAM_H_
00028 
00029 /*! Bitstream handler state */
00030 typedef struct
00031 {
00032     /*! The bit stream. */
00033     uint32_t bitstream;
00034     /*! The residual bits in bitstream. */
00035     int residue;
00036 } bitstream_state_t;
00037 
00038 void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
00039 
00040 uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
00041 
00042 void bitstream_flush(bitstream_state_t *s, uint8_t **c);
00043 
00044 bitstream_state_t *bitstream_init(bitstream_state_t *s);
00045 
00046 #endif
00047 /*- End of file ------------------------------------------------------------*/

Generated on 15 Mar 2017 for libg722_1 by  doxygen 1.6.1