Grok  9.5.0
Classes | Namespaces | Functions | Variables
ojph_block_decoder_sse2.cpp File Reference
#include <cassert>
#include <cstring>
#include "ojph_block_decoder.h"
#include "ojph_arch.h"
#include "ojph_message.h"
#include <x86intrin.h>
#include "table0.h"
#include "table1.h"

Classes

struct  ojph::local2::dec_mel_st
 MEL state structure for reading and decoding the MEL bitstream. More...
 
struct  ojph::local2::rev_struct
 A structure for reading and unstuffing a segment that grows backward, such as VLC and MRP. More...
 
struct  ojph::local2::frwd_struct
 State structure for reading and unstuffing of forward-growing bitstreams; these are: MagSgn and SPP bitstreams. More...
 

Namespaces

 ojph
 
 ojph::local2
 

Functions

static void ojph::local2::mel_read (dec_mel_st *melp)
 Reads and unstuffs the MEL bitstream. More...
 
static void ojph::local2::mel_decode (dec_mel_st *melp)
 Decodes unstuffed MEL segment bits stored in tmp to runs. More...
 
static void ojph::local2::mel_init (dec_mel_st *melp, ui8 *bbuf, int lcup, int scup)
 Initiates a dec_mel_st structure for MEL decoding and reads some bytes in order to get the read address to a multiple of 4. More...
 
static int ojph::local2::mel_get_run (dec_mel_st *melp)
 Retrieves one run from dec_mel_st; if there are no runs stored MEL segment is decoded. More...
 
void ojph::local2::rev_read (rev_struct *vlcp)
 Read and unstuff data from a backwardly-growing segment. More...
 
void ojph::local2::rev_init (rev_struct *vlcp, ui8 *data, int lcup, int scup)
 Initiates the rev_struct structure and reads a few bytes to move the read address to multiple of 4. More...
 
ui32 ojph::local2::rev_fetch (rev_struct *vlcp)
 Retrieves 32 bits from the head of a rev_struct structure. More...
 
ui32 ojph::local2::rev_advance (rev_struct *vlcp, ui32 num_bits)
 Consumes num_bits from a rev_struct structure. More...
 
void ojph::local2::rev_read_mrp (rev_struct *mrp)
 Reads and unstuffs from rev_struct. More...
 
void ojph::local2::rev_init_mrp (rev_struct *mrp, ui8 *data, int lcup, int len2)
 Initialized rev_struct structure for MRP segment, and reads a number of bytes such that the next 32 bits read are from an address that is a multiple of 4. More...
 
ui32 ojph::local2::rev_fetch_mrp (rev_struct *mrp)
 Retrieves 32 bits from the head of a rev_struct structure. More...
 
ui32 ojph::local2::rev_advance_mrp (rev_struct *mrp, ui32 num_bits)
 Consumes num_bits from a rev_struct structure. More...
 
static bool ojph::local2::vlc_init_tables ()
 Initializes vlc_tbl0 and vlc_tbl1 tables, from table0.h and table1.h. More...
 
static bool ojph::local2::uvlc_init_tables ()
 Initializes uvlc_tbl0 and uvlc_tbl1 tables. More...
 
template<int X>
void ojph::local2::frwd_read (frwd_struct *msp)
 Read and unstuffs 32 bits from forward-growing bitstream. More...
 
template<int X>
void ojph::local2::frwd_init (frwd_struct *msp, const ui8 *data, int size)
 Initialize frwd_struct struct and reads some bytes. More...
 
void ojph::local2::frwd_advance (frwd_struct *msp, ui32 num_bits)
 Consume num_bits bits from the bitstream of frwd_struct. More...
 
template<int X>
__m128i ojph::local2::frwd_fetch (frwd_struct *msp)
 Fetches 32 bits from the frwd_struct bitstream. More...
 
template<int N>
static void ojph::local2::one_quad_decode (const __m128i &inf_u_q, const __m128i &U_q, frwd_struct *magsgn, ui32 p, int &e0, int &e1, __m128i &row)
 
bool ojph::local2::ojph_decode_codeblock2 (ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride)
 Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pass. More...
 

Variables

static ui16 ojph::local2::vlc_tbl0 [1024] = { 0 }
 vlc_tbl0 contains decoding information for initial row of quads More...
 
static ui16 ojph::local2::vlc_tbl1 [1024] = { 0 }
 vlc_tbl1 contains decoding information for non-initial row of quads More...
 
static ui16 ojph::local2::uvlc_tbl0 [256+64] = { 0 }
 uvlc_tbl0 contains decoding information for initial row of quads More...
 
static ui16 ojph::local2::uvlc_tbl1 [256] = { 0 }
 uvlc_tbl1 contains decoding information for non-initial row of quads More...
 
static bool ojph::local2::vlc_tables_initialized = vlc_init_tables()
 Initializes VLC tables vlc_tbl0 and vlc_tbl1. More...
 
static bool ojph::local2::uvlc_tables_initialized = uvlc_init_tables()
 Initializes UVLC tables uvlc_tbl0 and uvlc_tbl1. More...