Skip to content

Commit eee5887

Browse files
youennfphiln
authored andcommitted
Update libyuv up to M115
https://bugs.webkit.org/show_bug.cgi?id=257481 rdar://110001035 Reviewed by Jean-Yves Avenard. * Source/ThirdParty/libwebrtc/Source/third_party/libyuv: Resynced. Canonical link: https://commits.webkit.org/264681@main
1 parent 9f67516 commit eee5887

78 files changed

Lines changed: 9846 additions & 2786 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/ThirdParty/libwebrtc/Source/third_party/libyuv/.gn

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,5 @@ exec_script_whitelist = build_dotfile_settings.exec_script_whitelist +
3434

3535
default_args = {
3636
mac_sdk_min = "10.12"
37-
38-
# https://bugs.chromium.org/p/libyuv/issues/detail?id=826
39-
ios_deployment_target = "10.0"
37+
ios_deployment_target = "12.0"
4038
}

Source/ThirdParty/libwebrtc/Source/third_party/libyuv/Android.bp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ cc_library {
6262
"source/row_msa.cc",
6363
"source/row_neon.cc",
6464
"source/row_neon64.cc",
65+
"source/row_rvv.cc",
6566
"source/scale.cc",
6667
"source/scale_any.cc",
6768
"source/scale_argb.cc",

Source/ThirdParty/libwebrtc/Source/third_party/libyuv/BUILD.gn

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# in the file PATENTS. All contributing project authors may
77
# be found in the AUTHORS file in the root of the source tree.
88

9+
import("//build/config/features.gni")
910
import("//testing/test.gni")
1011
import("libyuv.gni")
1112

@@ -21,15 +22,19 @@ declare_args() {
2122

2223
config("libyuv_config") {
2324
include_dirs = [ "include" ]
24-
if (is_android && current_cpu == "arm64") {
25-
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
26-
}
27-
if (is_android && current_cpu != "arm64") {
28-
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
25+
if (is_android) {
26+
if (target_cpu == "arm" || target_cpu == "x86" || target_cpu == "mipsel") {
27+
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
28+
} else {
29+
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
30+
}
2931
}
30-
32+
defines = []
3133
if (!libyuv_use_neon) {
32-
defines = [ "LIBYUV_DISABLE_NEON" ]
34+
defines += [ "LIBYUV_DISABLE_NEON" ]
35+
}
36+
if (libyuv_disable_rvv) {
37+
defines += [ "LIBYUV_DISABLE_RVV" ]
3338
}
3439
}
3540

@@ -129,6 +134,7 @@ static_library("libyuv_internal") {
129134
"source/row_any.cc",
130135
"source/row_common.cc",
131136
"source/row_gcc.cc",
137+
"source/row_rvv.cc",
132138
"source/row_win.cc",
133139
"source/scale.cc",
134140
"source/scale_any.cc",
@@ -150,7 +156,7 @@ static_library("libyuv_internal") {
150156
configs += [ "//build/config/gcc:symbol_visibility_default" ]
151157
}
152158

153-
if (!is_ios && !libyuv_disable_jpeg) {
159+
if ((!is_ios || use_blink) && !libyuv_disable_jpeg) {
154160
defines += [ "HAVE_JPEG" ]
155161

156162
# Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps

Source/ThirdParty/libwebrtc/Source/third_party/libyuv/CMakeLists.txt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
PROJECT ( YUV C CXX ) # "C" is required even for C++ projects
66
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
7-
OPTION( TEST "Built unit tests" OFF )
7+
OPTION( UNIT_TEST "Built unit tests" OFF )
88

99
SET ( ly_base_dir ${PROJECT_SOURCE_DIR} )
1010
SET ( ly_src_dir ${ly_base_dir}/source )
@@ -41,18 +41,24 @@ endif()
4141
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
4242
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
4343

44+
# this creates the yuvconstants tool
45+
ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
46+
TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} )
4447

45-
INCLUDE ( FindJPEG )
48+
find_package ( JPEG )
4649
if (JPEG_FOUND)
4750
include_directories( ${JPEG_INCLUDE_DIR} )
48-
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
51+
target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
4952
add_definitions( -DHAVE_JPEG )
5053
endif()
5154

52-
if(TEST)
55+
if(UNIT_TEST)
5356
find_library(GTEST_LIBRARY gtest)
5457
if(GTEST_LIBRARY STREQUAL "GTEST_LIBRARY-NOTFOUND")
5558
set(GTEST_SRC_DIR /usr/src/gtest CACHE STRING "Location of gtest sources")
59+
if (CMAKE_CROSSCOMPILING)
60+
set(GTEST_SRC_DIR third_party/googletest/src/googletest)
61+
endif()
5662
if(EXISTS ${GTEST_SRC_DIR}/src/gtest-all.cc)
5763
message(STATUS "building gtest from sources in ${GTEST_SRC_DIR}")
5864
set(gtest_sources ${GTEST_SRC_DIR}/src/gtest-all.cc)
@@ -61,7 +67,7 @@ if(TEST)
6167
include_directories(${GTEST_SRC_DIR}/include)
6268
set(GTEST_LIBRARY gtest)
6369
else()
64-
message(FATAL_ERROR "TEST is set but unable to find gtest library")
70+
message(FATAL_ERROR "UNIT_TEST is set but unable to find gtest library")
6571
endif()
6672
endif()
6773

@@ -78,6 +84,12 @@ if(TEST)
7884
if(NACL AND NACL_LIBC STREQUAL "newlib")
7985
target_link_libraries(libyuv_unittest glibc-compat)
8086
endif()
87+
88+
find_library(GFLAGS_LIBRARY gflags)
89+
if(NOT GFLAGS_LIBRARY STREQUAL "GFLAGS_LIBRARY-NOTFOUND")
90+
target_link_libraries(libyuv_unittest gflags)
91+
add_definitions(-DLIBYUV_USE_GFLAGS)
92+
endif()
8193
endif()
8294

8395

0 commit comments

Comments
 (0)