Commit 6b41d4da authored by Johann's avatar Johann

av1/[common|decoder]: apply clang-format v5.0.0

Change-Id: I86befaf7aa35f3f9b18618db1a27d191c1f7af36
parent b0ef6ff3
......@@ -396,7 +396,7 @@ void av1_loop_filter_frame_init(AV1_COMMON *cm, int default_filt_lvl,
,
int plane
#endif
) {
) {
int seg_id;
// n_shift is the multiplier for lf_deltas
// the multiplier is 1 for when filter_lvl is between 0 and 31;
......
......@@ -143,7 +143,7 @@ void av1_loop_filter_frame_init(struct AV1Common *cm, int default_filt_lvl,
,
int plane
#endif
);
);
void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
struct macroblockd *mbd, int filter_level,
......
......@@ -326,7 +326,9 @@ typedef struct MB_MODE_INFO {
#endif
} MB_MODE_INFO;
typedef struct MODE_INFO { MB_MODE_INFO mbmi; } MODE_INFO;
typedef struct MODE_INFO {
MB_MODE_INFO mbmi;
} MODE_INFO;
#if CONFIG_INTRABC
#define NO_FILTER_FOR_IBC 1 // Disable in-loop filters for frame with intrabc
......@@ -737,33 +739,15 @@ static const int av1_num_ext_tx_set[EXT_TX_SET_TYPES] = {
};
static const int av1_ext_tx_used[EXT_TX_SET_TYPES][TX_TYPES] = {
{
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
},
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
},
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
},
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
};
static INLINE TxSetType get_ext_tx_set_type(TX_SIZE tx_size, BLOCK_SIZE bs,
......@@ -791,14 +775,10 @@ static INLINE TxSetType get_ext_tx_set_type(TX_SIZE tx_size, BLOCK_SIZE bs,
// Maps tx set types to the indices.
static const int ext_tx_set_index[2][EXT_TX_SET_TYPES] = {
{
// Intra
0, -1, 2, -1, 1, -1, -1, -1, -1,
},
{
// Inter
0, 3, -1, -1, -1, -1, 2, -1, 1,
},
{ // Intra
0, -1, 2, -1, 1, -1, -1, -1, -16 },
{ // Inter
0, 3, -1, -1, -1, -1, 2, -1, 1 },
};
static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter,
......
......@@ -31,9 +31,9 @@ int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) {
for (int r = 0; r < maxr; r++) {
for (int c = 0; c < maxc; c++) {
skip = skip &&
cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
->mbmi.skip;
skip =
skip && cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
->mbmi.skip;
}
}
return skip;
......
......@@ -88,7 +88,7 @@ static INLINE void av1_get_convolve_filter_params(InterpFilters interp_filters,
,
int w, int h
#endif
) {
) {
#if CONFIG_DUAL_FILTER
InterpFilter filter_x = av1_extract_interp_filter(interp_filters, 1);
InterpFilter filter_y = av1_extract_interp_filter(interp_filters, 0);
......
......@@ -145,8 +145,8 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
#define DCT_MAX_VALUE_HIGH10 65536
#define DCT_MAX_VALUE_HIGH12 262144
/* Coefficients are predicted via a 3-dimensional probability table. */
/* Coefficients are predicted via a 3-dimensional probability table indexed on
* REF_TYPES, COEF_BANDS and COEF_CONTEXTS. */
#define REF_TYPES 2 // intra=0, inter=1
/* Middle dimension reflects the coefficient position within the transform. */
......@@ -167,7 +167,6 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
in meaning is perfectly OK because our context depends also on the
coefficient band (and since zigzag positions 0, 1, and 2 are in
distinct bands). */
#define COEFF_CONTEXTS 6
#define COEFF_CONTEXTS0 3 // for band 0
#define BAND_COEFF_CONTEXTS(band) \
......@@ -205,7 +204,6 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
// 128 lists of probabilities are stored for the following ONE node probs:
// 1, 3, 5, 7, ..., 253, 255
// In between probabilities are interpolated linearly
#define COEFF_PROB_MODELS 255
#define UNCONSTRAINED_NODES 3
......
......@@ -312,63 +312,27 @@ extern const aom_cdf_prob default_kf_y_mode_cdf[KF_MODE_CONTEXTS]
[CDF_SIZE(INTRA_MODES)];
static const int av1_ext_tx_ind[EXT_TX_SET_TYPES][TX_TYPES] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
1, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0,
},
{
1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0,
},
{
1, 2, 3, 6, 4, 5, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0,
},
{
3, 4, 5, 8, 6, 7, 9, 10, 11, 0, 1, 2, 0, 0, 0, 0,
},
{
7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
},
{
7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0 },
{ 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0 },
{ 1, 2, 3, 6, 4, 5, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0 },
{ 3, 4, 5, 8, 6, 7, 9, 10, 11, 0, 1, 2, 0, 0, 0, 0 },
{ 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6 },
{ 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6 },
};
static const int av1_ext_tx_inv[EXT_TX_SET_TYPES][TX_TYPES] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
9, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
{
9, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0, 0, 0,
},
{
9, 10, 11, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0,
},
{
9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8,
},
{
9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8,
},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 9, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 9, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0, 0, 0 },
{ 9, 10, 11, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0 },
{ 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8 },
{ 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8 },
};
void av1_setup_frame_contexts(struct AV1Common *cm);
......
......@@ -235,7 +235,7 @@ static INLINE int_mv gm_get_motion_vector(const WarpedMotionParams *gm,
,
int is_integer
#endif
) {
) {
int_mv res;
const int32_t *mat = gm->wmmat;
int x, y, tx, ty;
......
......@@ -102,7 +102,7 @@ static uint8_t add_ref_mv_candidate(
,
int is_integer
#endif
) {
) {
#if CONFIG_INTRABC
if (!is_inter_block(candidate)) return 0;
#endif // CONFIG_INTRABC
......@@ -803,7 +803,9 @@ static void setup_ref_mv_list(
const int blk_col_end = AOMMIN(xd->n8_w, mi_size_wide[BLOCK_64X64]);
const int tpl_sample_pos[3][2] = {
{ voffset, -2 }, { voffset, hoffset }, { voffset - 2, hoffset },
{ voffset, -2 },
{ voffset, hoffset },
{ voffset - 2, hoffset },
};
const int allow_extension = (xd->n8_h >= mi_size_high[BLOCK_8X8]) &&
(xd->n8_h < mi_size_high[BLOCK_64X64]) &&
......@@ -1269,7 +1271,7 @@ void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv,
,
int is_integer
#endif
) {
) {
int i;
// Make sure all the candidates are properly clamped etc
for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
......
......@@ -241,7 +241,7 @@ static INLINE void lower_mv_precision(MV *mv, int allow_hp
,
int is_integer
#endif
) {
) {
#if CONFIG_AMVR
if (is_integer) {
integer_mv_precision(mv);
......
......@@ -255,9 +255,8 @@ int av1_get_comp_reference_type_context(const MACROBLOCKD *xd) {
const MV_REFERENCE_FRAME frfl = left_mbmi->ref_frame[0];
if (a_sg && l_sg) { // single/single
pred_context =
1 +
2 * (!(IS_BACKWARD_REF_FRAME(frfa) ^ IS_BACKWARD_REF_FRAME(frfl)));
pred_context = 1 + 2 * (!(IS_BACKWARD_REF_FRAME(frfa) ^
IS_BACKWARD_REF_FRAME(frfl)));
} else if (l_sg || a_sg) { // single/comp
const int uni_rfc =
a_sg ? has_uni_comp_refs(left_mbmi) : has_uni_comp_refs(above_mbmi);
......@@ -412,9 +411,8 @@ int av1_get_pred_context_comp_ref_p(const AV1_COMMON *cm,
pred_context =
1 + 2 * (!CHECK_GOLDEN_OR_LAST3(edge_mbmi->ref_frame[0]));
else // comp pred (1/3)
pred_context = 1 +
2 * (!CHECK_GOLDEN_OR_LAST3(
edge_mbmi->ref_frame[fwd_ref_sign_idx]));
pred_context = 1 + 2 * (!CHECK_GOLDEN_OR_LAST3(
edge_mbmi->ref_frame[fwd_ref_sign_idx]));
} else { // inter/inter
const int l_sg = !has_second_ref(left_mbmi);
const int a_sg = !has_second_ref(above_mbmi);
......@@ -821,9 +819,8 @@ int av1_get_pred_context_single_ref_p3(const MACROBLOCKD *xd) {
else
pred_context = 4 * CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]);
} else { // comp
pred_context = 1 +
2 * (CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]) ||
CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[1]));
pred_context = 1 + 2 * (CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]) ||
CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[1]));
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
......@@ -917,9 +914,8 @@ int av1_get_pred_context_single_ref_p4(const MACROBLOCKD *xd) {
else
pred_context = 4 * (edge_mbmi->ref_frame[0] == LAST_FRAME);
} else { // comp
pred_context = 1 +
2 * (edge_mbmi->ref_frame[0] == LAST_FRAME ||
edge_mbmi->ref_frame[1] == LAST_FRAME);
pred_context = 1 + 2 * (edge_mbmi->ref_frame[0] == LAST_FRAME ||
edge_mbmi->ref_frame[1] == LAST_FRAME);
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
......@@ -1009,9 +1005,8 @@ int av1_get_pred_context_single_ref_p5(const MACROBLOCKD *xd) {
else
pred_context = 4 * (edge_mbmi->ref_frame[0] == LAST3_FRAME);
} else { // comp
pred_context = 1 +
2 * (edge_mbmi->ref_frame[0] == LAST3_FRAME ||
edge_mbmi->ref_frame[1] == LAST3_FRAME);
pred_context = 1 + 2 * (edge_mbmi->ref_frame[0] == LAST3_FRAME ||
edge_mbmi->ref_frame[1] == LAST3_FRAME);
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
......
......@@ -78,7 +78,7 @@ static INLINE void av1_make_inter_predictor(
#if CONFIG_AMVR
&& xd->cur_frame_force_integer_mv == 0
#endif
) {
) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
const struct buf_2d *const pre_buf = &pd->pre[ref];
av1_warp_plane(&final_warp_params,
......
......@@ -101,12 +101,8 @@ uint8_t has_tr_16x8[16] = {
uint8_t has_tr_16x16[8] = {
255, 85, 119, 85, 127, 85, 119, 85,
};
uint8_t has_tr_16x32[4] = {
255, 119, 127, 119,
};
uint8_t has_tr_32x16[4] = {
15, 5, 7, 5,
};
uint8_t has_tr_16x32[4] = { 255, 119, 127, 119 };
uint8_t has_tr_32x16[4] = { 15, 5, 7, 5 };
uint8_t has_tr_32x32[2] = { 95, 87 };
uint8_t has_tr_32x64[1] = { 127 };
uint8_t has_tr_64x32[1] = { 19 };
......@@ -129,18 +125,10 @@ uint8_t has_tr_8x32[8] = {
uint8_t has_tr_32x8[8] = {
15, 0, 5, 0, 7, 0, 5, 0,
};
uint8_t has_tr_16x64[2] = {
255, 127,
};
uint8_t has_tr_64x16[2] = {
3, 1,
};
uint8_t has_tr_32x128[1] = {
15,
};
uint8_t has_tr_128x32[1] = {
1,
};
uint8_t has_tr_16x64[2] = { 255, 127 };
uint8_t has_tr_64x16[2] = { 3, 1 };
uint8_t has_tr_32x128[1] = { 15 };
uint8_t has_tr_128x32[1] = { 1 };
#if CONFIG_EXT_PARTITION
static const uint8_t *const has_tr_tables[BLOCK_SIZES_ALL] = {
......@@ -184,9 +172,9 @@ static const uint8_t *const has_tr_tables[BLOCK_SIZES_ALL] = {
// 4x16, 16x4, 8x32
has_tr_8x32, has_tr_32x8, has_tr_16x64,
// 32x8, 16x64, 64x16
has_tr_64x16, has_tr_32x128, has_tr_128x32,
has_tr_64x16, has_tr_32x128, has_tr_128x32
#else
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
#endif
};
#endif // CONFIG_EXT_PARTITION
......@@ -224,7 +212,7 @@ static const uint8_t *const has_tr_vert_tables[BLOCK_SIZES] = {
// 32X64, 64X32, 64X64
has_tr_32x64, NULL, has_tr_vert_64x64,
// 64x128, 128x64, 128x128
has_tr_64x128, NULL, has_tr_128x128,
has_tr_64x128, NULL, has_tr_128x128
};
#else
static const uint8_t *const has_tr_vert_tables[BLOCK_SIZES] = {
......@@ -237,7 +225,7 @@ static const uint8_t *const has_tr_vert_tables[BLOCK_SIZES] = {
// 16X32, 32X16, 32X32
has_tr_32x64, NULL, has_tr_vert_64x64,
// 32X64, 64X32, 64X64
has_tr_64x128, NULL, has_tr_128x128,
has_tr_64x128, NULL, has_tr_128x128
};
#endif
#endif // CONFIG_EXT_PARTITION_TYPES
......@@ -348,15 +336,9 @@ uint8_t has_bl_16x8[16] = {
uint8_t has_bl_16x16[8] = {
84, 16, 84, 0, 84, 16, 84, 0,
};
uint8_t has_bl_16x32[4] = {
16, 0, 16, 0,
};
uint8_t has_bl_32x16[4] = {
78, 14, 78, 14,
};
uint8_t has_bl_32x32[2] = {
4, 4,
};
uint8_t has_bl_16x32[4] = { 16, 0, 16, 0 };
uint8_t has_bl_32x16[4] = { 78, 14, 78, 14 };
uint8_t has_bl_32x32[2] = { 4, 4 };
uint8_t has_bl_32x64[1] = { 0 };
uint8_t has_bl_64x32[1] = { 34 };
uint8_t has_bl_64x64[1] = { 0 };
......@@ -377,18 +359,10 @@ uint8_t has_bl_8x32[8] = {
uint8_t has_bl_32x8[8] = {
238, 78, 238, 14, 238, 78, 238, 14,
};
uint8_t has_bl_16x64[2] = {
0, 0,
};
uint8_t has_bl_64x16[2] = {
42, 42,
};
uint8_t has_bl_32x128[1] = {
0,
};
uint8_t has_bl_128x32[1] = {
0,
};
uint8_t has_bl_16x64[2] = { 0, 0 };
uint8_t has_bl_64x16[2] = { 42, 42 };
uint8_t has_bl_32x128[1] = { 0 };
uint8_t has_bl_128x32[1] = { 0 };
#if CONFIG_EXT_PARTITION
static const uint8_t *const has_bl_tables[BLOCK_SIZES_ALL] = {
......@@ -432,9 +406,9 @@ static const uint8_t *const has_bl_tables[BLOCK_SIZES_ALL] = {
// 4x16, 16x4, 8x32
has_bl_8x32, has_bl_32x8, has_bl_16x64,
// 32x8, 16x64, 64x16
has_bl_64x16, has_bl_32x128, has_bl_128x32,
has_bl_64x16, has_bl_32x128, has_bl_128x32
#else
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL
#endif
};
#endif // CONFIG_EXT_PARTITION
......@@ -472,7 +446,7 @@ static const uint8_t *const has_bl_vert_tables[BLOCK_SIZES] = {
// 32X64, 64X32, 64X64
has_bl_32x64, NULL, has_bl_vert_64x64,
// 64x128, 128x64, 128x128
has_bl_64x128, NULL, has_bl_128x128,
has_bl_64x128, NULL, has_bl_128x128
};
#else
static const uint8_t *const has_bl_vert_tables[BLOCK_SIZES] = {
......@@ -485,7 +459,7 @@ static const uint8_t *const has_bl_vert_tables[BLOCK_SIZES] = {
// 16X32, 32X16, 32X32
has_bl_32x64, NULL, has_bl_vert_64x64,
// 32X64, 64X32, 64X64
has_bl_64x128, NULL, has_bl_128x128,
has_bl_64x128, NULL, has_bl_128x128
};
#endif
#endif // CONFIG_EXT_PARTITION_TYPES
......
......@@ -132,10 +132,9 @@ extern "C" {
#define WIENER_FILT_TAP0_MIDV (3)
#define WIENER_FILT_TAP1_MIDV (-7)
#define WIENER_FILT_TAP2_MIDV (15)
#define WIENER_FILT_TAP3_MIDV \
(WIENER_FILT_STEP - \
2 * (WIENER_FILT_TAP0_MIDV + WIENER_FILT_TAP1_MIDV + \
WIENER_FILT_TAP2_MIDV))
#define WIENER_FILT_TAP3_MIDV \
(WIENER_FILT_STEP - 2 * (WIENER_FILT_TAP0_MIDV + WIENER_FILT_TAP1_MIDV + \
WIENER_FILT_TAP2_MIDV))
#define WIENER_FILT_TAP0_BITS 4
#define WIENER_FILT_TAP1_BITS 5
......@@ -258,7 +257,9 @@ static INLINE void set_default_wiener(WienerInfo *wiener_info) {
wiener_info->vfilter[6] = wiener_info->hfilter[6] = WIENER_FILT_TAP0_MIDV;
}
typedef struct { int h_start, h_end, v_start, v_end; } RestorationTileLimits;
typedef struct {
int h_start, h_end, v_start, v_end;
} RestorationTileLimits;
extern const sgr_params_type sgr_params[SGRPROJ_PARAMS];
extern int sgrproj_mtable[MAX_EPS][MAX_NELEM];
......
......@@ -46,7 +46,7 @@ typedef enum {
SEG_LVL_ALT_Q = 0, // Use alternate Quantizer ....
SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
#if CONFIG_SEGMENT_GLOBALMV
SEG_LVL_GLOBALMV = 4,
#endif
......
......@@ -322,7 +322,6 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
// performance because of contention. If the multithreading code changes in
// the future then the number of workers used by the loopfilter should be
// revisited.
#if CONFIG_PARALLEL_DEBLOCKING
// Initialize cur_sb_col to -1 for all SB rows.
memset(lf_sync->cur_sb_col, -1, sizeof(*lf_sync->cur_sb_col) * sb_rows);
......
......@@ -48,7 +48,9 @@ void av1_setup_frame_boundary_info(const struct AV1Common *const cm);
// tiles horizontally or vertically in the frame.
int get_tile_size(int mi_frame_size, int log2_tile_num, int *ntiles);
typedef struct { int left, top, right, bottom; } AV1PixelRect;
typedef struct {
int left, top, right, bottom;
} AV1PixelRect;
// Return the pixel extents of the given tile
AV1PixelRect av1_get_tile_rect(const TileInfo *tile_info,
......
......@@ -7527,6 +7527,6 @@ av1_default_coef_head_cdfs_q3[TX_SIZES][PLANE_TYPES] = {
typedef coeff_cdf_model coeff_cdf_table[TX_SIZES][PLANE_TYPES];
static const coeff_cdf_table *av1_default_qctx_coef_cdfs[TOKEN_CDF_Q_CTXS] = {
&av1_default_coef_head_cdfs_q0, &av1_default_coef_head_cdfs_q1,
&av1_default_coef_head_cdfs_q2, &av1_default_coef_head_cdfs_q3,
&av1_default_coef_head_cdfs_q2, &av1_default_coef_head_cdfs_q3
};
#endif // CONFIG_LV_MAP
......@@ -368,7 +368,7 @@ static INLINE int get_br_ctx(const uint8_t *const levels,
,
const TX_TYPE tx_type
#endif
) {
) {
const int row = c >> bwl;
const int col = c - (row << bwl);
const int stride = (1 << bwl) + TX_PAD_HOR;
......
......@@ -1654,15 +1654,21 @@ static INLINE void lowbd_write_buffer_8xn_sse2(__m128i *in, uint8_t *output,
}
static const transform_1d_sse2 lowbd_txfm8_1d_arr[TX_TYPES_1D] = {
idct8_new_sse2, iadst8_new_sse2, iadst8_new_sse2, iidentity8_new_sse2,
idct8_new_sse2, iadst8_new_sse2, iadst8_new_sse2, iidentity8_new_sse2
};
static const transform_1d_sse2 lowbd_txfm16_1d_arr[TX_TYPES_1D] = {
idct16_new_sse2, iadst16_new_sse2, iadst16_new_sse2, iidentity16_new_sse2,
idct16_new_sse2,
iadst16_new_sse2,
iadst16_new_sse2,
iidentity16_new_sse2,
};
static const transform_1d_sse2 lowbd_txfm32_1d_arr[TX_TYPES_1D] = {
idct32_new_sse2, NULL, NULL, iidentity32_new_sse2,
idct32_new_sse2,
NULL,
NULL,
iidentity32_new_sse2,
};
void av1_lowbd_inv_txfm2d_add_8x8_sse2(const int32_t *input, uint8_t *output,
......
......@@ -64,8 +64,9 @@ void av1_convolve_2d_avx2(const uint8_t *src, int src_stride, uint8_t *dst0,
_mm_loadu_si128((__m128i *)&src_ptr[(i * src_stride) + j]));
if (i + 1 < im_h)
data = _mm256_inserti128_si256(
data, _mm_loadu_si128(
(__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
data,
_mm_loadu_si128(
(__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
1);
__m256i res = convolve_x(data, coeffs_x, filt);
......@@ -198,8 +199,9 @@ void av1_convolve_2d_sr_avx2(const uint8_t *src, int src_stride, uint8_t *dst,
// Load the next line
if (i + 1 < im_h)
data = _mm256_inserti128_si256(
data, _mm_loadu_si128(
(__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
data,
_mm_loadu_si128(
(__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
1);
__m256i res = convolve_x(data, coeffs_h, filt);
......
......@@ -425,8 +425,9 @@ void av1_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst0,
for (i = 0; i < h; i += 2) {
data = &src_ptr[i * src_stride + j];
const __m256i src_67a = _mm256_permute2x128_si256(
src6, _mm256_castsi128_si256(
_mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
src6,
_mm256_castsi128_si256(
_mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
0x20);
src6 = _mm256_castsi128_si256(
......@@ -577,8 +578,9 @@ void av1_convolve_y_sr_avx2(const uint8_t *src, int src_stride, uint8_t *dst,
for (i = 0; i < h; i += 2) {
data = &src_ptr[i * src_stride + j];
const __m256i src_67a = _mm256_permute2x128_si256(
src6, _mm256_castsi128_si256(
_mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
src6,
_mm256_castsi128_si256(
_mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
0x20);
src6 = _mm256_castsi128_si256(
......
......@@ -3306,8 +3306,6 @@ struct aom_read_bit_buffer *av1_init_read_bit_buffer(
return rb;
}
//------------------------------------------------------------------------------
#if CONFIG_FRAME_SIZE
void av1_read_frame_size(struct aom_read_bit_buffer *rb, int num_bits_width,
int num_bits_height, int *width, int *height) {
......
......@@ -1629,7 +1629,7 @@ static int read_is_inter_block(AV1_COMMON *const cm, MACROBLOCKD *const xd,
#if CONFIG_SEGMENT_GLOBALMV
|| segfeature_active(&cm->seg, segment_id, SEG_LVL_GLOBALMV)
#endif
) {
) {
if (!av1_is_valid_scale(&cm->frame_refs[0].sf)) return 0;
}
const int ctx = av1_get_intra_inter_context(xd);
......@@ -2002,7 +2002,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
#if CONFIG_EXT_SKIP
&& !mbmi->skip_mode
#endif // CONFIG_EXT_SKIP
) {
) {
// Read idx to indicate current compound inter prediction mode group
const int masked_compound_used =
is_any_masked_compound_used(bsize) && cm->allow_masked_compound;
......@@ -2050,7 +2050,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
#if CONFIG_EXT_SKIP
&& !mbmi->skip_mode
#endif // CONFIG_EXT_SKIP
) {
) {
if (is_any_masked_compound_used(bsize)) {
if (cm->allow_masked_compound) {
if (!is_interinter_compound_used(COMPOUND_WEDGE, bsize))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment