aecpack.c(3) | Library Functions Manual | aecpack.c(3) |
aecpack.c - Pack array of float/double using AEC/CCSDS compression.
#include 'grib2_int.h'
#include <libaec.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
void aecpack (float *fld, g2int width, g2int
height, g2int *idrstmpl, unsigned char *cpack, g2int *lcpack)
This function packs up a float array into a AEC code stream. static int
aecpack_int (void *fld, int fld_is_double, g2int width,
g2int height, g2int *idrstmpl, unsigned char *cpack,
g2int *lcpack, int verbose)
Pack a float or double array into a AEC/CCSDS code stream. int
g2c_aecpackd (double *fld, size_t width, size_t height, int
*idrstmpl, unsigned char *cpack, size_t *lcpack)
This function packs up a double array into a AEC code stream. int
g2c_aecpackf (float *fld, size_t width, size_t height, int *idrstmpl,
unsigned char *cpack, size_t *lcpack)
This function packs up a float array into a AEC code stream.
Pack array of float/double using AEC/CCSDS compression.
Author
Date
Date Programmer Comments 2023-09-10 Engle Initial; Adapted from aecpack.c. 2023-10-16 Engle Added include libaec to set default values for CCSDS parameters.
Definition in file aecpack.c.
This function packs up a float array into a AEC code stream. After the data are scaled, and the reference value is subtracted out, the data are passed to the AEC encoder.
This function also fills in GRIB2 Data Representation Template 5.42 with the appropriate values.
Parameters
cpack A pointer that will get the packed data field. Must
be allocated before this function is called. Pass the allocated size in the
lcpack parameter.
lcpack Pointer that gets the length of packed field in cpack. This must
be set by the calling function to the size available in cpack.
Author
Definition at line 297 of file aecpack.c.
References aecpack_int().
Referenced by g2_addfield().
Pack a float or double array into a AEC/CCSDS code stream.
Parameters
Returns
Author
Definition at line 52 of file aecpack.c.
References ALOG2, enc_aec(), G2C_EAEC, G2C_NOERROR, int_power(), LOG, mkieee(), and sbits().
Referenced by aecpack(), g2c_aecpackd(), and g2c_aecpackf().
This function packs up a double array into a AEC code stream. After the data are scaled, and the reference value is subtracted out, the data are passed to the AEC encoder.
This function also fills in GRIB2 Data Representation Template 5.42 with the appropriate values.
This function is the V2 API version of aecpack() for floats.
Parameters
cpack A pointer that will get the packed data field. Must
be allocated before this function is called. Pass the allocated size in the
lcpack parameter.
lcpack Pointer that gets the length of packed field in cpack. This must
be set by the calling function to the size available in cpack.
Returns
Author
Definition at line 410 of file aecpack.c.
References aecpack_int(), and G2C_AEC_DRS_TEMPLATE_LEN.
This function packs up a float array into a AEC code stream. After the data are scaled, and the reference value is subtracted out, the data are passed to the AEC encoder.
This function also fills in GRIB2 Data Representation Template 5.42 with the appropriate values.
This function is the V2 API version of aecpack() for floats.
Parameters
cpack A pointer that will get the packed data field. Must
be allocated before this function is called. Pass the allocated size in the
lcpack parameter.
lcpack Pointer that gets the length of packed field in cpack. This must
be set by the calling function to the size available in cpack.
Returns
Author
Definition at line 346 of file aecpack.c.
References aecpack_int(), and G2C_AEC_DRS_TEMPLATE_LEN.
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.
Version 2.1.0 | NCEPLIBS-g2c |