Commit 504f4a89 authored by Yunqing Wang's avatar Yunqing Wang
Browse files

Remove unused macro USE_EXTRA_FILTER

Removed unused macro USE_EXTRA_FILTER.

Change-Id: Ief6c31c3a9a2e0845e0777e1dcef23f15cbcc898
parent 6b3d1e34
......@@ -849,10 +849,10 @@ void av1_convolve_2d_facade(const uint8_t *src, int src_stride, uint8_t *dst,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 1, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 1, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
......@@ -1090,10 +1090,10 @@ void av1_highbd_convolve_2d_facade(const uint8_t *src8, int src_stride,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 1, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 1, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
......@@ -1185,10 +1185,10 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
......@@ -1217,58 +1217,28 @@ static void convolve_helper(const uint8_t *src, int src_stride, uint8_t *dst,
temp[((MAX_SB_SIZE * 2 + 16) + 16) * MAX_SB_SIZE]);
int max_intermediate_size = ((MAX_SB_SIZE * 2 + 16) + 16);
int filter_size;
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
av1_convolve_filter_params_fixup_1212(&filter_params_x, &filter_params_y);
// we do filter with fewer taps first to reduce hardware implementation
// complexity
if (filter_params_y.taps < filter_params_x.taps) {
const int temp_stride = max_intermediate_size;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_x.taps;
const int intermediate_width =
(((w - 1) * x_step_q4 + subpel_x_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_width <= max_intermediate_size);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(src - (filter_size / 2 - 1), src_stride, temp, temp_stride,
intermediate_width, h, filter_params_y, subpel_y_q4,
y_step_q4, &temp_conv_params);
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(temp + (filter_size / 2 - 1), temp_stride, dst, dst_stride,
w, h, filter_params_x, subpel_x_q4, x_step_q4,
conv_params);
} else
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
{
const int temp_stride = MAX_SB_SIZE;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_q4 + subpel_y_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(src - src_stride * (filter_size / 2 - 1), src_stride, temp,
temp_stride, w, intermediate_height, filter_params_x,
subpel_x_q4, x_step_q4, &temp_conv_params);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(temp + temp_stride * (filter_size / 2 - 1), temp_stride,
dst, dst_stride, w, h, filter_params_y, subpel_y_q4,
y_step_q4, conv_params);
}
const int temp_stride = MAX_SB_SIZE;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_q4 + subpel_y_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(src - src_stride * (filter_size / 2 - 1), src_stride, temp,
temp_stride, w, intermediate_height, filter_params_x,
subpel_x_q4, x_step_q4, &temp_conv_params);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(temp + temp_stride * (filter_size / 2 - 1), temp_stride, dst,
dst_stride, w, h, filter_params_y, subpel_y_q4, y_step_q4,
conv_params);
}
}
......@@ -1286,10 +1256,10 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
assert(conv_params->round == CONVOLVE_OPT_ROUND);
......@@ -1317,61 +1287,29 @@ static void convolve_scale_helper(const uint8_t *src, int src_stride,
temp[((MAX_SB_SIZE * 2 + 16) + 16) * MAX_SB_SIZE]);
int max_intermediate_size = ((MAX_SB_SIZE * 2 + 16) + 16);
int filter_size;
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
av1_convolve_filter_params_fixup_1212(&filter_params_x, &filter_params_y);
// we do filter with fewer taps first to reduce hardware implementation
// complexity
if (filter_params_y.taps < filter_params_x.taps) {
const int temp_stride = max_intermediate_size;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_x.taps;
const int intermediate_width =
(((w - 1) * x_step_qn + subpel_x_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_width <= max_intermediate_size);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(src - (filter_size / 2 - 1), src_stride, temp, temp_stride,
intermediate_width, h, filter_params_y, subpel_y_qn,
y_step_qn, &temp_conv_params);
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(temp + (filter_size / 2 - 1), temp_stride, dst, dst_stride,
w, h, filter_params_x, subpel_x_qn, x_step_qn,
conv_params);
} else {
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
const int temp_stride = MAX_SB_SIZE;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_qn + subpel_y_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(src - src_stride * (filter_size / 2 - 1), src_stride, temp,
temp_stride, w, intermediate_height, filter_params_x,
subpel_x_qn, x_step_qn, &temp_conv_params);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(temp + temp_stride * (filter_size / 2 - 1), temp_stride,
dst, dst_stride, w, h, filter_params_y, subpel_y_qn,
y_step_qn, conv_params);
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
}
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
const int temp_stride = MAX_SB_SIZE;
ConvolveParams temp_conv_params;
temp_conv_params.ref = 0;
temp_conv_params.do_average = 0;
temp_conv_params.round = CONVOLVE_OPT_ROUND;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_qn + subpel_y_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
assert(filter_params_x.taps <= MAX_FILTER_TAP);
convolve_horiz(src - src_stride * (filter_size / 2 - 1), src_stride, temp,
temp_stride, w, intermediate_height, filter_params_x,
subpel_x_qn, x_step_qn, &temp_conv_params);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
convolve_vert(temp + temp_stride * (filter_size / 2 - 1), temp_stride, dst,
dst_stride, w, h, filter_params_y, subpel_y_qn, y_step_qn,
conv_params);
}
}
......@@ -1666,10 +1604,10 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
......@@ -1690,52 +1628,25 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
uint8_t *temp8 = CONVERT_TO_BYTEPTR(temp);
int max_intermediate_size = ((MAX_SB_SIZE * 2 + 16) + 16);
int filter_size;
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
av1_convolve_filter_params_fixup_1212(&filter_params_x, &filter_params_y);
if (filter_params_y.taps < filter_params_x.taps) {
const int temp_stride = max_intermediate_size;
filter_size = filter_params_x.taps;
const int intermediate_width =
(((w - 1) * x_step_q4 + subpel_x_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_width <= max_intermediate_size);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
highbd_convolve_vert_facade(src8 - (filter_size / 2 - 1), src_stride,
temp8, temp_stride, intermediate_width, h,
filter_params_y, subpel_y_q4, y_step_q4, 0,
bd);
assert(filter_params_x.taps <= MAX_FILTER_TAP);
highbd_convolve_horiz_facade(temp8 + (filter_size / 2 - 1), temp_stride,
dst8, dst_stride, w, h, filter_params_x,
subpel_x_q4, x_step_q4, ref_idx, bd);
} else
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
{
const int temp_stride = MAX_SB_SIZE;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_q4 + subpel_y_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
highbd_convolve_horiz_facade(src8 - src_stride * (filter_size / 2 - 1),
src_stride, temp8, temp_stride, w,
intermediate_height, filter_params_x,
subpel_x_q4, x_step_q4, 0, bd);
filter_size = filter_params_y.taps;
assert(filter_params_y.taps <= MAX_FILTER_TAP);
highbd_convolve_vert_facade(temp8 + temp_stride * (filter_size / 2 - 1),
temp_stride, dst8, dst_stride, w, h,
filter_params_y, subpel_y_q4, y_step_q4,
ref_idx, bd);
}
const int temp_stride = MAX_SB_SIZE;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_q4 + subpel_y_q4) >> SUBPEL_BITS) + filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
highbd_convolve_horiz_facade(src8 - src_stride * (filter_size / 2 - 1),
src_stride, temp8, temp_stride, w,
intermediate_height, filter_params_x,
subpel_x_q4, x_step_q4, 0, bd);
filter_size = filter_params_y.taps;
assert(filter_params_y.taps <= MAX_FILTER_TAP);
highbd_convolve_vert_facade(
temp8 + temp_stride * (filter_size / 2 - 1), temp_stride, dst8,
dst_stride, w, h, filter_params_y, subpel_y_q4, y_step_q4, ref_idx, bd);
}
}
......@@ -1762,10 +1673,10 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
InterpFilterParams filter_params_x, filter_params_y;
#if CONFIG_SHORT_FILTER
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y, w, h);
#else
av1_get_convolve_filter_params(interp_filters, 0, &filter_params_x,
av1_get_convolve_filter_params(interp_filters, &filter_params_x,
&filter_params_y);
#endif
......@@ -1786,54 +1697,24 @@ void av1_highbd_convolve_scale(const uint8_t *src8, int src_stride,
uint8_t *temp8 = CONVERT_TO_BYTEPTR(temp);
int max_intermediate_size = ((MAX_SB_SIZE * 2 + 16) + 16);
int filter_size;
const int temp_stride = MAX_SB_SIZE;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_qn + subpel_y_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
highbd_convolve_horiz_facade_scale(
src8 - src_stride * (filter_size / 2 - 1), src_stride, temp8,
temp_stride, w, intermediate_height, filter_params_x, subpel_x_qn,
x_step_qn, 0, bd);
filter_size = filter_params_y.taps;
assert(filter_params_y.taps <= MAX_FILTER_TAP);
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
av1_convolve_filter_params_fixup_1212(&filter_params_x, &filter_params_y);
if (filter_params_y.taps < filter_params_x.taps) {
const int temp_stride = max_intermediate_size;
filter_size = filter_params_x.taps;
const int intermediate_width =
(((w - 1) * x_step_qn + subpel_x_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_width <= max_intermediate_size);
assert(filter_params_y.taps <= MAX_FILTER_TAP);
highbd_convolve_vert_facade_scale(src8 - (filter_size / 2 - 1),
src_stride, temp8, temp_stride,
intermediate_width, h, filter_params_y,
subpel_y_qn, y_step_qn, 0, bd);
assert(filter_params_x.taps <= MAX_FILTER_TAP);
highbd_convolve_horiz_facade_scale(
temp8 + (filter_size / 2 - 1), temp_stride, dst8, dst_stride, w, h,
filter_params_x, subpel_x_qn, x_step_qn, ref_idx, bd);
} else {
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
const int temp_stride = MAX_SB_SIZE;
filter_size = filter_params_y.taps;
const int intermediate_height =
(((h - 1) * y_step_qn + subpel_y_qn) >> SCALE_SUBPEL_BITS) +
filter_size;
assert(intermediate_height <= max_intermediate_size);
(void)max_intermediate_size;
highbd_convolve_horiz_facade_scale(
src8 - src_stride * (filter_size / 2 - 1), src_stride, temp8,
temp_stride, w, intermediate_height, filter_params_x, subpel_x_qn,
x_step_qn, 0, bd);
filter_size = filter_params_y.taps;
assert(filter_params_y.taps <= MAX_FILTER_TAP);
highbd_convolve_vert_facade_scale(
temp8 + temp_stride * (filter_size / 2 - 1), temp_stride, dst8,
dst_stride, w, h, filter_params_y, subpel_y_qn, y_step_qn, ref_idx,
bd);
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
}
#endif // CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
highbd_convolve_vert_facade_scale(
temp8 + temp_stride * (filter_size / 2 - 1), temp_stride, dst8,
dst_stride, w, h, filter_params_y, subpel_y_qn, y_step_qn, ref_idx, bd);
}
}
......@@ -61,20 +61,7 @@ static INLINE ConvolveParams get_conv_params(int ref, int do_average,
return conv_params;
}
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
static INLINE void av1_convolve_filter_params_fixup_1212(
const InterpFilterParams *params_x, InterpFilterParams *params_y) {
if (params_x->interp_filter == MULTITAP_SHARP &&
params_y->interp_filter == MULTITAP_SHARP) {
// Avoid two directions both using 12-tap filter.
// This will reduce hardware implementation cost.
*params_y = av1_get_interp_filter_params(EIGHTTAP_SHARP);
}
}
#endif
static INLINE void av1_get_convolve_filter_params(InterpFilters interp_filters,
int avoid_1212,
InterpFilterParams *params_x,
InterpFilterParams *params_y
#if CONFIG_SHORT_FILTER
......@@ -96,12 +83,6 @@ static INLINE void av1_get_convolve_filter_params(InterpFilters interp_filters,
*params_x = av1_get_interp_filter_params(filter_x);
*params_y = av1_get_interp_filter_params(filter_y);
#endif
if (avoid_1212) {
#if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
convolve_filter_params_fixup_1212(params_x, params_y);
#endif
}
}
struct AV1Common;
......
......@@ -1865,22 +1865,6 @@ static const aom_cdf_prob
};
#if CONFIG_DUAL_FILTER
#if USE_EXTRA_FILTER
static const aom_cdf_prob
default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][CDF_SIZE(
SWITCHABLE_FILTERS)] = {
{ AOM_CDF4(30080, 31088, 31760) }, { AOM_CDF4(4608, 9620, 11050) },
{ AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(4352, 5240, 31880) },
{ AOM_CDF4(19072, 23352, 28488) }, { AOM_CDF4(30080, 31088, 31760) },
{ AOM_CDF4(4608, 9620, 11050) }, { AOM_CDF4(4352, 5240, 31880) },
{ AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(19072, 23352, 28488) },
{ AOM_CDF4(30080, 31088, 31760) }, { AOM_CDF4(4608, 9620, 11050) },
{ AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(4352, 5240, 31880) },
{ AOM_CDF4(19072, 23352, 28488) }, { AOM_CDF4(30080, 31088, 31760) },
{ AOM_CDF4(4608, 9620, 11050) }, { AOM_CDF4(4352, 5240, 31880) },
{ AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(19072, 23352, 28488) },
};
#else // USE_EXTRA_FILTER
static const aom_cdf_prob
default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][CDF_SIZE(
SWITCHABLE_FILTERS)] = {
......@@ -1893,7 +1877,6 @@ static const aom_cdf_prob
{ AOM_CDF3(31616, 31787) }, { AOM_CDF3(4224, 32433) },
{ AOM_CDF3(128, 256) }, { AOM_CDF3(17408, 18248) }
};
#endif // USE_EXTRA_FILTER
#else // CONFIG_DUAL_FILTER
static const aom_cdf_prob
default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS]
......
......@@ -48,130 +48,6 @@ DECLARE_ALIGNED(16, static const int16_t,
};
#endif // USE_TEMPORALFILTER_12TAP
#if USE_EXTRA_FILTER
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8[SUBPEL_SHIFTS]) = {
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 2, -6, 126, 8, -2, 0, 0 },
{ 0, 2, -10, 122, 18, -4, 0, 0 }, { 0, 2, -12, 116, 28, -8, 2, 0 },
{ 0, 2, -14, 110, 38, -10, 2, 0 }, { 0, 2, -14, 102, 48, -12, 2, 0 },
{ 0, 2, -16, 94, 58, -12, 2, 0 }, { 0, 2, -14, 84, 66, -12, 2, 0 },
{ 0, 2, -14, 76, 76, -14, 2, 0 }, { 0, 2, -12, 66, 84, -14, 2, 0 },
{ 0, 2, -12, 58, 94, -16, 2, 0 }, { 0, 2, -12, 48, 102, -14, 2, 0 },
{ 0, 2, -10, 38, 110, -14, 2, 0 }, { 0, 2, -8, 28, 116, -12, 2, 0 },
{ 0, 0, -4, 18, 122, -10, 2, 0 }, { 0, 0, -2, 8, 126, -6, 2, 0 }
};
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_regular_uv[SUBPEL_SHIFTS]) = {
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 2, -6, 126, 8, -2, 0, 0 },
{ 0, 2, -10, 122, 18, -4, 0, 0 }, { 0, 2, -12, 116, 28, -8, 2, 0 },
{ 0, 2, -14, 110, 38, -10, 2, 0 }, { 0, 2, -14, 102, 48, -12, 2, 0 },
{ 0, 2, -16, 94, 58, -12, 2, 0 }, { 0, 2, -14, 84, 66, -12, 2, 0 },
{ 0, 2, -14, 76, 76, -14, 2, 0 }, { 0, 2, -12, 66, 84, -14, 2, 0 },
{ 0, 2, -12, 58, 94, -16, 2, 0 }, { 0, 2, -12, 48, 102, -14, 2, 0 },
{ 0, 2, -10, 38, 110, -14, 2, 0 }, { 0, 2, -8, 28, 116, -12, 2, 0 },
{ 0, 0, -4, 18, 122, -10, 2, 0 }, { 0, 0, -2, 8, 126, -6, 2, 0 }
};
#if USE_12TAP_FILTER
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8sharp[SUBPEL_SHIFTS]) = {
// intfilt 0.8
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { -1, 2, -6, 127, 9, -4, 2, -1 },
{ -2, 5, -12, 124, 18, -7, 4, -2 }, { -2, 7, -16, 119, 28, -11, 5, -2 },
{ -3, 8, -19, 114, 38, -14, 7, -3 }, { -3, 9, -22, 107, 49, -17, 8, -3 },
{ -4, 10, -23, 99, 60, -20, 10, -4 }, { -4, 11, -23, 90, 70, -22, 10, -4 },
{ -4, 11, -23, 80, 80, -23, 11, -4 }, { -4, 10, -22, 70, 90, -23, 11, -4 },
{ -4, 10, -20, 60, 99, -23, 10, -4 }, { -3, 8, -17, 49, 107, -22, 9, -3 },
{ -3, 7, -14, 38, 114, -19, 8, -3 }, { -2, 5, -11, 28, 119, -16, 7, -2 },
{ -2, 4, -7, 18, 124, -12, 5, -2 }, { -1, 2, -4, 9, 127, -6, 2, -1 },
};
DECLARE_ALIGNED(256, static const int16_t,
sub_pel_filters_10sharp[SUBPEL_SHIFTS][12]) = {
// intfilt 0.85
{ 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0 },
{ 0, 1, -2, 3, -7, 127, 8, -4, 2, -1, 1, 0 },
{ 0, 1, -3, 6, -13, 124, 18, -8, 4, -2, 1, 0 },
{ 0, 2, -4, 8, -18, 120, 28, -12, 6, -4, 2, 0 },
{ 0, 2, -5, 10, -21, 114, 38, -15, 8, -5, 2, 0 },
{ 0, 3, -6, 11, -24, 107, 49, -19, 10, -6, 3, 0 },
{ 0, 3, -7, 12, -25, 99, 59, -21, 11, -6, 3, 0 },
{ 0, 3, -7, 12, -25, 90, 70, -23, 12, -7, 3, 0 },
{ 0, 3, -7, 12, -25, 81, 81, -25, 12, -7, 3, 0 },
{ 0, 3, -7, 12, -23, 70, 90, -25, 12, -7, 3, 0 },
{ 0, 3, -6, 11, -21, 59, 99, -25, 12, -7, 3, 0 },
{ 0, 3, -6, 10, -19, 49, 107, -24, 11, -6, 3, 0 },
{ 0, 2, -5, 8, -15, 38, 114, -21, 10, -5, 2, 0 },
{ 0, 2, -4, 6, -12, 28, 120, -18, 8, -4, 2, 0 },
{ 0, 1, -2, 4, -8, 18, 124, -13, 6, -3, 1, 0 },
{ 0, 1, -1, 2, -4, 8, 127, -7, 3, -2, 1, 0 },
};
#else
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8sharp[SUBPEL_SHIFTS]) = {
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { -2, 2, -6, 126, 8, -2, 2, 0 },
{ -2, 6, -12, 124, 16, -6, 4, -2 }, { -2, 8, -18, 120, 26, -10, 6, -2 },
{ -4, 10, -22, 116, 38, -14, 6, -2 }, { -4, 10, -22, 108, 48, -18, 8, -2 },
{ -4, 10, -24, 100, 60, -20, 8, -2 }, { -4, 10, -24, 90, 70, -22, 10, -2 },
{ -4, 12, -24, 80, 80, -24, 12, -4 }, { -2, 10, -22, 70, 90, -24, 10, -4 },
{ -2, 8, -20, 60, 100, -24, 10, -4 }, { -2, 8, -18, 48, 108, -22, 10, -4 },
{ -2, 6, -14, 38, 116, -22, 10, -4 }, { -2, 6, -10, 26, 120, -18, 8, -2 },
{ -2, 4, -6, 16, 124, -12, 6, -2 }, { 0, 2, -2, 8, 126, -6, 2, -2 }
};
#endif
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8smooth2[SUBPEL_SHIFTS]) = {
// freqmultiplier = 0.2
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 9, 30, 44, 32, 11, 2, 0 },
{ 0, 8, 28, 44, 34, 12, 2, 0 }, { 0, 7, 27, 44, 35, 13, 2, 0 },
{ 0, 6, 26, 43, 37, 14, 2, 0 }, { 0, 5, 24, 43, 38, 16, 2, 0 },
{ 0, 5, 23, 42, 38, 17, 3, 0 }, { 0, 4, 21, 41, 40, 19, 3, 0 },
{ 0, 4, 20, 40, 40, 20, 4, 0 }, { 0, 3, 19, 40, 41, 21, 4, 0 },
{ 0, 3, 17, 38, 42, 23, 5, 0 }, { 0, 2, 16, 38, 43, 24, 5, 0 },
{ 0, 2, 14, 37, 43, 26, 6, 0 }, { 0, 2, 13, 35, 44, 27, 7, 0 },
{ 0, 2, 12, 34, 44, 28, 8, 0 }, { 0, 2, 11, 32, 44, 30, 9, 0 },
};
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_smooth2_uv[SUBPEL_SHIFTS]) = {
// freqmultiplier = 0.2
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 9, 30, 44, 32, 11, 2, 0 },
{ 0, 8, 28, 44, 34, 12, 2, 0 }, { 0, 7, 27, 44, 35, 13, 2, 0 },
{ 0, 6, 26, 43, 37, 14, 2, 0 }, { 0, 5, 24, 43, 38, 16, 2, 0 },
{ 0, 5, 23, 42, 38, 17, 3, 0 }, { 0, 4, 21, 41, 40, 19, 3, 0 },
{ 0, 4, 20, 40, 40, 20, 4, 0 }, { 0, 3, 19, 40, 41, 21, 4, 0 },
{ 0, 3, 17, 38, 42, 23, 5, 0 }, { 0, 2, 16, 38, 43, 24, 5, 0 },
{ 0, 2, 14, 37, 43, 26, 6, 0 }, { 0, 2, 13, 35, 44, 27, 7, 0 },
{ 0, 2, 12, 34, 44, 28, 8, 0 }, { 0, 2, 11, 32, 44, 30, 9, 0 },
};
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8smooth[SUBPEL_SHIFTS]) = {
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 2, 28, 62, 34, 2, 0, 0 },
{ 0, 0, 26, 62, 36, 4, 0, 0 }, { 0, 0, 22, 62, 40, 4, 0, 0 },
{ 0, 0, 20, 60, 42, 6, 0, 0 }, { 0, 0, 18, 58, 44, 8, 0, 0 },
{ 0, 0, 16, 56, 46, 10, 0, 0 }, { 0, -2, 16, 54, 48, 12, 0, 0 },
{ 0, -2, 14, 52, 52, 14, -2, 0 }, { 0, 0, 12, 48, 54, 16, -2, 0 },
{ 0, 0, 10, 46, 56, 16, 0, 0 }, { 0, 0, 8, 44, 58, 18, 0, 0 },
{ 0, 0, 6, 42, 60, 20, 0, 0 }, { 0, 0, 4, 40, 62, 22, 0, 0 },
{ 0, 0, 4, 36, 62, 26, 0, 0 }, { 0, 0, 2, 34, 62, 28, 2, 0 }
};
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_smooth_uv[SUBPEL_SHIFTS]) = {
{ 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 2, 28, 62, 34, 2, 0, 0 },
{ 0, 0, 26, 62, 36, 4, 0, 0 }, { 0, 0, 22, 62, 40, 4, 0, 0 },