#include "luvcview/utils.h"#include "luvcview/color.h"#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <linux/types.h>#include <string.h>#include <fcntl.h>#include <wait.h>#include <time.h>#include <limits.h>#include "luvcview/huffman.h"
Go to the source code of this file.
Classes | |
| struct | comp |
| struct | dec_hufftbl |
| union | hufftblp |
| struct | in |
| struct | jpeg_decdata |
| struct | jpginfo |
| struct | scan |
Macros | |
| #define | __P(x) x |
| #define | C22 ((PREC)IFIX(2 * 0.923879532)) |
| #define | dec_huffac (dhuff + 2) |
| #define | dec_huffdc (dhuff + 0) |
| #define | DEC_REC(in, hu, r, i) |
| #define | DECBITS 10 /* seems to be the optimum */ |
| #define | FOUR_TWO_TWO 2 |
| #define | GETBITS(in, n) |
| #define | IC4 ((PREC)IFIX(1 / 0.707106781)) |
| #define | IFIX(a) ((int)((a) * (1 << ISHIFT) + .5)) |
| #define | IMULT(a, b) (((a) * (b)) >> ISHIFT) |
| #define | ISHIFT 11 |
| #define | ITOINT(a) ((a) >> ISHIFT) |
| #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 | M_APP0 0xe0 |
| #define | M_BADHUFF -1 |
| #define | M_COM 0xfe |
| #define | M_DHT 0xc4 |
| #define | M_DQT 0xdb |
| #define | M_DRI 0xdd |
| #define | M_EOF 0x80 |
| #define | M_EOI 0xd9 |
| #define | M_RST0 0xd0 |
| #define | M_SOF0 0xc0 |
| #define | M_SOI 0xd8 |
| #define | M_SOS 0xda |
| #define | MAXCOMP 4 |
| #define | PREC int |
| #define | S22 ((PREC)IFIX(2 * 0.382683432)) |
| #define | UNGETBITS(in, n) |
Typedefs | |
| typedef void(* | ftopict) (int *out, unsigned char *pic, int width) |
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 int fillbits | __P ((struct in *, int, unsigned int)) |
| static int dec_rec2 | __P ((struct in *, struct dec_hufftbl *, int *, int, int)) |
| static int | dec_checkmarker (void) |
| static void | dec_initscans (void) |
| static void | dec_makehuff (struct dec_hufftbl *hu, int *hufflen, unsigned char *huffvals) |
| 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 int | fillbits (struct in *in, int le, unsigned int bi) |
| int | get_picture (unsigned char *buf, int size) |
| int | get_pictureYV2 (unsigned char *buf, int width, int height) |
| static int | getbyte (void) |
| static void | getPictureName (char *Picture, int fmt) |
| static int | getword (void) |
| static int | huffman_init (void) |
| static void | idct (int *in, int *out, int *quant, long off, int max) |
| static void | idctqtab (unsigned char *qin, PREC *qout) |
| int | is_huffman (unsigned char *buf) |
| int | jpeg_decode (unsigned char **pic, unsigned char *buf, int *width, int *height) |
| void | Pyuv422tobgr24 (unsigned char *input_ptr, unsigned char *output_ptr, unsigned int image_width, unsigned int image_height) |
| unsigned int | Pyuv422togray8 (unsigned char *input_ptr, unsigned char *output_ptr, unsigned int image_width, unsigned int image_height) |
| unsigned int | Pyuv422torgb24 (unsigned char *input_ptr, unsigned char *output_ptr, unsigned int image_width, unsigned int image_height) |
| static int | readtables (int till, int *isDHT) |
| static void | setinput (struct in *in, unsigned char *p) |
| static void | yuv400pto422 (int *out, unsigned char *pic, int width) |
| static void | yuv420pto422 (int *out, unsigned char *pic, int width) |
| static void | yuv422pto422 (int *out, unsigned char *pic, int width) |
| static void | yuv444pto422 (int *out, unsigned char *pic, int width) |
Variables | |
| static PREC | aaidct [8] |
| static struct comp | comps [MAXCOMP] |
| static unsigned char * | datap |
| static struct dec_hufftbl | dhuff [4] |
| static struct scan | dscans [MAXCOMP] |
| static struct in | in |
| static struct jpginfo | info |
| static unsigned char | quant [4][64] |
| static unsigned char | zig [64] |
| static unsigned char | zig2 [64] |
| #define DEC_REC | ( | in, | |
| hu, | |||
| r, | |||
| i | |||
| ) |
| #define GETBITS | ( | in, | |
| n | |||
| ) |
| typedef void(* ftopict) (int *out, unsigned char *pic, int width) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int get_pictureYV2 | ( | unsigned char * | buf, |
| int | width, | ||
| int | height | ||
| ) |
|
static |
|
inlinestatic |
|
static |
| int jpeg_decode | ( | unsigned char ** | pic, |
| unsigned char * | buf, | ||
| int * | width, | ||
| int * | height | ||
| ) |
| void Pyuv422tobgr24 | ( | unsigned char * | input_ptr, |
| unsigned char * | output_ptr, | ||
| unsigned int | image_width, | ||
| unsigned int | image_height | ||
| ) |
| unsigned int Pyuv422togray8 | ( | unsigned char * | input_ptr, |
| unsigned char * | output_ptr, | ||
| unsigned int | image_width, | ||
| unsigned int | image_height | ||
| ) |
| unsigned int Pyuv422torgb24 | ( | unsigned char * | input_ptr, |
| unsigned char * | output_ptr, | ||
| unsigned int | image_width, | ||
| unsigned int | image_height | ||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |