Commit 26b75145 authored by Yunqing Wang's avatar Yunqing Wang
Browse files

Set AV1 convolve function pointers in JNT_COMP

Set function pointers for AV1 convolve functions in JNT_COMP.

Change-Id: I9042b09c7c0222660b18b3a9ebb1379fd05b52c8
parent 4a8ea37b
......@@ -737,48 +737,15 @@ void av1_convolve_2d_facade(const uint8_t *src, int src_stride, uint8_t *dst,
&filter_params_y);
#endif
#if CONFIG_JNT_COMP
(void)sf;
if (scaled) {
av1_convolve_2d_scale(src, src_stride, conv_params->dst,
conv_params->dst_stride, w, h, &filter_params_x,
&filter_params_y, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, conv_params);
} else {
if (subpel_x_q4 == 0 && subpel_y_q4 == 0) {
av1_jnt_convolve_2d_copy(src, src_stride, dst, dst_stride, w, h,
&filter_params_x, &filter_params_y, subpel_x_q4,
subpel_y_q4, conv_params);
} else if (subpel_x_q4 == 0) {
// place holder
av1_jnt_convolve_2d(src, src_stride, dst, dst_stride, w, h,
&filter_params_x, &filter_params_y, subpel_x_q4,
subpel_y_q4, conv_params);
} else if (subpel_y_q4 == 0) {
// place holder
av1_jnt_convolve_2d(src, src_stride, dst, dst_stride, w, h,
&filter_params_x, &filter_params_y, subpel_x_q4,
subpel_y_q4, conv_params);
} else {
av1_jnt_convolve_2d(src, src_stride, dst, dst_stride, w, h,
&filter_params_x, &filter_params_y, subpel_x_q4,
subpel_y_q4, conv_params);
}
}
#else
if (scaled) {
if (scaled)
av1_convolve_2d_scale(src, src_stride, conv_params->dst,
conv_params->dst_stride, w, h, &filter_params_x,
&filter_params_y, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, conv_params);
} else {
// Special case convolve functions should produce the same result as
// av1_convolve_2d.
else
sf->convolve[subpel_x_q4 != 0][subpel_y_q4 != 0][1](
src, src_stride, dst, dst_stride, w, h, &filter_params_x,
&filter_params_y, subpel_x_q4, subpel_y_q4, conv_params);
}
#endif // CONFIG_JNT_COMP
}
#if CONFIG_HIGHBITDEPTH
......
......@@ -182,6 +182,22 @@ void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
}
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_JNT_COMP
// Special case convolve functions should produce the same result as
// av1_int_convolve_2d.
// subpel_x_q4 == 0 && subpel_y_q4 == 0
sf->convolve[0][0][1] = av1_jnt_convolve_2d_copy;
// subpel_x_q4 == 0
// place holder
sf->convolve[0][1][1] = av1_jnt_convolve_2d;
// subpel_y_q4 == 0
// place holder
sf->convolve[1][0][1] = av1_jnt_convolve_2d;
// subpel_x_q4 != 0 && subpel_y_q4 != 0
sf->convolve[1][1][1] = av1_jnt_convolve_2d;
#else
// Special case convolve functions should produce the same result as
// av1_convolve_2d.
// subpel_x_q4 == 0 && subpel_y_q4 == 0
sf->convolve[0][0][1] = av1_convolve_2d_copy;
// subpel_x_q4 == 0
......@@ -190,4 +206,5 @@ void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
sf->convolve[1][0][1] = av1_convolve_x;
// subpel_x_q4 != 0 && subpel_y_q4 != 0
sf->convolve[1][1][1] = av1_convolve_2d;
#endif // CONFIG_JNT_COMP
}
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