diff mbox series

[FFmpeg-devel,1/2] lavc/aarch64: Assign callback with function

Message ID 20220629082440.119841-2-hum@semihalf.com
State Accepted
Commit eb7ab3928f6a82030cd030fda55579cdee252159
Headers show
Series lavc/aarch64: Provide neon implementations | 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

Hubert Mazur June 29, 2022, 8:24 a.m. UTC
Assign c->sad[0] callback with already existing neon implementation
of pix_abs16 function.

Signed-off-by: Hubert Mazur <hum@semihalf.com>
---
 libavcodec/aarch64/me_cmp_init_aarch64.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Martin Storsjö July 11, 2022, 8:58 p.m. UTC | #1
On Wed, 29 Jun 2022, Hubert Mazur wrote:

> Assign c->sad[0] callback with already existing neon implementation
> of pix_abs16 function.
>
> Signed-off-by: Hubert Mazur <hum@semihalf.com>
> ---
> libavcodec/aarch64/me_cmp_init_aarch64.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/aarch64/me_cmp_init_aarch64.c b/libavcodec/aarch64/me_cmp_init_aarch64.c
> index 9fb63e9973..bec9148a1a 100644
> --- a/libavcodec/aarch64/me_cmp_init_aarch64.c
> +++ b/libavcodec/aarch64/me_cmp_init_aarch64.c
> @@ -35,5 +35,7 @@ av_cold void ff_me_cmp_init_aarch64(MECmpContext *c, AVCodecContext *avctx)
>     if (have_neon(cpu_flags)) {
>         c->pix_abs[0][0] = ff_pix_abs16_neon;
>         c->pix_abs[0][3] = ff_pix_abs16_xy2_neon;
> +
> +        c->sad[0] = ff_pix_abs16_neon;
>     }
> }
> -- 
> 2.34.1

LGTM, although I wouldn't use the word "callback" for these. I'll push 
this with a reworded commit message.

// Martin
diff mbox series

Patch

diff --git a/libavcodec/aarch64/me_cmp_init_aarch64.c b/libavcodec/aarch64/me_cmp_init_aarch64.c
index 9fb63e9973..bec9148a1a 100644
--- a/libavcodec/aarch64/me_cmp_init_aarch64.c
+++ b/libavcodec/aarch64/me_cmp_init_aarch64.c
@@ -35,5 +35,7 @@  av_cold void ff_me_cmp_init_aarch64(MECmpContext *c, AVCodecContext *avctx)
     if (have_neon(cpu_flags)) {
         c->pix_abs[0][0] = ff_pix_abs16_neon;
         c->pix_abs[0][3] = ff_pix_abs16_xy2_neon;
+
+        c->sad[0] = ff_pix_abs16_neon;
     }
 }