diff mbox series

[FFmpeg-devel] libavcodec/hevc: add epel_put_pixels which same as qpel in arm

Message ID tencent_D7EB1834C64A70AFECB63C86E56F2197EC07@qq.com
State New
Headers show
Series [FFmpeg-devel] libavcodec/hevc: add epel_put_pixels which same as qpel in arm | 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

徐福隆 Feb. 26, 2023, 11:13 a.m. UTC
---
 libavcodec/arm/hevcdsp_init_neon.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

Comments

Martin Storsjö Feb. 28, 2023, 11:40 a.m. UTC | #1
On Sun, 26 Feb 2023, xufuji456 wrote:

> ---
> libavcodec/arm/hevcdsp_init_neon.c | 21 +++++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/arm/hevcdsp_init_neon.c b/libavcodec/arm/hevcdsp_init_neon.c
> index 8094e6c62e..4063acaf51 100644
> --- a/libavcodec/arm/hevcdsp_init_neon.c
> +++ b/libavcodec/arm/hevcdsp_init_neon.c
> @@ -119,7 +119,7 @@ QPEL_FUNC(ff_hevc_put_qpel_h3v3_neon_8);
>
> #define QPEL_FUNC_UW_PIX(name) \
>     void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
> -                                   int height, intptr_t mx, intptr_t my, int width);
> +                                   int height, intptr_t mx, intptr_t my, int width)
> QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w4_neon_8);
> QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w8_neon_8);
> QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w16_neon_8);
> @@ -131,7 +131,7 @@ QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w64_neon_8);
>
> #define QPEL_FUNC_UW(name) \
>     void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
> -              int width, int height, const int16_t* src2, ptrdiff_t src2stride);
> +              int width, int height, const int16_t* src2, ptrdiff_t src2stride)

These changes look like cosmetic changes unrelated to the rest; please 
split such changes to a separate patch.

> QPEL_FUNC_UW(ff_hevc_put_qpel_uw_pixels_neon_8);
> QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v1_neon_8);
> QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v2_neon_8);
> @@ -293,6 +293,17 @@ av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
>         c->put_hevc_qpel[8][0][0]  = ff_hevc_put_pixels_w48_neon_8;
>         c->put_hevc_qpel[9][0][0]  = ff_hevc_put_pixels_w64_neon_8;
>
> +        c->put_hevc_epel[0][0][0]  = ff_hevc_put_pixels_w2_neon_8;
> +        c->put_hevc_epel[1][0][0]  = ff_hevc_put_pixels_w4_neon_8;
> +        c->put_hevc_epel[2][0][0]  = ff_hevc_put_pixels_w6_neon_8;
> +        c->put_hevc_epel[3][0][0]  = ff_hevc_put_pixels_w8_neon_8;
> +        c->put_hevc_epel[4][0][0]  = ff_hevc_put_pixels_w12_neon_8;
> +        c->put_hevc_epel[5][0][0]  = ff_hevc_put_pixels_w16_neon_8;
> +        c->put_hevc_epel[6][0][0]  = ff_hevc_put_pixels_w24_neon_8;
> +        c->put_hevc_epel[7][0][0]  = ff_hevc_put_pixels_w32_neon_8;
> +        c->put_hevc_epel[8][0][0]  = ff_hevc_put_pixels_w48_neon_8;
> +        c->put_hevc_epel[9][0][0]  = ff_hevc_put_pixels_w64_neon_8;
> +
>         c->put_hevc_qpel_uni[1][0][0]  = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
>         c->put_hevc_qpel_uni[3][0][0]  = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
>         c->put_hevc_qpel_uni[5][0][0]  = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
> @@ -300,6 +311,12 @@ av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
>         c->put_hevc_qpel_uni[7][0][0]  = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
>         c->put_hevc_qpel_uni[8][0][0]  = ff_hevc_put_qpel_uw_pixels_w48_neon_8;
>         c->put_hevc_qpel_uni[9][0][0]  = ff_hevc_put_qpel_uw_pixels_w64_neon_8;
> +
> +        c->put_hevc_epel_uni[1][0][0]  = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
> +        c->put_hevc_epel_uni[3][0][0]  = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
> +        c->put_hevc_epel_uni[5][0][0]  = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
> +        c->put_hevc_epel_uni[6][0][0]  = ff_hevc_put_qpel_uw_pixels_w24_neon_8;
> +        c->put_hevc_epel_uni[7][0][0]  = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
>     }

