const uint8_t *limit0, const uint8_t *thresh0,
const uint8_t *blimit1, const uint8_t *limit1,
const uint8_t *thresh1, int bd);
+
+// wrapper for loopfilter functions without a 'count' param.
+typedef void (*loop_op_nc_t)(uint16_t *s, int p, const uint8_t *blimit,
+ const uint8_t *limit, const uint8_t *thresh,
+ int bd);
+template <loop_op_nc_t fn>
+void wrapper_nc(uint16_t *s, int p, const uint8_t *blimit,
+ const uint8_t *limit, const uint8_t *thresh,
+ int /*count*/, int bd) {
+ fn(s, p, blimit, limit, thresh, bd);
+}
#else
typedef void (*loop_op_t)(uint8_t *s, int p, const uint8_t *blimit,
const uint8_t *limit, const uint8_t *thresh,
const uint8_t *limit0, const uint8_t *thresh0,
const uint8_t *blimit1, const uint8_t *limit1,
const uint8_t *thresh1);
-#endif // CONFIG_VP9_HIGHBITDEPTH
-
-typedef std::tr1::tuple<loop_op_t, loop_op_t, int, int> loop8_param_t;
-typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
-
-#if HAVE_SSE2
-#if CONFIG_VP9_HIGHBITDEPTH
-void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count, int bd) {
- vpx_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd);
-}
-
-void wrapper_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count, int bd) {
- vpx_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd);
-}
-
-void wrapper_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count, int bd) {
- vpx_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd);
-}
-
-void wrapper_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count, int bd) {
- vpx_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
-}
-#else
-void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_dual_sse2(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh);
-}
-void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
+// wrapper for loopfilter functions without a 'count' param.
+typedef void (*loop_op_nc_t)(uint8_t *s, int p, const uint8_t *blimit,
+ const uint8_t *limit, const uint8_t *thresh);
+template <loop_op_nc_t fn>
+void wrapper_nc(uint8_t *s, int p, const uint8_t *blimit,
+ const uint8_t *limit, const uint8_t *thresh,
+ int /*count*/) {
+ fn(s, p, blimit, limit, thresh);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
-#endif // HAVE_SSE2
-#if HAVE_NEON_ASM
-#if CONFIG_VP9_HIGHBITDEPTH
-// No neon high bitdepth functions.
-#else
-void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
-}
-#endif // CONFIG_VP9_HIGHBITDEPTH
-#endif // HAVE_NEON_ASM
-
-#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
-void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_msa(s, p, blimit, limit, thresh);
-}
-
-void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
- const uint8_t *limit, const uint8_t *thresh,
- int count) {
- vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
-}
-#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
+typedef std::tr1::tuple<loop_op_t, loop_op_t, int, int> loop8_param_t;
+typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
public:
&vpx_highbd_lpf_horizontal_16_c, 8, 2),
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
&vpx_highbd_lpf_vertical_8_c, 8, 1),
- make_tuple(&wrapper_vertical_16_sse2,
- &wrapper_vertical_16_c, 8, 1),
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_c>, 8, 1),
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
&vpx_highbd_lpf_horizontal_4_c, 10, 1),
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
&vpx_highbd_lpf_horizontal_16_c, 10, 2),
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
&vpx_highbd_lpf_vertical_8_c, 10, 1),
- make_tuple(&wrapper_vertical_16_sse2,
- &wrapper_vertical_16_c, 10, 1),
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_c>, 10, 1),
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
&vpx_highbd_lpf_horizontal_4_c, 12, 1),
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
&vpx_highbd_lpf_horizontal_16_c, 12, 2),
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
&vpx_highbd_lpf_vertical_8_c, 12, 1),
- make_tuple(&wrapper_vertical_16_sse2,
- &wrapper_vertical_16_c, 12, 1),
- make_tuple(&wrapper_vertical_16_dual_sse2,
- &wrapper_vertical_16_dual_c, 8, 1),
- make_tuple(&wrapper_vertical_16_dual_sse2,
- &wrapper_vertical_16_dual_c, 10, 1),
- make_tuple(&wrapper_vertical_16_dual_sse2,
- &wrapper_vertical_16_dual_c, 12, 1)));
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_c>, 12, 1),
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_dual_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_dual_c>, 8, 1),
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_dual_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_dual_c>, 10, 1),
+ make_tuple(&wrapper_nc<vpx_highbd_lpf_vertical_16_dual_sse2>,
+ &wrapper_nc<vpx_highbd_lpf_vertical_16_dual_c>, 12, 1)));
#else
INSTANTIATE_TEST_CASE_P(
SSE2, Loop8Test6Param,
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
- make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1),
- make_tuple(&wrapper_vertical_16_dual_sse2,
- &wrapper_vertical_16_dual_c, 8, 1)));
+ make_tuple(&wrapper_nc<vpx_lpf_vertical_16_sse2>,
+ &wrapper_nc<vpx_lpf_vertical_16_c>, 8, 1),
+ make_tuple(&wrapper_nc<vpx_lpf_vertical_16_dual_sse2>,
+ &wrapper_nc<vpx_lpf_vertical_16_dual_c>, 8, 1)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif
&vpx_lpf_horizontal_16_c, 8, 1),
make_tuple(&vpx_lpf_horizontal_16_neon,
&vpx_lpf_horizontal_16_c, 8, 2),
- make_tuple(&wrapper_vertical_16_neon,
- &wrapper_vertical_16_c, 8, 1),
- make_tuple(&wrapper_vertical_16_dual_neon,
- &wrapper_vertical_16_dual_c, 8, 1),
+ make_tuple(&wrapper_nc<vpx_lpf_vertical_16_neon>,
+ &wrapper_nc<vpx_lpf_vertical_16_c>, 8, 1),
+ make_tuple(&wrapper_nc<vpx_lpf_vertical_16_dual_neon>,
+ &wrapper_nc<vpx_lpf_vertical_16_dual_c>, 8, 1),
#endif // HAVE_NEON_ASM
make_tuple(&vpx_lpf_horizontal_8_neon,
&vpx_lpf_horizontal_8_c, 8, 1),
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1),
- make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
+ make_tuple(&wrapper_nc<vpx_lpf_vertical_16_msa>,
+ &wrapper_nc<vpx_lpf_vertical_16_c>, 8, 1)));
INSTANTIATE_TEST_CASE_P(
MSA, Loop8Test9Param,