reconinter_enc: quiet -Wstringop-overflow warnings w/gcc-11 in av1_build_inter_predictors_for_planes_single_buf av1_build_wedge_inter_predictor_from_buf the array parameters' size may vary based on the number of planes; replace [3] w/[] and a size comment Change-Id: I7e9e87bffca4b67ff1e88295383dbf49f5c43a22 (cherry picked from commit 3a862d3d205b85d13e2da0d6dc60d19e81fa39d7)
diff --git a/av1/encoder/reconinter_enc.c b/av1/encoder/reconinter_enc.c index ca939de..5711243 100644 --- a/av1/encoder/reconinter_enc.c +++ b/av1/encoder/reconinter_enc.c
@@ -275,7 +275,7 @@ void av1_build_inter_predictors_for_planes_single_buf( MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, int ref, - uint8_t *ext_dst[3], int ext_dst_stride[3]) { + uint8_t *ext_dst[], int ext_dst_stride[]) { assert(bsize < BLOCK_SIZES_ALL); const MB_MODE_INFO *mi = xd->mi[0]; const int mi_row = xd->mi_row; @@ -402,10 +402,10 @@ void av1_build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, - uint8_t *ext_dst0[3], - int ext_dst_stride0[3], - uint8_t *ext_dst1[3], - int ext_dst_stride1[3]) { + uint8_t *ext_dst0[], + int ext_dst_stride0[], + uint8_t *ext_dst1[], + int ext_dst_stride1[]) { int plane; assert(bsize < BLOCK_SIZES_ALL); for (plane = plane_from; plane <= plane_to; ++plane) {
diff --git a/av1/encoder/reconinter_enc.h b/av1/encoder/reconinter_enc.h index 468e32b..5d32545 100644 --- a/av1/encoder/reconinter_enc.h +++ b/av1/encoder/reconinter_enc.h
@@ -61,16 +61,18 @@ void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd); +// |ext_dst*| are indexed from |plane_from| to |plane_to| inclusive. void av1_build_inter_predictors_for_planes_single_buf( MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, int ref, - uint8_t *ext_dst[3], int ext_dst_stride[3]); + uint8_t *ext_dst[], int ext_dst_stride[]); +// |ext_dst*| are indexed from |plane_from| to |plane_to| inclusive. void av1_build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, - uint8_t *ext_dst0[3], - int ext_dst_stride0[3], - uint8_t *ext_dst1[3], - int ext_dst_stride1[3]); + uint8_t *ext_dst0[], + int ext_dst_stride0[], + uint8_t *ext_dst1[], + int ext_dst_stride1[]); #ifdef __cplusplus } // extern "C"