[FFmpeg-devel] [PATCH 3/4] checkasm: hevc_pel: Use helpers for checking for writes out of bounds
Martin Storsjö
martin at martin.st
Tue Apr 1 12:35:16 EEST 2025
On Wed, 26 Mar 2025, Martin Storsjö wrote:
> This allows catching whether the functions write outside of
> the designated rectangle, and if run with "checkasm -v", it also
> prints out on which side of the rectangle the overwrite was.
> ---
> tests/checkasm/hevc_pel.c | 157 ++++++++++++++++++++++----------------
> 1 file changed, 90 insertions(+), 67 deletions(-)
This patch exposes existing issues in the Loongson HEVC simd; running with
"checkasm --test=hevc_pel -v" after applying these patches, shows the
following errors:
LSX:
- hevc_pel.qpel [OK]
- hevc_pel.qpel_uni [OK]
- hevc_pel.qpel_uni_w [OK]
put_hevc_pel_bi_pixels12_8_lsx (src/tests/checkasm/hevc_pel.c:272)
dst (12x12):
overwrite below
- hevc_pel.qpel_bi [FAILED]
- hevc_pel.epel [OK]
put_hevc_epel_uni_v24_8_lsx (src/tests/checkasm/hevc_pel.c:433)
dst (24x24):
overwrite below
put_hevc_epel_uni_hv12_8_lsx (src/tests/checkasm/hevc_pel.c:433)
dst (12x12):
overwrite below
- hevc_pel.epel_uni [FAILED]
- hevc_pel.epel_uni_w [OK]
put_hevc_epel_bi_hv6_8_lsx (src/tests/checkasm/hevc_pel.c:545)
dst (6x6):
overwrite below
- hevc_pel.epel_bi [FAILED]
LASX:
- hevc_pel.qpel_uni [OK]
- hevc_pel.qpel_uni_w [OK]
- hevc_pel.epel_uni_w [OK]
- hevc_pel.epel_bi [OK]
checkasm: 4 of 231 tests have failed
So the functions seem to produce more output rows than requested, for
"uneven" heights like 6, 12 or 24 pixels.
Can someone from Loongson please have a look at this?
We don't seem to have any Loongson instances on fate, so can I go ahead
and push this, without waiting for the Loongson assembly to be fixed? We
do have some on patchwork though, so I guess that'll make patchwork noisy
for everybody else until it is fixed, so I guess I'll have to hold off of
this patch until it is fixed.
// Martin
More information about the ffmpeg-devel
mailing list