Commit 88fe7871 authored by Debargha Mukherjee's avatar Debargha Mukherjee
Browse files

Refactor wedge generation

Change-Id: I2ec4f562e28a4673477e20186f9d6167b24b76b8
parent cf3ee225
......@@ -53,31 +53,41 @@ static INLINE int is_inter_mode(PREDICTION_MODE mode) {
}
#if CONFIG_EXT_INTER
#define WEDGE_BITS_SML 3
#define WEDGE_BITS_MED 4
#define WEDGE_BITS_BIG 5
#define WEDGE_BITS_SML 2
#define WEDGE_BITS_MED 3
#define WEDGE_BITS_BIG 4
#define WEDGE_NONE -1
#define WEDGE_WEIGHT_BITS 6
static INLINE int get_wedge_bits(BLOCK_SIZE sb_type) {
if (sb_type < BLOCK_8X8)
return 0;
if (sb_type <= BLOCK_8X8)
return WEDGE_BITS_SML;
else if (sb_type <= BLOCK_32X32)
return WEDGE_BITS_MED;
else
return WEDGE_BITS_BIG;
}
static const int get_wedge_bits_lookup[BLOCK_SIZES] = {
0,
0,
0,
WEDGE_BITS_SML,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
#if CONFIG_EXT_PARTITION
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
#endif // CONFIG_EXT_PARTITION
};
static INLINE int is_interinter_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return get_wedge_bits(sb_type) > 0;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int is_interintra_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return 0; // get_wedge_bits(sb_type) > 0;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int is_inter_singleref_mode(PREDICTION_MODE mode) {
......@@ -205,9 +215,10 @@ typedef struct {
// TODO(debargha): Consolidate these flags
int use_wedge_interintra;
int interintra_wedge_index;
int interintra_uv_wedge_index;
int interintra_wedge_sign;
int use_wedge_interinter;
int interinter_wedge_index;
int interinter_wedge_sign;
#endif // CONFIG_EXT_INTER
#if CONFIG_OBMC
......
......@@ -44,6 +44,11 @@ static int get_masked_weight(int m) {
return smoothfn[m + SMOOTHER_LEN];
}
#define WEDGE_OBLIQUE 1
#define WEDGE_STRAIGHT 0
#define WEDGE_PARMS 5
// [negative][transpose][reverse]
DECLARE_ALIGNED(16, static uint8_t,
wedge_mask_obl[2][2][2][MASK_MASTER_SIZE * MASK_MASTER_SIZE]);
......@@ -51,6 +56,7 @@ DECLARE_ALIGNED(16, static uint8_t,
DECLARE_ALIGNED(16, static uint8_t,
wedge_mask_str[2][2][MASK_MASTER_SIZE * MASK_MASTER_SIZE]);
// Equation of line: f(x, y) = a[0]*(x - a[2]*w/4) + a[1]*(y - a[3]*h/4) = 0
void vp10_init_wedge_masks() {
int i, j;
const int w = MASK_MASTER_SIZE;
......@@ -62,289 +68,208 @@ void vp10_init_wedge_masks() {
int x = (2 * j + 1 - (a[2] * w) / 2);
int y = (2 * i + 1 - (a[3] * h) / 2);
int m = (a[0] * x + a[1] * y) / 2;
wedge_mask_obl[0][0][0][i * stride + j] =
wedge_mask_obl[0][1][0][j * stride + i] =
wedge_mask_obl[0][0][1][i * stride + w - 1 - j] =
wedge_mask_obl[0][1][1][(w - 1 - j) * stride + i] =
get_masked_weight(m);
wedge_mask_obl[1][0][0][i * stride + j] =
wedge_mask_obl[1][1][0][j * stride + i] =
wedge_mask_obl[1][0][1][i * stride + w - 1 - j] =
wedge_mask_obl[1][1][1][(w - 1 - j) * stride + i] =
wedge_mask_obl[1][1][0][j * stride + i] =
get_masked_weight(m);
wedge_mask_obl[1][0][1][i * stride + w - 1 - j] =
wedge_mask_obl[1][1][1][(w - 1 - j) * stride + i] =
(1 << WEDGE_WEIGHT_BITS) - get_masked_weight(m);
wedge_mask_str[0][0][i * stride + j] =
wedge_mask_str[0][1][j * stride + i] =
get_masked_weight(x);
wedge_mask_obl[0][0][0][i * stride + j] =
wedge_mask_obl[0][1][0][j * stride + i] =
(1 << WEDGE_WEIGHT_BITS) - get_masked_weight(m);
wedge_mask_obl[0][0][1][i * stride + w - 1 - j] =
wedge_mask_obl[0][1][1][(w - 1 - j) * stride + i] =
get_masked_weight(m);
wedge_mask_str[1][0][i * stride + j] =
wedge_mask_str[1][1][j * stride + i] =
wedge_mask_str[1][1][j * stride + i] =
get_masked_weight(x);
wedge_mask_str[0][0][i * stride + j] =
wedge_mask_str[0][1][j * stride + i] =
(1 << WEDGE_WEIGHT_BITS) - get_masked_weight(x);
}
}
static const uint8_t *get_wedge_mask_inplace(const int *a,
int h, int w) {
const int woff = (a[2] * w) >> 2;
const int hoff = (a[3] * h) >> 2;
const int oblique = (abs(a[0]) + abs(a[1]) == 3);
const uint8_t *master;
int transpose, reverse, negative;
if (oblique) {
negative = (a[0] < 0);
transpose = (abs(a[0]) == 1);
reverse = (a[0] < 0) ^ (a[1] < 0);
} else {
negative = (a[0] < 0 || a[1] < 0);
transpose = (a[0] == 0);
reverse = 0;
}
master = (oblique ?
wedge_mask_obl[negative][transpose][reverse] :
wedge_mask_str[negative][transpose]) +
MASK_MASTER_STRIDE * (MASK_MASTER_SIZE / 2 - hoff) +
MASK_MASTER_SIZE / 2 - woff;
return master;
}
static const int wedge_params_sml[1 << WEDGE_BITS_SML]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
};
// Equation of line: f(x, y) = a[0]*(x - a[2]*w/4) + a[1]*(y - a[3]*h/4) = 0
// The soft mask is obtained by computing f(x, y) and then calling
// get_masked_weight(f(x, y)).
static const int wedge_params_sml[1 << WEDGE_BITS_SML][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
static const int wedge_params_med_hgtw[1 << WEDGE_BITS_MED]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_OBLIQUE, 1, 1, 2, 1},
{WEDGE_OBLIQUE, 1, 1, 2, 3},
{WEDGE_OBLIQUE, 1, 0, 2, 1},
{WEDGE_OBLIQUE, 1, 0, 2, 3},
};
static const int wedge_params_med_hgtw[1 << WEDGE_BITS_MED][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{-1, 2, 2, 1},
{ 1, -2, 2, 1},
{-1, 2, 2, 3},
{ 1, -2, 2, 3},
{-1, -2, 2, 1},
{ 1, 2, 2, 1},
{-1, -2, 2, 3},
{ 1, 2, 2, 3},
static const int wedge_params_med_hltw[1 << WEDGE_BITS_MED]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 1, 2},
{WEDGE_OBLIQUE, 0, 1, 3, 2},
{WEDGE_OBLIQUE, 0, 0, 1, 2},
{WEDGE_OBLIQUE, 0, 0, 3, 2},
};
static const int wedge_params_med_hltw[1 << WEDGE_BITS_MED][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{-2, 1, 1, 2},
{ 2, -1, 1, 2},
{-2, 1, 3, 2},
{ 2, -1, 3, 2},
{-2, -1, 1, 2},
{ 2, 1, 1, 2},
{-2, -1, 3, 2},
{ 2, 1, 3, 2},
static const int wedge_params_med_heqw[1 << WEDGE_BITS_MED]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_STRAIGHT, 1, 0, 2, 1},
{WEDGE_STRAIGHT, 1, 0, 2, 3},
{WEDGE_STRAIGHT, 0, 0, 1, 2},
{WEDGE_STRAIGHT, 0, 0, 3, 2},
};
static const int wedge_params_med_heqw[1 << WEDGE_BITS_MED][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{ 0, -2, 0, 1},
{ 0, 2, 0, 1},
{ 0, -2, 0, 3},
{ 0, 2, 0, 3},
{-2, 0, 1, 0},
{ 2, 0, 1, 0},
{-2, 0, 3, 0},
{ 2, 0, 3, 0},
static const int wedge_params_big_hgtw[1 << WEDGE_BITS_BIG]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_OBLIQUE, 1, 1, 2, 1},
{WEDGE_OBLIQUE, 1, 1, 2, 3},
{WEDGE_OBLIQUE, 1, 0, 2, 1},
{WEDGE_OBLIQUE, 1, 0, 2, 3},
{WEDGE_OBLIQUE, 0, 1, 1, 2},
{WEDGE_OBLIQUE, 0, 1, 3, 2},
{WEDGE_OBLIQUE, 0, 0, 1, 2},
{WEDGE_OBLIQUE, 0, 0, 3, 2},
{WEDGE_STRAIGHT, 1, 0, 2, 1},
{WEDGE_STRAIGHT, 1, 0, 2, 2},
{WEDGE_STRAIGHT, 1, 0, 2, 3},
{WEDGE_STRAIGHT, 0, 0, 2, 2},
};
static const int wedge_params_big_hgtw[1 << WEDGE_BITS_BIG][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{-1, 2, 2, 1},
{ 1, -2, 2, 1},
{-1, 2, 2, 3},
{ 1, -2, 2, 3},
{-1, -2, 2, 1},
{ 1, 2, 2, 1},
{-1, -2, 2, 3},
{ 1, 2, 2, 3},
{-2, 1, 1, 2},
{ 2, -1, 1, 2},
{-2, 1, 3, 2},
{ 2, -1, 3, 2},
{-2, -1, 1, 2},
{ 2, 1, 1, 2},
{-2, -1, 3, 2},
{ 2, 1, 3, 2},
{ 0, -2, 0, 1},
{ 0, 2, 0, 1},
{ 0, -2, 0, 2},
{ 0, 2, 0, 2},
{ 0, -2, 0, 3},
{ 0, 2, 0, 3},
{-2, 0, 2, 0},
{ 2, 0, 2, 0},
static const int wedge_params_big_hltw[1 << WEDGE_BITS_BIG]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_OBLIQUE, 1, 1, 2, 1},
{WEDGE_OBLIQUE, 1, 1, 2, 3},
{WEDGE_OBLIQUE, 1, 0, 2, 1},
{WEDGE_OBLIQUE, 1, 0, 2, 3},
{WEDGE_OBLIQUE, 0, 1, 1, 2},
{WEDGE_OBLIQUE, 0, 1, 3, 2},
{WEDGE_OBLIQUE, 0, 0, 1, 2},
{WEDGE_OBLIQUE, 0, 0, 3, 2},
{WEDGE_STRAIGHT, 0, 0, 1, 2},
{WEDGE_STRAIGHT, 0, 0, 2, 2},
{WEDGE_STRAIGHT, 0, 0, 3, 2},
{WEDGE_STRAIGHT, 1, 0, 2, 2},
};
static const int wedge_params_big_hltw[1 << WEDGE_BITS_BIG][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{-1, 2, 2, 1},
{ 1, -2, 2, 1},
{-1, 2, 2, 3},
{ 1, -2, 2, 3},
{-1, -2, 2, 1},
{ 1, 2, 2, 1},
{-1, -2, 2, 3},
{ 1, 2, 2, 3},
{-2, 1, 1, 2},
{ 2, -1, 1, 2},
{-2, 1, 3, 2},
{ 2, -1, 3, 2},
{-2, -1, 1, 2},
{ 2, 1, 1, 2},
{-2, -1, 3, 2},
{ 2, 1, 3, 2},
{ 0, -2, 0, 2},
{ 0, 2, 0, 2},
{-2, 0, 1, 0},
{ 2, 0, 1, 0},
{-2, 0, 2, 0},
{ 2, 0, 2, 0},
{-2, 0, 3, 0},
{ 2, 0, 3, 0},
static const int wedge_params_big_heqw[1 << WEDGE_BITS_BIG]
[WEDGE_PARMS] = {
{WEDGE_OBLIQUE, 1, 1, 2, 2},
{WEDGE_OBLIQUE, 1, 0, 2, 2},
{WEDGE_OBLIQUE, 0, 1, 2, 2},
{WEDGE_OBLIQUE, 0, 0, 2, 2},
{WEDGE_OBLIQUE, 1, 1, 2, 1},
{WEDGE_OBLIQUE, 1, 1, 2, 3},
{WEDGE_OBLIQUE, 1, 0, 2, 1},
{WEDGE_OBLIQUE, 1, 0, 2, 3},
{WEDGE_OBLIQUE, 0, 1, 1, 2},
{WEDGE_OBLIQUE, 0, 1, 3, 2},
{WEDGE_OBLIQUE, 0, 0, 1, 2},
{WEDGE_OBLIQUE, 0, 0, 3, 2},
{WEDGE_STRAIGHT, 1, 0, 2, 1},
{WEDGE_STRAIGHT, 1, 0, 2, 3},
{WEDGE_STRAIGHT, 0, 0, 1, 2},
{WEDGE_STRAIGHT, 0, 0, 3, 2},
};
static const int wedge_params_big_heqw[1 << WEDGE_BITS_BIG][4] = {
{-1, 2, 2, 2},
{ 1, -2, 2, 2},
{-2, 1, 2, 2},
{ 2, -1, 2, 2},
{-2, -1, 2, 2},
{ 2, 1, 2, 2},
{-1, -2, 2, 2},
{ 1, 2, 2, 2},
{-1, 2, 2, 1},
{ 1, -2, 2, 1},
{-1, 2, 2, 3},
{ 1, -2, 2, 3},
{-1, -2, 2, 1},
{ 1, 2, 2, 1},
{-1, -2, 2, 3},
{ 1, 2, 2, 3},
{-2, 1, 1, 2},
{ 2, -1, 1, 2},
{-2, 1, 3, 2},
{ 2, -1, 3, 2},
{-2, -1, 1, 2},
{ 2, 1, 1, 2},
{-2, -1, 3, 2},
{ 2, 1, 3, 2},
{ 0, -2, 0, 1},
{ 0, 2, 0, 1},
{ 0, -2, 0, 3},
{ 0, 2, 0, 3},
{-2, 0, 1, 0},
{ 2, 0, 1, 0},
{-2, 0, 3, 0},
{ 2, 0, 3, 0},
static const int *get_wedge_params_lookup[BLOCK_SIZES] = {
NULL,
NULL,
NULL,
&wedge_params_sml[0][0],
&wedge_params_med_hgtw[0][0],
&wedge_params_med_hltw[0][0],
&wedge_params_med_heqw[0][0],
&wedge_params_med_hgtw[0][0],
&wedge_params_med_hltw[0][0],
&wedge_params_med_heqw[0][0],
&wedge_params_big_hgtw[0][0],
&wedge_params_big_hltw[0][0],
&wedge_params_big_heqw[0][0],
#if CONFIG_EXT_PARTITION
&wedge_params_big_hgtw[0][0],
&wedge_params_big_hltw[0][0],
&wedge_params_big_heqw[0][0],
#endif // CONFIG_EXT_PARTITION
};
static const uint8_t *get_wedge_mask_inplace(const int *a,
int neg,
int h, int w) {
const uint8_t *master;
const int woff = (a[3] * w) >> 2;
const int hoff = (a[4] * h) >> 2;
if (!a) return NULL;
master = (a[0] ?
wedge_mask_obl[neg][a[1]][a[2]] :
wedge_mask_str[neg][a[1]]) +
MASK_MASTER_STRIDE * (MASK_MASTER_SIZE / 2 - hoff) +
MASK_MASTER_SIZE / 2 - woff;
return master;
}
static const int *get_wedge_params(int wedge_index,
BLOCK_SIZE sb_type,
int h, int w) {
BLOCK_SIZE sb_type) {
const int *a = NULL;
const int wedge_bits = get_wedge_bits(sb_type);
if (wedge_index == WEDGE_NONE)
return NULL;
if (wedge_bits == WEDGE_BITS_SML) {
a = wedge_params_sml[wedge_index];
} else if (wedge_bits == WEDGE_BITS_MED) {
if (h > w)
a = wedge_params_med_hgtw[wedge_index];
else if (h < w)
a = wedge_params_med_hltw[wedge_index];
else
a = wedge_params_med_heqw[wedge_index];
} else if (wedge_bits == WEDGE_BITS_BIG) {
if (h > w)
a = wedge_params_big_hgtw[wedge_index];
else if (h < w)
a = wedge_params_big_hltw[wedge_index];
else
a = wedge_params_big_heqw[wedge_index];
} else {
assert(0);
if (wedge_index != WEDGE_NONE) {
return get_wedge_params_lookup[sb_type] + WEDGE_PARMS * wedge_index;
}
return a;
}
const uint8_t *vp10_get_soft_mask(int wedge_index,
int wedge_sign,
BLOCK_SIZE sb_type,
int h, int w) {
const int *a = get_wedge_params(wedge_index, sb_type, h, w);
if (a) {
return get_wedge_mask_inplace(a, h, w);
} else {
return NULL;
}
const int *a = get_wedge_params(wedge_index, sb_type);
return get_wedge_mask_inplace(a, wedge_sign, h, w);
}
#if CONFIG_SUPERTX
const uint8_t *get_soft_mask_extend(int wedge_index, int plane,
const uint8_t *get_soft_mask_extend(int wedge_index,
int wedge_sign,
int plane,
BLOCK_SIZE sb_type,
int wedge_offset_y,
int wedge_offset_x) {
int subh = (plane ? 2 : 4) << b_height_log2_lookup[sb_type];
int subw = (plane ? 2 : 4) << b_width_log2_lookup[sb_type];
const int *a = get_wedge_params(wedge_index, sb_type, subh, subw);
const int *a = get_wedge_params(wedge_index, sb_type);
if (a) {
const uint8_t *mask = get_wedge_mask_inplace(a, subh, subw);
const uint8_t *mask = get_wedge_mask_inplace(a, wedge_sign, subh, subw);
mask -= (wedge_offset_x + wedge_offset_y * MASK_MASTER_STRIDE);
return mask;
} else {
......@@ -355,12 +280,14 @@ const uint8_t *get_soft_mask_extend(int wedge_index, int plane,
static void build_masked_compound_extend(uint8_t *dst, int dst_stride,
uint8_t *dst2, int dst2_stride,
int plane,
int wedge_index, BLOCK_SIZE sb_type,
int wedge_index,
int wedge_sign,
BLOCK_SIZE sb_type,
int wedge_offset_y, int wedge_offset_x,
int h, int w) {
int i, j;
const uint8_t *mask = get_soft_mask_extend(
wedge_index, plane, sb_type, wedge_offset_y, wedge_offset_x);
wedge_index, wedge_sign, plane, sb_type, wedge_offset_y, wedge_offset_x);
for (i = 0; i < h; ++i)
for (j = 0; j < w; ++j) {
int m = mask[i * MASK_MASTER_STRIDE + j];
......@@ -376,12 +303,12 @@ static void build_masked_compound_extend(uint8_t *dst, int dst_stride,
static void build_masked_compound_extend_highbd(
uint8_t *dst_8, int dst_stride,
uint8_t *dst2_8, int dst2_stride, int plane,
int wedge_index, BLOCK_SIZE sb_type,
int wedge_index, int wedge_sign, BLOCK_SIZE sb_type,
int wedge_offset_y, int wedge_offset_x,
int h, int w) {
int i, j;
const uint8_t *mask = get_soft_mask_extend(
wedge_index, plane, sb_type, wedge_offset_y, wedge_offset_x);
wedge_index, wedge_sign, plane, sb_type, wedge_offset_y, wedge_offset_x);
uint16_t *dst = CONVERT_TO_SHORTPTR(dst_8);
uint16_t *dst2 = CONVERT_TO_SHORTPTR(dst2_8);
for (i = 0; i < h; ++i)
......@@ -400,10 +327,12 @@ static void build_masked_compound_extend_highbd(
static void build_masked_compound(uint8_t *dst, int dst_stride,
uint8_t *dst2, int dst2_stride,
int wedge_index, BLOCK_SIZE sb_type,
int wedge_index, int wedge_sign,
BLOCK_SIZE sb_type,
int h, int w) {
int i, j;
const uint8_t *mask = vp10_get_soft_mask(wedge_index, sb_type, h, w);
const uint8_t *mask = vp10_get_soft_mask(wedge_index, wedge_sign,
sb_type, h, w);
for (i = 0; i < h; ++i)
for (j = 0; j < w; ++j) {
int m = mask[i * MASK_MASTER_STRIDE + j];
......@@ -418,10 +347,12 @@ static void build_masked_compound(uint8_t *dst, int dst_stride,
#if CONFIG_VP9_HIGHBITDEPTH
static void build_masked_compound_highbd(uint8_t *dst_8, int dst_stride,