FFmpeg
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)

Definition at line 24 of file dirac_vlc.c.

◆ RSIZE_BITS

#define RSIZE_BITS   (CHAR_BIT*sizeof(residual))

Definition at line 25 of file dirac_vlc.c.

◆ CONVERT_TO_RESIDUE

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

Definition at line 27 of file dirac_vlc.c.

◆ INIT_RESIDUE

#define INIT_RESIDUE (   N)
Value:
residual N = 0; \
av_unused int32_t N ## _bits = 0

Definition at line 30 of file dirac_vlc.c.

◆ SET_RESIDUE

#define SET_RESIDUE (   N,
  I,
  B 
)
Value:
N ## _bits = B

Definition at line 34 of file dirac_vlc.c.

◆ APPEND_RESIDUE

#define APPEND_RESIDUE (   N,
  M 
)
Value:
N |= M >> (N ## _bits); \
N ## _bits = (N ## _bits + (M ## _bits)) & 0x3F

Definition at line 38 of file dirac_vlc.c.

◆ READ_BIT

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

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().

M
#define M(a, b)
Definition: vp3dsp.c:45
int32_t
int32_t
Definition: audio_convert.c:194
residual
uint64_t residual
Definition: dirac_vlc.h:29
N
#define N
Definition: af_mcompand.c:54
CONVERT_TO_RESIDUE
#define CONVERT_TO_RESIDUE(a, b)
Definition: dirac_vlc.c:27
B
#define B
Definition: huffyuvdsp.h:32