Commit 41ec1d04 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Revert "misc-fix: use fixed intra prediction modes"

This reverts commit 4df11c7f.

Change-Id: I328b884dff690a4c7909f4cb2ceeaf0134c37ac2
parent 38532500
......@@ -113,12 +113,21 @@ specialize qw/aom_d135_predictor_2x2/;
add_proto qw/void aom_d153_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d153_predictor_2x2/;
add_proto qw/void aom_d207_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207_predictor_4x4/, "$sse2_x86inc";
add_proto qw/void aom_d207e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207e_predictor_4x4/;
add_proto qw/void aom_d45_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45_predictor_4x4 neon/, "$sse2_x86inc";
add_proto qw/void aom_d45e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45e_predictor_4x4/;
add_proto qw/void aom_d63_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63_predictor_4x4/, "$ssse3_x86inc";
add_proto qw/void aom_d63e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63e_predictor_4x4/;
......@@ -161,12 +170,21 @@ specialize qw/aom_dc_left_predictor_4x4 msa neon/, "$sse2_x86inc";
add_proto qw/void aom_dc_128_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_dc_128_predictor_4x4 msa neon/, "$sse2_x86inc";
add_proto qw/void aom_d207_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207_predictor_8x8/, "$ssse3_x86inc";
add_proto qw/void aom_d207e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207e_predictor_8x8/;
add_proto qw/void aom_d45_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45_predictor_8x8 neon/, "$sse2_x86inc";
add_proto qw/void aom_d45e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45e_predictor_8x8/;
add_proto qw/void aom_d63_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63_predictor_8x8/, "$ssse3_x86inc";
add_proto qw/void aom_d63e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63e_predictor_8x8/;
......@@ -200,12 +218,21 @@ specialize qw/aom_dc_left_predictor_8x8 neon msa/, "$sse2_x86inc";
add_proto qw/void aom_dc_128_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_dc_128_predictor_8x8 neon msa/, "$sse2_x86inc";
add_proto qw/void aom_d207_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207_predictor_16x16/, "$ssse3_x86inc";
add_proto qw/void aom_d207e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207e_predictor_16x16/;
add_proto qw/void aom_d45_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45_predictor_16x16 neon/, "$ssse3_x86inc";
add_proto qw/void aom_d45e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45e_predictor_16x16/;
add_proto qw/void aom_d63_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63_predictor_16x16/, "$ssse3_x86inc";
add_proto qw/void aom_d63e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63e_predictor_16x16/;
......@@ -239,12 +266,21 @@ specialize qw/aom_dc_left_predictor_16x16 neon msa/, "$sse2_x86inc";
add_proto qw/void aom_dc_128_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_dc_128_predictor_16x16 neon msa/, "$sse2_x86inc";
add_proto qw/void aom_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207_predictor_32x32/, "$ssse3_x86inc";
add_proto qw/void aom_d207e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d207e_predictor_32x32/;
add_proto qw/void aom_d45_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45_predictor_32x32/, "$ssse3_x86inc";
add_proto qw/void aom_d45e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d45e_predictor_32x32/;
add_proto qw/void aom_d63_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63_predictor_32x32/, "$ssse3_x86inc";
add_proto qw/void aom_d63e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/aom_d63e_predictor_32x32/;
......@@ -280,12 +316,21 @@ specialize qw/aom_dc_128_predictor_32x32 msa neon/, "$sse2_x86inc";
# High bitdepth functions
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_d207_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207_predictor_4x4/;
add_proto qw/void aom_highbd_d207e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207e_predictor_4x4/;
add_proto qw/void aom_highbd_d45_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45_predictor_4x4/;
add_proto qw/void aom_highbd_d45e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45e_predictor_4x4/;
add_proto qw/void aom_highbd_d63_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63_predictor_4x4/;
add_proto qw/void aom_highbd_d63e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63e_predictor_4x4/;
......@@ -319,12 +364,21 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_dc_128_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_dc_128_predictor_4x4/;
add_proto qw/void aom_highbd_d207_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207_predictor_8x8/;
add_proto qw/void aom_highbd_d207e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207e_predictor_8x8/;
add_proto qw/void aom_highbd_d45_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45_predictor_8x8/;
add_proto qw/void aom_highbd_d45e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45e_predictor_8x8/;
add_proto qw/void aom_highbd_d63_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63_predictor_8x8/;
add_proto qw/void aom_highbd_d63e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63e_predictor_8x8/;
......@@ -358,12 +412,21 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_dc_128_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_dc_128_predictor_8x8/;
add_proto qw/void aom_highbd_d207e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void aom_highbd_d207_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207_predictor_16x16/;
add_proto qw/void aom_highbd_d207e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207e_predictor_16x16/;
add_proto qw/void aom_highbd_d45_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45_predictor_16x16/;
add_proto qw/void aom_highbd_d45e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45e_predictor_16x16/;
add_proto qw/void aom_highbd_d63_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63_predictor_16x16/;
add_proto qw/void aom_highbd_d63e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63e_predictor_16x16/;
......@@ -397,12 +460,21 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_dc_128_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_dc_128_predictor_16x16/;
add_proto qw/void aom_highbd_d207_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207_predictor_32x32/;
add_proto qw/void aom_highbd_d207e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d207e_predictor_32x32/;
add_proto qw/void aom_highbd_d45_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45_predictor_32x32/;
add_proto qw/void aom_highbd_d45e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d45e_predictor_32x32/;
add_proto qw/void aom_highbd_d63_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63_predictor_32x32/;
add_proto qw/void aom_highbd_d63e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
specialize qw/aom_highbd_d63e_predictor_32x32/;
......
......@@ -19,6 +19,31 @@
#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)
#define AVG2(a, b) (((a) + (b) + 1) >> 1)
static INLINE void d207_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
int r, c;
(void)above;
// first column
for (r = 0; r < bs - 1; ++r) dst[r * stride] = AVG2(left[r], left[r + 1]);
dst[(bs - 1) * stride] = left[bs - 1];
dst++;
// second column
for (r = 0; r < bs - 2; ++r)
dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]);
dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]);
dst[(bs - 1) * stride] = left[bs - 1];
dst++;
// rest of last row
for (c = 0; c < bs - 2; ++c) dst[(bs - 1) * stride + c] = left[bs - 1];
for (r = bs - 2; r >= 0; --r)
for (c = 0; c < bs - 2; ++c)
dst[r * stride + c] = dst[(r + 1) * stride + c - 2];
}
#if CONFIG_MISC_FIXES
static INLINE void d207e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
int r, c;
......@@ -33,7 +58,26 @@ static INLINE void d207e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
dst += stride;
}
}
#endif // CONFIG_MISC_FIXES
static INLINE void d63_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
int r, c;
int size;
(void)left;
for (c = 0; c < bs; ++c) {
dst[c] = AVG2(above[c], above[c + 1]);
dst[stride + c] = AVG3(above[c], above[c + 1], above[c + 2]);
}
for (r = 2, size = bs - 2; r < bs; r += 2, --size) {
memcpy(dst + (r + 0) * stride, dst + (r >> 1), size);
memset(dst + (r + 0) * stride + size, above[bs - 1], bs - size);
memcpy(dst + (r + 1) * stride, dst + stride + (r >> 1), size);
memset(dst + (r + 1) * stride + size, above[bs - 1], bs - size);
}
}
#if CONFIG_MISC_FIXES
static INLINE void d63e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
int r, c;
......@@ -47,7 +91,28 @@ static INLINE void d63e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
dst += stride;
}
}
#endif // CONFIG_MISC_FIXES
static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
const uint8_t above_right = above[bs - 1];
const uint8_t *const dst_row0 = dst;
int x, size;
(void)left;
for (x = 0; x < bs - 1; ++x) {
dst[x] = AVG3(above[x], above[x + 1], above[x + 2]);
}
dst[bs - 1] = above_right;
dst += stride;
for (x = 1, size = bs - 2; x < bs; ++x, --size) {
memcpy(dst, dst_row0 + x, size);
memset(dst + size, above_right, x + 1);
dst += stride;
}
}
#if CONFIG_MISC_FIXES
static INLINE void d45e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
int r, c;
......@@ -60,6 +125,7 @@ static INLINE void d45e_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
dst += stride;
}
}
#endif // CONFIG_MISC_FIXES
static INLINE void d117_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
......@@ -243,8 +309,8 @@ void aom_ve_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
memcpy(dst + stride * 1, dst, 2);
}
void aom_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above,
const uint8_t *left) {
void aom_d207_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
const uint8_t *above, const uint8_t *left) {
const int I = left[0];
const int J = left[1];
const int K = left[2];
......@@ -555,6 +621,38 @@ void aom_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
}
#if CONFIG_AOM_HIGHBITDEPTH
static INLINE void highbd_d207_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
const uint16_t *left, int bd) {
int r, c;
(void)above;
(void)bd;
// First column.
for (r = 0; r < bs - 1; ++r) {
dst[r * stride] = AVG2(left[r], left[r + 1]);
}
dst[(bs - 1) * stride] = left[bs - 1];
dst++;
// Second column.
for (r = 0; r < bs - 2; ++r) {
dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]);
}
dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]);
dst[(bs - 1) * stride] = left[bs - 1];
dst++;
// Rest of last row.
for (c = 0; c < bs - 2; ++c) dst[(bs - 1) * stride + c] = left[bs - 1];
for (r = bs - 2; r >= 0; --r) {
for (c = 0; c < bs - 2; ++c)
dst[r * stride + c] = dst[(r + 1) * stride + c - 2];
}
}
#if CONFIG_MISC_FIXES
static INLINE void highbd_d207e_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
const uint16_t *left, int bd) {
......@@ -571,10 +669,11 @@ static INLINE void highbd_d207e_predictor(uint16_t *dst, ptrdiff_t stride,
dst += stride;
}
}
#endif // CONFIG_MISC_FIXES
static INLINE void highbd_d63e_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
const uint16_t *left, int bd) {
static INLINE void highbd_d63_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
const uint16_t *above,
const uint16_t *left, int bd) {
int r, c;
(void)left;
(void)bd;
......@@ -588,6 +687,25 @@ static INLINE void highbd_d63e_predictor(uint16_t *dst, ptrdiff_t stride,
}
}
#define highbd_d63e_predictor highbd_d63_predictor
static INLINE void highbd_d45_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
const uint16_t *above,
const uint16_t *left, int bd) {
int r, c;
(void)left;
(void)bd;
for (r = 0; r < bs; ++r) {
for (c = 0; c < bs; ++c) {
dst[c] = r + c + 2 < bs * 2
? AVG3(above[r + c], above[r + c + 1], above[r + c + 2])
: above[bs * 2 - 1];
}
dst += stride;
}
}
#if CONFIG_MISC_FIXES
static INLINE void highbd_d45e_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
const uint16_t *left, int bd) {
......@@ -602,6 +720,7 @@ static INLINE void highbd_d45e_predictor(uint16_t *dst, ptrdiff_t stride,
dst += stride;
}
}
#endif // CONFIG_MISC_FIXES
static INLINE void highbd_d117_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
......@@ -819,9 +938,14 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
#endif // CONFIG_AOM_HIGHBITDEPTH
/* clang-format off */
intra_pred_above_4x4(d207) // NOLINT
intra_pred_above_4x4(d63) // NOLINT
intra_pred_above_4x4(d45) // NOLINT
#if CONFIG_MISC_FIXES
intra_pred_allsizes(d207e) // NOLINT
intra_pred_allsizes(d63e) // NOLINT
intra_pred_above_4x4(d45e) // NOLINT
#endif
intra_pred_above_4x4(d117) // NOLINT
intra_pred_above_4x4(d135) // NOLINT
intra_pred_above_4x4(d153) // NOLINT
......
......@@ -754,8 +754,8 @@ static void build_masks(const loop_filter_info_n *const lfi_n,
*left_y |= left_prediction_mask[block_size] << shift_y;
*left_uv |= left_prediction_mask_uv[block_size] << shift_uv;
// If the block has no coefficients and is not intra we skip applying
// the loop filter on block edges.
// If the block has no coefficients and is not intra we skip applying
// the loop filter on block edges.
if ((mbmi->skip || mbmi->has_no_coeffs) && is_inter_block(mbmi)) return;
// Here we are adding a mask for the transform size. The transform
......
......@@ -178,9 +178,15 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(pred[V_PRED], v);
INIT_ALL_SIZES(pred[H_PRED], h);
#if CONFIG_MISC_FIXES
INIT_ALL_SIZES(pred[D207_PRED], d207e);
INIT_ALL_SIZES(pred[D45_PRED], d45e);
INIT_ALL_SIZES(pred[D63_PRED], d63e);
#else
INIT_ALL_SIZES(pred[D207_PRED], d207);
INIT_ALL_SIZES(pred[D45_PRED], d45);
INIT_ALL_SIZES(pred[D63_PRED], d63);
#endif
INIT_ALL_SIZES(pred[D117_PRED], d117);
INIT_ALL_SIZES(pred[D135_PRED], d135);
INIT_ALL_SIZES(pred[D153_PRED], d153);
......@@ -194,9 +200,15 @@ static void av1_init_intra_predictors_internal(void) {
#if CONFIG_AOM_HIGHBITDEPTH
INIT_ALL_SIZES(pred_high[V_PRED], highbd_v);
INIT_ALL_SIZES(pred_high[H_PRED], highbd_h);
#if CONFIG_MISC_FIXES
INIT_ALL_SIZES(pred_high[D207_PRED], highbd_d207e);
INIT_ALL_SIZES(pred_high[D45_PRED], highbd_d45e);
INIT_ALL_SIZES(pred_high[D63_PRED], highbd_d63e);
INIT_ALL_SIZES(pred_high[D63_PRED], highbd_d63);
#else
INIT_ALL_SIZES(pred_high[D207_PRED], highbd_d207);
INIT_ALL_SIZES(pred_high[D45_PRED], highbd_d45);
INIT_ALL_SIZES(pred_high[D63_PRED], highbd_d63);
#endif
INIT_ALL_SIZES(pred_high[D117_PRED], highbd_d117);
INIT_ALL_SIZES(pred_high[D135_PRED], highbd_d135);
INIT_ALL_SIZES(pred_high[D153_PRED], highbd_d153);
......
......@@ -47,12 +47,12 @@ void TestIntraPred(const char name[], AvxPredFunc const *pred_funcs,
const int kTotalPixels = 32 * kBPS;
DECLARE_ALIGNED(16, uint8_t, src[kTotalPixels]);
DECLARE_ALIGNED(16, uint8_t, ref_src[kTotalPixels]);
DECLARE_ALIGNED(16, uint8_t, left[kBPS * 2]);
DECLARE_ALIGNED(16, uint8_t, above_mem[2 * kBPS + 32]);
DECLARE_ALIGNED(16, uint8_t, left[kBPS]);
DECLARE_ALIGNED(16, uint8_t, above_mem[2 * kBPS + 16]);
uint8_t *const above = above_mem + 16;
for (int i = 0; i < kTotalPixels; ++i) ref_src[i] = rnd.Rand8();
for (int i = 0; i < kBPS * 2; ++i) left[i] = rnd.Rand8();
for (int i = -1; i < kBPS * 2 + 32; ++i) above[i] = rnd.Rand8();
for (int i = 0; i < kBPS; ++i) left[i] = rnd.Rand8();
for (int i = -1; i < kBPS; ++i) above[i] = rnd.Rand8();
const int kNumTests = static_cast<int>(2.e10 / num_pixels_per_test);
// some code assumes the top row has been extended:
......@@ -160,22 +160,24 @@ void TestIntraPred32(AvxPredFunc const *pred_funcs) {
INTRA_PRED_TEST(C, TestIntraPred4, aom_dc_predictor_4x4_c,
aom_dc_left_predictor_4x4_c, aom_dc_top_predictor_4x4_c,
aom_dc_128_predictor_4x4_c, aom_v_predictor_4x4_c,
aom_h_predictor_4x4_c, aom_d45e_predictor_4x4_c,
aom_h_predictor_4x4_c, aom_d45_predictor_4x4_c,
aom_d135_predictor_4x4_c, aom_d117_predictor_4x4_c,
aom_d153_predictor_4x4_c, aom_d207e_predictor_4x4_c,
aom_d63e_predictor_4x4_c, aom_tm_predictor_4x4_c)
aom_d153_predictor_4x4_c, aom_d207_predictor_4x4_c,
aom_d63_predictor_4x4_c, aom_tm_predictor_4x4_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSE2, TestIntraPred4, aom_dc_predictor_4x4_sse2,
aom_dc_left_predictor_4x4_sse2, aom_dc_top_predictor_4x4_sse2,
aom_dc_128_predictor_4x4_sse2, aom_v_predictor_4x4_sse2,
aom_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
aom_h_predictor_4x4_sse2, aom_d45_predictor_4x4_sse2, NULL,
NULL, NULL, aom_d207_predictor_4x4_sse2, NULL,
aom_tm_predictor_4x4_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSSE3 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, aom_d153_predictor_4x4_ssse3, NULL, NULL, NULL)
NULL, NULL, aom_d153_predictor_4x4_ssse3, NULL,
aom_d63_predictor_4x4_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_DSPR2
......@@ -188,8 +190,9 @@ INTRA_PRED_TEST(DSPR2, TestIntraPred4, aom_dc_predictor_4x4_dspr2, NULL, NULL,
INTRA_PRED_TEST(NEON, TestIntraPred4, aom_dc_predictor_4x4_neon,
aom_dc_left_predictor_4x4_neon, aom_dc_top_predictor_4x4_neon,
aom_dc_128_predictor_4x4_neon, aom_v_predictor_4x4_neon,
aom_h_predictor_4x4_neon, NULL, aom_d135_predictor_4x4_neon,
NULL, NULL, NULL, NULL, aom_tm_predictor_4x4_neon)
aom_h_predictor_4x4_neon, aom_d45_predictor_4x4_neon,
aom_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
aom_tm_predictor_4x4_neon)
#endif // HAVE_NEON
#if HAVE_MSA
......@@ -206,22 +209,23 @@ INTRA_PRED_TEST(MSA, TestIntraPred4, aom_dc_predictor_4x4_msa,
INTRA_PRED_TEST(C, TestIntraPred8, aom_dc_predictor_8x8_c,
aom_dc_left_predictor_8x8_c, aom_dc_top_predictor_8x8_c,
aom_dc_128_predictor_8x8_c, aom_v_predictor_8x8_c,
aom_h_predictor_8x8_c, aom_d45e_predictor_8x8_c,
aom_h_predictor_8x8_c, aom_d45_predictor_8x8_c,
aom_d135_predictor_8x8_c, aom_d117_predictor_8x8_c,
aom_d153_predictor_8x8_c, aom_d207e_predictor_8x8_c,
aom_d63e_predictor_8x8_c, aom_tm_predictor_8x8_c)
aom_d153_predictor_8x8_c, aom_d207_predictor_8x8_c,
aom_d63_predictor_8x8_c, aom_tm_predictor_8x8_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSE2, TestIntraPred8, aom_dc_predictor_8x8_sse2,
aom_dc_left_predictor_8x8_sse2, aom_dc_top_predictor_8x8_sse2,
aom_dc_128_predictor_8x8_sse2, aom_v_predictor_8x8_sse2,
aom_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
aom_tm_predictor_8x8_sse2)
aom_h_predictor_8x8_sse2, aom_d45_predictor_8x8_sse2, NULL,
NULL, NULL, NULL, NULL, aom_tm_predictor_8x8_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSSE3 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, aom_d153_predictor_8x8_ssse3, NULL, NULL, NULL)
NULL, NULL, aom_d153_predictor_8x8_ssse3,
aom_d207_predictor_8x8_ssse3, aom_d63_predictor_8x8_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_DSPR2
......@@ -234,8 +238,8 @@ INTRA_PRED_TEST(DSPR2, TestIntraPred8, aom_dc_predictor_8x8_dspr2, NULL, NULL,
INTRA_PRED_TEST(NEON, TestIntraPred8, aom_dc_predictor_8x8_neon,
aom_dc_left_predictor_8x8_neon, aom_dc_top_predictor_8x8_neon,
aom_dc_128_predictor_8x8_neon, aom_v_predictor_8x8_neon,
aom_h_predictor_8x8_neon, NULL, NULL, NULL, NULL, NULL, NULL,
aom_tm_predictor_8x8_neon)
aom_h_predictor_8x8_neon, aom_d45_predictor_8x8_neon, NULL,
NULL, NULL, NULL, NULL, aom_tm_predictor_8x8_neon)
#endif // HAVE_NEON
......@@ -253,10 +257,10 @@ INTRA_PRED_TEST(MSA, TestIntraPred8, aom_dc_predictor_8x8_msa,
INTRA_PRED_TEST(C, TestIntraPred16, aom_dc_predictor_16x16_c,
aom_dc_left_predictor_16x16_c, aom_dc_top_predictor_16x16_c,
aom_dc_128_predictor_16x16_c, aom_v_predictor_16x16_c,
aom_h_predictor_16x16_c, aom_d45e_predictor_16x16_c,
aom_h_predictor_16x16_c, aom_d45_predictor_16x16_c,
aom_d135_predictor_16x16_c, aom_d117_predictor_16x16_c,
aom_d153_predictor_16x16_c, aom_d207e_predictor_16x16_c,
aom_d63e_predictor_16x16_c, aom_tm_predictor_16x16_c)
aom_d153_predictor_16x16_c, aom_d207_predictor_16x16_c,
aom_d63_predictor_16x16_c, aom_tm_predictor_16x16_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSE2, TestIntraPred16, aom_dc_predictor_16x16_sse2,
......@@ -269,8 +273,9 @@ INTRA_PRED_TEST(SSE2, TestIntraPred16, aom_dc_predictor_16x16_sse2,
#if HAVE_SSSE3 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, aom_d153_predictor_16x16_ssse3, NULL, NULL,
NULL)
aom_d45_predictor_16x16_ssse3, NULL, NULL,
aom_d153_predictor_16x16_ssse3, aom_d207_predictor_16x16_ssse3,
aom_d63_predictor_16x16_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_DSPR2
......@@ -284,8 +289,8 @@ INTRA_PRED_TEST(NEON, TestIntraPred16, aom_dc_predictor_16x16_neon,
aom_dc_left_predictor_16x16_neon,
aom_dc_top_predictor_16x16_neon,
aom_dc_128_predictor_16x16_neon, aom_v_predictor_16x16_neon,
aom_h_predictor_16x16_neon, NULL, NULL, NULL, NULL, NULL, NULL,
aom_tm_predictor_16x16_neon)
aom_h_predictor_16x16_neon, aom_d45_predictor_16x16_neon, NULL,
NULL, NULL, NULL, NULL, aom_tm_predictor_16x16_neon)
#endif // HAVE_NEON
#if HAVE_MSA
......@@ -302,10 +307,10 @@ INTRA_PRED_TEST(MSA, TestIntraPred16, aom_dc_predictor_16x16_msa,
INTRA_PRED_TEST(C, TestIntraPred32, aom_dc_predictor_32x32_c,
aom_dc_left_predictor_32x32_c, aom_dc_top_predictor_32x32_c,
aom_dc_128_predictor_32x32_c, aom_v_predictor_32x32_c,
aom_h_predictor_32x32_c, aom_d45e_predictor_32x32_c,
aom_h_predictor_32x32_c, aom_d45_predictor_32x32_c,
aom_d135_predictor_32x32_c, aom_d117_predictor_32x32_c,
aom_d153_predictor_32x32_c, aom_d207e_predictor_32x32_c,
aom_d63e_predictor_32x32_c, aom_tm_predictor_32x32_c)
aom_d153_predictor_32x32_c, aom_d207_predictor_32x32_c,
aom_d63_predictor_32x32_c, aom_tm_predictor_32x32_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSE2, TestIntraPred32, aom_dc_predictor_32x32_sse2,
......@@ -318,8 +323,9 @@ INTRA_PRED_TEST(SSE2, TestIntraPred32, aom_dc_predictor_32x32_sse2,
#if HAVE_SSSE3 && CONFIG_USE_X86INC
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, aom_d153_predictor_32x32_ssse3, NULL, NULL,
NULL)
aom_d45_predictor_32x32_ssse3, NULL, NULL,
aom_d153_predictor_32x32_ssse3, aom_d207_predictor_32x32_ssse3,
aom_d63_predictor_32x32_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_NEON
......
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