decenc_aec.c(3)

NAME
decenc_aec.c - Decode/encode an AEC code stream.

SYNOPSIS

#include 'grib2_int.h'
#include <libaec.h>
#include <stdint.h>
#include <stdio.h>

  Functions

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.
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 g2c_dec_aec (unsigned char *cpack, int len, int nbits, int flags, int block_size, int rsi, unsigned char *cfld, int cfldlen)
Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.
int g2c_enc_aec (unsigned char *data, int ctemplen, int nbits, int flags, int block_size, int rsi, unsigned char *aecbuf, int *aecbuflen)
Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.

Detailed Description

Decode/encode an AEC code stream.

Author
    Eric Engle

Date
    2023-10-16

Definition in file decenc_aec.c.

Function Documentation

  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.

Parameters
    cpack Pointer to buffer that holds the input AEC code stream.
    len Length (in bytes) of the buffer that holds the input AEC code stream.
    nbits CCSDS bits per sample.
    flags CCSDS compression options mask.
    block_size CCSDS block size.
    rsi CCSDS reference sample interval.
    cfld Pointer to output buffer from the AEC decoder.
    cfldlen length of output buffer.

Returns

    •   >0 Length of data from AEC decoder

    •   0 Successful decode (AEC_OK)

    •   -1 AEC_CONF_ERROR

    •   -2 AEC_STREAM_ERROR

    •   -3 AEC_DATA_ERROR

    •   -4 AEC_MEM_ERROR

    •   -5 AEC_RSI_OFFSETS_ERROR

Author
    Eric Engle

Date
    2023-10-16

Definition at line 38 of file decenc_aec.c.

References LOG.

Referenced by aecunpack_int(), and g2c_dec_aec().

  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.

Parameters
    data Pointer to buffer that holds the input data.
    ctemplen Length (in bytes) of the buffer that holds the input data..
    nbits CCSDS bits per sample.
    flags CCSDS compression options mask.
    block_size CCSDS block size.
    rsi CCSDS reference sample interval.
    aecbuf Pointer to buffer holding the AEC encoded stream.
    aecbuflen Length of AEC code stream.

Returns

    •   >0 Exact length of AEC encoded data.

    •   0 Successful decode (AEC_OK)

    •   -1 AEC_CONF_ERROR

    •   -2 AEC_STREAM_ERROR

    •   -3 AEC_DATA_ERROR

    •   -4 AEC_MEM_ERROR

    •   -5 AEC_RSI_OFFSETS_ERROR

Author
    Eric Engle

Date
    2023-10-16

Definition at line 108 of file decenc_aec.c.

References LOG.

Referenced by aecpack_int(), and g2c_enc_aec().

  int g2c_dec_aec (unsigned char * cpack, int len, int nbits, int flags, int block_size, int rsi, unsigned char * cfld, int cfldlen)

Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.

Parameters
    cpack Pointer to buffer that holds the input AEC code stream.
    len Length (in bytes) of the buffer that holds the input AEC code stream.
    nbits CCSDS bits per sample.
    flags CCSDS compression options mask.
    block_size CCSDS block size.
    rsi CCSDS reference sample interval.
    cfld Pointer to output buffer from the AEC decoder.
    cfldlen length of output buffer.

Returns

    •   >0 Length of data from AEC decoder

    •   0 Successful decode (AEC_OK)

    •   -1 AEC_CONF_ERROR

    •   -2 AEC_STREAM_ERROR

    •   -3 AEC_DATA_ERROR

    •   -4 AEC_MEM_ERROR

    •   -5 AEC_RSI_OFFSETS_ERROR

Author
    Alyson Stahl

Date
    10/2025

Definition at line 179 of file decenc_aec.c.

References dec_aec().

  int g2c_enc_aec (unsigned char * data, int ctemplen, int nbits, int flags, int block_size, int rsi, unsigned char * aecbuf, int * aecbuflen)

Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.

Parameters
    data Pointer to buffer that holds the input data.
    ctemplen Length (in bytes) of the buffer that holds the input data..
    nbits CCSDS bits per sample.
    flags CCSDS compression options mask.
    block_size CCSDS block size.
    rsi CCSDS reference sample interval.
    aecbuf Pointer to buffer holding the AEC encoded stream.
    aecbuflen Length of AEC code stream.

Returns

    •   >0 Exact length of AEC encoded data.

    •   0 Successful decode (AEC_OK)

    •   -1 AEC_CONF_ERROR

    •   -2 AEC_STREAM_ERROR

    •   -3 AEC_DATA_ERROR

    •   -4 AEC_MEM_ERROR

    •   -5 AEC_RSI_OFFSETS_ERROR

Author
    Alyson Stahl

Date
    10/2025

Definition at line 215 of file decenc_aec.c.

References enc_aec().

Author

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.