coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
jpeg.c File Reference
#include <string.h>
#include "jpeg.h"
Include dependency graph for jpeg.c:

Go to the source code of this file.

Data Structures

struct  in
 
union  hufftblp
 
struct  scan
 
struct  dec_hufftbl
 
struct  comp
 
struct  jpginfo
 

Macros

#define __LITTLE_ENDIAN
 
#define ISHIFT   11
 
#define IFIX(a)   ((int)((a) * (1 << ISHIFT) + .5))
 
#define IMULT(a, b)   (((a) * (b)) >> ISHIFT)
 
#define ITOINT(a)   ((a) >> ISHIFT)
 
#define __P(x)   x
 
#define M_BADHUFF   -1
 
#define M_EOF   0x80
 
#define DECBITS   10 /* seems to be the optimum */
 
#define PREC   int
 
#define M_SOI   0xd8
 
#define M_APP0   0xe0
 
#define M_DQT   0xdb
 
#define M_SOF0   0xc0
 
#define M_DHT   0xc4
 
#define M_DRI   0xdd
 
#define M_SOS   0xda
 
#define M_RST0   0xd0
 
#define M_EOI   0xd9
 
#define M_COM   0xfe
 
#define MAXCOMP   4
 
#define dec_huffdc   (dhuff + 0)
 
#define dec_huffac   (dhuff + 2)
 
#define LEBI_DCL   int le, bi
 
#define LEBI_GET(in)   (le = in->left, bi = in->bits)
 
#define LEBI_PUT(in)   (in->left = le, in->bits = bi)
 
#define GETBITS(in, n)
 
#define UNGETBITS(in, n)
 
#define DEC_REC(in, hu, r, i)
 
#define ONE   ((PREC)IFIX(1.))
 
#define S2   ((PREC)IFIX(0.382683432))
 
#define C2   ((PREC)IFIX(0.923879532))
 
#define C4   ((PREC)IFIX(0.707106781))
 
#define S22   ((PREC)IFIX(2 * 0.382683432))
 
#define C22   ((PREC)IFIX(2 * 0.923879532))
 
#define IC4   ((PREC)IFIX(1 / 0.707106781))
 
#define C3IC1   ((PREC)IFIX(0.847759065)) /* c3/c1 */
 
#define C5IC1   ((PREC)IFIX(0.566454497)) /* c5/c1 */
 
#define C7IC1   ((PREC)IFIX(0.198912367)) /* c7/c1 */
 
#define XPP(a, b)   (t = a + b, b = a - b, a = t)
 
#define XMP(a, b)   (t = a - b, b = a + b, a = t)
 
#define XPM(a, b)   (t = a + b, b = b - a, a = t)
 
#define ROT(a, b, s, c)
 
#define IDCT
 
#define ROUND
 
#define STORECLAMP(a, x)
 
#define CLAMP(x)   ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x))
 
#define CBCRCG(yin, xin)
 
#define PIC(yin, xin, p, xout)
 
#define PIC_16(yin, xin, p, xout, add)
 
#define PIC_32(yin, xin, p, xout)
 
#define PIC221111(xin)
 
#define PIC221111_16(xin)
 
#define PIC221111_32(xin)
 

Functions

static void decode_mcus __P ((struct in *, int *, int, struct scan *, int *))
 
static int dec_readmarker __P ((struct in *))
 
static void dec_makehuff __P ((struct dec_hufftbl *, int *, unsigned char *))
 
static void setinput __P ((struct in *, unsigned char *))
 
static void idctqtab __P ((unsigned char *, PREC *))
 
static void idct __P ((int *, int *, PREC *, PREC, int))
 
static void scaleidctqtab __P ((PREC *, PREC))
 
static void initcol __P ((PREC[][64]))
 
static void col221111 __P ((int *, unsigned char *, int))
 
static int getbyte (void)
 
static int getword (void)
 
static int readtables (int till)
 
static void dec_initscans (void)
 
static int dec_checkmarker (void)
 
void jpeg_fetch_size (unsigned char *buf, int *width, int *height)
 
int jpeg_check_size (unsigned char *buf, int width, int height)
 
int jpeg_decode (unsigned char *buf, unsigned char *pic, int width, int height, int depth, struct jpeg_decdata *decdata)
 
