Go to the source code of this file.
Functions | |
int | se_v (char *tracestring, Bitstream *bitstream) |
int | ue_v (char *tracestring, Bitstream *bitstream) |
Boolean | u_1 (char *tracestring, Bitstream *bitstream) |
int | u_v (int LenInBits, char *tracestring, Bitstream *bitstream) |
int | i_v (int LenInBits, char *tracestring, Bitstream *bitstream) |
void | linfo_ue (int len, int info, int *value1, int *dummy) |
void | linfo_se (int len, int info, int *value1, int *dummy) |
void | linfo_cbp_intra_normal (int len, int info, int *cbp, int *dummy) |
void | linfo_cbp_inter_normal (int len, int info, int *cbp, int *dummy) |
void | linfo_cbp_intra_other (int len, int info, int *cbp, int *dummy) |
void | linfo_cbp_inter_other (int len, int info, int *cbp, int *dummy) |
void | linfo_levrun_inter (int len, int info, int *level, int *irun) |
void | linfo_levrun_c2x2 (int len, int info, int *level, int *irun) |
int | uvlc_startcode_follows (Slice *currSlice, int dummy) |
int | readSyntaxElement_VLC (SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_UVLC (SyntaxElement *sym, ImageParameters *p_Img, struct datapartition *dp) |
int | readSyntaxElement_Intra4x4PredictionMode (SyntaxElement *sym, ImageParameters *p_Img, Bitstream *currStream) |
int | GetVLCSymbol (byte buffer[], int totbitoffset, int *info, int bytecount) |
int | GetVLCSymbol_IntraMode (byte buffer[], int totbitoffset, int *info, int bytecount) |
int | readSyntaxElement_FLC (SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_NumCoeffTrailingOnes (SyntaxElement *sym, Bitstream *currStream, char *type) |
int | readSyntaxElement_NumCoeffTrailingOnesChromaDC (ImageParameters *p_Img, SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_Level_VLC0 (SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_Level_VLCN (SyntaxElement *sym, int vlc, Bitstream *currStream) |
int | readSyntaxElement_TotalZeros (SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_TotalZerosChromaDC (ImageParameters *p_Img, SyntaxElement *sym, Bitstream *currStream) |
int | readSyntaxElement_Run (SyntaxElement *sym, Bitstream *currStream) |
int | GetBits (byte buffer[], int totbitoffset, int *info, int bitcount, int numbits) |
int | ShowBits (byte buffer[], int totbitoffset, int bitcount, int numbits) |
int | more_rbsp_data (byte buffer[], int totbitoffset, int bytecount) |
Variables | |
static const byte | NCBP [2][48][2] |
static const byte | NTAB1 [4][8][2] |
static const byte | LEVRUN1 [16] |
static const byte | NTAB2 [4][8][2] |
static const byte | LEVRUN3 [4] |
static const byte | NTAB3 [2][2][2] |
Definition in file vlc.h.
int GetBits | ( | byte | buffer[], | |
int | totbitoffset, | |||
int * | info, | |||
int | bitcount, | |||
int | numbits | |||
) |
Reads bits from the bitstream buffer.
buffer | containing VLC-coded data bits | |
totbitoffset | bit offset from start of partition | |
info | returns value of the read bits | |
bitcount | total bytes in bitstream | |
numbits | number of bits to read |
Definition at line 1211 of file vlc.c.
Referenced by readIPCM_CABAC(), and readSyntaxElement_FLC().
int GetVLCSymbol | ( | byte | buffer[], | |
int | totbitoffset, | |||
int * | info, | |||
int | bytecount | |||
) |
read one exp-golomb VLC symbol
buffer | containing VLC-coded data bits | |
totbitoffset | bit offset from start of partition | |
info | returns the value of the symbol | |
bytecount | buffer length |
Definition at line 535 of file vlc.c.
Referenced by readSyntaxElement_VLC().
int i_v | ( | int | LenInBits, | |
char * | tracestring, | |||
Bitstream * | bitstream | |||
) |
i_v, reads an i(v) syntax element, the length in bits is stored in the global p_Dec->UsedBits variable
LenInBits | length of the syntax element | |
tracestring | the string for the trace file | |
bitstream | the stream to be read from |
Definition at line 148 of file vlc.c.
References syntaxelement::inf, syntaxelement::len, linfo_ue(), syntaxelement::mapping, readSyntaxElement_FLC(), SE_HEADER, and syntaxelement::type.
Referenced by interpret_picture_timing_info().
void linfo_cbp_inter_normal | ( | int | len, | |
int | info, | |||
int * | cbp, | |||
int * | dummy | |||
) |
Definition at line 270 of file vlc.c.
References linfo_ue(), and NCBP.
Referenced by decode_one_frame().
void linfo_cbp_inter_other | ( | int | len, | |
int | info, | |||
int * | cbp, | |||
int * | dummy | |||
) |
Definition at line 286 of file vlc.c.
References linfo_ue(), and NCBP.
Referenced by decode_one_frame().
void linfo_cbp_intra_normal | ( | int | len, | |
int | info, | |||
int * | cbp, | |||
int * | dummy | |||
) |
Definition at line 237 of file vlc.c.
References linfo_ue(), and NCBP.
Referenced by decode_one_frame().
void linfo_cbp_intra_other | ( | int | len, | |
int | info, | |||
int * | cbp, | |||
int * | dummy | |||
) |
Definition at line 254 of file vlc.c.
References linfo_ue(), and NCBP.
Referenced by decode_one_frame().
void linfo_levrun_c2x2 | ( | int | len, | |
int | info, | |||
int * | level, | |||
int * | irun | |||
) |
Definition at line 337 of file vlc.c.
References LEVRUN3.
Referenced by read_CBP_and_coeffs_from_NAL_CABAC().
void linfo_levrun_inter | ( | int | len, | |
int | info, | |||
int * | level, | |||
int * | irun | |||
) |
Definition at line 302 of file vlc.c.
References NTAB1.
Referenced by read_CBP_and_coeffs_from_NAL_CABAC(), read_CBP_and_coeffs_from_NAL_CAVLC(), and readCompCoeff4x4SMB_CABAC().
void linfo_se | ( | int | len, | |
int | info, | |||
int * | value1, | |||
int * | dummy | |||
) |
mapping rule for se(v) syntax elements
Definition at line 219 of file vlc.c.
Referenced by read_motion_info_from_NAL_b_slice(), read_motion_info_from_NAL_p_slice(), and se_v().
void linfo_ue | ( | int | len, | |
int | info, | |||
int * | value1, | |||
int * | dummy | |||
) |
mapping rule for ue(v) syntax elements
Definition at line 203 of file vlc.c.
Referenced by i_v(), linfo_cbp_inter_normal(), linfo_cbp_inter_other(), linfo_cbp_intra_normal(), linfo_cbp_intra_other(), prepareListforRefIdx(), read_ipred_modes(), read_one_macroblock_b_slice(), read_one_macroblock_i_slice(), read_one_macroblock_p_slice(), u_v(), and ue_v().
int more_rbsp_data | ( | byte | buffer[], | |
int | totbitoffset, | |||
int | bytecount | |||
) |
test if bit buffer contains only stop bit
buffer | buffer containing VLC-coded data bits | |
totbitoffset | bit offset from start of partition | |
bytecount | buffer length |
Definition at line 467 of file vlc.c.
Referenced by InterpretPPS(), and uvlc_startcode_follows().
int readSyntaxElement_FLC | ( | SyntaxElement * | sym, | |
Bitstream * | currStream | |||
) |
read FLC codeword from UVLC-partition
Definition at line 668 of file vlc.c.
References Bitstream::bitstream_length, Bitstream::frame_bitoffset, GetBits(), syntaxelement::inf, syntaxelement::len, Bitstream::streamBuffer, and syntaxelement::value1.
Referenced by i_v(), read_CBP_and_coeffs_from_NAL_CABAC(), read_CBP_and_coeffs_from_NAL_CAVLC(), read_IPCM_coeffs_from_NAL(), read_one_macroblock_b_slice(), read_one_macroblock_i_slice(), read_one_macroblock_p_slice(), readCoeff4x4_CAVLC(), readRefPictureIdx_FLC(), and u_v().
int readSyntaxElement_Intra4x4PredictionMode | ( | SyntaxElement * | sym, | |
ImageParameters * | p_Img, | |||
Bitstream * | currStream | |||
) |
read next VLC codeword for 4x4 Intra Prediction Mode and map it to the corresponding Intra Prediction Direction
Definition at line 404 of file vlc.c.
References Bitstream::bitstream_length, Bitstream::frame_bitoffset, syntaxelement::inf, syntaxelement::len, Bitstream::streamBuffer, TRACE, and syntaxelement::value1.
Referenced by read_ipred_modes().
int readSyntaxElement_Level_VLC0 | ( | SyntaxElement * | sym, | |
Bitstream * | currStream | |||
) |
read Level VLC0 codeword from UVLC-partition
Definition at line 865 of file vlc.c.
References Bitstream::bitstream_length, Bitstream::frame_bitoffset, syntaxelement::inf, syntaxelement::len, ShowBits(), and Bitstream::streamBuffer.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_Level_VLCN | ( | SyntaxElement * | sym, | |
int | vlc, | |||
Bitstream * | currStream | |||
) |
read Level VLC codeword from UVLC-partition
Definition at line 923 of file vlc.c.
References Bitstream::bitstream_length, Bitstream::frame_bitoffset, syntaxelement::inf, syntaxelement::len, ShowBits(), and Bitstream::streamBuffer.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_NumCoeffTrailingOnes | ( | SyntaxElement * | sym, | |
Bitstream * | currStream, | |||
char * | type | |||
) |
read NumCoeff/TrailingOnes codeword from UVLC-partition
Definition at line 694 of file vlc.c.
References Bitstream::bitstream_length, code_from_bitstream_2d(), Bitstream::frame_bitoffset, syntaxelement::len, ShowBits(), Bitstream::streamBuffer, syntaxelement::value1, and syntaxelement::value2.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_NumCoeffTrailingOnesChromaDC | ( | ImageParameters * | p_Img, | |
SyntaxElement * | sym, | |||
Bitstream * | currStream | |||
) |
read NumCoeff/TrailingOnes codeword from UVLC-partition ChromaDC
Definition at line 798 of file vlc.c.
References code_from_bitstream_2d(), syntaxelement::len, syntaxelement::value1, and syntaxelement::value2.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_Run | ( | SyntaxElement * | sym, | |
Bitstream * | currStream | |||
) |
read Run codeword from UVLC-partition
Definition at line 1152 of file vlc.c.
References code_from_bitstream_2d(), syntaxelement::len, and syntaxelement::value1.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_TotalZeros | ( | SyntaxElement * | sym, | |
Bitstream * | currStream | |||
) |
read Total Zeros codeword from UVLC-partition
Definition at line 997 of file vlc.c.
References code_from_bitstream_2d(), syntaxelement::len, and syntaxelement::value1.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_TotalZerosChromaDC | ( | ImageParameters * | p_Img, | |
SyntaxElement * | sym, | |||
Bitstream * | currStream | |||
) |
read Total Zeros Chroma DC codeword from UVLC-partition
Definition at line 1061 of file vlc.c.
References code_from_bitstream_2d(), syntaxelement::len, and syntaxelement::value1.
Referenced by readCoeff4x4_CAVLC().
int readSyntaxElement_UVLC | ( | SyntaxElement * | sym, | |
ImageParameters * | p_Img, | |||
struct datapartition * | dp | |||
) |
read next UVLC codeword from UVLC-partition and map it to the corresponding syntax element
Definition at line 392 of file vlc.c.
References readSyntaxElement_VLC().
int readSyntaxElement_VLC | ( | SyntaxElement * | sym, | |
Bitstream * | currStream | |||
) |
read next UVLC codeword from UVLC-partition and map it to the corresponding syntax element
Definition at line 367 of file vlc.c.
References Bitstream::bitstream_length, Bitstream::frame_bitoffset, GetVLCSymbol(), syntaxelement::inf, syntaxelement::len, syntaxelement::mapping, Bitstream::streamBuffer, syntaxelement::value1, and syntaxelement::value2.
Referenced by readSyntaxElement_UVLC(), se_v(), and ue_v().
int se_v | ( | char * | tracestring, | |
Bitstream * | bitstream | |||
) |
ue_v, reads an se(v) syntax element, the length in bits is stored in the global p_Dec->UsedBits variable
tracestring | the string for the trace file | |
bitstream | the stream to be read from |
Definition at line 79 of file vlc.c.
References syntaxelement::len, linfo_se(), syntaxelement::mapping, readSyntaxElement_VLC(), SE_HEADER, syntaxelement::type, and syntaxelement::value1.
Referenced by interpret_film_grain_characteristics_info(), interpret_pan_scan_rect_info(), interpret_post_filter_hints_info(), InterpretPPS(), pred_weight_table(), and RestOfSliceHeader().
int ShowBits | ( | byte | buffer[], | |
int | totbitoffset, | |||
int | bitcount, | |||
int | numbits | |||
) |
Reads bits from the bitstream buffer.
buffer | buffer containing VLC-coded data bits | |
totbitoffset | bit offset from start of partition | |
bitcount | total bytes in bitstream | |
numbits | number of bits to read |
Definition at line 1262 of file vlc.c.
Referenced by readSyntaxElement_Level_VLC0(), readSyntaxElement_Level_VLCN(), and readSyntaxElement_NumCoeffTrailingOnes().
ue_v, reads an u(1) syntax element, the length in bits is stored in the global p_Dec->UsedBits variable
tracestring | the string for the trace file | |
bitstream | the stream to be read from |
Definition at line 186 of file vlc.c.
References u_v().
Referenced by dec_ref_pic_marking(), interpret_deblocking_filter_display_preference_info(), interpret_dec_ref_pic_marking_repetition_info(), interpret_film_grain_characteristics_info(), interpret_motion_constrained_slice_group_set_info(), interpret_pan_scan_rect_info(), interpret_picture_timing_info(), interpret_post_filter_hints_info(), interpret_recovery_point_info(), interpret_spare_pic(), interpret_stereo_video_info_info(), interpret_subsequence_characteristics_info(), interpret_subsequence_info(), interpret_subsequence_layer_characteristics_info(), InterpretPPS(), pred_weight_table(), ref_pic_list_reordering(), and RestOfSliceHeader().
int u_v | ( | int | LenInBits, | |
char * | tracestring, | |||
Bitstream * | bitstream | |||
) |
ue_v, reads an u(v) syntax element, the length in bits is stored in the global p_Dec->UsedBits variable
LenInBits | length of the syntax element | |
tracestring | the string for the trace file | |
bitstream | the stream to be read from |
Definition at line 113 of file vlc.c.
References syntaxelement::inf, syntaxelement::len, linfo_ue(), syntaxelement::mapping, readSyntaxElement_FLC(), SE_HEADER, and syntaxelement::type.
Referenced by FirstPartOfSliceHeader(), interpret_buffering_period_info(), interpret_film_grain_characteristics_info(), interpret_motion_constrained_slice_group_set_info(), interpret_picture_timing_info(), interpret_post_filter_hints_info(), interpret_recovery_point_info(), interpret_subsequence_characteristics_info(), interpret_subsequence_layer_characteristics_info(), InterpretPPS(), RestOfSliceHeader(), and u_1().
int ue_v | ( | char * | tracestring, | |
Bitstream * | bitstream | |||
) |
ue_v, reads an ue(v) syntax element, the length in bits is stored in the global p_Dec->UsedBits variable
tracestring | the string for the trace file | |
bitstream | the stream to be read from |
Definition at line 48 of file vlc.c.
References syntaxelement::len, linfo_ue(), syntaxelement::mapping, readSyntaxElement_VLC(), SE_HEADER, syntaxelement::type, and syntaxelement::value1.
Referenced by dec_ref_pic_marking(), FirstPartOfSliceHeader(), interpret_buffering_period_info(), interpret_deblocking_filter_display_preference_info(), interpret_dec_ref_pic_marking_repetition_info(), interpret_film_grain_characteristics_info(), interpret_full_frame_freeze_info(), interpret_full_frame_snapshot_info(), interpret_motion_constrained_slice_group_set_info(), interpret_pan_scan_rect_info(), interpret_post_filter_hints_info(), interpret_progressive_refinement_end_info(), interpret_progressive_refinement_start_info(), interpret_recovery_point_info(), interpret_scene_information(), interpret_spare_pic(), interpret_subsequence_characteristics_info(), interpret_subsequence_info(), interpret_subsequence_layer_characteristics_info(), InterpretPPS(), pred_weight_table(), read_new_slice(), ref_pic_list_reordering(), and RestOfSliceHeader().
int uvlc_startcode_follows | ( | Slice * | currSlice, | |
int | dummy | |||
) |
Check if there are symbols for the next MB.
Definition at line 506 of file vlc.c.
References assignSE2partition, Bitstream::bitstream_length, slice::dp_mode, Bitstream::frame_bitoffset, more_rbsp_data(), slice::partArr, and Bitstream::streamBuffer.
const byte LEVRUN1[16] [static] |
Initial value:
{ 2,1,0,0 }
Definition at line 59 of file vlc.h.
Referenced by linfo_levrun_c2x2().
Initial value:
{ { {15, 0},{ 0, 1},{ 7, 2},{11, 4},{13, 8},{14, 3},{ 3, 5},{ 5,10},{10,12},{12,15},{ 1, 7},{ 2,11}, { 4,13},{ 8,14},{ 6, 6},{ 9, 9},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0}, { 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0}, { 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0},{ 0, 0} }, { {47, 0},{31,16},{15, 1},{ 0, 2},{23, 4},{27, 8},{29,32},{30, 3},{ 7, 5},{11,10},{13,12},{14,15}, {39,47},{43, 7},{45,11},{46,13},{16,14},{ 3, 6},{ 5, 9},{10,31},{12,35},{19,37},{21,42},{26,44}, {28,33},{35,34},{37,36},{42,40},{44,39},{ 1,43},{ 2,45},{ 4,46},{ 8,17},{17,18},{18,20},{20,24}, {24,19},{ 6,21},{ 9,26},{22,28},{25,23},{32,27},{33,29},{34,30},{36,22},{40,25},{38,38},{41,41} } }
Definition at line 19 of file vlc.h.
Referenced by linfo_cbp_inter_normal(), linfo_cbp_inter_other(), linfo_cbp_intra_normal(), and linfo_cbp_intra_other().
Initial value:
{ {{1,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}, {{1,1},{1,2},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}, {{2,0},{1,3},{1,4},{1,5},{0,0},{0,0},{0,0},{0,0}}, {{3,0},{2,1},{2,2},{1,6},{1,7},{1,8},{1,9},{4,0}}, }
Definition at line 36 of file vlc.h.
Referenced by linfo_levrun_inter().
const byte NTAB2[4][8][2] [static] |
const byte NTAB3[2][2][2] [static] |