Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/vncdll/winvnc/libjpeg/jchuff.h
Views: 11784
/*1* jchuff.h2*3* Copyright (C) 1991-1997, Thomas G. Lane.4* This file is part of the Independent JPEG Group's software.5* For conditions of distribution and use, see the accompanying README file.6*7* This file contains declarations for Huffman entropy encoding routines8* that are shared between the sequential encoder (jchuff.c) and the9* progressive encoder (jcphuff.c). No other modules need to see these.10*/1112/* The legal range of a DCT coefficient is13* -1024 .. +1023 for 8-bit data;14* -16384 .. +16383 for 12-bit data.15* Hence the magnitude should always fit in 10 or 14 bits respectively.16*/1718#if BITS_IN_JSAMPLE == 819#define MAX_COEF_BITS 1020#else21#define MAX_COEF_BITS 1422#endif2324/* Derived data constructed for each Huffman table */2526typedef struct {27unsigned int ehufco[256]; /* code for each symbol */28char ehufsi[256]; /* length of code for each symbol */29/* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */30} c_derived_tbl;3132/* Short forms of external names for systems with brain-damaged linkers. */3334#ifdef NEED_SHORT_EXTERNAL_NAMES35#define jpeg_make_c_derived_tbl jMkCDerived36#define jpeg_gen_optimal_table jGenOptTbl37#endif /* NEED_SHORT_EXTERNAL_NAMES */3839/* Expand a Huffman table definition into the derived format */40EXTERN(void) jpeg_make_c_derived_tbl41JPP((j_compress_ptr cinfo, boolean isDC, int tblno,42c_derived_tbl ** pdtbl));4344/* Generate an optimal table definition given the specified counts */45EXTERN(void) jpeg_gen_optimal_table46JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));474849