static int fillbits __P ((struct in *, int, unsigned int))
 
static int dec_rec2 __P ((struct in *, struct dec_hufftbl *, int *, int, int))
 
static void setinput (struct in *in, unsigned char *p)
 
static int fillbits (struct in *in, int le, unsigned int bi)
 
static int dec_readmarker (struct in *in)
 
static int dec_rec2 (struct in *in, struct dec_hufftbl *hu, int *runp, int c, int i)
 
static void decode_mcus (struct in *in, int *dct, int n, struct scan *sc, int *maxp)
 
static void dec_makehuff (struct dec_hufftbl *hu, int *hufflen, unsigned char *huffvals)
 
void idct (int *in, int *out, PREC *lquant, PREC off, int max)
 
static void idctqtab (unsigned char *qin, PREC *qout)
 
static void scaleidctqtab (PREC *q, PREC sc)
 
static void initcol (PREC q[][64])
 
static void col221111 (int *out, unsigned char *pic, int width)
 
static void col221111_16 (int *out, unsigned char *pic, int width)
 
static void col221111_32 (int *out, unsigned char *pic, int width)
 

Variables

static unsigned char * datap
 
static struct jpginfo info
 
static struct comp comps [MAXCOMP]
 
static struct scan dscans [MAXCOMP]
 
static unsigned char quant [4][64]
 
static struct dec_hufftbl dhuff [4]
 
static struct in glob_in
 
static unsigned char zig2 [64]
 
static unsigned char zig [64]
 
static PREC aaidct [8]
 

Macro Definition Documentation

◆ __LITTLE_ENDIAN

#define __LITTLE_ENDIAN

Definition at line 10 of file jpeg.c.

◆ __P

#define __P (   x)    x

Definition at line 20 of file jpeg.c.

◆ C2

#define C2   ((PREC)IFIX(0.923879532))

Definition at line 632 of file jpeg.c.

◆ C22

#define C22   ((PREC)IFIX(2 * 0.923879532))

Definition at line 636 of file jpeg.c.

◆ C3IC1

#define C3IC1   ((PREC)IFIX(0.847759065)) /* c3/c1 */

Definition at line 639 of file jpeg.c.

◆ C4

#define C4   ((PREC)IFIX(0.707106781))

Definition at line 633 of file jpeg.c.

◆ C5IC1

#define C5IC1   ((PREC)IFIX(0.566454497)) /* c5/c1 */

Definition at line 640 of file jpeg.c.

◆ C7IC1

#define C7IC1   ((PREC)IFIX(0.198912367)) /* c7/c1 */

Definition at line 641 of file jpeg.c.

◆ CBCRCG

#define CBCRCG (   yin,
  xin 
)
Value:
( \
cb = outc[0 + yin * 8 + xin], \
cr = outc[64 + yin * 8 + xin], \
cg = (50 * cb + 130 * cr + 128) >> 8 \
)

Definition at line 833 of file jpeg.c.

◆ CLAMP

#define CLAMP (   x)    ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x))

Definition at line 829 of file jpeg.c.

◆ dec_huffac

#define dec_huffac   (dhuff + 2)

Definition at line 144 of file jpeg.c.

◆ dec_huffdc

#define dec_huffdc   (dhuff + 0)

Definition at line 143 of file jpeg.c.

◆ DEC_REC

#define DEC_REC (   in,
  hu,
  r,
 
)
Value:
( \
r = GETBITS(in, DECBITS), \
i = hu->llvals[r], \
i & 128 ? \
( \
UNGETBITS(in, i & 127), \
r = i >> 8 & 15, \
i >> 16 \
) \
: \
( \
i = dec_rec2(in, hu, &r, r, i), \
LEBI_GET(in), \
i \
) \
)
#define GETBITS(in, n)
Definition: jpeg.c:479
#define LEBI_PUT(in)
Definition: jpeg.c:477
#define DECBITS
Definition: jpeg.c:60
static int dec_rec2(struct in *in, struct dec_hufftbl *hu, int *runp, int c, int i)
Definition: jpeg.c:490
Definition: jpeg.c:27

Definition at line 524 of file jpeg.c.

◆ DECBITS

#define DECBITS   10 /* seems to be the optimum */

Definition at line 60 of file jpeg.c.

