40 struct aec_stream strm;
44 strm.bits_per_sample = nbits;
45 LOG((3,
"dec_aec: bits_per_sample = %d",strm.bits_per_sample));
48 LOG((3,
"dec_aec: block_size = %d",block_size));
49 strm.block_size = block_size;
52 LOG((3,
"dec_aec: rsi = %d",rsi));
57 LOG((3,
"dec_aec: flags = %d",strm.flags));
64 LOG((3,
"dec_aec: avail_in = %d",strm.avail_in));
70 strm.avail_out = (size_t) cfldlen;
73 ret = aec_buffer_decode(&strm);
74 LOG((3,
"dec_aec: return from aec_buffer_encode = %d", ret));
75 if (ret == AEC_OK) ret = strm.total_out;
108 struct aec_stream strm;
112 strm.bits_per_sample = nbits;
113 LOG((3,
"enc_aec: bits_per_sample = %d",strm.bits_per_sample));
116 LOG((3,
"enc_aec: block_size = %d",block_size));
117 strm.block_size = block_size;
120 LOG((3,
"enc_aec: rsi = %d",rsi));
125 LOG((3,
"enc_aec: flags = %d",strm.flags));
131 strm.avail_in = ctemplen;
132 LOG((3,
"enc_aec: avail_in = %d",strm.avail_in));
135 strm.next_out = aecbuf;
138 strm.avail_out = (size_t) aecbuflen;
141 ret = aec_buffer_encode(&strm);
142 LOG((3,
"enc_aec: return from aec_buffer_encode = %d", ret));
143 if (ret == AEC_OK) 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.