Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
d1f7331a
Commit
d1f7331a
authored
Aug 15, 2012
by
Mathis Rosenhauer
Browse files
Fixed support for >64 bit FS for good, fixed init bug
parent
18458bd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/aed.c
View file @
d1f7331a
...
...
@@ -329,6 +329,7 @@ int ae_decode_init(ae_streamp strm)
state
->
samples_out
=
0
;
state
->
bitp
=
0
;
state
->
fs
=
0
;
state
->
pp
=
strm
->
flags
&
AE_DATA_PREPROCESS
;
state
->
mode
=
M_ID
;
return
AE_OK
;
...
...
@@ -363,21 +364,34 @@ int ae_decode_end(ae_streamp strm)
#define DROP(n) state->bitp -= (unsigned)(n)
#define ASKFS() \
do { \
ASK(1); \
while (GET(1) == 0) \
{ \
state->fs++; \
DROP(1); \
ASK(1); \
} \
DROP(1); \
} while(0)
#define ASKFS() \
do { \
ASK(1); \
while ((state->acc & (1ULL << (state->bitp - 1))) == 0) \
{ \
if (state->bitp == 1) \
{ \
if (strm->avail_in == 0) goto req_buffer; \
strm->avail_in--; \
strm->total_in++; \
state->acc <<= 8; \
state->acc |= *strm->next_in++; \
state->bitp += 8; \
} \
state->fs++; \
state->bitp--; \
} \
} while (0)
#define GETFS() state->fs
#define DROPFS() state->fs = 0;
#define DROPFS() \
do { \
state->fs = 0; \
/* Needs to be here for \
ASK/GET/PUT/DROP interleaving. */
\
state->bitp--; \
} while (0)
#define PUT(sample) \
do { \
...
...
src/aee.c
View file @
d1f7331a
...
...
@@ -193,6 +193,7 @@ int ae_encode_init(ae_streamp strm)
return
AE_MEM_ERROR
;
}
state
->
bp_out
=
state
->
block_out
;
*
state
->
bp_out
=
0
;
state
->
bitp
=
8
;
strm
->
total_in
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment