diff mbox series

[FFmpeg-devel,10/15] avcodec/x86/diracdsp_init: Reuse macro

Message ID 20210219075022.2445161-10-andreas.rheinhardt@gmail.com
State Accepted
Commit 7825cc392a2febbe91a1321a522dbdaa49048ae7
Headers show
Series [FFmpeg-devel,01/15] avformat/asf: Move ff_asf_audio_conceal_none to its only user
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 19, 2021, 7:50 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/x86/diracdsp_init.c | 38 ++--------------------------------
 1 file changed, 2 insertions(+), 36 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
index 8633c66743..8baacf3129 100644
--- a/libavcodec/x86/diracdsp_init.c
+++ b/libavcodec/x86/diracdsp_init.c
@@ -91,42 +91,8 @@  DIRAC_PIXOP(put, mmx)
 DIRAC_PIXOP(avg, mmx)
 DIRAC_PIXOP(avg, mmxext)
 
-static void put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5],
-                                    int stride, int h)
-{
-    if (h&3)
-        ff_put_dirac_pixels16_c(dst, src, stride, h);
-    else
-        ff_put_pixels16_sse2(dst, src[0], stride, h);
-}
-static void avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5],
-                                    int stride, int h)
-{
-    if (h&3)
-        ff_avg_dirac_pixels16_c(dst, src, stride, h);
-    else
-        ff_avg_pixels16_sse2(dst, src[0], stride, h);
-}
-static void put_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5],
-                                    int stride, int h)
-{
-    if (h&3) {
-        ff_put_dirac_pixels32_c(dst, src, stride, h);
-    } else {
-        ff_put_pixels16_sse2(dst   , src[0]   , stride, h);
-        ff_put_pixels16_sse2(dst+16, src[0]+16, stride, h);
-    }
-}
-static void avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5],
-                                    int stride, int h)
-{
-    if (h&3) {
-        ff_avg_dirac_pixels32_c(dst, src, stride, h);
-    } else {
-        ff_avg_pixels16_sse2(dst   , src[0]   , stride, h);
-        ff_avg_pixels16_sse2(dst+16, src[0]+16, stride, h);
-    }
-}
+DIRAC_PIXOP(put, sse2)
+DIRAC_PIXOP(avg, sse2)
 
 #if !ARCH_X86_64
 HPEL_FILTER(8, mmx)