aboutsummaryrefslogtreecommitdiff
path: root/files/BUILD.gn
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2022-08-02 13:26:21 -0700
committerVignesh Venkatasubramanian <vigneshv@google.com>2022-08-25 13:27:22 -0700
commit51738d52b6c91d4573b75f6483dd045d0affc00b (patch)
treee8cf5f7cdc94a5abfe84a758a4245d7269b65f8f /files/BUILD.gn
parentfe33d276d689446c03db3f1f761797b01aa06e1f (diff)
downloadlibyuv-51738d52b6c91d4573b75f6483dd045d0affc00b.tar.gz
Update external/libyuv to r1837
Update external/libyuv to version r1837 (d53f1bee) from upstream. This brings in some new functions that will be used by libavif. Also update README.version with local modifications. The files/ subdirectory is a pristine copy of the upstream checkout except for the local modifications that are listed in README.version. Bug: b/241008246 Bug: b/228492909 Test: Builds. Media and Camera CTS tests pass. Merged-In: I1bd041e475666e13fafd8c3792d7142a022d435a Change-Id: I85df21181e582ff835aab1e9ef13ad3ac8421d30
Diffstat (limited to 'files/BUILD.gn')
-rw-r--r--files/BUILD.gn118
1 files changed, 54 insertions, 64 deletions
diff --git a/files/BUILD.gn b/files/BUILD.gn
index 8904fd6c..a72ff065 100644
--- a/files/BUILD.gn
+++ b/files/BUILD.gn
@@ -6,12 +6,12 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-import("libyuv.gni")
import("//testing/test.gni")
+import("libyuv.gni")
declare_args() {
- # Set to false to disable building with gflags.
- libyuv_use_gflags = true
+ # Set to false to disable building with absl flags.
+ libyuv_use_absl_flags = true
# When building a shared library using a target in WebRTC or
# Chromium projects that depends on libyuv, setting this flag
@@ -27,20 +27,24 @@ config("libyuv_config") {
if (is_android && current_cpu != "arm64") {
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
}
+
+ if (!libyuv_use_neon) {
+ defines = [ "LIBYUV_DISABLE_NEON" ]
+ }
}
# This target is built when no specific target is specified on the command line.
group("default") {
testonly = true
- deps = [
- ":libyuv",
- ]
+ deps = [ ":libyuv" ]
if (libyuv_include_tests) {
deps += [
":compare",
":cpuid",
+ ":i444tonv12_eg",
":libyuv_unittest",
":psnr",
+ ":yuvconstants",
":yuvconvert",
]
}
@@ -52,13 +56,9 @@ group("libyuv") {
if (is_win && target_cpu == "x64") {
# Compile with clang in order to get inline assembly
- public_deps = [
- ":libyuv_internal(//build/toolchain/win:win_clang_x64)",
- ]
+ public_deps = [ ":libyuv_internal(//build/toolchain/win:win_clang_x64)" ]
} else {
- public_deps = [
- ":libyuv_internal",
- ]
+ public_deps = [ ":libyuv_internal" ]
}
if (libyuv_use_neon) {
@@ -69,11 +69,7 @@ group("libyuv") {
deps += [ ":libyuv_msa" ]
}
- if (libyuv_use_mmi) {
- deps += [ ":libyuv_mmi" ]
- }
-
- if (!is_ios) {
+ if (!is_ios && !libyuv_disable_jpeg) {
# Make sure that clients of libyuv link with libjpeg. This can't go in
# libyuv_internal because in Windows x64 builds that will generate a clang
# build of libjpeg, and we don't want two copies.
@@ -102,7 +98,9 @@ static_library("libyuv_internal") {
"include/libyuv/row.h",
"include/libyuv/scale.h",
"include/libyuv/scale_argb.h",
+ "include/libyuv/scale_rgb.h",
"include/libyuv/scale_row.h",
+ "include/libyuv/scale_uv.h",
"include/libyuv/version.h",
"include/libyuv/video_common.h",
@@ -137,6 +135,8 @@ static_library("libyuv_internal") {
"source/scale_argb.cc",
"source/scale_common.cc",
"source/scale_gcc.cc",
+ "source/scale_rgb.cc",
+ "source/scale_uv.cc",
"source/scale_win.cc",
"source/video_common.cc",
]
@@ -150,7 +150,7 @@ static_library("libyuv_internal") {
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}
- if (!is_ios) {
+ if (!is_ios && !libyuv_disable_jpeg) {
defines += [ "HAVE_JPEG" ]
# Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps
@@ -192,9 +192,7 @@ if (libyuv_use_neon) {
"source/scale_neon64.cc",
]
- deps = [
- ":libyuv_internal",
- ]
+ deps = [ ":libyuv_internal" ]
public_configs = [ ":libyuv_config" ]
@@ -225,27 +223,7 @@ if (libyuv_use_msa) {
"source/scale_msa.cc",
]
- deps = [
- ":libyuv_internal",
- ]
-
- public_configs = [ ":libyuv_config" ]
- }
-}
-
-if (libyuv_use_mmi) {
- static_library("libyuv_mmi") {
- sources = [
- # MMI Source Files
- "source/compare_mmi.cc",
- "source/rotate_mmi.cc",
- "source/row_mmi.cc",
- "source/scale_mmi.cc",
- ]
-
- deps = [
- ":libyuv_internal",
- ]
+ deps = [ ":libyuv_internal" ]
public_configs = [ ":libyuv_config" ]
}
@@ -275,8 +253,6 @@ if (libyuv_include_tests) {
testonly = true
sources = [
- # sources
- # headers
"unit_test/basictypes_test.cc",
"unit_test/color_test.cc",
"unit_test/compare_test.cc",
@@ -288,7 +264,9 @@ if (libyuv_include_tests) {
"unit_test/rotate_argb_test.cc",
"unit_test/rotate_test.cc",
"unit_test/scale_argb_test.cc",
+ "unit_test/scale_rgb_test.cc",
"unit_test/scale_test.cc",
+ "unit_test/scale_uv_test.cc",
"unit_test/unit_test.cc",
"unit_test/unit_test.h",
"unit_test/video_common_test.cc",
@@ -300,19 +278,20 @@ if (libyuv_include_tests) {
]
defines = []
- if (libyuv_use_gflags) {
- defines += [ "LIBYUV_USE_GFLAGS" ]
- deps += [ "//third_party/gflags" ]
+ if (libyuv_use_absl_flags) {
+ defines += [ "LIBYUV_USE_ABSL_FLAGS" ]
+ deps += [
+ "//third_party/abseil-cpp/absl/flags:flag",
+ "//third_party/abseil-cpp/absl/flags:parse",
+ ]
}
configs += [ ":libyuv_unittest_warnings_config" ]
- public_deps = [
- "//testing/gtest",
- ]
+ public_deps = [ "//testing/gtest" ]
public_configs = [ ":libyuv_unittest_config" ]
- if (is_linux) {
+ if (is_linux || is_chromeos) {
cflags = [ "-fexceptions" ]
}
if (is_ios) {
@@ -349,10 +328,8 @@ if (libyuv_include_tests) {
# sources
"util/compare.cc",
]
- deps = [
- ":libyuv",
- ]
- if (is_linux) {
+ deps = [ ":libyuv" ]
+ if (is_linux || is_chromeos) {
cflags = [ "-fexceptions" ]
}
}
@@ -362,10 +339,19 @@ if (libyuv_include_tests) {
# sources
"util/yuvconvert.cc",
]
- deps = [
- ":libyuv",
+ deps = [ ":libyuv" ]
+ if (is_linux || is_chromeos) {
+ cflags = [ "-fexceptions" ]
+ }
+ }
+
+ executable("yuvconstants") {
+ sources = [
+ # sources
+ "util/yuvconstants.c",
]
- if (is_linux) {
+ deps = [ ":libyuv" ]
+ if (is_linux || is_chromeos) {
cflags = [ "-fexceptions" ]
}
}
@@ -377,22 +363,26 @@ if (libyuv_include_tests) {
"util/psnr_main.cc",
"util/ssim.cc",
]
- deps = [
- ":libyuv",
- ]
+ deps = [ ":libyuv" ]
if (!is_ios && !libyuv_disable_jpeg) {
defines = [ "HAVE_JPEG" ]
}
}
+ executable("i444tonv12_eg") {
+ sources = [
+ # sources
+ "util/i444tonv12_eg.cc",
+ ]
+ deps = [ ":libyuv" ]
+ }
+
executable("cpuid") {
sources = [
# sources
"util/cpuid.c",
]
- deps = [
- ":libyuv",
- ]
+ deps = [ ":libyuv" ]
}
}