FFmpeg
|
For static VLCs, the number of bits can often be hardcoded at each get_vlc2() callsite. More...
#include <vlc.h>
Data Fields | |
VLCElem * | table |
points to where the next VLC table will be placed More... | |
unsigned | size |
remaining number of elements in table More... | |
For static VLCs, the number of bits can often be hardcoded at each get_vlc2() callsite.
Then using a full VLC would be uneconomical, because only VLC.table would ever be accessed after initialization. The following functions provide wrappers around the relevant ff_vlc_init_* functions suitable for said task.
The ff_vlc_init_tables_* functions are intended to be used for initializing a series of VLCs. The user initializes a VLCInitState with the details about the underlying array of VLCElem; it is automatically updated by the ff_vlc_init_tables_* functions (i.e. table is incremented and size decremented by the number of elements of the current table). The VLC_INIT_STATIC_OVERLONG flag is also automatically added. These functions return a pointer to the table just initialized, potentially to be used in arrays of pointer to VLC tables.
The ff_vlc_init_table_* functions are intended to be used for initializing a single VLC table, given by table and table_size. The VLC_INIT_USE_STATIC flag is automatically added.
VLCElem* VLCInitState::table |
unsigned VLCInitState::size |