41 struct aec_stream strm;
45 strm.bits_per_sample = nbits;
46 LOG((3,
"dec_aec: bits_per_sample = %d", strm.bits_per_sample));
49 LOG((3,
"dec_aec: block_size = %d", block_size));
50 strm.block_size = block_size;
53 LOG((3,
"dec_aec: rsi = %d", rsi));
58 LOG((3,
"dec_aec: flags = %d", strm.flags));
65 LOG((3,
"dec_aec: avail_in = %d", strm.avail_in));
71 strm.avail_out = (size_t)cfldlen;
74 ret = aec_buffer_decode(&strm);
75 LOG((3,
"dec_aec: return from aec_buffer_encode = %d", ret));
111 struct aec_stream strm;
115 strm.bits_per_sample = nbits;
116 LOG((3,
"enc_aec: bits_per_sample = %d", strm.bits_per_sample));
119 LOG((3,
"enc_aec: block_size = %d", block_size));
120 strm.block_size = block_size;
123 LOG((3,
"enc_aec: rsi = %d", rsi));
128 LOG((3,
"enc_aec: flags = %d", strm.flags));
134 strm.avail_in = ctemplen;
135 LOG((3,
"enc_aec: avail_in = %d", strm.avail_in));
138 strm.next_out = aecbuf;
141 strm.avail_out = (size_t)aecbuflen;
144 ret = aec_buffer_encode(&strm);
145 LOG((3,
"enc_aec: return from aec_buffer_encode = %d", ret));
147 ret = strm.total_out;
int enc_aec(unsigned char *data, g2int ctemplen, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char *aecbuf, g2int *aecbuflen)
Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.
int dec_aec(unsigned char *cpack, g2int len, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char *cfld, g2int cfldlen)
Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.
int64_t g2int
Long integer type.
Header file with internal function prototypes NCEPLIBS-g2c library.
#define LOG(e)
Ignore logging to stdout.