#include "avcodec.h"#include "bitstream.h"

Go to the source code of this file.
Defines | |
| #define | GET_DATA(v, table, i, wrap, size) |
Functions | |
| void | align_put_bits (PutBitContext *s) |
| void | put_string (PutBitContext *pbc, char *s, int put_zero) |
| unsigned int | get_bits_long (GetBitContext *s, int n) |
| unsigned int | show_bits_long (GetBitContext *s, int n) |
| void | align_get_bits (GetBitContext *s) |
| int | check_marker (GetBitContext *s, const char *msg) |
| 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, uint32_t code_prefix, int n_prefix, int flags) |
| int | init_vlc (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, int use_static) |
| void | free_vlc (VLC *vlc) |
| #define GET_DATA | ( | v, | |||
| table, | |||||
| i, | |||||
| wrap, | |||||
| size | ) |
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 95 of file bitstream.c.
Referenced by build_table().
| void align_get_bits | ( | GetBitContext * | s | ) |
Definition at line 76 of file bitstream.c.
References get_bits_count(), and skip_bits().
Referenced by decode_frame(), decode_mb_cavlc(), decode_slice(), ff_h261_resync(), ff_h263_resync(), ff_mpeg4_decode_picture_header(), h263_decode_picture_header(), ljpeg_decode_rgb_scan(), ljpeg_decode_yuv_scan(), mjpeg_decode_scan(), mpeg4_is_resync(), sonic_decode_frame(), and wma_decode_block().

| void align_put_bits | ( | PutBitContext * | s | ) |
Definition at line 31 of file bitstream.c.
References PutBitContext::bit_left, and put_bits().
Referenced by encode_frame(), ff_h261_encode_picture_header(), and flush_put_bits().

| static int alloc_table | ( | VLC * | vlc, | |
| int | size, | |||
| int | use_static | |||
| ) | [static] |
Definition at line 112 of file bitstream.c.
References av_realloc(), av_realloc_static(), VLC::bits, VLC::table, VLC::table_allocated, VLC::table_size, and VLC_TYPE.
Referenced by build_table(), and mp_decode_layer2().

| 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, | |||
| uint32_t | code_prefix, | |||
| int | n_prefix, | |||
| int | flags | |||
| ) | [static] |
Definition at line 131 of file bitstream.c.
References alloc_table(), av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, GET_DATA, INIT_VLC_LE, INIT_VLC_USE_STATIC, nb, NULL, VLC::table, and VLC_TYPE.
Referenced by init_vlc().

| int check_marker | ( | GetBitContext * | s, | |
| const char * | msg | |||
| ) |
Definition at line 82 of file bitstream.c.
References av_log(), AV_LOG_INFO, get_bits1(), and NULL.
Referenced by decode_vol_header(), decode_vop_header(), and mpeg4_decode_video_packet_header().

| void free_vlc | ( | VLC * | vlc | ) |
Definition at line 289 of file bitstream.c.
References av_free(), and VLC::table.
Referenced by decode_end(), dvvideo_init(), mjpeg_decode_dht(), mjpeg_decode_end(), read_huffman_tables(), read_old_huffman_tables(), vorbis_free(), and wma_decode_end().

| unsigned int get_bits_long | ( | GetBitContext * | s, | |
| int | n | |||
| ) |
reads 0-32 bits.
Definition at line 55 of file bitstream.c.
References get_bits().
Referenced by decode_vui_parameters(), ff_mpeg4_decode_partitions(), flac_decode_frame(), flv_h263_decode_picture_header(), get_le16(), get_le32(), intel_h263_decode_picture_header(), metadata_streaminfo(), mjpegb_decode_frame(), shorten_decode_frame(), show_bits_long(), and theora_decode_comments().

| int init_vlc | ( | 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, | |||
| int | use_static | |||
| ) |
Definition at line 257 of file bitstream.c.
References av_free(), VLC::bits, build_table(), NULL, VLC::table, VLC::table_allocated, and VLC::table_size.
Referenced by build_vlc(), decode_init(), decode_init_vlc(), dvvideo_init(), ff_msmpeg4_decode_init(), h261_decode_init_vlc(), h263_decode_init_vlc(), init_2d_vlc_rl(), init_coef_vlc(), init_vlc_rl(), init_vlcs(), ir2_decode_init(), read_huffman_tables(), read_old_huffman_tables(), rv10_decode_init(), svq1_decode_init(), vorbis_parse_setup_hdr_codebooks(), vp3_decode_init(), and wma_decode_init().

| void put_string | ( | PutBitContext * | pbc, | |
| char * | s, | |||
| int | put_zero | |||
| ) |
Definition at line 40 of file bitstream.c.
References put_bits().

| unsigned int show_bits_long | ( | GetBitContext * | s, | |
| int | n | |||
| ) |
shows 0-32 bits.
Definition at line 66 of file bitstream.c.
References get_bits_long(), and show_bits().
Referenced by flac_decode_frame(), and mpeg4_decode_partition_a().

1.5.5