FFmpeg
Macros | Functions | Variables
golomb.h File Reference

exp golomb vlc stuff More...

#include <stdint.h>
#include "get_bits.h"

Go to the source code of this file.

Macros

#define INVALID_VLC   0x80000000
 

Functions

static int get_ue_golomb (GetBitContext *gb)
 Read an unsigned Exp-Golomb code in the range 0 to 8190. More...
 
static unsigned get_ue_golomb_long (GetBitContext *gb)
 Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1. More...
 
static int get_ue_golomb_31 (GetBitContext *gb)
 read unsigned exp golomb code, constraint to a max of 31. More...
 
static unsigned get_interleaved_ue_golomb (GetBitContext *gb)
 
static int get_te0_golomb (GetBitContext *gb, int range)
 read unsigned truncated exp golomb code. More...
 
static int get_te_golomb (GetBitContext *gb, int range)
 read unsigned truncated exp golomb code. More...
 
static int get_se_golomb (GetBitContext *gb)
 read signed exp golomb code. More...
 
static int get_se_golomb_long (GetBitContext *gb)
 
static int get_interleaved_se_golomb (GetBitContext *gb)
 
static int dirac_get_se_golomb (GetBitContext *gb)
 
static int get_ur_golomb (GetBitContext *gb, int k, int limit, int esc_len)
 read unsigned golomb rice code (ffv1). More...
 
static int get_ur_golomb_jpegls (GetBitContext *gb, int k, int limit, int esc_len)
 read unsigned golomb rice code (jpegls). More...
 
static int get_sr_golomb (GetBitContext *gb, int k, int limit, int esc_len)
 read signed golomb rice code (ffv1). More...
 
static int get_sr_golomb_flac (GetBitContext *gb, int k, int limit, int esc_len)
 read signed golomb rice code (flac). More...
 
static unsigned int get_ur_golomb_shorten (GetBitContext *gb, int k)
 read unsigned golomb rice code (shorten). More...
 
static int get_sr_golomb_shorten (GetBitContext *gb, int k)
 read signed golomb rice code (shorten). More...
 

Variables

const uint8_t ff_golomb_vlc_len [512]
 
const uint8_t ff_ue_golomb_vlc_code [512]
 
const int8_t ff_se_golomb_vlc_code [512]
 
const uint8_t ff_interleaved_golomb_vlc_len [256]
 
const uint8_t ff_interleaved_ue_golomb_vlc_code [256]
 
const int8_t ff_interleaved_se_golomb_vlc_code [256]
 
const uint8_t ff_interleaved_dirac_golomb_vlc_code [256]
 

Detailed Description

exp golomb vlc stuff

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at and Alex Beregszaszi

Definition in file golomb.h.

Macro Definition Documentation

◆ INVALID_VLC

#define INVALID_VLC   0x80000000

Definition at line 37 of file golomb.h.

Function Documentation

◆ get_ue_golomb()

static int get_ue_golomb ( GetBitContext gb)
inlinestatic

◆ get_ue_golomb_long()

static unsigned get_ue_golomb_long ( GetBitContext gb)
inlinestatic

◆ get_ue_golomb_31()

static int get_ue_golomb_31 ( GetBitContext gb)
inlinestatic

◆ get_interleaved_ue_golomb()

static unsigned get_interleaved_ue_golomb ( GetBitContext gb)
inlinestatic

◆ get_te0_golomb()

static int get_te0_golomb ( GetBitContext gb,
int  range 
)
inlinestatic

read unsigned truncated exp golomb code.

Definition at line 211 of file golomb.h.

◆ get_te_golomb()

static int get_te_golomb ( GetBitContext gb,
int  range 
)
inlinestatic

read unsigned truncated exp golomb code.

Definition at line 226 of file golomb.h.

◆ get_se_golomb()

static int get_se_golomb ( GetBitContext gb)
inlinestatic

◆ get_se_golomb_long()

static int get_se_golomb_long ( GetBitContext gb)
inlinestatic

◆ get_interleaved_se_golomb()

static int get_interleaved_se_golomb ( GetBitContext gb)
inlinestatic

Definition at line 301 of file golomb.h.

Referenced by rv34_decode_mv(), svq3_decode_mb(), and svq3_mc_dir().

◆ dirac_get_se_golomb()

static int dirac_get_se_golomb ( GetBitContext gb)
inlinestatic

◆ get_ur_golomb()

static int get_ur_golomb ( GetBitContext gb,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

read unsigned golomb rice code (ffv1).

Definition at line 374 of file golomb.h.

Referenced by get_sr_golomb().

◆ get_ur_golomb_jpegls()

static int get_ur_golomb_jpegls ( GetBitContext gb,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

read unsigned golomb rice code (jpegls).

Returns
-1 on error

Definition at line 431 of file golomb.h.

Referenced by get_sr_golomb_dst(), get_sr_golomb_flac(), get_sr_golomb_shorten(), get_ur_golomb_shorten(), loco_get_rice(), ls_get_code_regular(), and ls_get_code_runterm().

◆ get_sr_golomb()

static int get_sr_golomb ( GetBitContext gb,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

read signed golomb rice code (ffv1).

Definition at line 532 of file golomb.h.

Referenced by get_vlc_symbol().

◆ get_sr_golomb_flac()

static int get_sr_golomb_flac ( GetBitContext gb,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

read signed golomb rice code (flac).

Returns
INT_MIN on error

Definition at line 544 of file golomb.h.

Referenced by decode_residuals().

◆ get_ur_golomb_shorten()

static unsigned int get_ur_golomb_shorten ( GetBitContext gb,
int  k 
)
inlinestatic

read unsigned golomb rice code (shorten).

Definition at line 554 of file golomb.h.

Referenced by decode_subframe_lpc(), get_uint(), read_header(), shn_probe(), and shorten_decode_frame().

◆ get_sr_golomb_shorten()

static int get_sr_golomb_shorten ( GetBitContext gb,
int  k 
)
inlinestatic

read signed golomb rice code (shorten).

Definition at line 562 of file golomb.h.

Referenced by decode_subframe_lpc().

Variable Documentation

◆ ff_golomb_vlc_len

const uint8_t ff_golomb_vlc_len[512]

Definition at line 31 of file golomb.c.

Referenced by get_se_golomb(), get_ue_golomb(), and get_ue_golomb_31().

◆ ff_ue_golomb_vlc_code

const uint8_t ff_ue_golomb_vlc_code[512]

Definition at line 50 of file golomb.c.

Referenced by get_ue_golomb(), and get_ue_golomb_31().

◆ ff_se_golomb_vlc_code

const int8_t ff_se_golomb_vlc_code[512]

Definition at line 69 of file golomb.c.

Referenced by get_se_golomb().

◆ ff_interleaved_golomb_vlc_len

const uint8_t ff_interleaved_golomb_vlc_len[256]

Definition at line 100 of file golomb.c.

Referenced by get_interleaved_se_golomb(), and get_interleaved_ue_golomb().

◆ ff_interleaved_ue_golomb_vlc_code

const uint8_t ff_interleaved_ue_golomb_vlc_code[256]

Definition at line 119 of file golomb.c.

Referenced by get_interleaved_ue_golomb().

◆ ff_interleaved_se_golomb_vlc_code

const int8_t ff_interleaved_se_golomb_vlc_code[256]

Definition at line 138 of file golomb.c.

Referenced by get_interleaved_se_golomb().

◆ ff_interleaved_dirac_golomb_vlc_code

const uint8_t ff_interleaved_dirac_golomb_vlc_code[256]

Definition at line 157 of file golomb.c.

Referenced by get_interleaved_ue_golomb().