FFmpeg
Data Structures | Macros | Functions
rl.h File Reference
#include <stdint.h>
#include "vlc.h"

Go to the source code of this file.

Data Structures

struct  RLTable
 RLTable. More...
 

Macros

#define MAX_RUN   64
 
#define MAX_LEVEL   64
 
#define INIT_VLC_RL(rl, static_size)
 
#define INIT_FIRST_VLC_RL(rl, static_size)
 

Functions

void ff_rl_init (RLTable *rl, uint8_t static_store[2][2 *MAX_RUN+MAX_LEVEL+3])
 Initialize index_run, max_level and max_run from n, last, table_vlc, table_run and table_level. More...
 
void ff_rl_init_vlc (RLTable *rl, unsigned static_size)
 Initialize rl_vlc from n, last, table_vlc, table_run and table_level. More...
 
static int get_rl_index (const RLTable *rl, int last, int run, int level)
 

Detailed Description

rl header.

Definition in file rl.h.

Macro Definition Documentation

◆ MAX_RUN

#define MAX_RUN   64

Definition at line 35 of file rl.h.

◆ MAX_LEVEL

#define MAX_LEVEL   64

Definition at line 36 of file rl.h.

◆ INIT_VLC_RL

#define INIT_VLC_RL (   rl,
  static_size 
)
Value:
{\
int q;\
static RL_VLC_ELEM rl_vlc_table[32][static_size];\
if(!rl.rl_vlc[0]){\
for(q=0; q<32; q++)\
rl.rl_vlc[q]= rl_vlc_table[q];\
\
ff_rl_init_vlc(&rl, static_size);\
}\
}

Definition at line 73 of file rl.h.

◆ INIT_FIRST_VLC_RL

#define INIT_FIRST_VLC_RL (   rl,
  static_size 
)
Value:
do { \
static RL_VLC_ELEM rl_vlc_table[static_size]; \
\
rl.rl_vlc[0] = rl_vlc_table; \
ff_rl_init_vlc(&rl, static_size); \
} while (0)

Definition at line 86 of file rl.h.

Function Documentation

◆ ff_rl_init()

void ff_rl_init ( RLTable rl,
uint8_t  static_store[2][2 *MAX_RUN+MAX_LEVEL+3] 
)

Initialize index_run, max_level and max_run from n, last, table_vlc, table_run and table_level.

Parameters
static_storestatic uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] to hold the level and run tables.
Note
This function does not touch rl_vlc at all, hence there is no need to synchronize calls to ff_rl_init() and ff_rl_init_vlc() using the same RLTable.

Definition at line 27 of file rl.c.

Referenced by ff_mpeg4videodec_static_init(), h261_encode_init_static(), h263_encode_init_static(), h263_init_rl_inter(), mpeg4_init_rl_intra(), msmpeg4_common_init_static(), and speedhq_init_static_data().

◆ ff_rl_init_vlc()

void ff_rl_init_vlc ( RLTable rl,
unsigned  static_size 
)

Initialize rl_vlc from n, last, table_vlc, table_run and table_level.

All rl_vlc pointers to be initialized must already point to a static buffer of static_size RL_VLC_ELEM elements; if a pointer is NULL, initializing further VLCs stops.

Note
This function does not touch what ff_rl_init() initializes at all, hence there is no need to synchronize calls to ff_rl_init() and ff_rl_init_vlc() using the same RLTable.

Definition at line 70 of file rl.c.

◆ get_rl_index()

static int get_rl_index ( const RLTable rl,
int  last,
int  run,
int  level 
)
inlinestatic
if
if(ret)
Definition: filter_design.txt:179
RL_VLC_ELEM
Definition: vlc.h:32
ff_rl_init_vlc
void ff_rl_init_vlc(RLTable *rl, unsigned static_size)
Initialize rl_vlc from n, last, table_vlc, table_run and table_level.
Definition: rl.c:70