◆ GETBITS

#define GETBITS (   in,
 
)
Value:
( \
(le < (n) ? le = fillbits(in, le, bi), bi = in->bits : 0), \
(le -= (n)), \
bi >> le & ((1 << (n)) - 1) \
)
static int fillbits(struct in *in, int le, unsigned int bi)
Definition: jpeg.c:428
unsigned int bits
Definition: jpeg.c:29

Definition at line 479 of file jpeg.c.

◆ IC4

#define IC4   ((PREC)IFIX(1 / 0.707106781))

Definition at line 637 of file jpeg.c.

◆ IDCT

#define IDCT
Value:
( \
XPP(t0, t1), \
XMP(t2, t3), \
t2 = IMULT(t2, IC4) - t3, \
XPP(t0, t3), \
XPP(t1, t2), \
XMP(t4, t7), \
XPP(t5, t6), \
XMP(t5, t7), \
t5 = IMULT(t5, IC4), \
ROT(t4, t6, S22, C22), \
t6 -= t7, \
t5 -= t6, \
t4 -= t5, \
XPP(t0, t7), \
XPP(t1, t6), \
XPP(t2, t5), \
XPP(t3, t4) \
)
#define IC4
Definition: jpeg.c:637
#define C22
Definition: jpeg.c:636
#define IMULT(a, b)
Definition: jpeg.c:16
#define S22
Definition: jpeg.c:635

Definition at line 651 of file jpeg.c.

◆ IFIX

#define IFIX (   a)    ((int)((a) * (1 << ISHIFT) + .5))

Definition at line 15 of file jpeg.c.

◆ IMULT

#define IMULT (   a,
 
)    (((a) * (b)) >> ISHIFT)

Definition at line 16 of file jpeg.c.

◆ ISHIFT

#define ISHIFT   11

Definition at line 13 of file jpeg.c.

◆ ITOINT

#define ITOINT (   a)    ((a) >> ISHIFT)

Definition at line 17 of file jpeg.c.

◆ LEBI_DCL

#define LEBI_DCL   int le, bi

Definition at line 475 of file jpeg.c.

◆ LEBI_GET

#define LEBI_GET (   in)    (le = in->left, bi = in->bits)

Definition at line 476 of file jpeg.c.

◆ LEBI_PUT

#define LEBI_PUT (   in)    (in->left = le, in->bits = bi)

Definition at line 477 of file jpeg.c.

◆ M_APP0

#define M_APP0   0xe0

Definition at line 94 of file jpeg.c.

◆ M_BADHUFF

#define M_BADHUFF   -1

Definition at line 24 of file jpeg.c.

◆ M_COM

#define M_COM   0xfe

Definition at line 102 of file jpeg.c.

◆ M_DHT

#define M_DHT   0xc4

Definition at line 97 of file jpeg.c.

◆ M_DQT

#define M_DQT   0xdb

Definition at line 95 of file jpeg.c.

◆ M_DRI

#define M_DRI   0xdd

Definition at line 98 of file jpeg.c.

◆ M_EOF

#define M_EOF   0x80

Definition at line 25 of file jpeg.c.

◆ M_EOI

#define M_EOI   0xd9

Definition at line 101 of file jpeg.c.

◆ M_RST0

#define M_RST0   0xd0

Definition at line 100 of file jpeg.c.

◆ M_SOF0

#define M_SOF0   0xc0

Definition at line 96 of file jpeg.c.

◆ M_SOI

#define M_SOI   0xd8

Definition at line 93 of file jpeg.c.

◆ M_SOS

#define M_SOS   0xda

Definition at line 99 of file jpeg.c.

◆ MAXCOMP

#define MAXCOMP   4

Definition at line 125 of file jpeg.c.

◆ ONE

#define ONE   ((PREC)IFIX(1.))

Definition at line 630 of file jpeg.c.

◆ PIC

#define PIC (   yin,
  xin,
  p,
  xout 
)
Value:
( \
y = outy[(yin) * 8 + xin], \
STORECLAMP(p[(xout) * 3 + 0], y + cr), \
STORECLAMP(p[(xout) * 3 + 1], y - cg), \
STORECLAMP(p[(xout) * 3 + 2], y + cb) \
)
#define STORECLAMP(a, x)
Definition: jpeg.c:820
int y
Definition: edid.c:994

