FFmpeg  4.0
Macros | Functions
dirac_vlc.c File Reference
#include "dirac_vlc.h"

Go to the source code of this file.

Macros

#define LUT_SIZE   (1 << LUT_BITS)
 
#define RSIZE_BITS   (CHAR_BIT*sizeof(residual))
 
#define CONVERT_TO_RESIDUE(a, b)   (((residual)(a)) << (RSIZE_BITS - (b)))
 
#define INIT_RESIDUE(N)
 
#define SET_RESIDUE(N, I, B)
 
#define APPEND_RESIDUE(N, M)
 
#define READ_BIT(N)   (((N) >> (N ## _count--)) & 1)
 

Functions

int ff_dirac_golomb_read_32bit (DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *_dst, int coeffs)
 
int ff_dirac_golomb_read_16bit (DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *_dst, int coeffs)
 
static void search_for_golomb (DiracGolombLUT *l, residual r, int bits)
 
static void generate_parity_lut (DiracGolombLUT *lut, int even)
 
static void generate_offset_lut (DiracGolombLUT *lut, int off)
 
av_cold int ff_dirac_golomb_reader_init (DiracGolombLUT **lut_ctx)
 
av_cold void ff_dirac_golomb_reader_end (DiracGolombLUT **lut_ctx)
 

Macro Definition Documentation

◆ LUT_SIZE

#define LUT_SIZE   (1 << LUT_BITS)

◆ RSIZE_BITS

#define RSIZE_BITS   (CHAR_BIT*sizeof(residual))

◆ CONVERT_TO_RESIDUE

#define CONVERT_TO_RESIDUE (   a,
  b 
)    (((residual)(a)) << (RSIZE_BITS - (b)))

Definition at line 27 of file dirac_vlc.c.

Referenced by generate_offset_lut(), and generate_parity_lut().

◆ INIT_RESIDUE

#define INIT_RESIDUE (   N)
Value:
residual N = 0; \
av_unused int32_t N ## _bits = 0
#define N
Definition: af_mcompand.c:54
uint64_t residual
Definition: dirac_vlc.h:29
int32_t

Definition at line 30 of file dirac_vlc.c.

Referenced by ff_dirac_golomb_read_16bit(), ff_dirac_golomb_read_32bit(), generate_offset_lut(), and generate_parity_lut().

◆ SET_RESIDUE

#define SET_RESIDUE (   N,
  I,
  B 
)
Value:
N ## _bits = B
#define N
Definition: af_mcompand.c:54
#define B
Definition: huffyuvdsp.h:32
#define CONVERT_TO_RESIDUE(a, b)
Definition: dirac_vlc.c:27

Definition at line 34 of file dirac_vlc.c.

Referenced by generate_offset_lut(), and generate_parity_lut().

◆ APPEND_RESIDUE

#define APPEND_RESIDUE (   N,
  M 
)
Value:
N |= M >> (N ## _bits); \
N ## _bits = (N ## _bits + (M ## _bits)) & 0x3F
#define N
Definition: af_mcompand.c:54
#define M(a, b)
Definition: vp3dsp.c:44

Definition at line 38 of file dirac_vlc.c.

Referenced by ff_dirac_golomb_read_16bit(), and ff_dirac_golomb_read_32bit().

◆ READ_BIT

#define READ_BIT (   N)    (((N) >> (N ## _count--)) & 1)

Referenced by search_for_golomb().

Function Documentation

◆ ff_dirac_golomb_read_32bit()

int ff_dirac_golomb_read_32bit ( DiracGolombLUT lut_ctx,
const uint8_t buf,
int  bytes,
uint8_t _dst,
int  coeffs 
)

Definition at line 42 of file dirac_vlc.c.

Referenced by decode_hq_slice().

◆ ff_dirac_golomb_read_16bit()

int ff_dirac_golomb_read_16bit ( DiracGolombLUT lut_ctx,
const uint8_t buf,
int  bytes,
uint8_t _dst,
int  coeffs 
)

Definition at line 82 of file dirac_vlc.c.

Referenced by decode_hq_slice().

◆ search_for_golomb()

static void search_for_golomb ( DiracGolombLUT l,
residual  r,
int  bits 
)
inlinestatic

Definition at line 123 of file dirac_vlc.c.

Referenced by generate_offset_lut(), and generate_parity_lut().

◆ generate_parity_lut()

static void generate_parity_lut ( DiracGolombLUT lut,
int  even 
)
static

Definition at line 168 of file dirac_vlc.c.

Referenced by ff_dirac_golomb_reader_init().

◆ generate_offset_lut()

static void generate_offset_lut ( DiracGolombLUT lut,
int  off 
)
static

Definition at line 210 of file dirac_vlc.c.

Referenced by ff_dirac_golomb_reader_init().

◆ ff_dirac_golomb_reader_init()

av_cold int ff_dirac_golomb_reader_init ( DiracGolombLUT **  lut_ctx)

Definition at line 232 of file dirac_vlc.c.

Referenced by dirac_decode_init().

◆ ff_dirac_golomb_reader_end()

av_cold void ff_dirac_golomb_reader_end ( DiracGolombLUT **  lut_ctx)

Definition at line 249 of file dirac_vlc.c.

Referenced by dirac_decode_end().