Commit b9b017d5 authored by Angie Chiang's avatar Angie Chiang

Allow only one direction uses 12 sharp filter

Performance drop
BDRate
lowres -0.116%
midres -0.073%
hdres  -0.056%

Change-Id: Ic90caf9b8f6fb9d9fd6f9c0e80436a7c468a3c97
parent e325abd0
......@@ -158,6 +158,12 @@ void av1_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
av1_get_interp_filter_params(interp_filter[1 + 2 * ref_idx]);
InterpFilterParams filter_params_y =
av1_get_interp_filter_params(interp_filter[0 + 2 * ref_idx]);
if (interp_filter[0 + 2 * ref_idx] == MULTITAP_SHARP &&
interp_filter[1 + 2 * ref_idx] == MULTITAP_SHARP) {
// Avoid two directions both using 12-tap filter.
// This will reduce hardware implementation cost.
filter_params_y = av1_get_interp_filter_params(EIGHTTAP_SHARP);
}
#endif
#if CONFIG_DUAL_FILTER
......
......@@ -62,7 +62,6 @@ DECLARE_ALIGNED(256, static const InterpKernel,
{ -1, 2, -6, 18, 123, -10, 3, -1 }, { 0, 1, -3, 8, 126, -5, 1, 0 },
};
#if CONFIG_EXT_INTRA
DECLARE_ALIGNED(256, static const InterpKernel,
sub_pel_filters_8sharp[SUBPEL_SHIFTS]) = {
// intfilt 0.8
......@@ -75,7 +74,6 @@ DECLARE_ALIGNED(256, static const InterpKernel,
{ -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 },
};
#endif // CONFIG_EXT_INTRA
DECLARE_ALIGNED(256, static const int16_t,
sub_pel_filters_12sharp[SUBPEL_SHIFTS][12]) = {
......@@ -206,7 +204,7 @@ const InterpKernel *av1_intra_filter_kernels[INTRA_FILTERS] = {
#if CONFIG_EXT_INTERP
static const InterpFilterParams
av1_interp_filter_params_list[SWITCHABLE_FILTERS + 1] = {
av1_interp_filter_params_list[SWITCHABLE_FILTERS + EXTRA_FILTERS] = {
{ (const int16_t *)sub_pel_filters_8, SUBPEL_TAPS, SUBPEL_SHIFTS,
EIGHTTAP_REGULAR },
{ (const int16_t *)sub_pel_filters_8smooth, SUBPEL_TAPS, SUBPEL_SHIFTS,
......@@ -216,7 +214,11 @@ static const InterpFilterParams
{ (const int16_t *)sub_pel_filters_8smooth2, SUBPEL_TAPS, SUBPEL_SHIFTS,
EIGHTTAP_SMOOTH2 },
{ (const int16_t *)bilinear_filters, SUBPEL_TAPS, SUBPEL_SHIFTS,
BILINEAR }
BILINEAR },
#if CONFIG_DUAL_FILTER
{ (const int16_t *)sub_pel_filters_8sharp, SUBPEL_TAPS, SUBPEL_SHIFTS,
EIGHTTAP_SHARP },
#endif
};
#else
static const InterpFilterParams
......
......@@ -42,7 +42,7 @@ extern "C" {
#define USE_TEMPORALFILTER_12TAP 1
#if USE_TEMPORALFILTER_12TAP
#define TEMPORALFILTER_12TAP (SWITCHABLE_FILTERS + 1)
#define TEMPORALFILTER_12TAP (SWITCHABLE_FILTERS + 2)
#endif
// The codec can operate in four possible inter prediction filter mode:
......@@ -51,11 +51,14 @@ extern "C" {
#define BILINEAR (SWITCHABLE_FILTERS)
#define SWITCHABLE (SWITCHABLE_FILTERS + 1) /* the last one */
#if CONFIG_DUAL_FILTER
#define EIGHTTAP_SHARP (SWITCHABLE_FILTERS + 1)
#define EXTRA_FILTERS 2
#define SWITCHABLE_FILTER_CONTEXTS ((SWITCHABLE_FILTERS + 1) * 4)
#define INTER_FILTER_COMP_OFFSET (SWITCHABLE_FILTERS + 1)
#define INTER_FILTER_DIR_OFFSET ((SWITCHABLE_FILTERS + 1) * 2)
#else
#define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1)
#define EXTRA_FILTERS 1
#endif
typedef uint8_t InterpFilter;
......
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