|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.twilight.h264.decoder.GetBitContext
public class GetBitContext
| Field Summary | |
|---|---|
static int[] |
av_reverse
|
int[] |
buffer
|
int |
buffer_end
|
int |
buffer_offset
|
long |
cache
|
long |
cache0
|
long |
cache1
|
static int[] |
ff_golomb_vlc_len
|
static int[] |
ff_se_golomb_vlc_code
|
static int[] |
ff_ue_golomb_len
|
static int[] |
ff_ue_golomb_vlc_code
|
int |
index
|
static int |
INIT_VLC_LE
|
static int |
INIT_VLC_USE_NEW_STATIC
|
static int |
MIN_CACHE_BITS
|
int |
size_in_bits
|
| Constructor Summary | |
|---|---|
GetBitContext()
|
|
| Method Summary | |
|---|---|
void |
align_get_bits()
|
static int |
alloc_table(VLC vlc,
int size,
int use_static)
|
static long |
bitswap_32(long x)
|
static int |
build_table(VLC vlc,
int table_nb_bits,
int nb_codes,
VLCcode[] codes_base,
int codes_offset,
int flags)
Build VLC decoding tables suitable for use with get_vlc(). |
long |
check_marker(String msg)
|
long |
decode012()
|
long |
decode210()
|
int |
get_bits_count()
|
int |
get_bits_left()
|
long |
get_bits_long(int n,
String message)
reads 0-32 bits. |
long |
get_bits(int n,
String message)
reads 1-17 bits. |
long |
get_bits1(String message)
|
int |
get_sbits_long(int n,
String message)
reads 0-32 bits as a signed integer. |
int |
get_sbits(int n)
|
int |
get_se_golomb(String message)
read signed exp golomb code. |
int |
get_ue_golomb_31(String message)
read unsigned exp golomb code, constraint to a max of 31. |
int |
get_ue_golomb(String message)
read unsigned exp golomb code. |
int |
get_vlc2(short[][] table_base,
int table_offset,
int bits,
int max_depth,
String message)
parses a vlc code, faster then get_vlc() |
int |
get_xbits(int n)
read mpeg1 dc style vlc (sign bit + mantisse with no MSB). |
void |
init_get_bits(int[] buffer,
int buffer_offset,
int bit_size)
init GetBitContext. |
GetBitContext |
makeCopy()
|
long |
show_bits_long(int n)
shows 0-32 bits. |
long |
show_bits(int n)
shows 1-17 bits. |
long |
show_bits1()
|
void |
skip_bits_long(int n)
|
void |
skip_bits(int n)
|
void |
skip_bits1()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_CACHE_BITS
public static final int INIT_VLC_LE
public static final int INIT_VLC_USE_NEW_STATIC
public static final int[] av_reverse
public static final int[] ff_golomb_vlc_len
public static final int[] ff_ue_golomb_vlc_code
public static final int[] ff_se_golomb_vlc_code
public static final int[] ff_ue_golomb_len
public int[] buffer
public int buffer_offset
public int buffer_end
public int index
public long cache
public long cache0
public long cache1
public int size_in_bits
| Constructor Detail |
|---|
public GetBitContext()
| Method Detail |
|---|
public static final long bitswap_32(long x)
public GetBitContext makeCopy()
public int get_bits_count()
public void skip_bits_long(int n)
public int get_xbits(int n)
n - length in bitspublic int get_sbits(int n)
public long get_bits(int n,
String message)
public long show_bits(int n)
public void skip_bits(int n)
public long get_bits1(String message)
public long show_bits1()
public void skip_bits1()
public long get_bits_long(int n,
String message)
public int get_sbits_long(int n,
String message)
public long show_bits_long(int n)
public long check_marker(String msg)
public void init_get_bits(int[] buffer,
int buffer_offset,
int bit_size)
buffer - bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then the actual read bits
because some optimized bitstream readers read 32 or 64 bit at once and could read over the endbit_size - the size of the buffer in bits
While GetBitContext stores the buffer size, for performance reasons you are
responsible for checking for the buffer end yourself (take advantage of the padding)!public void align_get_bits()
public long decode012()
public long decode210()
public int get_bits_left()
public static int alloc_table(VLC vlc,
int size,
int use_static)
public static int build_table(VLC vlc,
int table_nb_bits,
int nb_codes,
VLCcode[] codes_base,
int codes_offset,
int flags)
vlc - the context to be inittedtable_nb_bits - max length of vlc codes to store directly in this table
(Longer codes are delegated to subtables.)nb_codes - number of elements in codes[]codes - descriptions of the vlc codes
These must be ordered such that codes going into the same subtable are contiguous.
Sorting by VLCcode.code is sufficient, though not necessary.
public int get_vlc2(short[][] table_base,
int table_offset,
int bits,
int max_depth,
String message)
bits - is the number of bits which will be read at once, must be
identical to nb_bits in init_vlc()max_depth - is the number of times bits bits must be read to completely
read the longest vlc code
= (max_vlc_length + bits - 1) / bitspublic int get_ue_golomb(String message)
public int get_ue_golomb_31(String message)
public int get_se_golomb(String message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||