Add convolve-round experiment
Change-Id: I02a019b1c11b3ee4ae32d424cb6ef2f8ae554824
diff --git a/av1/common/convolve.c b/av1/common/convolve.c
index c9ac02c..a1a266b 100644
--- a/av1/common/convolve.c
+++ b/av1/common/convolve.c
@@ -197,7 +197,7 @@
}
}
-#if CONVOLVE_POST_ROUNDING
+#if CONFIG_CONVOLVE_ROUND
void av1_convolve_rounding(const int32_t *src, int src_stride, uint8_t *dst,
int dst_stride, int w, int h) {
int r, c;
@@ -208,7 +208,7 @@
}
}
}
-#endif // CONVOLVE_POST_ROUNDING
+#endif // CONFIG_CONVOLVE_ROUND
void av1_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
int dst_stride, int w, int h,
diff --git a/av1/common/convolve.h b/av1/common/convolve.h
index 0f1dd9c..349e9ac 100644
--- a/av1/common/convolve.h
+++ b/av1/common/convolve.h
@@ -17,10 +17,6 @@
extern "C" {
#endif
-#if CONFIG_DUAL_FILTER
-#define CONVOLVE_POST_ROUNDING 1
-#endif
-
typedef enum CONVOLVE_OPT {
// indicate the results in dst buf is rounded by FILTER_BITS or not
CONVOLVE_OPT_ROUND,
@@ -41,7 +37,7 @@
return conv_params;
}
-#if CONVOLVE_POST_ROUNDING
+#if CONFIG_CONVOLVE_ROUND
static INLINE ConvolveParams get_conv_params_no_round(int ref, int32_t *dst,
int dst_stride) {
ConvolveParams conv_params;
@@ -54,7 +50,7 @@
void av1_convolve_rounding(const int32_t *src, int src_stride, uint8_t *dst,
int dst_stride, int w, int h);
-#endif // CONVOLVE_POST_ROUNDING
+#endif // CONFIG_CONVOLVE_ROUND
void av1_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
int dst_stride, int w, int h,
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index 575c4c9..fe6e85f 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -917,9 +917,9 @@
uint8_t *pre[2];
MV32 scaled_mv[2];
SubpelParams subpel_params[2];
-#if CONVOLVE_POST_ROUNDING
+#if CONFIG_CONVOLVE_ROUND
int32_t tmp_dst[MAX_SB_SIZE * MAX_SB_SIZE];
-#endif // CONVOLVE_POST_ROUNDING
+#endif // CONFIG_CONVOLVE_ROUND
for (ref = 0; ref < 1 + is_compound; ++ref) {
const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
@@ -971,12 +971,12 @@
for (ref = 0; ref < 1 + is_compound; ++ref) {
const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
struct buf_2d *const pre_buf = &pd->pre[ref];
-#if CONVOLVE_POST_ROUNDING
+#if CONFIG_CONVOLVE_ROUND
ConvolveParams conv_params =
get_conv_params_no_round(ref, tmp_dst, MAX_SB_SIZE);
#else
ConvolveParams conv_params = get_conv_params(ref);
-#endif // CONVOLVE_POST_ROUNDING
+#endif // CONFIG_CONVOLVE_ROUND
#if CONFIG_EXT_INTER
if (ref &&
is_masked_compound_type(mi->mbmi.interinter_compound_data.type))
@@ -1009,7 +1009,7 @@
subpel_params[ref].xs, subpel_params[ref].ys, xd);
}
-#if CONVOLVE_POST_ROUNDING
+#if CONFIG_CONVOLVE_ROUND
// TODO(angiebird): This part needs optimization
#if CONFIG_AOM_HIGHBITDEPTH
if (!(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH))
@@ -1017,7 +1017,7 @@
#else
av1_convolve_rounding(tmp_dst, MAX_SB_SIZE, dst, dst_buf->stride, w, h);
#endif
-#endif // CONVOLVE_POST_ROUNDING
+#endif // CONFIG_CONVOLVE_ROUND
}
}
diff --git a/configure b/configure
index 8acd553..ba7828c 100755
--- a/configure
+++ b/configure
@@ -254,6 +254,7 @@
rect_tx
ref_mv
dual_filter
+ convolve_round
ext_tx
tx64x64
sub8x8_mc