loopfilter: Refactor common calls for lowbd and hbd.
BUG=aomedia:442
Change-Id: Ie8a24934e89c87af6677ff39d4a86c252ea18593
diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c
index 6caa734..5e17b49 100644
--- a/av1/common/av1_loopfilter.c
+++ b/av1/common/av1_loopfilter.c
@@ -1734,21 +1734,17 @@
// 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 @@
}
#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 @@
// 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 @@
}
#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;