//The following 2 can be changed to int8_t but that causes 10cpu cycles speedloss
//The following 2 can be changed to int8_t but that causes 10cpu cycles speedloss
intluma_weight[48][2][2];
intchroma_weight[48][2][2][2];
intimplicit_weight[48][48][2];
...
...
@@ -370,48 +369,48 @@ typedef struct H264Context{
intcol_fieldoff;
intdist_scale_factor[16];
intdist_scale_factor_field[2][32];
intmap_col_to_list0[2][16+32];
intmap_col_to_list0_field[2][2][16+32];
intmap_col_to_list0[2][16+32];
intmap_col_to_list0_field[2][2][16+32];
/**
* num_ref_idx_l0/1_active_minus1 + 1
*/
unsignedintref_count[2];///< counts frames or fields, depending on current mb mode
unsignedintref_count[2];///< counts frames or fields, depending on current mb mode
unsignedintlist_count;
uint8_t*list_counts;///< Array of list_count per MB specifying the slice type
Pictureref_list[2][48];/**< 0..15: frame refs, 16..47: mbaff field refs.
Reordered version of default_ref_list
according to picture reordering in slice header */
intref2frm[MAX_SLICES][2][64];///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1
uint8_t*list_counts;///< Array of list_count per MB specifying the slice type
Pictureref_list[2][48];/**< 0..15: frame refs, 16..47: mbaff field refs.
* Reordered version of default_ref_list
* according to picture reordering in slice header */
intref2frm[MAX_SLICES][2][64];///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1
//data partitioning
//data partitioning
GetBitContextintra_gb;
GetBitContextinter_gb;
GetBitContext*intra_gb_ptr;
GetBitContext*inter_gb_ptr;
DECLARE_ALIGNED(16,DCTELEM,mb)[16*48*2];///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.
DECLARE_ALIGNED(16,DCTELEM,mb_luma_dc)[3][16*2];
DCTELEMmb_padding[256*2];///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
DECLARE_ALIGNED(16,DCTELEM,mb)[16*48*2];///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.
DECLARE_ALIGNED(16,DCTELEM,mb_luma_dc)[3][16*2];
DCTELEMmb_padding[256*2];///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
/**
* Cabac
*/
CABACContextcabac;
uint8_tcabac_state[1024];
uint8_tcabac_state[1024];
/* 0x100 -> non null luma_dc, 0x80/0x40 -> non null chroma_dc (cb/cr), 0x?0 -> chroma_cbp(0,1,2), 0x0? luma_cbp */
uint16_t*cbp_table;
/* 0x100 -> non null luma_dc, 0x80/0x40 -> non null chroma_dc (cb/cr), 0x?0 -> chroma_cbp(0, 1, 2), 0x0? luma_cbp */
uint16_t*cbp_table;
intcbp;
inttop_cbp;
intleft_cbp;
/* chroma_pred_mode for i4x4 or i16x16, else 0 */
uint8_t*chroma_pred_mode_table;
intlast_qscale_diff;
uint8_t(*mvd_table[2])[2];
DECLARE_ALIGNED(16,uint8_t,mvd_cache)[2][5*8][2];
uint8_t*direct_table;
uint8_tdirect_cache[5*8];
uint8_t*chroma_pred_mode_table;
intlast_qscale_diff;
uint8_t(*mvd_table[2])[2];
DECLARE_ALIGNED(16,uint8_t,mvd_cache)[2][5*8][2];
uint8_t*direct_table;
uint8_tdirect_cache[5*8];
uint8_tzigzag_scan[16];
uint8_tzigzag_scan8x8[64];
...
...
@@ -432,13 +431,13 @@ typedef struct H264Context{
intis_complex;
//deblock
intdeblocking_filter;///< disable_deblocking_filter_idc with 1<->0
//deblock
intdeblocking_filter;///< disable_deblocking_filter_idc with 1 <-> 0