This change breaks "make fate-hevc" and can't be applied.

// Martin
徐福隆 Feb. 28, 2023, 12:13 p.m. UTC | #2
Thank you for your advice.
I will split it, and submit a new patch.
On the other hand, I will run "make fate-hevc" to check over.




------------------ Original ------------------
From:                                                                                                                        "Martin Storsj�"                                                                                    <martin@martin.st&gt;;
Date:&nbsp;Tue, Feb 28, 2023 07:40 PM
To:&nbsp;"FFmpeg development discussions and patches"<ffmpeg-devel@ffmpeg.org&gt;;
Cc:&nbsp;"徐福隆"<839789740@qq.com&gt;;
Subject:&nbsp;Re: [FFmpeg-devel] [PATCH] libavcodec/hevc: add epel_put_pixels which same as qpel in arm



On Sun, 26 Feb 2023, xufuji456 wrote:

&gt; ---
&gt; libavcodec/arm/hevcdsp_init_neon.c | 21 +++++++++++++++++++--
&gt; 1 file changed, 19 insertions(+), 2 deletions(-)
&gt;
&gt; diff --git a/libavcodec/arm/hevcdsp_init_neon.c b/libavcodec/arm/hevcdsp_init_neon.c
&gt; index 8094e6c62e..4063acaf51 100644
&gt; --- a/libavcodec/arm/hevcdsp_init_neon.c
&gt; +++ b/libavcodec/arm/hevcdsp_init_neon.c
&gt; @@ -119,7 +119,7 @@ QPEL_FUNC(ff_hevc_put_qpel_h3v3_neon_8);
&gt;
&gt; #define QPEL_FUNC_UW_PIX(name) \
&gt;&nbsp;&nbsp;&nbsp;&nbsp; void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int height, intptr_t mx, intptr_t my, int width);
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int height, intptr_t mx, intptr_t my, int width)
&gt; QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w4_neon_8);
&gt; QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w8_neon_8);
&gt; QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w16_neon_8);
&gt; @@ -131,7 +131,7 @@ QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w64_neon_8);
&gt;
&gt; #define QPEL_FUNC_UW(name) \
&gt;&nbsp;&nbsp;&nbsp;&nbsp; void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int width, int height, const int16_t* src2, ptrdiff_t src2stride);
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int width, int height, const int16_t* src2, ptrdiff_t src2stride)

These changes look like cosmetic changes unrelated to the rest; please 
split such changes to a separate patch.

