Classes | Functions | Variables
pjpeg.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include "pjpeg.h"
#include "image_u8.h"
#include "image_u8x3.h"
#include "debug_print.h"
Include dependency graph for pjpeg.c:

Go to the source code of this file.

Classes

struct  bit_decoder
 
struct  pjpeg_decode_state
 
struct  pjpeg_huffman_code
 

Functions

static uint32_t bd_consume_bits (struct bit_decoder *bd, int nbits)
 
static void bd_discard_bytes (struct bit_decoder *bd, int nbytes)
 
static void bd_discard_to_byte_boundary (struct bit_decoder *bd)
 
static void bd_ensure (struct bit_decoder *bd, int nbits)
 
static uint32_t bd_get_offset (struct bit_decoder *bd)
 
static int bd_has_more (struct bit_decoder *bd)
 
static uint32_t bd_peek_bits (struct bit_decoder *bd, int nbits)
 
static uint8_t clamp_u8 (int32_t v)
 
static uint8_t clampd (double v)
 
static uint8_t max_u8 (uint8_t a, uint8_t b)
 
pjpeg_tpjpeg_create_from_buffer (uint8_t *buf, int buflen, uint32_t flags, int *error)
 
pjpeg_tpjpeg_create_from_file (const char *path, uint32_t flags, int *error)
 
static int pjpeg_decode_buffer (struct pjpeg_decode_state *pjd)
 
void pjpeg_destroy (pjpeg_t *pj)
 
void pjpeg_idct_2D_double (int32_t in[64], uint8_t *out, uint32_t outstride)
 
void pjpeg_idct_2D_nanojpeg (int32_t in[64], uint8_t *out, uint32_t outstride)
 
void pjpeg_idct_2D_u32 (int32_t in[64], uint8_t *out, uint32_t outstride)
 
image_u8_tpjpeg_to_u8_baseline (pjpeg_t *pj)
 
image_u8x3_tpjpeg_to_u8x3_baseline (pjpeg_t *pj)
 

Variables

static uint8_t mjpeg_dht []
 
static const char ZZ [64]
 

Function Documentation

◆ bd_consume_bits()

static uint32_t bd_consume_bits ( struct bit_decoder bd,
int  nbits 
)
inlinestatic

Definition at line 209 of file pjpeg.c.

◆ bd_discard_bytes()

static void bd_discard_bytes ( struct bit_decoder bd,
int  nbytes 
)
inlinestatic

Definition at line 223 of file pjpeg.c.

◆ bd_discard_to_byte_boundary()

static void bd_discard_to_byte_boundary ( struct bit_decoder bd)
inlinestatic

Definition at line 236 of file pjpeg.c.

◆ bd_ensure()

static void bd_ensure ( struct bit_decoder bd,
int  nbits 
)
inlinestatic

Definition at line 175 of file pjpeg.c.

◆ bd_get_offset()

static uint32_t bd_get_offset ( struct bit_decoder bd)
inlinestatic

Definition at line 241 of file pjpeg.c.

◆ bd_has_more()

static int bd_has_more ( struct bit_decoder bd)
inlinestatic

Definition at line 229 of file pjpeg.c.

◆ bd_peek_bits()

static uint32_t bd_peek_bits ( struct bit_decoder bd,
int  nbits 
)
inlinestatic

Definition at line 202 of file pjpeg.c.

◆ clamp_u8()

static uint8_t clamp_u8 ( int32_t  v)
inlinestatic

Definition at line 728 of file pjpeg.c.

◆ clampd()

static uint8_t clampd ( double  v)
inlinestatic

Definition at line 718 of file pjpeg.c.

◆ max_u8()

static uint8_t max_u8 ( uint8_t  a,
uint8_t  b 
)
inlinestatic

Definition at line 144 of file pjpeg.c.

◆ pjpeg_create_from_buffer()

pjpeg_t* pjpeg_create_from_buffer ( uint8_t *  buf,
int  buflen,
uint32_t  flags,
int *  error 
)

Definition at line 857 of file pjpeg.c.

◆ pjpeg_create_from_file()

pjpeg_t* pjpeg_create_from_file ( const char *  path,
uint32_t  flags,
int *  error 
)

Definition at line 825 of file pjpeg.c.

◆ pjpeg_decode_buffer()

static int pjpeg_decode_buffer ( struct pjpeg_decode_state pjd)
static

Definition at line 246 of file pjpeg.c.

◆ pjpeg_destroy()

void pjpeg_destroy ( pjpeg_t pj)

Definition at line 689 of file pjpeg.c.

◆ pjpeg_idct_2D_double()

void pjpeg_idct_2D_double ( int32_t  in[64],
uint8_t *  out,
uint32_t  outstride 
)

Definition at line 241 of file pjpeg-idct.c.

◆ pjpeg_idct_2D_nanojpeg()

void pjpeg_idct_2D_nanojpeg ( int32_t  in[64],
uint8_t *  out,
uint32_t  outstride 
)

Definition at line 380 of file pjpeg-idct.c.

◆ pjpeg_idct_2D_u32()

void pjpeg_idct_2D_u32 ( int32_t  in[64],
uint8_t *  out,
uint32_t  outstride 
)

Definition at line 179 of file pjpeg-idct.c.

◆ pjpeg_to_u8_baseline()

image_u8_t* pjpeg_to_u8_baseline ( pjpeg_t pj)

Definition at line 703 of file pjpeg.c.

◆ pjpeg_to_u8x3_baseline()

image_u8x3_t* pjpeg_to_u8x3_baseline ( pjpeg_t pj)

Definition at line 738 of file pjpeg.c.

Variable Documentation

◆ mjpeg_dht

uint8_t mjpeg_dht[]
static

Definition at line 86 of file pjpeg.c.

◆ ZZ

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

Definition at line 150 of file pjpeg.c.



apriltag
Author(s): Edwin Olson , Max Krogius
autogenerated on Mon Jun 26 2023 02:26:35