forked from notaz/pcsx_rearmed
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update libchdr based from latest upstream sources. Fixes some issues as noted. - Latest upstream commit: https://github.com/rtissera/libchdr/tree/6117d59d00ef8620de4cff4d6ecae46368cae881 - Fix #301 - Specific commit that fixes above problem: rtissera/libchdr@e1acac6
- Loading branch information
1 parent
7973b25
commit 9c659ff
Showing
11 changed files
with
2,118 additions
and
2,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Aaron Giles | ||
/*************************************************************************** | ||
bitstream.h | ||
Helper classes for reading/writing at the bit level. | ||
***************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#ifndef __BITSTREAM_H__ | ||
#define __BITSTREAM_H__ | ||
|
||
#include <stdint.h> | ||
|
||
//************************************************************************** | ||
// TYPE DEFINITIONS | ||
//************************************************************************** | ||
|
||
// helper class for reading from a bit buffer | ||
struct bitstream | ||
{ | ||
uint32_t buffer; // current bit accumulator | ||
int bits; // number of bits in the accumulator | ||
const uint8_t * read; // read pointer | ||
uint32_t doffset; // byte offset within the data | ||
uint32_t dlength; // length of the data | ||
}; | ||
|
||
struct bitstream* create_bitstream(const void *src, uint32_t srclength); | ||
int bitstream_overflow(struct bitstream* bitstream); | ||
uint32_t bitstream_read_offset(struct bitstream* bitstream); | ||
|
||
uint32_t bitstream_read(struct bitstream* bitstream, int numbits); | ||
uint32_t bitstream_peek(struct bitstream* bitstream, int numbits); | ||
void bitstream_remove(struct bitstream* bitstream, int numbits); | ||
uint32_t bitstream_flush(struct bitstream* bitstream); | ||
|
||
|
||
#endif | ||
/* license:BSD-3-Clause | ||
* copyright-holders:Aaron Giles | ||
*************************************************************************** | ||
bitstream.h | ||
Helper classes for reading/writing at the bit level. | ||
***************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#ifndef __BITSTREAM_H__ | ||
#define __BITSTREAM_H__ | ||
|
||
#include <stdint.h> | ||
|
||
/*************************************************************************** | ||
* TYPE DEFINITIONS | ||
*************************************************************************** | ||
*/ | ||
|
||
/* helper class for reading from a bit buffer */ | ||
struct bitstream | ||
{ | ||
uint32_t buffer; /* current bit accumulator */ | ||
int bits; /* number of bits in the accumulator */ | ||
const uint8_t * read; /* read pointer */ | ||
uint32_t doffset; /* byte offset within the data */ | ||
uint32_t dlength; /* length of the data */ | ||
}; | ||
|
||
struct bitstream* create_bitstream(const void *src, uint32_t srclength); | ||
int bitstream_overflow(struct bitstream* bitstream); | ||
uint32_t bitstream_read_offset(struct bitstream* bitstream); | ||
|
||
uint32_t bitstream_read(struct bitstream* bitstream, int numbits); | ||
uint32_t bitstream_peek(struct bitstream* bitstream, int numbits); | ||
void bitstream_remove(struct bitstream* bitstream, int numbits); | ||
uint32_t bitstream_flush(struct bitstream* bitstream); | ||
|
||
|
||
#endif |
Oops, something went wrong.