[FFmpeg-devel] [PATCH v2 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

Nuo Mi nuomi2021 at gmail.com
Fri May 31 15:02:53 EEST 2024


On Fri, May 31, 2024 at 2:29 AM Ronald S. Bultje <rsbultje at gmail.com> wrote:

> Hi,
>
> On Thu, May 30, 2024 at 12:28 PM <toqsxw at outlook.com> wrote:
>
> > From: Wu Jianhua <toqsxw at outlook.com>
> >
> > Some tests fails with certain seeds
> >
> > tests/checkasm/checkasm 2325607578 --test=vvc_alf
> > checkasm: using random seed 2325607578
> > AVX2:
> >     vvc_alf_filter_luma_120x20_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x24_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x28_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x32_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x36_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x40_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x44_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x48_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x52_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x56_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x60_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x64_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x68_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x72_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x76_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x80_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x84_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x88_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x92_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x96_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x100_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x104_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x108_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x112_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x116_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x120_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x124_12_avx2 (vvc_alf.c:104)
> >     vvc_alf_filter_luma_120x128_12_avx2 (vvc_alf.c:104)
> >   - vvc_alf.alf_filter   [FAILED]
> >   - vvc_alf.alf_classify [OK]
> > checkasm: 28 of 9216 tests have failed
> >
> > Reported-by: James Almer <jamrial at gmail.com>
> > Signed-off-by: Wu Jianhua <toqsxw at outlook.com>
> > ---
> >  libavcodec/x86/vvc/vvc_alf.asm | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/x86/vvc/vvc_alf.asm
> > b/libavcodec/x86/vvc/vvc_alf.asm
> > index 71e821c27b..f7b3e2a6cc 100644
> > --- a/libavcodec/x86/vvc/vvc_alf.asm
> > +++ b/libavcodec/x86/vvc/vvc_alf.asm
> > @@ -356,7 +356,8 @@ SECTION .text
> >
> >      FILTER_VB         xq
> >
> > -    paddw             m0, m2
> > +    ; sum += curr
> > +    paddsw             m0, m2
> >
> >      ; clip to pixel
> >      CLIPW             m0, m14, m15
> > --
> > 2.44.0.windows.1
> >
>
> LGTM.
>
Applied,
Thank you, Jianhua, Andreas, and Ronald.

>
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list