Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libaec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mathis Rosenhauer
libaec
Commits
9af97721
Commit
9af97721
authored
10 years ago
by
Moritz Hanke
Committed by
Mathis Rosenhauer
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
makes last_out int32_t
parent
19f3f8e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/decode.c
+4
-5
4 additions, 5 deletions
src/decode.c
src/decode.h
+1
-1
1 addition, 1 deletion
src/decode.h
with
5 additions
and
6 deletions
src/decode.c
+
4
−
5
View file @
9af97721
...
...
@@ -68,8 +68,7 @@
static void flush_##KIND(struct aec_stream *strm) \
{ \
uint32_t *flush_end, *bp, half_d; \
int32_t data; \
int64_t m; \
int32_t data, m; \
struct internal_state *state = strm->state; \
\
flush_end = state->rsip; \
...
...
@@ -79,7 +78,7 @@
state->last_out = *state->rsi_buffer; \
\
if (strm->flags & AEC_DATA_SIGNED) { \
m = UINT
64
_C(1) << (strm->bits_per_sample - 1); \
m = UINT
32
_C(1) << (strm->bits_per_sample - 1); \
/* Reference samples have to be sign extended */
\
state->last_out = (state->last_out ^ m) - m; \
} \
...
...
@@ -87,11 +86,12 @@
state->flush_start++; \
} \
\
data = state->last_out; \
\
if (state->xmin == 0) { \
\
uint32_t xmax, med, d; \
med = state->xmax / 2 + 1; \
data = (uint32_t)state->last_out; \
xmax = state->xmax; \
\
for (bp = state->flush_start; bp < flush_end; bp++) { \
...
...
@@ -118,7 +118,6 @@
} else { \
\
int32_t xmax, d; \
data = state->last_out; \
xmax = state->xmax; \
\
for (bp = state->flush_start; bp < flush_end; bp++) { \
...
...
This diff is collapsed.
Click to expand it.
src/decode.h
+
1
−
1
View file @
9af97721
...
...
@@ -78,7 +78,7 @@ struct internal_state {
void
(
*
flush_output
)(
struct
aec_stream
*
);
/* previous output for post-processing */
int
64
_t
last_out
;
int
32
_t
last_out
;
/* minimum integer for post-processing */
int64_t
xmin
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment