Commit 77118729 authored by Urvang Joshi's avatar Urvang Joshi
Browse files

loopfilter: Refactor common calls for lowbd and hbd.

BUG=aomedia:442

Change-Id: Ie8a24934e89c87af6677ff39d4a86c252ea18593
parent 37aebf1b
......@@ -1734,21 +1734,17 @@ void av1_filter_block_plane_ss00_ver(AV1_COMMON *const cm,
// Disable filtering on the leftmost column.
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
if (cm->use_highbitdepth)
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
mask_16x16_l, mask_8x8_l, mask_4x4_l, mask_4x4_int_l, &cm->lf_info,
&lfm->lfl_y[r][0], (int)cm->bit_depth);
} else {
else
#endif // CONFIG_HIGHBITDEPTH
filter_selectively_vert_row2(
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info, &lfm->lfl_y[r][0]);
}
#else
filter_selectively_vert_row2(
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info, &lfm->lfl_y[r][0]);
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= 2 * MI_SIZE;
mask_8x8 >>= 2 * MI_SIZE;
......@@ -1789,21 +1785,16 @@ void av1_filter_block_plane_ss00_hor(AV1_COMMON *const cm,
}
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
if (cm->use_highbitdepth)
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int & 0xff, &cm->lf_info, &lfm->lfl_y[r][0],
(int)cm->bit_depth);
} else {
else
#endif // CONFIG_HIGHBITDEPTH
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int & 0xff, &cm->lf_info,
&lfm->lfl_y[r][0]);
}
#else
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int & 0xff, &cm->lf_info,
&lfm->lfl_y[r][0]);
#endif // CONFIG_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
......@@ -1846,22 +1837,17 @@ void av1_filter_block_plane_ss11_ver(AV1_COMMON *const cm,
// Disable filtering on the leftmost column.
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
if (cm->use_highbitdepth)
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
mask_16x16_l, mask_8x8_l, mask_4x4_l, mask_4x4_int_l, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0], (int)cm->bit_depth);
} else {
else
#endif // CONFIG_HIGHBITDEPTH
filter_selectively_vert_row2(plane->subsampling_x, dst->buf,
dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
}
#else
filter_selectively_vert_row2(
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info, &lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
......@@ -1917,21 +1903,16 @@ void av1_filter_block_plane_ss11_hor(AV1_COMMON *const cm,
}
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
if (cm->use_highbitdepth)
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info, &lfm->lfl_uv[r >> 1][0],
(int)cm->bit_depth);
} else {
else
#endif // CONFIG_HIGHBITDEPTH
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
}
#else
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE / 2;
......
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