blob: b1ab8ecc5e38f638af207f74bb4b2aee33478c01 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
jackychen8f9902a2015-11-26 02:59:48 -08009import("//build/config/arm.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010import("../../build/webrtc.gni")
11
kjellander@webrtc.org72273912015-02-23 19:08:31 +000012build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64"
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000013
kjellanderb62dbbe2016-09-23 00:38:52 -070014rtc_static_library("video_processing") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000015 sources = [
jackychen8f9902a2015-11-26 02:59:48 -080016 "util/denoiser_filter.cc",
17 "util/denoiser_filter.h",
18 "util/denoiser_filter_c.cc",
19 "util/denoiser_filter_c.h",
jackychenfa0befe2016-04-01 07:46:58 -070020 "util/noise_estimation.cc",
21 "util/noise_estimation.h",
jackychen8f9902a2015-11-26 02:59:48 -080022 "util/skin_detection.cc",
23 "util/skin_detection.h",
jackychen8f9902a2015-11-26 02:59:48 -080024 "video_denoiser.cc",
25 "video_denoiser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000026 ]
27
28 deps = [
29 "../../common_audio",
30 "../../common_video",
31 "../../modules/utility",
32 "../../system_wrappers",
33 ]
34 if (build_video_processing_sse2) {
35 deps += [ ":video_processing_sse2" ]
36 }
jackychen8f9902a2015-11-26 02:59:48 -080037 if (rtc_build_with_neon) {
38 deps += [ ":video_processing_neon" ]
39 }
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000040
kjellandere40a7ee2016-10-16 23:56:12 -070041 if (!build_with_chromium && is_clang) {
42 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070043 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000044 }
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000045}
46
47if (build_video_processing_sse2) {
kjellanderb62dbbe2016-09-23 00:38:52 -070048 rtc_static_library("video_processing_sse2") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020049 sources = [
jackychen8f9902a2015-11-26 02:59:48 -080050 "util/denoiser_filter_sse2.cc",
51 "util/denoiser_filter_sse2.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020052 ]
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000053
kjellandere40a7ee2016-10-16 23:56:12 -070054 if (!build_with_chromium && is_clang) {
55 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070056 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000057 }
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000058
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000059 if (is_posix) {
60 cflags = [ "-msse2" ]
61 }
62 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000063}
jackychen8f9902a2015-11-26 02:59:48 -080064
65if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -070066 rtc_static_library("video_processing_neon") {
jackychen8f9902a2015-11-26 02:59:48 -080067 sources = [
68 "util/denoiser_filter_neon.cc",
69 "util/denoiser_filter_neon.h",
70 ]
71 if (current_cpu != "arm64") {
ehmaldonado38a21322016-09-02 04:10:34 -070072 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
jackychen8f9902a2015-11-26 02:59:48 -080073 cflags = [ "-mfpu=neon" ]
74 }
75 }
76}