#include "bgmc.h"
Go to the source code of this file.
Defines | |
#define | FREQ_BITS 14 |
#define | VALUE_BITS 18 |
#define | TOP_VALUE ((1 << VALUE_BITS) - 1) |
#define | FIRST_QTR (TOP_VALUE / 4 + 1) |
#define | HALF (2 * FIRST_QTR) |
#define | THIRD_QTR (3 * FIRST_QTR) |
#define | LUT_BITS (FREQ_BITS - 8) |
#define | LUT_SIZE (1 << LUT_BITS) |
#define | LUT_BUFF 4 |
Functions | |
static void | bgmc_lut_fillp (uint8_t *lut, int *lut_status, int delta) |
Initialize a given lookup table using a given delta. | |
static uint8_t * | bgmc_lut_getp (uint8_t *lut, int *lut_status, int delta) |
Retune the index of a suitable lookup table for a given delta. | |
int | ff_bgmc_init (AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status) |
Initialize the lookup table arrays. | |
void | ff_bgmc_end (uint8_t **cf_lut, int **cf_lut_status) |
Release the lookup table arrays. | |
void | ff_bgmc_decode_init (GetBitContext *gb, unsigned int *h, unsigned int *l, unsigned int *v) |
Initialize decoding and reads the first value. | |
void | ff_bgmc_decode_end (GetBitContext *gb) |
Finish decoding. | |
void | ff_bgmc_decode (GetBitContext *gb, unsigned int num, int32_t *dst, int delta, unsigned int sx, unsigned int *h, unsigned int *l, unsigned int *v, uint8_t *cf_lut, int *cf_lut_status) |
Read and decode a block Gilbert-Moore coded symbol. | |
Variables | |
static const uint16_t | cf_tables_1 [3][129] |
Cumulative frequency tables for block Gilbert-Moore coding. | |
static const uint16_t | cf_tables_2 [8][193] |
static const uint16_t | cf_tables_3 [5][257] |
static const uint16_t *const | cf_table [16] |
Definition in file bgmc.c.
#define FIRST_QTR (TOP_VALUE / 4 + 1) |
#define FREQ_BITS 14 |
#define HALF (2 * FIRST_QTR) |
#define LUT_BITS (FREQ_BITS - 8) |
#define LUT_BUFF 4 |
#define LUT_SIZE (1 << LUT_BITS) |
Definition at line 40 of file bgmc.c.
Referenced by bgmc_lut_fillp(), bgmc_lut_getp(), ff_bgmc_decode(), and ff_bgmc_init().
#define THIRD_QTR (3 * FIRST_QTR) |
#define VALUE_BITS 18 |
Definition at line 33 of file bgmc.c.
Referenced by ff_bgmc_decode_end(), and ff_bgmc_decode_init().
static void bgmc_lut_fillp | ( | uint8_t * | lut, | |
int * | lut_status, | |||
int | delta | |||
) | [static] |
Initialize a given lookup table using a given delta.
Definition at line 429 of file bgmc.c.
Referenced by bgmc_lut_getp().
static uint8_t* bgmc_lut_getp | ( | uint8_t * | lut, | |
int * | lut_status, | |||
int | delta | |||
) | [static] |
Retune the index of a suitable lookup table for a given delta.
Definition at line 451 of file bgmc.c.
Referenced by ff_bgmc_decode().
void ff_bgmc_decode | ( | GetBitContext * | gb, | |
unsigned int | num, | |||
int32_t * | dst, | |||
int | delta, | |||
unsigned int | sx, | |||
unsigned int * | h, | |||
unsigned int * | l, | |||
unsigned int * | v, | |||
uint8_t * | cf_lut, | |||
int * | cf_lut_status | |||
) |
Read and decode a block Gilbert-Moore coded symbol.
Definition at line 515 of file bgmc.c.
Referenced by read_var_block_data().
void ff_bgmc_decode_end | ( | GetBitContext * | gb | ) |
void ff_bgmc_decode_init | ( | GetBitContext * | gb, | |
unsigned int * | h, | |||
unsigned int * | l, | |||
unsigned int * | v | |||
) |
Initialize decoding and reads the first value.
Definition at line 496 of file bgmc.c.
Referenced by read_var_block_data().
void ff_bgmc_end | ( | uint8_t ** | cf_lut, | |
int ** | cf_lut_status | |||
) |
Release the lookup table arrays.
Definition at line 487 of file bgmc.c.
Referenced by decode_end(), and ff_bgmc_init().
int ff_bgmc_init | ( | AVCodecContext * | avctx, | |
uint8_t ** | cf_lut, | |||
int ** | cf_lut_status | |||
) |
Initialize the lookup table arrays.
Definition at line 467 of file bgmc.c.
Referenced by decode_init().
const uint16_t* const cf_table[16] [static] |
Initial value:
{ cf_tables_1[0], cf_tables_1[1], cf_tables_1[2], cf_tables_2[0], cf_tables_2[1], cf_tables_2[2], cf_tables_2[3], cf_tables_2[4], cf_tables_2[5], cf_tables_2[6], cf_tables_2[7], cf_tables_3[0], cf_tables_3[1], cf_tables_3[2], cf_tables_3[3], cf_tables_3[4] }
Definition at line 419 of file bgmc.c.
Referenced by bgmc_lut_fillp(), and ff_bgmc_decode().
const uint16_t cf_tables_1[3][129] [static] |
const uint16_t cf_tables_2[8][193] [static] |
const uint16_t cf_tables_3[5][257] [static] |