| OLD | NEW |
| 1 /* libFLAC - Free Lossless Audio Codec library | 1 /* libFLAC - Free Lossless Audio Codec library |
| 2 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson | 2 * Copyright (C) 2000-2009 Josh Coalson |
| 3 * Copyright (C) 2011-2014 Xiph.Org Foundation |
| 3 * | 4 * |
| 4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 6 * are met: | 7 * are met: |
| 7 * | 8 * |
| 8 * - Redistributions of source code must retain the above copyright | 9 * - Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| 10 * | 11 * |
| 11 * - Redistributions in binary form must reproduce the above copyright | 12 * - Redistributions in binary form must reproduce the above copyright |
| 12 * notice, this list of conditions and the following disclaimer in the | 13 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 29 matching lines...) Expand all Loading... |
| 42 struct FLAC__BitReader; | 43 struct FLAC__BitReader; |
| 43 typedef struct FLAC__BitReader FLAC__BitReader; | 44 typedef struct FLAC__BitReader FLAC__BitReader; |
| 44 | 45 |
| 45 typedef FLAC__bool (*FLAC__BitReaderReadCallback)(FLAC__byte buffer[], size_t *b
ytes, void *client_data); | 46 typedef FLAC__bool (*FLAC__BitReaderReadCallback)(FLAC__byte buffer[], size_t *b
ytes, void *client_data); |
| 46 | 47 |
| 47 /* | 48 /* |
| 48 * construction, deletion, initialization, etc functions | 49 * construction, deletion, initialization, etc functions |
| 49 */ | 50 */ |
| 50 FLAC__BitReader *FLAC__bitreader_new(void); | 51 FLAC__BitReader *FLAC__bitreader_new(void); |
| 51 void FLAC__bitreader_delete(FLAC__BitReader *br); | 52 void FLAC__bitreader_delete(FLAC__BitReader *br); |
| 52 FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu, FLAC__Bi
tReaderReadCallback rcb, void *cd); | 53 FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback
rcb, void *cd); |
| 53 void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */ | 54 void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */ |
| 54 FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br); | 55 FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br); |
| 55 void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out); | 56 void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out); |
| 56 | 57 |
| 57 /* | 58 /* |
| 58 * CRC functions | 59 * CRC functions |
| 59 */ | 60 */ |
| 60 void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed); | 61 void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed); |
| 61 FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br); | 62 FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br); |
| 62 | 63 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 74 FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader *br, FLAC__uint32 *va
l, unsigned bits); | 75 FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader *br, FLAC__uint32 *va
l, unsigned bits); |
| 75 FLAC__bool FLAC__bitreader_read_raw_int32(FLAC__BitReader *br, FLAC__int32 *val,
unsigned bits); | 76 FLAC__bool FLAC__bitreader_read_raw_int32(FLAC__BitReader *br, FLAC__int32 *val,
unsigned bits); |
| 76 FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader *br, FLAC__uint64 *va
l, unsigned bits); | 77 FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader *br, FLAC__uint64 *va
l, unsigned bits); |
| 77 FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__
uint32 *val); /*only for bits=32*/ | 78 FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__
uint32 *val); /*only for bits=32*/ |
| 78 FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader *br, unsigned bits);
/* WATCHOUT: does not CRC the skipped data! */ /*@@@@ add to unit tests */ | 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 */ |
| 79 FLAC__bool FLAC__bitreader_skip_byte_block_aligned_no_crc(FLAC__BitReader *br, u
nsigned nvals); /* WATCHOUT: does not CRC the read data! */ | 80 FLAC__bool FLAC__bitreader_skip_byte_block_aligned_no_crc(FLAC__BitReader *br, u
nsigned nvals); /* WATCHOUT: does not CRC the read data! */ |
| 80 FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(FLAC__BitReader *br, F
LAC__byte *val, unsigned nvals); /* WATCHOUT: does not CRC the read data! */ | 81 FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(FLAC__BitReader *br, F
LAC__byte *val, unsigned nvals); /* WATCHOUT: does not CRC the read data! */ |
| 81 FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *va
l); | 82 FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *va
l); |
| 82 FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsig
ned parameter); | 83 FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsig
ned parameter); |
| 83 FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[
], unsigned nvals, unsigned parameter); | 84 FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[
], unsigned nvals, unsigned parameter); |
| 84 #ifndef FLAC__NO_ASM | |
| 85 # ifdef FLAC__CPU_IA32 | |
| 86 # ifdef FLAC__HAS_NASM | |
| 87 FLAC__bool FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap(FLAC__BitReader
*br, int vals[], unsigned nvals, unsigned parameter); | |
| 88 # endif | |
| 89 # endif | |
| 90 #endif | |
| 91 #if 0 /* UNUSED */ | 85 #if 0 /* UNUSED */ |
| 92 FLAC__bool FLAC__bitreader_read_golomb_signed(FLAC__BitReader *br, int *val, uns
igned parameter); | 86 FLAC__bool FLAC__bitreader_read_golomb_signed(FLAC__BitReader *br, int *val, uns
igned parameter); |
| 93 FLAC__bool FLAC__bitreader_read_golomb_unsigned(FLAC__BitReader *br, unsigned *v
al, unsigned parameter); | 87 FLAC__bool FLAC__bitreader_read_golomb_unsigned(FLAC__BitReader *br, unsigned *v
al, unsigned parameter); |
| 94 #endif | 88 #endif |
| 95 FLAC__bool FLAC__bitreader_read_utf8_uint32(FLAC__BitReader *br, FLAC__uint32 *v
al, FLAC__byte *raw, unsigned *rawlen); | 89 FLAC__bool FLAC__bitreader_read_utf8_uint32(FLAC__BitReader *br, FLAC__uint32 *v
al, FLAC__byte *raw, unsigned *rawlen); |
| 96 FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *v
al, FLAC__byte *raw, unsigned *rawlen); | 90 FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *v
al, FLAC__byte *raw, unsigned *rawlen); |
| 97 | |
| 98 FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br); | |
| 99 #endif | 91 #endif |
| OLD | NEW |