Loading...
Searching...
No Matches
VLC decoding tables

## Functions

static bool | ojph::local::vlc_init_tables ()
| Initializes vlc_tbl0 and vlc_tbl1 tables, from table0.h and table1.h.

## Variables

ui16 | ojph::local::vlc_tbl0 [1024] = { 0 }
| vlc_tbl0 contains decoding information for initial row of quads
ui16 | ojph::local::vlc_tbl1 [1024] = { 0 }
| vlc_tbl1 contains decoding information for non-initial row of quads
static bool | ojph::local::vlc_tables_initialized = vlc_init_tables()
| Initializes VLC tables vlc_tbl0 and vlc_tbl1.

## Detailed Description

VLC decoding tables used in decoding VLC codewords to these fields:

- `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 decodable bits in the bitstream.
  The 3 MSB is the context of for the codeword.

## Function Documentation

## vlc_init_tables()

bool ojph::local::vlc_init_tables | ( |  | ) |

static

`#include <ojph_block_common.cpp>`

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

Definition at line 117 of file ojph_block_common.cpp.

References vlc_tbl0, and vlc_tbl1.

Referenced by initialize_block_encoder_tables().

## Variable Documentation

## vlc_tables_initialized

bool ojph::local::vlc_tables_initialized = vlc_init_tables()

static

`#include <ojph_block_common.cpp>`

Initializes VLC tables vlc_tbl0 and vlc_tbl1.

Definition at line 336 of file ojph_block_common.cpp.

## vlc_tbl0

ui16 ojph::local::vlc_tbl0 = { 0 }

`#include <ojph_block_common.cpp>`

vlc_tbl0 contains decoding information for initial row of quads

Definition at line 69 of file ojph_block_common.cpp.

Referenced by initialize_block_encoder_tables(), ojph_decode_codeblock32(), ojph_decode_codeblock64(), ojph_decode_codeblock_wasm(), ojph_encode_codeblock32(), ojph_encode_codeblock64(), and vlc_init_tables().

## vlc_tbl1

ui16 ojph::local::vlc_tbl1 = { 0 }

`#include <ojph_block_common.cpp>`

vlc_tbl1 contains decoding information for non-initial row of quads

Definition at line 72 of file ojph_block_common.cpp.

Referenced by initialize_block_encoder_tables(), ojph_decode_codeblock32(), ojph_decode_codeblock64(), ojph_decode_codeblock_wasm(), ojph_encode_codeblock32(), ojph_encode_codeblock64(), and vlc_init_tables().