2014-06-23 19:21:07 +00:00
|
|
|
# Copyright (c) 2014 The WebRTC 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.
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
import("../../webrtc.gni")
|
2014-06-23 19:21:07 +00:00
|
|
|
|
2015-02-23 19:08:31 +00:00
|
|
|
build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64"
|
2014-07-07 11:46:43 +00:00
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("video_processing") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2014-07-07 11:46:43 +00:00
|
|
|
sources = [
|
2015-11-26 02:59:48 -08:00
|
|
|
"util/denoiser_filter.cc",
|
|
|
|
|
"util/denoiser_filter_c.cc",
|
|
|
|
|
"util/denoiser_filter_c.h",
|
2016-04-01 07:46:58 -07:00
|
|
|
"util/noise_estimation.cc",
|
|
|
|
|
"util/noise_estimation.h",
|
2015-11-26 02:59:48 -08:00
|
|
|
"util/skin_detection.cc",
|
|
|
|
|
"util/skin_detection.h",
|
|
|
|
|
"video_denoiser.cc",
|
|
|
|
|
"video_denoiser.h",
|
2014-07-07 11:46:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
2017-03-08 01:41:14 -08:00
|
|
|
":denoiser_filter",
|
2017-04-26 03:38:35 -07:00
|
|
|
"..:module_api",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2018-11-28 16:47:49 +01:00
|
|
|
"../../api/video:video_frame",
|
|
|
|
|
"../../api/video:video_frame_i420",
|
2019-06-10 12:59:38 +02:00
|
|
|
"../../api/video:video_rtp_headers",
|
2014-07-07 11:46:43 +00:00
|
|
|
"../../common_audio",
|
|
|
|
|
"../../common_video",
|
|
|
|
|
"../../modules/utility",
|
2017-12-13 16:05:42 +01:00
|
|
|
"../../rtc_base:checks",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../../rtc_base:rtc_base_approved",
|
2018-07-25 16:05:48 +02:00
|
|
|
"../../rtc_base/system:arch",
|
2017-12-06 09:17:14 +01:00
|
|
|
"../../system_wrappers:cpu_features_api",
|
2017-12-14 11:24:00 +01:00
|
|
|
"//third_party/libyuv",
|
2014-07-07 11:46:43 +00:00
|
|
|
]
|
|
|
|
|
if (build_video_processing_sse2) {
|
|
|
|
|
deps += [ ":video_processing_sse2" ]
|
|
|
|
|
}
|
2015-11-26 02:59:48 -08:00
|
|
|
if (rtc_build_with_neon) {
|
|
|
|
|
deps += [ ":video_processing_neon" ]
|
|
|
|
|
}
|
2014-07-07 11:46:43 +00:00
|
|
|
}
|
|
|
|
|
|
2017-03-08 01:41:14 -08:00
|
|
|
rtc_source_set("denoiser_filter") {
|
|
|
|
|
# Target that only exists to avoid cyclic depdency errors for the SSE2 and
|
|
|
|
|
# Neon implementations below.
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "util/denoiser_filter.h" ]
|
|
|
|
|
deps = [ "..:module_api" ]
|
2017-03-08 01:41:14 -08:00
|
|
|
}
|
|
|
|
|
|
2014-07-07 11:46:43 +00:00
|
|
|
if (build_video_processing_sse2) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("video_processing_sse2") {
|
2015-05-25 12:55:39 +02:00
|
|
|
sources = [
|
2015-11-26 02:59:48 -08:00
|
|
|
"util/denoiser_filter_sse2.cc",
|
|
|
|
|
"util/denoiser_filter_sse2.h",
|
2015-05-25 12:55:39 +02:00
|
|
|
]
|
2014-08-18 17:56:28 +00:00
|
|
|
|
2016-12-27 06:32:08 -08:00
|
|
|
deps = [
|
2017-03-08 01:41:14 -08:00
|
|
|
":denoiser_filter",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../../rtc_base:rtc_base_approved",
|
2016-12-27 06:32:08 -08:00
|
|
|
"../../system_wrappers",
|
|
|
|
|
]
|
|
|
|
|
|
2018-03-30 10:38:06 -07:00
|
|
|
if (is_posix || is_fuchsia) {
|
2014-07-07 11:46:43 +00:00
|
|
|
cflags = [ "-msse2" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-23 19:21:07 +00:00
|
|
|
}
|
2015-11-26 02:59:48 -08:00
|
|
|
|
|
|
|
|
if (rtc_build_with_neon) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("video_processing_neon") {
|
2015-11-26 02:59:48 -08:00
|
|
|
sources = [
|
|
|
|
|
"util/denoiser_filter_neon.cc",
|
|
|
|
|
"util/denoiser_filter_neon.h",
|
|
|
|
|
]
|
2016-12-27 06:32:08 -08:00
|
|
|
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ ":denoiser_filter" ]
|
2017-03-08 01:41:14 -08:00
|
|
|
|
2015-11-26 02:59:48 -08:00
|
|
|
if (current_cpu != "arm64") {
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
2015-11-26 02:59:48 -08:00
|
|
|
cflags = [ "-mfpu=neon" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-01-19 08:27:11 -08:00
|
|
|
|
|
|
|
|
if (rtc_include_tests) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("video_processing_unittests") {
|
2017-01-19 08:27:11 -08:00
|
|
|
testonly = true
|
2017-04-25 04:04:50 -07:00
|
|
|
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "test/denoiser_test.cc" ]
|
2017-01-19 08:27:11 -08:00
|
|
|
deps = [
|
2018-11-28 16:47:49 +01:00
|
|
|
":denoiser_filter",
|
2017-01-19 08:27:11 -08:00
|
|
|
":video_processing",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2018-11-28 16:47:49 +01:00
|
|
|
"../../api/video:video_frame",
|
|
|
|
|
"../../api/video:video_frame_i420",
|
2019-06-10 12:59:38 +02:00
|
|
|
"../../api/video:video_rtp_headers",
|
2019-03-21 13:35:10 +01:00
|
|
|
"../../common_video",
|
2018-03-15 15:05:39 +01:00
|
|
|
"../../test:fileutils",
|
2019-12-05 15:59:00 +01:00
|
|
|
"../../test:frame_utils",
|
2017-01-19 08:27:11 -08:00
|
|
|
"../../test:test_support",
|
|
|
|
|
"../../test:video_test_common",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|