15 #define SAFE (strm->avail_in >= state->in_blklen \
16 && strm->avail_out >= state->out_blklen)
19 #define MIN(a, b) (((a) < (b))? (a): (b))
21 struct internal_state {
22 int (*mode)(struct aec_stream *);
23 int id; /* option ID */
24 int id_len; /* bit length of code option identification key */
25 int (**id_table)(struct aec_stream *); /* table maps IDs to states */
26 void (*put_sample)(struct aec_stream *, int64_t);
27 int ref_int; /* reference sample is every ref_int samples */
28 int64_t last_out; /* previous output for post-processing */
29 int64_t xmin; /* minimum integer for post-processing */
30 int64_t xmax; /* maximum integer for post-processing */
31 int in_blklen; /* length of uncompressed input block
32 should be the longest possible block */
33 int out_blklen; /* length of output block in bytes */
34 int n, i; /* counter for samples */
35 int64_t *block; /* block buffer for split-sample options */
36 int se; /* set if second extension option is selected */
37 uint64_t acc; /* accumulator for currently used bit sequence */
38 int bitp; /* bit pointer to the next unused bit in accumulator */
39 int fs; /* last fundamental sequence in accumulator */
40 int ref; /* 1 if current block has reference sample */
41 int pp; /* 1 if postprocessor has to be used */