RetroArch
bitreader.h
Go to the documentation of this file.
1 /* libFLAC - Free Lossless Audio Codec library
2  * Copyright (C) 2000-2009 Josh Coalson
3  * Copyright (C) 2011-2016 Xiph.Org Foundation
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * - Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * - Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * - Neither the name of the Xiph.org Foundation nor the names of its
17  * contributors may be used to endorse or promote products derived from
18  * this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef FLAC__PRIVATE__BITREADER_H
34 #define FLAC__PRIVATE__BITREADER_H
35 
36 #include <stdio.h> /* for FILE */
37 #include "../FLAC/ordinals.h"
38 #include "cpu.h"
39 
40 /*
41  * opaque structure definition
42  */
43 struct FLAC__BitReader;
45 
47 
48 /*
49  * construction, deletion, initialization, etc functions
50  */
54 void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */
57 
58 /*
59  * CRC functions
60  */
63 
64 /*
65  * info functions
66  */
70 
71 /*
72  * read functions
73  */
74 
79 FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader *br, unsigned bits); /* WATCHOUT: does not CRC the skipped data! */ /*@@@@ add to unit tests */
80 FLAC__bool FLAC__bitreader_skip_byte_block_aligned_no_crc(FLAC__BitReader *br, unsigned nvals); /* WATCHOUT: does not CRC the read data! */
81 FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(FLAC__BitReader *br, FLAC__byte *val, unsigned nvals); /* WATCHOUT: does not CRC the read data! */
83 FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter);
84 FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter);
85 #if 0 /* UNUSED */
86 FLAC__bool FLAC__bitreader_read_golomb_signed(FLAC__BitReader *br, int *val, unsigned parameter);
87 FLAC__bool FLAC__bitreader_read_golomb_unsigned(FLAC__BitReader *br, unsigned *val, unsigned parameter);
88 #endif
91 #endif
FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(FLAC__BitReader *br, FLAC__byte *val, unsigned nvals)
Definition: bitreader.c:576
FLAC__bool(* FLAC__BitReaderReadCallback)(FLAC__byte buffer[], size_t *bytes, void *client_data)
Definition: bitreader.h:46
GLuint GLfloat * val
Definition: glext.h:7847
uint32_t FLAC__uint32
Definition: ordinals.h:65
FLAC__bool FLAC__bitreader_skip_byte_block_aligned_no_crc(FLAC__BitReader *br, unsigned nvals)
Definition: bitreader.c:541
FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter)
Definition: bitreader.c:741
unsigned bytes
Definition: bitreader.c:110
struct passwd out
Definition: missing_libc_functions.c:51
FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader *br, FLAC__uint64 *val, unsigned bits)
Definition: bitreader.c:460
FLAC__BitReader * FLAC__bitreader_new(void)
Definition: bitreader.c:229
void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out)
Definition: bitreader.c:296
FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br)
Definition: bitreader.c:289
int32_t FLAC__int32
Definition: ordinals.h:62
unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br)
Definition: bitreader.c:357
FLAC__bool FLAC__bitreader_read_utf8_uint32(FLAC__BitReader *br, FLAC__uint32 *val, FLAC__byte *raw, unsigned *rawlen)
Definition: bitreader.c:965
FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *val, FLAC__byte *raw, unsigned *rawlen)
Definition: bitreader.c:1020
FLAC__bool FLAC__bitreader_read_raw_int32(FLAC__BitReader *br, FLAC__int32 *val, unsigned bits)
Definition: bitreader.c:447
FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val)
Definition: bitreader.c:632
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd)
Definition: bitreader.c:259
FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br)
Definition: bitreader.c:336
FLAC__uint8 FLAC__byte
Definition: ordinals.h:72
void * client_data
Definition: bitreader.c:116
void FLAC__bitreader_delete(FLAC__BitReader *br)
Definition: bitreader.c:245
FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br)
Definition: bitreader.c:352
void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed)
Definition: bitreader.c:326
uint64_t FLAC__uint64
Definition: ordinals.h:66
uint16_t FLAC__uint16
Definition: ordinals.h:64
#define FILE
Definition: file_stream_transforms.h:35
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:11836
FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val)
Definition: bitreader.c:481
FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter)
Definition: bitreader.c:713
def cd(new_dir)
Definition: build.py:40
void FLAC__bitreader_free(FLAC__BitReader *br)
Definition: bitreader.c:275
int FLAC__bool
Definition: ordinals.h:70
unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br)
Definition: bitreader.c:362
Definition: video4linux2.c:51
FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader *br, FLAC__uint32 *val, unsigned bits)
Definition: bitreader.c:367
FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader *br, unsigned bits)
Definition: bitreader.c:506
Definition: bitreader.c:104