//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];
intluma_weight[48][2][2];
intchroma_weight[48][2][2][2];
intchroma_weight[48][2][2][2];
intimplicit_weight[48][48][2];
intimplicit_weight[48][48][2];
...
@@ -370,8 +369,8 @@ typedef struct H264Context{
...
@@ -370,8 +369,8 @@ typedef struct H264Context{
intcol_fieldoff;
intcol_fieldoff;
intdist_scale_factor[16];
intdist_scale_factor[16];
intdist_scale_factor_field[2][32];
intdist_scale_factor_field[2][32];
intmap_col_to_list0[2][16+32];
intmap_col_to_list0[2][16+32];
intmap_col_to_list0_field[2][2][16+32];
intmap_col_to_list0_field[2][2][16+32];
/**
/**
* num_ref_idx_l0/1_active_minus1 + 1
* num_ref_idx_l0/1_active_minus1 + 1
...
@@ -380,19 +379,19 @@ typedef struct H264Context{
...
@@ -380,19 +379,19 @@ typedef struct H264Context{
unsignedintlist_count;
unsignedintlist_count;
uint8_t*list_counts;///< Array of list_count per MB specifying the slice type
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.
Pictureref_list[2][48];/**< 0..15: frame refs, 16..47: mbaff field refs.
Reordered version of default_ref_list
* Reordered version of default_ref_list
according to picture reordering in slice header */
* 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
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;
GetBitContextintra_gb;
GetBitContextinter_gb;
GetBitContextinter_gb;
GetBitContext*intra_gb_ptr;
GetBitContext*intra_gb_ptr;
GetBitContext*inter_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)[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];
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
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
* Cabac
...
@@ -400,7 +399,7 @@ typedef struct H264Context{
...
@@ -400,7 +399,7 @@ typedef struct H264Context{
CABACContextcabac;
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 */
/* 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;
uint16_t*cbp_table;
intcbp;
intcbp;
inttop_cbp;
inttop_cbp;
...
@@ -409,9 +408,9 @@ typedef struct H264Context{
...
@@ -409,9 +408,9 @@ typedef struct H264Context{
uint8_t*chroma_pred_mode_table;
uint8_t*chroma_pred_mode_table;
intlast_qscale_diff;
intlast_qscale_diff;
uint8_t(*mvd_table[2])[2];
uint8_t(*mvd_table[2])[2];
DECLARE_ALIGNED(16,uint8_t,mvd_cache)[2][5*8][2];
DECLARE_ALIGNED(16,uint8_t,mvd_cache)[2][5*8][2];
uint8_t*direct_table;
uint8_t*direct_table;
uint8_tdirect_cache[5*8];
uint8_tdirect_cache[5*8];
uint8_tzigzag_scan[16];
uint8_tzigzag_scan[16];
uint8_tzigzag_scan8x8[64];
uint8_tzigzag_scan8x8[64];
...
@@ -432,13 +431,13 @@ typedef struct H264Context{
...
@@ -432,13 +431,13 @@ typedef struct H264Context{
intis_complex;
intis_complex;
//deblock
//deblock
intdeblocking_filter;///< disable_deblocking_filter_idc with 1<->0
intdeblocking_filter;///< disable_deblocking_filter_idc with 1 <-> 0