mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
[AArch64] Add :libyuv_sve library in preparation for SVE kernels
This commit only adds the bare minimum to get the new library building through GN, the actual content of row_sve.cc is empty for now until we start porting some kernels across. Bug: libyuv:973 Change-Id: Ibdf4fc258761f3e507d700f27a405099c667ac75 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5424738 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
f2e78e1304
commit
9a8be20def
32
BUILD.gn
32
BUILD.gn
@ -35,6 +35,9 @@ config("libyuv_config") {
|
|||||||
if (!libyuv_use_neon) {
|
if (!libyuv_use_neon) {
|
||||||
defines += [ "LIBYUV_DISABLE_NEON" ]
|
defines += [ "LIBYUV_DISABLE_NEON" ]
|
||||||
}
|
}
|
||||||
|
if (!libyuv_use_sve) {
|
||||||
|
defines += [ "LIBYUV_DISABLE_SVE" ]
|
||||||
|
}
|
||||||
if (libyuv_disable_rvv) {
|
if (libyuv_disable_rvv) {
|
||||||
defines += [ "LIBYUV_DISABLE_RVV" ]
|
defines += [ "LIBYUV_DISABLE_RVV" ]
|
||||||
}
|
}
|
||||||
@ -78,6 +81,10 @@ group("libyuv") {
|
|||||||
deps += [ ":libyuv_neon" ]
|
deps += [ ":libyuv_neon" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (libyuv_use_sve) {
|
||||||
|
deps += [ ":libyuv_sve" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (libyuv_use_msa) {
|
if (libyuv_use_msa) {
|
||||||
deps += [ ":libyuv_msa" ]
|
deps += [ ":libyuv_msa" ]
|
||||||
}
|
}
|
||||||
@ -241,6 +248,31 @@ if (libyuv_use_neon) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (libyuv_use_sve) {
|
||||||
|
static_library("libyuv_sve") {
|
||||||
|
sources = [
|
||||||
|
"source/row_sve.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [ ":libyuv_internal" ]
|
||||||
|
|
||||||
|
public_configs = [ ":libyuv_config" ]
|
||||||
|
|
||||||
|
# Always enable optimization for Release and NaCl builds (to workaround
|
||||||
|
# crbug.com/538243).
|
||||||
|
if (!is_debug) {
|
||||||
|
configs -= [ "//build/config/compiler:default_optimization" ]
|
||||||
|
|
||||||
|
# Enable optimize for speed (-O2) over size (-Os).
|
||||||
|
# TODO(fbarchard): Consider optimize_speed which is O3.
|
||||||
|
configs += [ "//build/config/compiler:optimize_max" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# SVE2 is an Armv9-A feature.
|
||||||
|
cflags = [ "-march=armv9-a+sve2" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (libyuv_use_msa) {
|
if (libyuv_use_msa) {
|
||||||
static_library("libyuv_msa") {
|
static_library("libyuv_msa") {
|
||||||
sources = [
|
sources = [
|
||||||
|
|||||||
@ -18,6 +18,7 @@ declare_args() {
|
|||||||
libyuv_use_neon =
|
libyuv_use_neon =
|
||||||
current_cpu == "arm64" ||
|
current_cpu == "arm64" ||
|
||||||
(current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
|
(current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
|
||||||
|
libyuv_use_sve = current_cpu == "arm64"
|
||||||
libyuv_use_msa =
|
libyuv_use_msa =
|
||||||
(current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa
|
(current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa
|
||||||
libyuv_use_mmi =
|
libyuv_use_mmi =
|
||||||
|
|||||||
27
source/row_sve.cc
Normal file
27
source/row_sve.cc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024 The LibYuv Project Authors. All rights reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "libyuv/row.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace libyuv {
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(LIBYUV_DISABLE_SVE) && defined(__aarch64__)
|
||||||
|
|
||||||
|
// TODO(libyuv:973) Port kernels to SVE/SVE2.
|
||||||
|
|
||||||
|
#endif // !defined(LIBYUV_DISABLE_SVE) && defined(__aarch64__)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
} // namespace libyuv
|
||||||
|
#endif
|
||||||
Loading…
x
Reference in New Issue
Block a user