hvirtual/quicktime/ffmpeg/libavcodec/bitstream.c File Reference

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

Include dependency graph for bitstream.c:

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 Documentation

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


Function Documentation

void align_get_bits ( GetBitContext s  ) 

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

unsigned int get_bits_long ( GetBitContext s,
int  n 
)

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 put_string ( PutBitContext pbc,
char *  s,
int  put_zero 
)

Definition at line 40 of file bitstream.c.

References put_bits().

Here is the call graph for this function:

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

Here is the call graph for this function:


Generated on Mon Apr 28 13:58:47 2008 for Cinelerra by  doxygen 1.5.5