diff mbox series

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

Message ID OSZP286MB2173FC26DC3681E048C71D6ECAF32@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM
State Accepted
Commit 09d3370c2884f4535d738e9baea008738cfb602b
Headers show
Series [FFmpeg-devel,v2,1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Wu Jianhua May 30, 2024, 4:28 p.m. UTC
From: Wu Jianhua <toqsxw@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@gmail.com>
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
---
 libavcodec/x86/vvc/vvc_alf.asm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ronald S. Bultje May 30, 2024, 6:29 p.m. UTC | #1
Hi,

On Thu, May 30, 2024 at 12:28 PM <toqsxw@outlook.com> wrote:

> From: Wu Jianhua <toqsxw@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@gmail.com>
> Signed-off-by: Wu Jianhua <toqsxw@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.

Ronald
Andreas Rheinhardt May 30, 2024, 6:33 p.m. UTC | #2
toqsxw@outlook.com:
> From: Wu Jianhua <toqsxw@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@gmail.com>
> Signed-off-by: Wu Jianhua <toqsxw@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

And can I get an answer to the question of whether the issue is present
when used by the actual decoder and not only the checkasm test?

- Andreas
Wu Jianhua May 30, 2024, 7:45 p.m. UTC | #3
Andreas Rheinhardt:
> 发件人: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> 代表 Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> 发送时间: 2024年5月30日 11:33
> 收件人: ffmpeg-devel@ffmpeg.org
> 主题: Re: [FFmpeg-devel] [PATCH v2 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow
> 
> toqsxw@outlook.com:
> > From: Wu Jianhua <toqsxw@outlook.com>
> >
> > Some tests fails with certain seeds
> >
> > tests/checkasm/checkasm 2325607578 --test=vvc_alf
> > checkasm: using random seed 2325607578
> 

> And can I get an answer to the question of whether the issue is present
> when used by the actual decoder and not only the checkasm test?
> 
> - Andreas
> 

Sure. This issue hasn't occurred in the actual decoding of our tests but only in the checksum test, for the filter is generated randomly.

Thanks,
Jianhua
Ronald S. Bultje May 30, 2024, 8:49 p.m. UTC | #4
Hi Andreas,

On Thu, May 30, 2024 at 2:33 PM Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:

> toqsxw@outlook.com:
> > From: Wu Jianhua <toqsxw@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@gmail.com>
> > Signed-off-by: Wu Jianhua <toqsxw@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
>
> And can I get an answer to the question of whether the issue is present
> when used by the actual decoder and not only the checkasm test?
>

From my reading of the source code, this could happen in a crafted (e.g.
fuzzed) stream.

Ronald
Nuo Mi May 31, 2024, 11:54 a.m. UTC | #5
On Fri, May 31, 2024 at 4:49 AM Ronald S. Bultje <rsbultje@gmail.com> wrote:

> Hi Andreas,
>
> On Thu, May 30, 2024 at 2:33 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
> > toqsxw@outlook.com:
> > > From: Wu Jianhua <toqsxw@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@gmail.com>
> > > Signed-off-by: Wu Jianhua <toqsxw@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
> >
> > And can I get an answer to the question of whether the issue is present
> > when used by the actual decoder and not only the checkasm test?
> >
>
> From my reading of the source code, this could happen in a crafted (e.g.
> fuzzed) stream.
>
Yes, the test case is valid. So even if the normal clips don't have this
issue, some clips might.

>
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
Nuo Mi May 31, 2024, 12:02 p.m. UTC | #6
On Fri, May 31, 2024 at 2:29 AM Ronald S. Bultje <rsbultje@gmail.com> wrote:

> Hi,
>
> On Thu, May 30, 2024 at 12:28 PM <toqsxw@outlook.com> wrote:
>
> > From: Wu Jianhua <toqsxw@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@gmail.com>
> > Signed-off-by: Wu Jianhua <toqsxw@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@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
diff mbox series

Patch

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