FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
golomb.h File Reference

exp golomb vlc stuff
More...

#include <stdint.h>
#include "get_bits.h"
#include "put_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...
 
static void set_ue_golomb (PutBitContext *pb, int i)
 write unsigned exp golomb code. More...
 
static void set_ue_golomb_long (PutBitContext *pb, uint32_t i)
 write unsigned exp golomb code. More...
 
static void set_te_golomb (PutBitContext *pb, int i, int range)
 write truncated unsigned exp golomb code. More...
 
static void set_se_golomb (PutBitContext *pb, int i)
 write signed exp golomb code. More...
 
static void set_ur_golomb (PutBitContext *pb, int i, int k, int limit, int esc_len)
 write unsigned golomb rice code (ffv1). More...
 
static void set_ur_golomb_jpegls (PutBitContext *pb, int i, int k, int limit, int esc_len)
 write unsigned golomb rice code (jpegls). More...
 
static void set_sr_golomb (PutBitContext *pb, int i, int k, int limit, int esc_len)
 write signed golomb rice code (ffv1). More...
 
static void set_sr_golomb_flac (PutBitContext *pb, int i, int k, int limit, int esc_len)
 write signed golomb rice code (flac). 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_ue_golomb_len [256]
 
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

#define INVALID_VLC   0x80000000

Definition at line 38 of file golomb.h.

Referenced by get_interleaved_se_golomb(), and rv34_decode_mv().

Function Documentation

static int get_ue_golomb ( GetBitContext gb)
inlinestatic
static unsigned get_ue_golomb_long ( GetBitContext gb)
inlinestatic
static int get_ue_golomb_31 ( GetBitContext gb)
inlinestatic
static unsigned get_interleaved_ue_golomb ( GetBitContext gb)
inlinestatic
static int get_te0_golomb ( GetBitContext gb,
int  range 
)
inlinestatic

read unsigned truncated exp golomb code.

Definition at line 155 of file golomb.h.

static int get_te_golomb ( GetBitContext gb,
int  range 
)
inlinestatic

read unsigned truncated exp golomb code.

Definition at line 170 of file golomb.h.

static int get_se_golomb ( GetBitContext gb)
inlinestatic
static int get_se_golomb_long ( GetBitContext gb)
inlinestatic

Definition at line 215 of file golomb.h.

Referenced by hvcc_parse_pps(), pps_range_extensions(), and skip_scaling_list_data().

static int get_interleaved_se_golomb ( GetBitContext gb)
inlinestatic

Definition at line 222 of file golomb.h.

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

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

read unsigned golomb rice code (ffv1).

Definition at line 270 of file golomb.h.

Referenced by get_sr_golomb(), and get_sr_golomb_dst().

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

read unsigned golomb rice code (jpegls).

Definition at line 305 of file golomb.h.

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

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

read signed golomb rice code (ffv1).

Definition at line 372 of file golomb.h.

Referenced by get_vlc_symbol().

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

read signed golomb rice code (flac).

Definition at line 382 of file golomb.h.

Referenced by decode_residuals().

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

read unsigned golomb rice code (shorten).

Definition at line 392 of file golomb.h.

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

static int get_sr_golomb_shorten ( GetBitContext gb,
int  k 
)
inlinestatic

read signed golomb rice code (shorten).

Definition at line 400 of file golomb.h.

Referenced by decode_subframe_lpc().

static void set_ue_golomb ( PutBitContext pb,
int  i 
)
inlinestatic

write unsigned exp golomb code.

2^16 - 2 at most

Definition at line 463 of file golomb.h.

Referenced by ff_hevc_encode_nal_vps(), main(), set_se_golomb(), and set_te_golomb().

static void set_ue_golomb_long ( PutBitContext pb,
uint32_t  i 
)
inlinestatic

write unsigned exp golomb code.

2^32-2 at most.

Definition at line 479 of file golomb.h.

Referenced by main().

static void set_te_golomb ( PutBitContext pb,
int  i,
int  range 
)
inlinestatic

write truncated unsigned exp golomb code.

Definition at line 494 of file golomb.h.

static void set_se_golomb ( PutBitContext pb,
int  i 
)
inlinestatic

write signed exp golomb code.

16 bits at most.

Definition at line 508 of file golomb.h.

Referenced by main().

static void set_ur_golomb ( PutBitContext pb,
int  i,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

write unsigned golomb rice code (ffv1).

Definition at line 519 of file golomb.h.

Referenced by set_sr_golomb().

static void set_ur_golomb_jpegls ( PutBitContext pb,
int  i,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

write unsigned golomb rice code (jpegls).

Definition at line 536 of file golomb.h.

Referenced by ls_encode_regular(), ls_encode_runterm(), and set_sr_golomb_flac().

static void set_sr_golomb ( PutBitContext pb,
int  i,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

write signed golomb rice code (ffv1).

Definition at line 565 of file golomb.h.

Referenced by put_vlc_symbol().

static void set_sr_golomb_flac ( PutBitContext pb,
int  i,
int  k,
int  limit,
int  esc_len 
)
inlinestatic

write signed golomb rice code (flac).

Definition at line 579 of file golomb.h.

Referenced by write_subframes().

Variable Documentation

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

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

const int8_t ff_se_golomb_vlc_code[512]

Definition at line 69 of file golomb.c.

Referenced by get_se_golomb().

const uint8_t ff_ue_golomb_len[256]

Definition at line 89 of file golomb.c.

Referenced by set_ue_golomb(), and set_ue_golomb_long().

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

const uint8_t ff_interleaved_ue_golomb_vlc_code[256]

Definition at line 119 of file golomb.c.

Referenced by get_interleaved_ue_golomb().

const int8_t ff_interleaved_se_golomb_vlc_code[256]

Definition at line 138 of file golomb.c.

Referenced by get_interleaved_se_golomb().

const uint8_t ff_interleaved_dirac_golomb_vlc_code[256]

Definition at line 157 of file golomb.c.

Referenced by get_interleaved_ue_golomb().