summaryrefslogtreecommitdiff
path: root/src/decode.h
diff options
context:
space:
mode:
authorMathis Rosenhauer <rosenhauer@dkrz.de>2012-11-05 16:28:20 +0100
committerThomas Jahns <jahns@dkrz.de>2013-02-19 11:33:00 +0100
commit51bf26530fb205a4ced83a38854378d9ca8fb2b3 (patch)
treed4ed1f88708d67c49a53d58e99de90453f10c060 /src/decode.h
parent874139b80f06659e3c46c8e84aaade290328a33a (diff)
downloadlibaec-51bf26530fb205a4ced83a38854378d9ca8fb2b3.tar.gz
libaec-51bf26530fb205a4ced83a38854378d9ca8fb2b3.tar.bz2
libaec-51bf26530fb205a4ced83a38854378d9ca8fb2b3.zip
buffer output and filter in one go
Diffstat (limited to 'src/decode.h')
-rw-r--r--src/decode.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/decode.h b/src/decode.h
index cd0c3e7..7277399 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -12,8 +12,8 @@
#define M_CONTINUE 1
#define M_EXIT 0
-#define SAFE (strm->avail_in >= state->in_blklen \
- && strm->avail_out >= state->out_blklen)
+#define SAFE(strm) (strm->avail_in >= strm->state->in_blklen \
+ && strm->avail_out >= strm->state->out_blklen)
#define ROS 5
#define MIN(a, b) (((a) < (b))? (a): (b))
@@ -23,7 +23,7 @@ struct internal_state {
int id; /* option ID */
int id_len; /* bit length of code option identification key */
int (**id_table)(struct aec_stream *); /* table maps IDs to states */
- void (*put_sample)(struct aec_stream *, int64_t);
+ void (*flush_output)(struct aec_stream *);
int ref_int; /* reference sample is every ref_int samples */
int64_t last_out; /* previous output for post-processing */
int64_t xmin; /* minimum integer for post-processing */
@@ -40,8 +40,12 @@ struct internal_state {
int ref; /* 1 if current block has reference sample */
int pp; /* 1 if postprocessor has to be used */
int byte_per_sample;
- size_t samples_out;
int *se_table;
+ uint32_t *buf_out;
+ uint32_t buf_next_out;
+ uint32_t buf_size;
+ uint32_t flush_start;
+ uint32_t flush_end;
} decode_state;
#endif /* DECODE_H */