Skip to content

Commit c1cc81c

Browse files
Laurence BankLaurence Bank
authored andcommitted
Renamed buffered_bits structure to not conflict with JPEGDEC
1 parent dcf6c79 commit c1cc81c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Group5.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ inline uint32_t TIFFMOTOLONG(uint8_t *p)
115115
// G5 Encoder
116116
//
117117

118-
typedef struct pil_buffered_bits
118+
typedef struct g5_buffered_bits
119119
{
120120
unsigned char *pBuf; // buffer pointer
121121
uint32_t ulBits; // buffered bits
122122
uint32_t ulBitOff; // current bit offset
123123
uint32_t ulDataSize; // available data
124-
} BUFFERED_BITS;
124+
} G5_BUFFERED_BITS;
125125

126126
//
127127
// Encoder state
@@ -135,7 +135,7 @@ typedef struct g5_enc_image_tag
135135
int iDataSize; // generated output size
136136
uint8_t *pOutBuf;
137137
int16_t *pCur, *pRef; // pointers to swap current and reference lines
138-
BUFFERED_BITS bb;
138+
G5_BUFFERED_BITS bb;
139139
int16_t CurFlips[MAX_IMAGE_FLIPS];
140140
int16_t RefFlips[MAX_IMAGE_FLIPS];
141141
} G5ENCIMAGE;

src/g5enc.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static const uint8_t vtable[14] =
5050
2,7}; /* V(3) = 0000010 */
5151

5252

53-
static void G5ENCInsertCode(BUFFERED_BITS *bb, BIGUINT ulCode, int iLen)
53+
static void G5ENCInsertCode(G5_BUFFERED_BITS *bb, BIGUINT ulCode, int iLen)
5454
{
5555
if ((bb->ulBitOff + iLen) > REGISTER_WIDTH) { // need to write data
5656
bb->ulBits |= (ulCode >> (bb->ulBitOff + iLen - REGISTER_WIDTH)); // partial bits on first word
@@ -66,7 +66,7 @@ static void G5ENCInsertCode(BUFFERED_BITS *bb, BIGUINT ulCode, int iLen)
6666
//
6767
// Flush any buffered bits to the output
6868
//
69-
static void G5ENCFlushBits(BUFFERED_BITS *bb)
69+
static void G5ENCFlushBits(G5_BUFFERED_BITS *bb)
7070
{
7171
while (bb->ulBitOff >= 8)
7272
{
@@ -204,13 +204,13 @@ int xsize, iErr, iHighWater;
204204
int iCur, iRef, iLen;
205205
int iHLen; // number of bits for long horizontal codes
206206
int16_t *CurFlips, *RefFlips;
207-
BUFFERED_BITS bb;
207+
G5_BUFFERED_BITS bb;
208208

209209
if (pImage == NULL || pPixels == NULL)
210210
return G5_INVALID_PARAMETER;
211211
iHighWater = pImage->iOutSize - 32;
212212
iHLen = 32 - __builtin_clz(pImage->iWidth);
213-
memcpy(&bb, &pImage->bb, sizeof(BUFFERED_BITS)); // keep local copy
213+
memcpy(&bb, &pImage->bb, sizeof(G5_BUFFERED_BITS)); // keep local copy
214214
CurFlips = pImage->pCur;
215215
RefFlips = pImage->pRef;
216216
xsize = pImage->iWidth; /* For performance reasons */

0 commit comments

Comments
 (0)