JDEC

The JDEC structure holds the data, pointer and flags to manage the decompression session. Application program must not change any member in this structure.

typedef struct JDEC JDEC;
struct JDEC {
    size_t dctr;                 /* Number of bytes available in the input buffer */
    uint8_t* dptr;               /* Current data read ptr */
    uint8_t* inbuf;              /* Bit stream input buffer */
    uint8_t dmsk;                /* Current bit in the current read byte */
    uint8_t scale;               /* Output scaling ratio */
    uint8_t msx, msy;            /* MCU size in unit of block (width, height) */
    uint8_t qtid[3];             /* Quantization table ID of each component */
    uint8_t ncomp;               /* Number of color components (1:grayscale, 3:color) */
    int16_t dcv[3];              /* Previous DC element of each component */
    uint16_t nrst;               /* Restart inverval */
    uint16_t width, height;      /* Size of the input image (pixel) */
    uint8_t* huffbits[2][2];     /* Huffman bit distribution tables [yc][dcac] */
    uint16_t* huffcode[2][2];    /* Huffman code word tables [yc][dcac] */
    uint8_t* huffdata[2][2];     /* Huffman decoded data tables [yc][dcac] */
    int32_t* qttbl[4];           /* De-quaitizer tables [id] */
    void* workbuf;               /* Working buffer for IDCT and RGB output */
    uint8_t* mcubuf;             /* Working buffer for the MCU */
    void* pool;                  /* Pointer to available memory pool */
    size_t sz_pool;              /* Size of momory pool (bytes available) */
    size_t (*infunc)(JDEC*, uint8_t*, size_t); /* Pointer to jpeg stream input function */
    void* device;                /* Pointer to I/O device identifiler for the session */
};

Return