Go to the documentation of this file.
34 void *fld,
int fld_is_double)
38 float ref, bscale, dscale;
51 if (!(ifld = calloc(ndpts,
sizeof(
g2int))))
53 fprintf(stderr,
"Could not allocate space in jpcunpack.\n Data field NOT upacked.\n");
59 for (j = 0; j < ndpts; j++)
60 dfld[j] = (((
float)ifld[j] * bscale) + ref) * dscale;
64 for (j = 0; j < ndpts; j++)
65 ffld[j] = (((
float)ifld[j] * bscale) + ref) * dscale;
73 for (j = 0; j < ndpts; j++)
78 for (j = 0; j < ndpts; j++)
static g2int jpcunpack_int(unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, void *fld, int fld_is_double)
Unpack JPEG2000 compressed data into an array of floats, using info from the GRIB2 Data Representatio...
#define G2_NO_ERROR
Function succeeded.
void rdieee(g2int *rieee, float *a, g2int num)
This subroutine reads a list of real values in 32-bit IEEE floating point format.
double int_power(double x, g2int y)
Function similar to C pow() power function.
g2int jpcunpackd(unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, double *fld)
Unpack JPEG2000 compressed data into an array of doubles, using info from the GRIB2 Data Representati...
Header file with internal function prototypes NCEPLIBS-g2c library.
int dec_jpeg2000(char *injpc, g2int bufsize, g2int *outfld)
This Function decodes a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i....
int64_t g2int
Long integer type.
#define G2_JPCUNPACK_MEM
In jpcunpack() or other unpack function: out of memory.
g2int jpcunpack(unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, float *fld)
Unpack JPEG2000 compressed data into an array of floats, using info from the GRIB2 Data Representatio...