29#define UNCHECKED_BITSTREAM_READER 1
40 0, 1, 2, 4, 8, 3, 5,10,12,15, 7,11,13,14, 6, 9,
4415, 0, 7,11,13,14, 3, 5,10,12, 1, 2, 4, 8, 6, 9,
90 6, 2, 0, 0, 8, 6, 3, 0, 9, 8, 7, 5, 10, 9, 8, 6,
91 11,10, 9, 7, 13,11,10, 8, 13,13,11, 9, 13,13,13,10,
92 14,14,13,11, 14,14,14,13, 15,15,14,14, 15,15,15,14,
93 16,15,15,15, 16,16,16,15, 16,16,16,16, 16,16,16,16,
97 6, 2, 0, 0, 6, 5, 3, 0, 7, 6, 6, 4, 8, 6, 6, 4,
98 8, 7, 7, 5, 9, 8, 8, 6, 11, 9, 9, 6, 11,11,11, 7,
99 12,11,11, 9, 12,12,12,11, 12,12,12,11, 13,13,13,12,
100 13,13,13,13, 13,14,13,13, 14,14,14,13, 14,14,14,14,
104 6, 4, 0, 0, 6, 5, 4, 0, 6, 5, 5, 4, 7, 5, 5, 4,
105 7, 5, 5, 4, 7, 6, 6, 4, 7, 6, 6, 4, 8, 7, 7, 5,
106 8, 8, 7, 6, 9, 8, 8, 7, 9, 9, 8, 8, 9, 9, 9, 8,
107 10, 9, 9, 9, 10,10,10,10, 10,10,10,10, 10,10,10,10,
111 6, 6, 0, 0, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6,
112 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
113 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
114 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
121 5, 1, 0, 0, 7, 4, 1, 0, 7, 6, 5, 3, 7, 6, 5, 3,
122 7, 6, 5, 4, 15, 6, 5, 4, 11,14, 5, 4, 8,10,13, 4,
123 15,14, 9, 4, 11,10,13,12, 15,14, 9,12, 11,10,13, 8,
124 15, 1, 9,12, 11,14,13, 8, 7,10, 9,12, 4, 6, 5, 8,
128 11, 2, 0, 0, 7, 7, 3, 0, 7,10, 9, 5, 7, 6, 5, 4,
129 4, 6, 5, 6, 7, 6, 5, 8, 15, 6, 5, 4, 11,14,13, 4,
130 15,10, 9, 4, 11,14,13,12, 8,10, 9, 8, 15,14,13,12,
131 11,10, 9,12, 7,11, 6, 8, 9, 8,10, 1, 7, 6, 5, 4,
135 15,14, 0, 0, 11,15,13, 0, 8,12,14,12, 15,10,11,11,
136 11, 8, 9,10, 9,14,13, 9, 8,10, 9, 8, 15,14,13,13,
137 11,14,10,12, 15,10,13,12, 11,14, 9,12, 8,10,13, 8,
138 13, 7, 9,12, 9,12,11,10, 5, 8, 7, 6, 1, 4, 3, 2,
142 0, 1, 0, 0, 4, 5, 6, 0, 8, 9,10,11, 12,13,14,15,
143 16,17,18,19, 20,21,22,23, 24,25,26,27, 28,29,30,31,
144 32,33,34,35, 36,37,38,39, 40,41,42,43, 44,45,46,47,
145 48,49,50,51, 52,53,54,55, 56,57,58,59, 60,61,62,63,
150 {1,3,3,4,4,5,5,6,6,7,7,8,8,9,9,9},
151 {3,3,3,3,3,4,4,4,4,5,5,6,6,6,6},
152 {4,3,3,3,4,4,3,3,4,5,5,6,5,6},
153 {5,3,4,4,3,3,3,4,3,4,5,5,5},
154 {4,4,4,3,3,3,3,3,4,5,4,5},
155 {6,5,3,3,3,3,3,3,4,3,6},
156 {6,5,3,3,3,2,3,4,3,6},
168 {1,3,2,3,2,3,2,3,2,3,2,3,2,3,2,1},
169 {7,6,5,4,3,5,4,3,2,3,2,3,2,1,0},
170 {5,7,6,5,4,3,4,3,2,3,2,1,1,0},
171 {3,7,5,4,6,5,4,3,3,2,2,1,0},
172 {5,4,3,7,6,5,4,3,2,1,1,0},
173 {1,1,7,6,5,4,3,2,1,1,0},
174 {1,1,5,4,3,3,2,1,1,0},
198 { 1, 3, 3, 4, 4, 4, 5, 5 },
199 { 3, 2, 3, 3, 3, 3, 3 },
200 { 3, 3, 2, 2, 3, 3 },
208 { 1, 2, 3, 2, 3, 1, 1, 0 },
209 { 0, 1, 1, 4, 5, 6, 7 },
210 { 0, 1, 1, 2, 6, 7 },
224 {3,3,3,3,3,3,3,4,5,6,7,8,9,10,11},
234 {7,6,5,4,3,2,1,1,1,1,1,1,1,1,1},
237#define LEVEL_TAB_BITS 8
240#define CHROMA_DC_COEFF_TOKEN_VLC_BITS 8
241#define CHROMA422_DC_COEFF_TOKEN_VLC_BITS 13
242#define COEFF_TOKEN_VLC_BITS 8
243#define TOTAL_ZEROS_VLC_BITS 9
244#define CHROMA_DC_TOTAL_ZEROS_VLC_BITS 3
245#define CHROMA422_DC_TOTAL_ZEROS_VLC_BITS 5
246#define RUN_VLC_BITS 3
247#define RUN7_VLC_BITS 6
269 + (520 + 332 + 280 + 256) ];
277 const int index8=
scan8[n];
282 if(
i<64)
i= (
i+1)>>1;
293 for(suffix_length=0; suffix_length<7; suffix_length++){
298 int level_code = (
prefix << suffix_length) +
299 (
i >> (
av_log2(
i) - suffix_length)) - (1 << suffix_length);
300 int mask = -(level_code&1);
301 level_code = (((2 + level_code) >> 1) ^
mask) -
mask;
317 const VLCElem *coeff_token_vlc_original[4];
334 for (
int i = 0;
i < 6;
i++) {
340 for (
int i = 0;
i < 4;
i++) {
341 coeff_token_vlc_original[
i] =
347 static const uint8_t coeff_token_table_index[17] = {
348 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3
353 for (
int i = 0;
i < 3;
i++) {
360 for (
int i = 0;
i < 7;
i++) {
367 for (
int i = 0;
i < 15;
i++) {
407 const uint8_t *scantable,
const uint32_t *qmul,
411 int zeros_left, coeff_token, total_coeff,
i, trailing_ones, run_before;
428 total_coeff = coeff_token >> 2;
435 if(total_coeff > (
unsigned)max_coeff) {
440 trailing_ones= coeff_token&3;
441 ff_tlog(
h->avctx,
"trailing:%d, total:%d\n", trailing_ones, total_coeff);
450 if(trailing_ones<total_coeff) {
452 int suffix_length = total_coeff > 10 & trailing_ones < 3;
457 if(level_code >= 100){
480 level_code += (1<<(
prefix-3))-4096;
485 if(trailing_ones < 3) level_code += 2;
488 mask= -(level_code&1);
491 level_code += ((level_code>>31)|1) & -(trailing_ones < 3);
493 suffix_length = 1 + (level_code + 3U > 6U);
494 level[trailing_ones]= level_code;
498 for(
i=trailing_ones+1;
i<total_coeff;
i++) {
499 static const unsigned int suffix_limit[7] = {0,3,6,12,24,48,INT_MAX };
504 if(level_code >= 100){
510 level_code = (
prefix<<suffix_length) +
get_bits(gb, suffix_length);
512 level_code = 15<<suffix_length;
518 level_code += (1<<(
prefix-3))-4096;
522 mask= -(level_code&1);
523 level_code= (((2+level_code)>>1) ^
mask) -
mask;
526 suffix_length+= suffix_limit[suffix_length] + level_code > 2U*suffix_limit[suffix_length];
530 if(total_coeff == max_coeff)
533 if (max_coeff <= 8) {
546#define STORE_BLOCK(type) \
547 scantable += zeros_left + total_coeff - 1; \
548 if(n >= LUMA_DC_BLOCK_INDEX){ \
549 ((type*)block)[*scantable] = level[0]; \
550 for(i=1;i<total_coeff && zeros_left > 0;i++) { \
552 run_before = get_vlc2(gb, run_vlc[zeros_left], RUN_VLC_BITS, 1); \
554 run_before = get_vlc2(gb, run7_vlc_table, RUN7_VLC_BITS, 2); \
555 zeros_left -= run_before; \
556 scantable -= 1 + run_before; \
557 ((type*)block)[*scantable]= level[i]; \
559 for(;i<total_coeff;i++) { \
561 ((type*)block)[*scantable]= level[i]; \
564 ((type*)block)[*scantable] = ((int)(level[0] * qmul[*scantable] + 32))>>6; \
565 for(i=1;i<total_coeff && zeros_left > 0;i++) { \
567 run_before = get_vlc2(gb, run_vlc[zeros_left], RUN_VLC_BITS, 1); \
569 run_before = get_vlc2(gb, run7_vlc_table, RUN7_VLC_BITS, 2); \
570 zeros_left -= run_before; \
571 scantable -= 1 + run_before; \
572 ((type*)block)[*scantable]= ((int)(level[i] * qmul[*scantable] + 32))>>6; \
574 for(;i<total_coeff;i++) { \
576 ((type*)block)[*scantable]= ((int)(level[i] * qmul[*scantable] + 32))>>6; \
580 if (
h->pixel_shift) {
597 const uint8_t *scan8x8,
int pixel_shift,
598 int mb_type,
int cbp,
int p)
614 for(i8x8=0; i8x8<4; i8x8++){
615 for(i4x4=0; i4x4<4; i4x4++){
616 const int index= i4x4 + 4*i8x8 + p*16;
618 index, scan + 1,
h->ps.pps->dequant4_coeff[p][qscale], 15) < 0 ){
629 int cqm = (
IS_INTRA( mb_type ) ? 0:3)+p;
632 for(i8x8=0; i8x8<4; i8x8++){
635 int16_t *buf = &sl->
mb[64*i8x8+256*p << pixel_shift];
637 for(i4x4=0; i4x4<4; i4x4++){
638 const int index= i4x4 + 4*i8x8 + p*16;
640 h->ps.pps->dequant8_coeff[cqm][qscale], 16) < 0 )
644 nnz[0] += nnz[1] + nnz[8] + nnz[9];
645 new_cbp |= !!nnz[0] << i8x8;
647 for(i4x4=0; i4x4<4; i4x4++){
648 const int index= i4x4 + 4*i8x8 + p*16;
650 scan,
h->ps.pps->dequant4_coeff[cqm][qscale], 16) < 0 ){
658 nnz[0] = nnz[1] = nnz[8] = nnz[9] = 0;
669 unsigned int mb_type, cbp;
670 int dct8x8_allowed =
h->ps.pps->transform_8x8_mode;
671 const int decode_chroma =
h->ps.sps->chroma_format_idc == 1 ||
h->ps.sps->chroma_format_idc == 2;
672 const int pixel_shift =
h->pixel_shift;
682 if (mb_skip_run >
h->mb_num) {
699 if ((sl->
mb_y & 1) == 0)
712 goto decode_intra_mb;
720 goto decode_intra_mb;
744 h->ps.sps->bit_depth_luma;
755 h->cur_pic.qscale_table[mb_xy] = 0;
757 memset(
h->non_zero_count[mb_xy], 16, 48);
759 h->cur_pic.mb_type[mb_xy] = mb_type;
779 for(
i=0;
i<16;
i+=di){
784 mode = rem_mode + (rem_mode >=
mode);
811 }
else if(partition_count==4){
812 int i, j, sub_partition_count[4], list,
ref[2][4];
844 for (list = 0; list < sl->
list_count; list++) {
852 }
else if(ref_count == 2){
872 for (list = 0; list < sl->
list_count; list++) {
884 for(j=0; j<sub_partition_count[
i]; j++){
886 const int index= 4*
i + block_width*j;
895 mv_cache[ 8 ][0]= mv_cache[ 9 ][0]=
mx;
897 mv_cache[ 8 ][1]= mv_cache[ 9 ][1]=
my;
899 mv_cache[ 1 ][0]=
mx;
900 mv_cache[ 1 ][1]=
my;
902 mv_cache[ 8 ][0]=
mx;
903 mv_cache[ 8 ][1]=
my;
905 mv_cache[ 0 ][0]=
mx;
906 mv_cache[ 0 ][1]=
my;
917 dct8x8_allowed &=
h->ps.sps->direct_8x8_inference_flag;
922 for (list = 0; list < sl->
list_count; list++) {
924 if (
IS_DIR(mb_type, 0, list)) {
928 }
else if (rc == 2) {
940 for (list = 0; list < sl->
list_count; list++) {
941 if(
IS_DIR(mb_type, 0, list)){
952 for (list = 0; list < sl->
list_count; list++) {
953 for (
i = 0;
i < 2;
i++) {
955 if (
IS_DIR(mb_type,
i, list)) {
959 }
else if (rc == 2) {
973 for (list = 0; list < sl->
list_count; list++) {
990 for (list = 0; list < sl->
list_count; list++) {
991 for (
i = 0;
i < 2;
i++) {
993 if (
IS_DIR(mb_type,
i, list)) {
997 }
else if (rc == 2) {
1011 for (list = 0; list < sl->
list_count; list++) {
1053 if (!decode_chroma && cbp>15) {
1059 if(dct8x8_allowed && (cbp&15) && !
IS_INTRA(mb_type)){
1063 h->cbp_table[mb_xy]= cbp;
1064 h->cur_pic.mb_type[mb_xy] = mb_type;
1067 int i4x4, i8x8, chroma_idx;
1071 const uint8_t *scan, *scan8x8;
1072 const int max_qp = 51 + 6 * (
h->ps.sps->bit_depth_luma - 8);
1076 sl->
qscale += (unsigned)dquant;
1078 if (((
unsigned)sl->
qscale) > max_qp){
1080 else sl->
qscale -= max_qp+1;
1081 if (((
unsigned)sl->
qscale) > max_qp){
1092 scan8x8 = sl->
qscale ?
h->field_scan8x8_cavlc :
h->field_scan8x8_cavlc_q0;
1093 scan = sl->
qscale ?
h->field_scan :
h->field_scan_q0;
1095 scan8x8 = sl->
qscale ?
h->zigzag_scan8x8_cavlc :
h->zigzag_scan8x8_cavlc_q0;
1096 scan = sl->
qscale ?
h->zigzag_scan :
h->zigzag_scan_q0;
1102 h->cbp_table[mb_xy] |= ret << 12;
1111 const int num_c8x8 =
h->ps.sps->chroma_format_idc;
1114 for(chroma_idx=0; chroma_idx<2; chroma_idx++)
1118 NULL, 4 * num_c8x8) < 0) {
1124 for(chroma_idx=0; chroma_idx<2; chroma_idx++){
1125 const uint32_t *qmul =
h->ps.pps->dequant4_coeff[chroma_idx+1+(
IS_INTRA( mb_type ) ? 0:3)][sl->
chroma_qp[chroma_idx]];
1126 int16_t *
mb = sl->
mb + (16*(16 + 16*chroma_idx) << pixel_shift);
1127 for (i8x8 = 0; i8x8<num_c8x8; i8x8++) {
1128 for (i4x4 = 0; i4x4 < 4; i4x4++) {
1129 const int index = 16 + 16*chroma_idx + 8*i8x8 + i4x4;
1132 mb += 16 << pixel_shift;
1146 h->cur_pic.qscale_table[mb_xy] = sl->
qscale;
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t my
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t mx
static double val(void *priv, double ch)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
static struct @346255127015250356166251341105367306144006377143 state
static void fill_rectangle(int x, int y, int w, int h)
#define GET_CACHE(name, gb)
static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table, int bits, int max_depth)
Parse a vlc code.
#define CLOSE_READER(name, gb)
static int get_bits_left(GetBitContext *gb)
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static unsigned int get_bits1(GetBitContext *s)
#define OPEN_READER(name, gb)
static void skip_bits(GetBitContext *s, int n)
#define UPDATE_CACHE(name, gb)
#define LAST_SKIP_BITS(name, gb, num)
static const uint8_t * align_get_bits(GetBitContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
static int get_se_golomb(GetBitContext *gb)
read signed exp golomb code.
static int get_ue_golomb_31(GetBitContext *gb)
read unsigned exp golomb code, constraint to a max of 31.
static int get_ue_golomb(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to 8190.
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PICTURE_TYPE_P
Predicted.
@ AV_PICTURE_TYPE_SI
Switching Intra.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
#define CHROMA_DC_COEFF_TOKEN_VLC_BITS
static int get_level_prefix(GetBitContext *gb)
static const uint8_t chroma422_dc_total_zeros_bits[7][8]
static const uint8_t coeff_token_bits[4][4 *17]
static const uint8_t coeff_token_len[4][4 *17]
static const uint8_t chroma422_dc_total_zeros_len[7][8]
int ff_h264_decode_mb_cavlc(const H264Context *h, H264SliceContext *sl)
Decode a macroblock.
static av_cold void init_cavlc_level_tab(void)
static const uint8_t chroma422_dc_coeff_token_len[4 *9]
#define COEFF_TOKEN_VLC_BITS
static const uint8_t chroma_dc_coeff_token_bits[4 *5]
static int decode_residual(const H264Context *h, H264SliceContext *sl, GetBitContext *gb, int16_t *block, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff)
Decode a residual block.
static const uint8_t chroma_dc_coeff_token_len[4 *5]
static const uint8_t chroma_dc_total_zeros_bits[3][4]
static const uint8_t golomb_to_intra4x4_cbp_gray[16]
static const VLCElem * total_zeros_vlc[15+1]
#define TOTAL_ZEROS_VLC_BITS
static const uint8_t total_zeros_bits[16][16]
#define CHROMA_DC_TOTAL_ZEROS_VLC_BITS
#define CHROMA422_DC_TOTAL_ZEROS_VLC_BITS
static VLCElem run7_vlc_table[96+(6<< RUN_VLC_BITS)+(15<< TOTAL_ZEROS_VLC_BITS)+(3<< CHROMA_DC_TOTAL_ZEROS_VLC_BITS)+(7<< CHROMA422_DC_TOTAL_ZEROS_VLC_BITS)+(520+332+280+256)]
static const uint8_t chroma422_dc_coeff_token_bits[4 *9]
static const uint8_t chroma_dc_total_zeros_len[3][4]
static const uint8_t total_zeros_len[16][16]
#define STORE_BLOCK(type)
static const VLCElem * chroma422_dc_total_zeros_vlc[7+1]
static const uint8_t run_len[7][16]
static const VLCElem * run_vlc[6+1]
static const uint8_t golomb_to_inter_cbp_gray[16]
static av_always_inline int decode_luma_residual(const H264Context *h, H264SliceContext *sl, GetBitContext *gb, const uint8_t *scan, const uint8_t *scan8x8, int pixel_shift, int mb_type, int cbp, int p)
static VLCElem chroma422_dc_coeff_token_vlc_table[1<< CHROMA422_DC_COEFF_TOKEN_VLC_BITS]
#define CHROMA422_DC_COEFF_TOKEN_VLC_BITS
static const uint8_t run_bits[7][16]
static int pred_non_zero_count(const H264Context *h, const H264SliceContext *sl, int n)
Get the predicted number of non-zero coefficients.
static VLCElem chroma_dc_coeff_token_vlc_table[256]
static const VLCElem * chroma_dc_total_zeros_vlc[3+1]
static int8_t cavlc_level_tab[7][1<< LEVEL_TAB_BITS][2]
av_cold void ff_h264_decode_init_vlc(void)
static const VLCElem * coeff_token_vlc[17]
17 pointers to only four different VLCs
void ff_h264_pred_direct_motion(const H264Context *const h, H264SliceContext *sl, int *mb_type)
H.264 / AVC / MPEG-4 part10 motion vector prediction.
static void fill_decode_neighbors(const H264Context *h, H264SliceContext *sl, int mb_type)
static av_always_inline void write_back_motion(const H264Context *h, H264SliceContext *sl, int mb_type)
static av_always_inline int pred_intra_mode(const H264Context *h, H264SliceContext *sl, int n)
Get the predicted intra4x4 prediction mode.
static av_always_inline int get_dct8x8_allowed(const H264Context *h, H264SliceContext *sl)
static av_always_inline void write_back_non_zero_count(const H264Context *h, H264SliceContext *sl)
static av_unused void decode_mb_skip(const H264Context *h, H264SliceContext *sl)
decodes a P_SKIP or B_SKIP macroblock
static av_always_inline void pred_motion(const H264Context *const h, H264SliceContext *sl, int n, int part_width, int list, int ref, int *const mx, int *const my)
Get the predicted MV.
static void fill_decode_caches(const H264Context *h, H264SliceContext *sl, int mb_type)
static av_always_inline void pred_8x16_motion(const H264Context *const h, H264SliceContext *sl, int n, int list, int ref, int *const mx, int *const my)
Get the directionally predicted 8x16 MV.
static av_always_inline void write_back_intra_pred_mode(const H264Context *h, H264SliceContext *sl)
static av_always_inline void pred_16x8_motion(const H264Context *const h, H264SliceContext *sl, int n, int list, int ref, int *const mx, int *const my)
Get the directionally predicted 16x8 MV.
int ff_h264_check_intra4x4_pred_mode(int8_t *pred_mode_cache, void *logctx, int top_samples_available, int left_samples_available)
Check if the top & left blocks are available if needed and change the dc mode so it only uses the ava...
int ff_h264_check_intra_pred_mode(void *logctx, int top_samples_available, int left_samples_available, int mode, int is_chroma)
Check if the top & left blocks are available if needed and change the dc mode so it only uses the ava...
static const uint8_t scan8[16 *3+3]
static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
const IMbInfo ff_h264_i_mb_type_info[26]
const PMbInfo ff_h264_p_mb_type_info[5]
const uint8_t ff_h264_golomb_to_inter_cbp[48]
const uint8_t ff_h264_chroma422_dc_scan[8]
const PMbInfo ff_h264_b_sub_mb_type_info[13]
const uint8_t ff_h264_chroma_dc_scan[4]
const PMbInfo ff_h264_b_mb_type_info[23]
const uint8_t ff_h264_golomb_to_intra4x4_cbp[48]
const PMbInfo ff_h264_p_sub_mb_type_info[4]
H.264 / AVC / MPEG-4 part10 codec.
#define IS_DIR(a, part, list)
static av_always_inline int get_chroma_qp(const PPS *pps, int t, int qscale)
Get the chroma qp.
#define LUMA_DC_BLOCK_INDEX
#define CHROMA_DC_BLOCK_INDEX
#define PART_NOT_AVAILABLE
const uint16_t ff_h264_mb_sizes[4]
static const uint16_t mask[17]
#define MB_TYPE_INTERLACED
#define FF_ARRAY_ELEMS(a)
int mb_field_decoding_flag
int8_t ref_cache[2][5 *8]
const uint8_t * intra_pcm_ptr
int16_t mv_cache[2][5 *8][2]
Motion vector cache.
unsigned int left_samples_available
int slice_type_nos
S free slice type (SI/SP are remapped to I/P)
unsigned int top_samples_available
int16_t mb[16 *48 *2]
as a DCT coefficient is int32_t in high depth, we need to reserve twice the space.
int mb_mbaff
mb_aff_frame && mb_field_decoding_flag
int8_t intra4x4_pred_mode_cache[5 *8]
uint8_t non_zero_count_cache[15 *8]
non zero coeff count cache.
unsigned int ref_count[2]
num_ref_idx_l0/1_active_minus1 + 1
int16_t mb_luma_dc[3][16 *2]
For static VLCs, the number of bits can often be hardcoded at each get_vlc2() callsite.
static int ref[MAX_W *MAX_W]
#define VLC_INIT_STATIC_TABLE(vlc_table, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, flags)
#define VLC_INIT_STATE(_table)
static const VLCElem * ff_vlc_init_tables(VLCInitState *state, 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 flags)