Fix a bug in interpolation for intrabc that causes data race.
Previously there was the possibility that when one of the
dimensions requires no interpolation, the implementation still
reads the 2-tap sources (though not used) and causes a potential
data race.
This patch separates the two when applicable.
BUG=b/145993032
Change-Id: I0b119efa482945f106346897a136046d83d3eece
diff --git a/av1/common/convolve.c b/av1/common/convolve.c
index 1504611..f73fd21 100644
--- a/av1/common/convolve.c
+++ b/av1/common/convolve.c
@@ -573,11 +573,21 @@
if (filter_params_x->taps == 2 || filter_params_y->taps == 2) {
assert(filter_params_x->taps == 2 && filter_params_y->taps == 2);
assert(!scaled);
- if (subpel_x_qn || subpel_y_qn) {
+ if (subpel_x_qn && subpel_y_qn) {
av1_convolve_2d_sr_c(src, src_stride, dst, dst_stride, w, h,
filter_params_x, filter_params_y, subpel_x_qn,
subpel_y_qn, conv_params);
return;
+ } else if (subpel_x_qn) {
+ av1_convolve_x_sr_c(src, src_stride, dst, dst_stride, w, h,
+ filter_params_x, filter_params_y, subpel_x_qn,
+ subpel_y_qn, conv_params);
+ return;
+ } else if (subpel_y_qn) {
+ av1_convolve_y_sr_c(src, src_stride, dst, dst_stride, w, h,
+ filter_params_x, filter_params_y, subpel_x_qn,
+ subpel_y_qn, conv_params);
+ return;
}
}