Commit dbfec2a8 authored by Angie Chiang's avatar Angie Chiang

Add convolve-round experiment

Change-Id: I02a019b1c11b3ee4ae32d424cb6ef2f8ae554824
parent c957af9c
......@@ -197,7 +197,7 @@ void av1_convolve_vert_facade(const uint8_t *src, int src_stride, uint8_t *dst,
}
}
#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 @@ void av1_convolve_rounding(const int32_t *src, int src_stride, uint8_t *dst,
}
}
}
#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,
......
......@@ -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 @@ static INLINE ConvolveParams get_conv_params(int ref) {
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 @@ static INLINE ConvolveParams get_conv_params_no_round(int ref, int32_t *dst,
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,
......
......@@ -917,9 +917,9 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
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 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
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 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
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 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
#else
av1_convolve_rounding(tmp_dst, MAX_SB_SIZE, dst, dst_buf->stride, w, h);
#endif
#endif // CONVOLVE_POST_ROUNDING
#endif // CONFIG_CONVOLVE_ROUND
}
}
......
......@@ -254,6 +254,7 @@ EXPERIMENT_LIST="
rect_tx
ref_mv
dual_filter
convolve_round
ext_tx
tx64x64
sub8x8_mc
......
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