Definition at line 851 of file jpeg.c.

◆ PIC221111

#define PIC221111 (   xin)
Value:
( \
CBCRCG(0, xin), \
PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \
PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \
PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \
PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \
)

Definition at line 902 of file jpeg.c.

◆ PIC221111_16

#define PIC221111_16 (   xin)
Value:
( \
CBCRCG(0, xin), \
PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3), \
PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0), \
PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1), \
PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2) \
)

Definition at line 911 of file jpeg.c.

◆ PIC221111_32

#define PIC221111_32 (   xin)
Value:
( \
CBCRCG(0, xin), \
PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \
PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \
PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \
PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \
)

Definition at line 920 of file jpeg.c.

◆ PIC_16

#define PIC_16 (   yin,
  xin,
  p,
  xout,
  add 
)
Value:
( \
y = outy[(yin) * 8 + xin], \
y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 8) | \
((CLAMP(y - cg + add) & 0xfc) << 3) | \
((CLAMP(y + cb + add*2+1)) >> 3), \
p[(xout) * 2 + 0] = y & 0xff, \
p[(xout) * 2 + 1] = y >> 8 \
)
#define CLAMP(x)
Definition: jpeg.c:829

Definition at line 860 of file jpeg.c.

◆ PIC_32

#define PIC_32 (   yin,
  xin,
  p,
  xout 
)
Value:
( \
y = outy[(yin) * 8 + xin], \
STORECLAMP(p[(xout) * 4 + 0], y + cr), \
STORECLAMP(p[(xout) * 4 + 1], y - cg), \
STORECLAMP(p[(xout) * 4 + 2], y + cb), \
p[(xout) * 4 + 3] = 0 \
)

Definition at line 893 of file jpeg.c.

◆ PREC

#define PREC   int

Definition at line 77 of file jpeg.c.

◆ ROT

#define ROT (   a,
  b,
  s,
  c 
)
Value:
(t = IMULT(a + b, s), \
a = IMULT(a, c - s) + t, \
b = IMULT(b, c + s) - t)
#define s(param, src_bits, pmcreg, dst_bits)
#define c(value, pmcreg, dst_bits)

Definition at line 647 of file jpeg.c.

◆ ROUND

#define ROUND

Definition at line 790 of file jpeg.c.

◆ S2

#define S2   ((PREC)IFIX(0.382683432))

Definition at line 631 of file jpeg.c.

◆ S22

#define S22   ((PREC)IFIX(2 * 0.382683432))

Definition at line 635 of file jpeg.c.

◆ STORECLAMP

#define STORECLAMP (   a,
  x 
)
Value:
( \
(a) = (x), \
(unsigned int)(x) >= 256 ? \
((a) = (x) < 0 ? 0 : 255) \
: \
0 \
)
int x
Definition: edid.c:994

Definition at line 820 of file jpeg.c.

◆ UNGETBITS

#define UNGETBITS (   in,
 
)
Value:
( \
le += (n) \
)

Definition at line 485 of file jpeg.c.

◆ XMP

#define XMP (   a,
 
)    (t = a - b, b = a + b, a = t)

Definition at line 644 of file jpeg.c.

◆ XPM

#define XPM (   a,
 
)    (t = a + b, b = b - a, a = t)

Definition at line 645 of file jpeg.c.

◆ XPP

#define XPP (   a,
 
)    (t = a + b, b = a - b, a = t)

Definition at line 643 of file jpeg.c.

Function Documentation

◆ __P() [1/11]

static void idct __P ( (int *, int *, PREC *, PREC, int)  )
static

◆ __P() [2/11]

static void col221111_32 __P ( (int *, unsigned char *, int)  )
static

◆ __P() [3/11]

