OpenJPH
Open-source implementation of JPEG2000 Part-15
Loading...
Searching...
No Matches
VLC decoding tables

Functions

static bool ojph::local::uvlc_init_tables ()
 Initializes uvlc_tbl0 and uvlc_tbl1 tables.

Variables

ui16 ojph::local::uvlc_tbl0 [256+64] = { 0 }
 uvlc_tbl0 contains decoding information for initial row of quads
ui16 ojph::local::uvlc_tbl1 [256] = { 0 }
 uvlc_tbl1 contains decoding information for non-initial row of quads
ui8 ojph::local::uvlc_bias [256+64] = { 0 }
 uvlc_bias contains decoding info. for initial row of quads
static bool ojph::local::uvlc_tables_initialized = uvlc_init_tables()
 Initializes UVLC tables uvlc_tbl0 and uvlc_tbl1.

Detailed Description

UVLC decoding tables used to partially decode u values from UVLC
codewords.
The table index is 8 (or 9) bits and composed of two parts:
The 6 LSBs carries the head of the VLC to be decoded. Up to 6 bits to be used; these are uvlc prefix code for quad 0 and 1
The 2 (or 3) MSBs contain u_off of quad 0 + 2 * o_off quad 1

  • 4 * mel event for initial row of quads when needed

    Each entry contains, starting from the LSB
    • total total prefix length for quads 0 and 1 (3 bits)
    • total total suffix length for quads 0 and 1 (4 bits)
    • suffix length for quad 0 (3 bits)
    • prefix for quad 0 (3 bits)
    • prefix for quad 1 (3 bits)

      Another table is uvlc_bias, which is needed to correctly decode the extension u_ext for initial row of quads. Under certain condition, we deduct 1 or 2 from u_q0 and u_q1 before encoding them; so for us to know that decoding u_ext is needed, we recreate the u_q0 and u_q1 that we actually encoded.
      For simplicity, we use the same index as before
    • u_q0 bias is 2 bits
    • u_q1 bias is 2 bits

Function Documentation

◆ uvlc_init_tables()

bool ojph::local::uvlc_init_tables ( )
static

#include </build/openjph/src/OpenJPH-0.24.2/src/core/coding/ojph_block_common.cpp>

Initializes uvlc_tbl0 and uvlc_tbl1 tables.

Definition at line 189 of file ojph_block_common.cpp.

References uvlc_bias, uvlc_tbl0, and uvlc_tbl1.

Referenced by initialize_block_encoder_tables().

Variable Documentation

◆ uvlc_bias

ui8 ojph::local::uvlc_bias = { 0 }

#include </build/openjph/src/OpenJPH-0.24.2/src/core/coding/ojph_block_common.cpp>

uvlc_bias contains decoding info. for initial row of quads

Definition at line 109 of file ojph_block_common.cpp.

Referenced by ojph_decode_codeblock64(), and uvlc_init_tables().

◆ uvlc_tables_initialized

bool ojph::local::uvlc_tables_initialized = uvlc_init_tables()
static

#include </build/openjph/src/OpenJPH-0.24.2/src/core/coding/ojph_block_common.cpp>

Initializes UVLC tables uvlc_tbl0 and uvlc_tbl1.

Definition at line 342 of file ojph_block_common.cpp.

◆ uvlc_tbl0

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

#include </build/openjph/src/OpenJPH-0.24.2/src/core/coding/ojph_block_common.cpp>

uvlc_tbl0 contains decoding information for initial row of quads

Definition at line 104 of file ojph_block_common.cpp.

Referenced by ojph_decode_codeblock32(), ojph_decode_codeblock64(), ojph_decode_codeblock_wasm(), and uvlc_init_tables().

◆ uvlc_tbl1

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

#include </build/openjph/src/OpenJPH-0.24.2/src/core/coding/ojph_block_common.cpp>

uvlc_tbl1 contains decoding information for non-initial row of quads

Definition at line 107 of file ojph_block_common.cpp.

Referenced by ojph_decode_codeblock32(), ojph_decode_codeblock64(), ojph_decode_codeblock_wasm(), and uvlc_init_tables().