FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

#define LUT_SIZE   (1 << LUT_BITS)
#define RSIZE_BITS   (CHAR_BIT*sizeof(residual))
#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().

#define INIT_RESIDUE (   N)
Value:
residual N = 0; \
av_unused int32_t N ## _bits = 0
#define N
Definition: vf_pp7.c:73
uint64_t residual
Definition: dirac_vlc.h:29
int32_t
#define av_unused
Definition: attributes.h:125

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

#define SET_RESIDUE (   N,
  I,
  B 
)
Value:
N ## _bits = B
Definition: vf_geq.c:47
#define N
Definition: vf_pp7.c:73
#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().

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

Definition at line 38 of file dirac_vlc.c.

Referenced by ff_dirac_golomb_read_16bit(), and ff_dirac_golomb_read_32bit().

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

Referenced by search_for_golomb().

Function Documentation

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

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

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

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

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

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

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