static void scaleidctqtab __P ( (PREC *, PREC )
static

◆ __P() [4/11]

static void initcol __P ( (PREC[][64])  )
static

◆ __P() [5/11]

static void dec_makehuff __P ( (struct dec_hufftbl *, int *, unsigned char *)  )
static

◆ __P() [6/11]

static int dec_readmarker __P ( (struct in *)  )
static

◆ __P() [7/11]

static void decode_mcus __P ( (struct in *, int *, int, struct scan *, int *)  )
static

◆ __P() [8/11]

static int fillbits __P ( (struct in *, int, unsigned int)  )
static

◆ __P() [9/11]

static int dec_rec2 __P ( (struct in *, struct dec_hufftbl *, int *, int, int)  )
static

◆ __P() [10/11]

static void setinput __P ( (struct in *, unsigned char *)  )
static

◆ __P() [11/11]

static void idctqtab __P ( (unsigned char *, PREC *)  )
static

◆ col221111()

static void col221111 ( int *  out,
unsigned char *  pic,
int  width 
)
static

Definition at line 929 of file jpeg.c.

References PIC221111, width, and y.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ col221111_16()

static void col221111_16 ( int *  out,
unsigned char *  pic,
int  width 
)
static

Definition at line 953 of file jpeg.c.

References PIC221111_16, width, and y.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ col221111_32()

static void col221111_32 ( int *  out,
unsigned char *  pic,
int  width 
)
static

Definition at line 977 of file jpeg.c.

References PIC221111_32, width, and y.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ dec_checkmarker()

static int dec_checkmarker ( void  )
static

Definition at line 231 of file jpeg.c.

References dec_readmarker(), jpginfo::dri, dscans, glob_in, info, jpginfo::nm, jpginfo::ns, and jpginfo::rm.

Referenced by jpeg_decode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dec_initscans()

static void dec_initscans ( void  )
static

Definition at line 221 of file jpeg.c.

References jpginfo::dri, dscans, info, M_RST0, jpginfo::nm, jpginfo::ns, and jpginfo::rm.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ dec_makehuff()

static void dec_makehuff ( struct dec_hufftbl hu,
int *  hufflen,
unsigned char *  huffvals 
)
static

Definition at line 574 of file jpeg.c.

References c, DECBITS, dec_hufftbl::llvals, dec_hufftbl::maxcode, dec_hufftbl::valptr, dec_hufftbl::vals, and x.

Referenced by readtables().

Here is the caller graph for this function:

◆ dec_readmarker()

static int dec_readmarker ( struct in in)
static

Definition at line 462 of file jpeg.c.

References in::bits, fillbits(), in::left, m, and in::marker.

Referenced by dec_checkmarker(), and jpeg_decode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dec_rec2()

static int dec_rec2 ( struct in in,
struct dec_hufftbl hu,
int *  runp,
int  c,
int  i 
)
static

◆ decode_mcus()

static void decode_mcus ( struct in in,
int *  dct,
int  n,
struct scan sc,
int *  maxp 
)
static

Definition at line 542 of file jpeg.c.

References scan::dc, DEC_REC, hufftblp::dhuff, scan::huac, scan::hudc, LEBI_DCL, LEBI_GET, LEBI_PUT, memset(), and scan::next.

Referenced by jpeg_decode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillbits()

static int fillbits ( struct in in,
int  le,
unsigned int  bi 
)
static

Definition at line 428 of file jpeg.c.

References in::bits, in::data, m, M_EOF, in::marker, and in::p.

Referenced by dec_readmarker().

Here is the caller graph for this function:

◆ getbyte()

static int getbyte ( void  )
static

Definition at line 106 of file jpeg.c.

References datap.

Referenced by jpeg_check_size(), jpeg_decode(), jpeg_fetch_size(), and readtables().

Here is the caller graph for this function:

◆ getword()

static int getword ( void  )
static

Definition at line 111 of file jpeg.c.

Referenced by jpeg_check_size(), jpeg_decode(), jpeg_fetch_size(), and readtables().

Here is the caller graph for this function:

◆ idct()

void idct ( int *  in,
int *  out,
PREC lquant,
PREC  off,
int  max 
)

Definition at line 683 of file jpeg.c.

References IDCT, ITOINT, PREC, and zig2.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ idctqtab()

static void idctqtab ( unsigned char *  qin,
PREC qout 
)
static

Definition at line 768 of file jpeg.c.

References aaidct, IMULT, and zig.

Referenced by jpeg_decode().

Here is the caller graph for this function:

◆ initcol()

static void initcol ( PREC  q[][64])
static

Definition at line 813 of file jpeg.c.

References IFIX, and scaleidctqtab().

Referenced by jpeg_decode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jpeg_check_size()

int jpeg_check_size ( unsigned char *  buf,
int  width,
int  height 
)

Definition at line 256 of file jpeg.c.

References buf, datap, getbyte(), getword(), height, M_SOF0, readtables(), and width.

Here is the call graph for this function:

◆ jpeg_decode()

◆ jpeg_fetch_size()

void jpeg_fetch_size ( unsigned char *  buf,
int *  width,
int *  height 
)

Definition at line 244 of file jpeg.c.

References buf, datap, getbyte(), getword(), height, M_SOF0, readtables(), and width.

Referenced by set_bootsplash().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readtables()

static int readtables ( int  till)
static

Definition at line 148 of file jpeg.c.

References dec_makehuff(), dhuff, jpginfo::dri, getbyte(), getword(), info, m, M_DHT, M_DQT, M_DRI, and quant.

Referenced by jpeg_check_size(), jpeg_decode(), and jpeg_fetch_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleidctqtab()

static void scaleidctqtab ( PREC q,
PREC  sc 
)
static

Definition at line 778 of file jpeg.c.

References IMULT.

Referenced by initcol().

Here is the caller graph for this function:

◆ setinput()

static void setinput ( struct in in,
unsigned char *  p 
)
static

Definition at line 420 of file jpeg.c.

References in::bits, in::left, in::marker, and in::p.

Referenced by jpeg_decode().

Here is the caller graph for this function:

Variable Documentation

◆ aaidct

PREC aaidct[8]
static
Initial value:
= {
IFIX(0.3535533906), IFIX(0.4903926402),
IFIX(0.4619397663), IFIX(0.4157348062),
IFIX(0.3535533906), IFIX(0.2777851165),
IFIX(0.1913417162), IFIX(0.0975451610)
}
#define IFIX(a)
Definition: jpeg.c:15

Definition at line 760 of file jpeg.c.

Referenced by idctqtab().

◆ comps

struct comp comps[MAXCOMP]
static

Definition at line 111 of file jpeg.c.

Referenced by jpeg_decode().

◆ datap

unsigned char* datap
static

Definition at line 104 of file jpeg.c.

Referenced by getbyte(), jpeg_check_size(), jpeg_decode(), and jpeg_fetch_size().

◆ dhuff

struct dec_hufftbl dhuff[4]
static

Definition at line 139 of file jpeg.c.

Referenced by readtables().

◆ dscans

struct scan dscans[MAXCOMP]
static

Definition at line 111 of file jpeg.c.

Referenced by dec_checkmarker(), dec_initscans(), and jpeg_decode().

◆ glob_in

struct in glob_in
static

Definition at line 139 of file jpeg.c.

Referenced by dec_checkmarker(), and jpeg_decode().

◆ info

struct jpginfo info
static

Definition at line 111 of file jpeg.c.

Referenced by dec_checkmarker(), dec_initscans(), jpeg_decode(), and readtables().

◆ quant

unsigned char quant[4][64]
static

Definition at line 139 of file jpeg.c.

Referenced by jpeg_decode(), and readtables().

◆ zig

unsigned char zig[64]
static
Initial value:
= {
0, 1, 5, 6, 14, 15, 27, 28,
2, 4, 7, 13, 16, 26, 29, 42,
3, 8, 12, 17, 25, 30, 41, 43,
9, 11, 18, 24, 31, 40, 44, 53,
10, 19, 23, 32, 39, 45, 52, 54,
20, 22, 33, 38, 46, 51, 55, 60,
21, 34, 37, 47, 50, 56, 59, 61,
35, 36, 48, 49, 57, 58, 62, 63
}

Definition at line 749 of file jpeg.c.

Referenced by idctqtab().

◆ zig2

unsigned char zig2[64]
static
Initial value:
= {
0, 2, 3, 9, 10, 20, 21, 35,
14, 16, 25, 31, 39, 46, 50, 57,
5, 7, 12, 18, 23, 33, 37, 48,
27, 29, 41, 44, 52, 55, 59, 62,
15, 26, 30, 40, 45, 51, 56, 58,
1, 4, 8, 11, 19, 22, 34, 36,
28, 42, 43, 53, 54, 60, 61, 63,
6, 13, 17, 24, 32, 38, 47, 49
}

Definition at line 672 of file jpeg.c.

Referenced by idct().