&gt; QPEL_FUNC_UW(ff_hevc_put_qpel_uw_pixels_neon_8);
&gt; QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v1_neon_8);
&gt; QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v2_neon_8);
&gt; @@ -293,6 +293,17 @@ av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel[8][0][0]&nbsp; = ff_hevc_put_pixels_w48_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel[9][0][0]&nbsp; = ff_hevc_put_pixels_w64_neon_8;
&gt;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[0][0][0]&nbsp; = ff_hevc_put_pixels_w2_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[1][0][0]&nbsp; = ff_hevc_put_pixels_w4_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[2][0][0]&nbsp; = ff_hevc_put_pixels_w6_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[3][0][0]&nbsp; = ff_hevc_put_pixels_w8_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[4][0][0]&nbsp; = ff_hevc_put_pixels_w12_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[5][0][0]&nbsp; = ff_hevc_put_pixels_w16_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[6][0][0]&nbsp; = ff_hevc_put_pixels_w24_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[7][0][0]&nbsp; = ff_hevc_put_pixels_w32_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[8][0][0]&nbsp; = ff_hevc_put_pixels_w48_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel[9][0][0]&nbsp; = ff_hevc_put_pixels_w64_neon_8;
&gt; +
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[1][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[3][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[5][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
&gt; @@ -300,6 +311,12 @@ av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[7][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[8][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w48_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_qpel_uni[9][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w64_neon_8;
&gt; +
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel_uni[1][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel_uni[3][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel_uni[5][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel_uni[6][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w24_neon_8;
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c-&gt;put_hevc_epel_uni[7][0][0]&nbsp; = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
&gt;&nbsp;&nbsp;&nbsp;&nbsp; }

This change breaks "make fate-hevc" and can't be applied.

// Martin
diff mbox series

Patch

diff --git a/libavcodec/arm/hevcdsp_init_neon.c b/libavcodec/arm/hevcdsp_init_neon.c
index 8094e6c62e..4063acaf51 100644
--- a/libavcodec/arm/hevcdsp_init_neon.c
+++ b/libavcodec/arm/hevcdsp_init_neon.c
@@ -119,7 +119,7 @@  QPEL_FUNC(ff_hevc_put_qpel_h3v3_neon_8);
 
 #define QPEL_FUNC_UW_PIX(name) \
     void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
-                                   int height, intptr_t mx, intptr_t my, int width);
+                                   int height, intptr_t mx, intptr_t my, int width)
 QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w4_neon_8);
 QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w8_neon_8);
 QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w16_neon_8);
@@ -131,7 +131,7 @@  QPEL_FUNC_UW_PIX(ff_hevc_put_qpel_uw_pixels_w64_neon_8);
 
 #define QPEL_FUNC_UW(name) \
     void name(uint8_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, \
-              int width, int height, const int16_t* src2, ptrdiff_t src2stride);
+              int width, int height, const int16_t* src2, ptrdiff_t src2stride)
 QPEL_FUNC_UW(ff_hevc_put_qpel_uw_pixels_neon_8);
 QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v1_neon_8);
 QPEL_FUNC_UW(ff_hevc_put_qpel_uw_v2_neon_8);
@@ -293,6 +293,17 @@  av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
         c->put_hevc_qpel[8][0][0]  = ff_hevc_put_pixels_w48_neon_8;
         c->put_hevc_qpel[9][0][0]  = ff_hevc_put_pixels_w64_neon_8;
 
+        c->put_hevc_epel[0][0][0]  = ff_hevc_put_pixels_w2_neon_8;
+        c->put_hevc_epel[1][0][0]  = ff_hevc_put_pixels_w4_neon_8;
+        c->put_hevc_epel[2][0][0]  = ff_hevc_put_pixels_w6_neon_8;
+        c->put_hevc_epel[3][0][0]  = ff_hevc_put_pixels_w8_neon_8;
+        c->put_hevc_epel[4][0][0]  = ff_hevc_put_pixels_w12_neon_8;
+        c->put_hevc_epel[5][0][0]  = ff_hevc_put_pixels_w16_neon_8;
+        c->put_hevc_epel[6][0][0]  = ff_hevc_put_pixels_w24_neon_8;
+        c->put_hevc_epel[7][0][0]  = ff_hevc_put_pixels_w32_neon_8;
+        c->put_hevc_epel[8][0][0]  = ff_hevc_put_pixels_w48_neon_8;
+        c->put_hevc_epel[9][0][0]  = ff_hevc_put_pixels_w64_neon_8;
+
         c->put_hevc_qpel_uni[1][0][0]  = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
         c->put_hevc_qpel_uni[3][0][0]  = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
         c->put_hevc_qpel_uni[5][0][0]  = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
@@ -300,6 +311,12 @@  av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
         c->put_hevc_qpel_uni[7][0][0]  = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
         c->put_hevc_qpel_uni[8][0][0]  = ff_hevc_put_qpel_uw_pixels_w48_neon_8;
         c->put_hevc_qpel_uni[9][0][0]  = ff_hevc_put_qpel_uw_pixels_w64_neon_8;
+
+        c->put_hevc_epel_uni[1][0][0]  = ff_hevc_put_qpel_uw_pixels_w4_neon_8;
+        c->put_hevc_epel_uni[3][0][0]  = ff_hevc_put_qpel_uw_pixels_w8_neon_8;
+        c->put_hevc_epel_uni[5][0][0]  = ff_hevc_put_qpel_uw_pixels_w16_neon_8;
+        c->put_hevc_epel_uni[6][0][0]  = ff_hevc_put_qpel_uw_pixels_w24_neon_8;
+        c->put_hevc_epel_uni[7][0][0]  = ff_hevc_put_qpel_uw_pixels_w32_neon_8;
     }
 
     if (bit_depth == 10) {