#include "avcodec.h"
#include "bitstream.h"
Go to the source code of this file.
Defines | |
#define | GET_DATA(v, table, i, wrap, size) |
Functions | |
attribute_deprecated | av_alloc_size (2) |
Same as av_mallocz_static(), but does a realloc. | |
void | align_put_bits (PutBitContext *s) |
void | ff_put_string (PutBitContext *pbc, const char *s, int put_zero) |
void | ff_copy_bits (PutBitContext *pb, const uint8_t *src, int length) |
static int | alloc_table (VLC *vlc, int size, int use_static) |
static int | build_table (VLC *vlc, int table_nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, uint32_t code_prefix, int n_prefix, int flags) |
int | init_vlc_sparse (VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags) |
void | free_vlc (VLC *vlc) |
Variables | |
const uint8_t | ff_log2_run [32] |
Definition in file bitstream.c.
Value:
{\ const uint8_t *ptr = (const uint8_t *)table + i * wrap;\ switch(size) {\ case 1:\ v = *(const uint8_t *)ptr;\ break;\ case 2:\ v = *(const uint16_t *)ptr;\ break;\ default:\ v = *(const uint32_t *)ptr;\ break;\ }\ }
Definition at line 102 of file bitstream.c.
Referenced by build_table().
void align_put_bits | ( | PutBitContext * | s | ) |
Definition at line 57 of file bitstream.c.
Referenced by encode_block(), encode_frame(), encode_picture_ls(), ff_h261_encode_picture_header(), flush_put_bits(), h264_write_nal_unit(), put_bitstream_info(), put_header(), and write_slice_end().
static int alloc_table | ( | VLC * | vlc, | |
int | size, | |||
int | use_static | |||
) | [static] |
attribute_deprecated av_alloc_size | ( | 2 | ) |
Same as av_mallocz_static(), but does a realloc.
[in] | ptr | The block of memory to reallocate. |
[in] | size | The requested size. |
Definition at line 49 of file bitstream.c.
static int build_table | ( | VLC * | vlc, | |
int | table_nb_bits, | |||
int | nb_codes, | |||
const void * | bits, | |||
int | bits_wrap, | |||
int | bits_size, | |||
const void * | codes, | |||
int | codes_wrap, | |||
int | codes_size, | |||
const void * | symbols, | |||
int | symbols_wrap, | |||
int | symbols_size, | |||
uint32_t | code_prefix, | |||
int | n_prefix, | |||
int | flags | |||
) | [static] |
void ff_copy_bits | ( | PutBitContext * | pb, | |
const uint8_t * | src, | |||
int | length | |||
) |
Definition at line 76 of file bitstream.c.
Referenced by encode_thread(), merge_context_after_encode(), and svq1_encode_plane().
void ff_put_string | ( | PutBitContext * | pbc, | |
const char * | s, | |||
int | put_zero | |||
) |
void free_vlc | ( | VLC * | vlc | ) |
Definition at line 316 of file bitstream.c.
Referenced by cook_decode_close(), decode_end(), dnxhd_decode_close(), dvvideo_init(), ff_mjpeg_decode_dht(), ff_mjpeg_decode_end(), ff_wma_end(), fraps2_decode_plane(), generate_joint_tables(), mimic_decode_end(), mp_decode_frame(), read_huffman_tables(), read_old_huffman_tables(), smacker_decode_header_tree(), smka_decode_frame(), tm2_free_codes(), vorbis_free(), vp3_decode_end(), vp56_free(), and vp6_build_huff_tree().
int init_vlc_sparse | ( | VLC * | vlc, | |
int | nb_bits, | |||
int | nb_codes, | |||
const void * | bits, | |||
int | bits_wrap, | |||
int | bits_size, | |||
const void * | codes, | |||
int | codes_wrap, | |||
int | codes_size, | |||
const void * | symbols, | |||
int | symbols_wrap, | |||
int | symbols_size, | |||
int | flags | |||
) |
Definition at line 274 of file bitstream.c.
Referenced by build_huff_tree(), ff_ccitt_unpack_init(), generate_joint_tables(), mpc8_decode_init(), rv34_gen_vlc(), and rv40_init_tables().
const uint8_t ff_log2_run[32] |
Initial value:
{ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9,10,11,12,13,14,15 }
Definition at line 33 of file bitstream.c.
Referenced by decode_line(), ls_decode_line(), ls_encode_line(), and ls_encode_run().