mirror of https://code.videolan.org/videolan/vlc
deinterlace: move AArch64 AdvSIMD code to backend module
This commit is contained in:
parent
8e197aa3a2
commit
dccbcb9bac
|
@ -31,6 +31,7 @@ include hw/d3d11/Makefile.am
|
||||||
include hw/vaapi/Makefile.am
|
include hw/vaapi/Makefile.am
|
||||||
include hw/vdpau/Makefile.am
|
include hw/vdpau/Makefile.am
|
||||||
include hw/mmal/Makefile.am
|
include hw/mmal/Makefile.am
|
||||||
|
include isa/aarch64/Makefile.am
|
||||||
include isa/arm/Makefile.am
|
include isa/arm/Makefile.am
|
||||||
include isa/riscv/Makefile.am
|
include isa/riscv/Makefile.am
|
||||||
include keystore/Makefile.am
|
include keystore/Makefile.am
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
aarch64dir = $(pluginsdir)/aarch64
|
||||||
|
aarch64_LTLIBRARIES =
|
||||||
|
|
||||||
|
libdeinterlace_aarch64_plugin_la_SOURCES = \
|
||||||
|
isa/aarch64/simd/deinterlace.c isa/aarch64/simd/merge.S
|
||||||
|
|
||||||
|
if HAVE_ARM64
|
||||||
|
aarch64_LTLIBRARIES += \
|
||||||
|
libdeinterlace_aarch64_plugin.la
|
||||||
|
endif
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*****************************************************************************
|
||||||
|
* deinterlace.c: AArch64 AdvSIMD deinterlacing functions
|
||||||
|
*****************************************************************************
|
||||||
|
* Copyright (C) 2022 Rémi Denis-Courmont
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <vlc_common.h>
|
||||||
|
#include <vlc_cpu.h>
|
||||||
|
#include <vlc_plugin.h>
|
||||||
|
#include "../../../video_filter/deinterlace/merge.h"
|
||||||
|
|
||||||
|
void merge8_arm64(void *, const void *, const void *, size_t);
|
||||||
|
void merge16_arm64(void *, const void *, const void *, size_t);
|
||||||
|
|
||||||
|
static void Probe(void *data)
|
||||||
|
{
|
||||||
|
if (vlc_CPU_ARM_NEON()) {
|
||||||
|
struct deinterlace_functions *const f = data;
|
||||||
|
|
||||||
|
f->merges[0] = merge8_arm64;
|
||||||
|
f->merges[1] = merge16_arm64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vlc_module_begin()
|
||||||
|
set_description("AArch64 AvdSIMD optimisation for deinterlacing")
|
||||||
|
set_cpu_funcs("deinterlace functions", Probe, 10)
|
||||||
|
vlc_module_end()
|
|
@ -1,5 +1,5 @@
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// merge_arm64.S : ARM64 NEON mean
|
// merge.S : AArch64 Advanced SIMD mean
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// Copyright (C) 2009-2012 Rémi Denis-Courmont
|
// Copyright (C) 2009-2012 Rémi Denis-Courmont
|
||||||
// Copyright (C) 2016- Janne Grunau
|
// Copyright (C) 2016- Janne Grunau
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
// Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
// Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||||
//****************************************************************************/
|
//****************************************************************************/
|
||||||
|
|
||||||
#include "../../isa/arm/asm.S"
|
#include "../../arm/asm.S"
|
||||||
|
|
||||||
.arch armv8-a+simd
|
.arch armv8-a+simd
|
||||||
.text
|
.text
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
// NOTE: Offset and pitch must be multiple of 16-bytes in VLC.
|
// NOTE: Offset and pitch must be multiple of 16-bytes in VLC.
|
||||||
function merge8_arm64_neon
|
function merge8_arm64
|
||||||
bti c
|
bti c
|
||||||
ands x5, SIZE, #~63
|
ands x5, SIZE, #~63
|
||||||
b.eq 2f
|
b.eq 2f
|
||||||
|
@ -69,7 +69,7 @@ function merge8_arm64_neon
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
function merge16_arm64_neon
|
function merge16_arm64
|
||||||
bti c
|
bti c
|
||||||
ands x5, SIZE, #~63
|
ands x5, SIZE, #~63
|
||||||
b.eq 2f
|
b.eq 2f
|
|
@ -183,10 +183,6 @@ if HAVE_NEON
|
||||||
libdeinterlace_plugin_la_SOURCES += video_filter/deinterlace/merge_arm.S
|
libdeinterlace_plugin_la_SOURCES += video_filter/deinterlace/merge_arm.S
|
||||||
libdeinterlace_plugin_la_CPPFLAGS += -DCAN_COMPILE_ARM
|
libdeinterlace_plugin_la_CPPFLAGS += -DCAN_COMPILE_ARM
|
||||||
endif
|
endif
|
||||||
if HAVE_ARM64
|
|
||||||
libdeinterlace_plugin_la_SOURCES += video_filter/deinterlace/merge_arm64.S
|
|
||||||
libdeinterlace_plugin_la_CPPFLAGS += -DCAN_COMPILE_ARM64
|
|
||||||
endif
|
|
||||||
if HAVE_SVE
|
if HAVE_SVE
|
||||||
libdeinterlace_plugin_la_SOURCES += video_filter/deinterlace/merge_sve.S
|
libdeinterlace_plugin_la_SOURCES += video_filter/deinterlace/merge_sve.S
|
||||||
libdeinterlace_plugin_la_CPPFLAGS += -DCAN_COMPILE_SVE
|
libdeinterlace_plugin_la_CPPFLAGS += -DCAN_COMPILE_SVE
|
||||||
|
|
|
@ -577,11 +577,6 @@ notsupp:
|
||||||
if( vlc_CPU_ARM_SVE() )
|
if( vlc_CPU_ARM_SVE() )
|
||||||
p_sys->pf_merge = pixel_size == 1 ? merge8_arm_sve : merge16_arm_sve;
|
p_sys->pf_merge = pixel_size == 1 ? merge8_arm_sve : merge16_arm_sve;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
#if defined(CAN_COMPILE_ARM64)
|
|
||||||
if( vlc_CPU_ARM_NEON() )
|
|
||||||
p_sys->pf_merge = pixel_size == 1 ? merge8_arm64_neon : merge16_arm64_neon;
|
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
vlc_CPU_functions_init_once("deinterlace functions", &funcs);
|
vlc_CPU_functions_init_once("deinterlace functions", &funcs);
|
||||||
|
|
|
@ -176,15 +176,6 @@ void merge8_armv6 (void *, const void *, const void *, size_t);
|
||||||
void merge16_armv6 (void *, const void *, const void *, size_t);
|
void merge16_armv6 (void *, const void *, const void *, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CAN_COMPILE_ARM64)
|
|
||||||
/**
|
|
||||||
* ARM64 NEON routine to blend pixels from two picture lines.
|
|
||||||
*/
|
|
||||||
void merge8_arm64_neon (void *, const void *, const void *, size_t);
|
|
||||||
void merge16_arm64_neon (void *, const void *, const void *, size_t);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void merge8_arm_sve(void *, const void *, const void *, size_t);
|
void merge8_arm_sve(void *, const void *, const void *, size_t);
|
||||||
void merge16_arm_sve(void *, const void *, const void *, size_t);
|
void merge16_arm_sve(void *, const void *, const void *, size_t);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue