46 struct aec_stream strm;
50 strm.bits_per_sample = nbits;
51 LOG((3,
"dec_aec: bits_per_sample = %d",strm.bits_per_sample));
54 LOG((3,
"dec_aec: block_size = %d",block_size));
55 strm.block_size = block_size;
58 LOG((3,
"dec_aec: rsi = %d",rsi));
63 LOG((3,
"dec_aec: flags = %d",strm.flags));
70 LOG((3,
"dec_aec: avail_in = %d",strm.avail_in));
76 strm.avail_out = (size_t) cfldlen;
79 ret = aec_buffer_decode(&strm);
80 LOG((3,
"dec_aec: return from aec_buffer_encode = %d", ret));
81 if (ret == AEC_OK) ret = strm.total_out;
114 struct aec_stream strm;
118 strm.bits_per_sample = nbits;
119 LOG((3,
"enc_aec: bits_per_sample = %d",strm.bits_per_sample));
122 LOG((3,
"enc_aec: block_size = %d",block_size));
123 strm.block_size = block_size;
126 LOG((3,
"enc_aec: rsi = %d",rsi));
131 LOG((3,
"enc_aec: flags = %d",strm.flags));
137 strm.avail_in = ctemplen;
138 LOG((3,
"enc_aec: avail_in = %d",strm.avail_in));
141 strm.next_out = aecbuf;
144 strm.avail_out = (size_t) aecbuflen;
147 ret = aec_buffer_encode(&strm);
148 LOG((3,
"enc_aec: return from aec_buffer_encode = %d", ret));
149 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)
This Function encodes 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)
This Function decodes 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.