libavcodec/bitstream.c File Reference

bitstream api. More...

#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]


Detailed Description

bitstream api.

Definition in file bitstream.c.


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 102 of file bitstream.c.

Referenced by build_table().


Function Documentation

void align_put_bits ( PutBitContext s  ) 

static int alloc_table ( VLC vlc,
int  size,
int  use_static 
) [static]

Definition at line 119 of file bitstream.c.

Referenced by build_table(), and mp_decode_layer2().

attribute_deprecated av_alloc_size (  ) 

Same as av_mallocz_static(), but does a realloc.

Parameters:
[in] ptr The block of memory to reallocate.
[in] size The requested size.
Returns:
Block of memory of requested size.
Deprecated:
. Code which uses ff_realloc_static is broken/misdesigned and should correctly use static arrays

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]

Definition at line 140 of file bitstream.c.

Referenced by init_vlc_sparse().

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 
)

Definition at line 66 of file bitstream.c.

Referenced by jpeg_put_comments().

void free_vlc ( VLC vlc  ) 

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 
)


Variable Documentation

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


Generated on Fri Oct 26 02:35:42 2012 for FFmpeg by  doxygen 1.5.8