FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
dirac_arith.h File Reference
#include "config.h"
#include "bytestream.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  DiracArith
 

Macros

#define CTX_SB_F1   CTX_ZP_F5
 
#define CTX_SB_DATA   0
 
#define CTX_PMODE_REF1   0
 
#define CTX_PMODE_REF2   1
 
#define CTX_GLOBAL_BLOCK   2
 
#define CTX_MV_F1   CTX_ZP_F2
 
#define CTX_MV_DATA   0
 
#define CTX_DC_F1   CTX_ZP_F5
 
#define CTX_DC_DATA   0
 

Enumerations

enum  dirac_arith_contexts {
  CTX_ZPZN_F1, CTX_ZPNN_F1, CTX_NPZN_F1, CTX_NPNN_F1,
  CTX_ZP_F2, CTX_ZP_F3, CTX_ZP_F4, CTX_ZP_F5,
  CTX_ZP_F6, CTX_NP_F2, CTX_NP_F3, CTX_NP_F4,
  CTX_NP_F5, CTX_NP_F6, CTX_COEFF_DATA, CTX_SIGN_NEG,
  CTX_SIGN_ZERO, CTX_SIGN_POS, CTX_ZERO_BLOCK, CTX_DELTA_Q_F,
  CTX_DELTA_Q_DATA, CTX_DELTA_Q_SIGN, DIRAC_CTX_COUNT
}
 

Functions

static void renorm (DiracArith *c)
 
static void refill (DiracArith *c)
 
static int dirac_get_arith_bit (DiracArith *c, int ctx)
 
static int dirac_get_arith_uint (DiracArith *c, int follow_ctx, int data_ctx)
 
static int dirac_get_arith_int (DiracArith *c, int follow_ctx, int data_ctx)
 
void ff_dirac_init_arith_tables (void)
 
void ff_dirac_init_arith_decoder (DiracArith *c, GetBitContext *gb, int length)
 

Variables

const uint8_t ff_dirac_next_ctx [DIRAC_CTX_COUNT]
 
int16_t ff_dirac_prob_branchless [256][2]
 

Detailed Description

Arithmetic decoder for Dirac

Author
Marco Gerards marco.nosp@m.@gnu.nosp@m..org

Definition in file dirac_arith.h.

Macro Definition Documentation

◆ CTX_SB_F1

#define CTX_SB_F1   CTX_ZP_F5

Definition at line 69 of file dirac_arith.h.

◆ CTX_SB_DATA

#define CTX_SB_DATA   0

Definition at line 70 of file dirac_arith.h.

◆ CTX_PMODE_REF1

#define CTX_PMODE_REF1   0

Definition at line 71 of file dirac_arith.h.

◆ CTX_PMODE_REF2

#define CTX_PMODE_REF2   1

Definition at line 72 of file dirac_arith.h.

◆ CTX_GLOBAL_BLOCK

#define CTX_GLOBAL_BLOCK   2

Definition at line 73 of file dirac_arith.h.

◆ CTX_MV_F1

#define CTX_MV_F1   CTX_ZP_F2

Definition at line 74 of file dirac_arith.h.

◆ CTX_MV_DATA

#define CTX_MV_DATA   0

Definition at line 75 of file dirac_arith.h.

◆ CTX_DC_F1

#define CTX_DC_F1   CTX_ZP_F5

Definition at line 76 of file dirac_arith.h.

◆ CTX_DC_DATA

#define CTX_DC_DATA   0

Definition at line 77 of file dirac_arith.h.

Enumeration Type Documentation

◆ dirac_arith_contexts

Enumerator
CTX_ZPZN_F1 
CTX_ZPNN_F1 
CTX_NPZN_F1 
CTX_NPNN_F1 
CTX_ZP_F2 
CTX_ZP_F3 
CTX_ZP_F4 
CTX_ZP_F5 
CTX_ZP_F6 
CTX_NP_F2 
CTX_NP_F3 
CTX_NP_F4 
CTX_NP_F5 
CTX_NP_F6 
CTX_COEFF_DATA 
CTX_SIGN_NEG 
CTX_SIGN_ZERO 
CTX_SIGN_POS 
CTX_ZERO_BLOCK 
CTX_DELTA_Q_F 
CTX_DELTA_Q_DATA 
CTX_DELTA_Q_SIGN 
DIRAC_CTX_COUNT 

Definition at line 39 of file dirac_arith.h.

Function Documentation

◆ renorm()

static void renorm ( DiracArith c)
inlinestatic

Definition at line 95 of file dirac_arith.h.

Referenced by dirac_get_arith_bit().

◆ refill()

static void refill ( DiracArith c)
inlinestatic

Definition at line 112 of file dirac_arith.h.

Referenced by dirac_get_arith_bit().

◆ dirac_get_arith_bit()

static int dirac_get_arith_bit ( DiracArith c,
int  ctx 
)
inlinestatic

◆ dirac_get_arith_uint()

static int dirac_get_arith_uint ( DiracArith c,
int  follow_ctx,
int  data_ctx 
)
inlinestatic

Definition at line 178 of file dirac_arith.h.

Referenced by dirac_get_arith_int(), and dirac_unpack_block_motion_data().

◆ dirac_get_arith_int()

static int dirac_get_arith_int ( DiracArith c,
int  follow_ctx,
int  data_ctx 
)
inlinestatic

Definition at line 194 of file dirac_arith.h.

Referenced by codeblock(), and decode_block_params().

◆ ff_dirac_init_arith_tables()

void ff_dirac_init_arith_tables ( void  )

Definition at line 86 of file dirac_arith.c.

Referenced by dirac_decode_init().

◆ ff_dirac_init_arith_decoder()

void ff_dirac_init_arith_decoder ( DiracArith c,
GetBitContext gb,
int  length 
)

Definition at line 96 of file dirac_arith.c.

Referenced by decode_subband_internal(), and dirac_unpack_block_motion_data().

Variable Documentation

◆ ff_dirac_next_ctx

const uint8_t ff_dirac_next_ctx[DIRAC_CTX_COUNT]

Definition at line 66 of file dirac_arith.c.

Referenced by dirac_get_arith_uint().

◆ ff_dirac_prob_branchless

int16_t ff_dirac_prob_branchless[256][2]

Definition at line 84 of file dirac_arith.c.

Referenced by dirac_get_arith_bit(), and ff_dirac_init_arith_tables().