jpcunpack.c(3)
π jpcunpack.c π β a whole manual page from the Library Functions Manual, section 3 π
okay bestie, sit down, hydrate, and let's talk about the JPEG2000 unpacking situation, because this one is genuinely iconic β¨
πΈ NAME πΈ
jpcunpack.c β unpack a data field that was packed with JPEG2000. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
#include 'grib2_int.h'
#include <stdio.h>
#include <stdlib.h>
π¦ Functions π¦
int g2c_jpcunpackd (unsigned char *cpack, size_t len, int *idrstmpl, size_t ndpts, double *fld)β unpacks JPEG2000 compressed data into an array of doubles, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. doubles girlie πint g2c_jpcunpackf (unsigned char *cpack, size_t len, int *idrstmpl, size_t ndpts, float *fld)β unpacks JPEG2000 compressed data into an array of floats, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. floats bestie π«Άg2int jpcunpack (unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, float *fld)β unpacks JPEG2000 compressed data into an array of floats, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. the OG π€static int jpcunpack_int (unsigned char *cpack, g2int len, g2int *idrstmpl, g2int ndpts, void *fld, int fld_is_double, int verbose)β unpacks JPEG2000 compressed data into an array of floats or doubles, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. the backstage main character, lowkey runs the whole show π§
π Detailed Description π
Unpack a data field that was packed with JPEG2000.
stream
π Author π
Stephem Gilbert
π Date π
2003-08-27
π Definition in file π
jpcunpack.c.
π Function Documentation π
int g2c_jpcunpackd (unsigned char * cpack, size_t len, int * idrstmpl, size_t ndpts, double * fld)
Unpack JPEG2000 compressed data into an array of doubles, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. This function is the V2 API version of jpcunpack() for doubles. she's the glow-up, no cap π
Parameters
cpackβ the packed data.lenβ the length of the packed data.idrstmplβ pointer to array of values for Data Representation Template 5.40 or 5.40000.ndptsβ the number of data values to unpack.fldβ a pointer that gets the unpacked data values as an array ofdouble.
Returns
G2C_NOERRORβ no error. we love a clean run β¨G2C_ENOMEMβ out of memory. the tragedy π
Author
Ed Hartnett
Date
2022-08-12
Definition at line 199 of file jpcunpack.c.
References
G2C_JPEG_DRS_TEMPLATE_LEN, jpcunpack_int(), and LOG.
int g2c_jpcunpackf (unsigned char * cpack, size_t len, int * idrstmpl, size_t ndpts, float * fld)
Unpack JPEG2000 compressed data into an array of floats, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. the float sibling, equally slay π¦
Parameters
cpackβ the packed data.lenβ the length of the packed data.idrstmplβ pointer to array of values for Data Representation Template 5.40 or 5.40000.ndptsβ the number of data values to unpack.fldβ a pointer that gets the unpacked data values as an array offloat.
Returns
G2C_NOERRORβ no error. βG2C_ENOMEMβ out of memory. π
Author
Ed Hartnett
Date
2022-09-08
Definition at line 159 of file jpcunpack.c.
References
G2C_JPEG_DRS_TEMPLATE_LEN, jpcunpack_int(), and LOG.
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 Representation Template 5.40 or 5.40000. the original recipe, still serving looks since 2003 π
Parameters
cpackβ the packed data.lenβ the length of the packed data.idrstmplβ pointer to array of values for Data Representation Template 5.40 or 5.40000.ndptsβ the number of data values to unpack.fldβ a pointer that gets the unpacked data values as an array offloat.
Returns
G2C_NOERRORβ no error. πΈG2_JPCUNPACK_MEMβ out of memory. not the memory situation bestie π
Author
Stephem Gilbert
Date
2003-08-27
Definition at line 123 of file jpcunpack.c.
References
G2_JPCUNPACK_MEM, jpcunpack_int(), and LOG.
Referenced by
g2c_unpack7_int().
int jpcunpack_int (unsigned char * cpack, g2int len, g2int * idrstmpl, g2int ndpts, void * fld, int fld_is_double, int verbose) [static]
Unpack JPEG2000 compressed data into an array of floats or doubles, using info from the GRIB2 Data Representation Template 5.40 or 5.40000. This function is used by jpcunpack(), g2c_jpcunpackf(), and g2c_jpcunpackd(). yeah she's the one everybody calls, the main character energy is off the charts π
Parameters
cpackβ the packed data.lenβ the length of the packed data.idrstmplβ pointer to array of values for Data Representation Template 5.40 or 5.40000.ndptsβ the number of data values to unpack.fldβ a pointer that gets the unpacked data values.fld_is_doubleβ non-zero if the data are to be unpacked into adoublearray, otherwise data will be unpacked into afloatarray.verboseβ if non-zero, error messages will be printed in case of error. Otherwise, error codes will be return but no error messages printed. Calls to the originalg2cAPI may cause error messages to be printed in case of error. For the newg2c_API, no error messages will be printed β instead an error code will be returned. Callg2c_strerror()to get the error message for any error code. iykyk π
heads up bestie: thatverboseflag is a whole personality. the oldg2cAPI might yap at you on error, but the newg2c_API stays quiet and hands you an error code instead β then you go callg2c_strerror()to find out what it actually means. fr fr.
Returns
G2C_NOERRORβ no error. β¨G2C_ENOMEMβ out of memory. π
Author
Ed Hartnett
Date
2022-09-06
Definition at line 44 of file jpcunpack.c.
References
dec_jpeg2000(), G2C_ENOMEM, G2C_NOERROR, int_power(), LOG, and rdieee().
Referenced by
g2c_jpcunpackd(), g2c_jpcunpackf(), and jpcunpack().
π«Ά Author π«Ά
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code. a robot wrote the docs, a legend wrote the code, that's the vibe π
and that's the whole page babes π this was NCEPLIBS-g2c, Version 2.3.0, serving jpcunpack.c(3) realness β stay packed, stay iconic, periodt πβ¨
π¦ where this page comes from
- ubuntu resolute: libg2c-dev 2.3.0-4 Β· LGPL-3.0-only
- ubuntu stonking: libg2c-dev 2.3.0-7 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms