OpenJPEG 2.5.2

Functions | Variables
VLC decoding tables

VLC tables to decode VLC codewords to these fields: (in order)
More...

## Functions
OPJ_BOOL | vlc_init_tables ()
| Initializes vlc_tbl0 and vlc_tbl1 tables, from table0.h and table1.h.

## Variables
int | vlc_tbl0 [1024] = { 0 }
| vlc_tbl0 contains decoding information for initial row of quads
int | vlc_tbl1 [1024] = { 0 }
| vlc_tbl1 contains decoding information for non-initial row of quads
OPJ_BOOL | vlc_tables_initialized = OPJ_FALSE
| Initializes VLC tables vlc_tbl0 and vlc_tbl1.

## Detailed Description

VLC tables to decode VLC codewords to these fields: (in order)

- `cwd_len` : 3bits -> the codeword length of the VLC codeword; the VLC cwd is in the LSB of bitstream
- `u_off` : 1bit -> u_offset, which is 1 if u value is not 0
- `rho` : 4bits -> significant samples within a quad
- `e_1` : 4bits -> EMB e_1
- `e_k` : 4bits -> EMB e_k
  The table index is 10 bits and composed of two parts:
  The 7 LSBs contain a codeword which might be shorter than 7 bits; this word is the next decoable bits in the bitstream.
  The 3 MSB is the context of for the codeword.

## Function Documentation

## ◆ vlc_init_tables()

OPJ_BOOL vlc_init_tables | ( |  | ) |

Initializes vlc_tbl0 and vlc_tbl1 tables, from table0.h and table1.h.

References vlc_src_table::cwd_len, vlc_src_table::e_k, OPJ_FALSE, OPJ_TRUE, vlc_src_table::rho, tbl0, tbl1, vlc_tbl0, and vlc_tbl1.

Referenced by main().

## Variable Documentation

## ◆ vlc_tables_initialized

OPJ_BOOL vlc_tables_initialized = OPJ_FALSE

Initializes VLC tables vlc_tbl0 and vlc_tbl1.

Referenced by main().

## ◆ vlc_tbl0

int vlc_tbl0[1024] = { 0 }

vlc_tbl0 contains decoding information for initial row of quads

Referenced by main(), opj_t1_ht_decode_cblk(), and vlc_init_tables().

## ◆ vlc_tbl1

int vlc_tbl1[1024] = { 0 }

vlc_tbl1 contains decoding information for non-initial row of quads

Referenced by main(), opj_t1_ht_decode_cblk(), and vlc_init_tables().