Properly handle 2D filter boundary extension

The amount of border extension needed in the first stage inter
filtering is decided by the length of the second stage filter
kernel.

Change-Id: Icddbc58c02234d5df09ff0eeebcf166ffe689203
This commit is contained in:
Jingning Han 2016-05-13 16:15:43 -07:00
Родитель 7ac38a7143
Коммит 14dd5538e9
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -142,13 +142,21 @@ void vp10_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
MAX_BLOCK_WIDTH];
int temp_stride = MAX_BLOCK_WIDTH;
#if CONFIG_DUAL_FILTER
InterpFilterParams filter_params =
InterpFilterParams filter_params_x =
vp10_get_interp_filter_params(interp_filter[1 + 2 * ref_idx]);
InterpFilterParams filter_params_y =
vp10_get_interp_filter_params(interp_filter[0 + 2 * ref_idx]);
InterpFilterParams filter_params = filter_params_x;
// The filter size implies the required number of reference pixels for
// the second stage filtering. It is possible that the two directions
// require different filter sizes.
int filter_size = filter_params_y.taps;
#else
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
int filter_size = filter_params.taps;
#endif
int intermediate_height =
(((h - 1) * y_step_q4 + subpel_y_q4) >> SUBPEL_BITS) + filter_size;
@ -159,7 +167,7 @@ void vp10_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
subpel_x_q4, x_step_q4, 0);
#if CONFIG_DUAL_FILTER
filter_params = vp10_get_interp_filter_params(interp_filter[2 * ref_idx]);
filter_params = filter_params_y;
#else
filter_params = vp10_get_interp_filter_params(interp_filter);
#endif