kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 1 | # 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 | |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 9 | import("//build/config/arm.gni") |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 10 | import("../../build/webrtc.gni") |
| 11 | |
kjellander@webrtc.org | 7227391 | 2015-02-23 19:08:31 +0000 | [diff] [blame] | 12 | build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 13 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 14 | rtc_static_library("video_processing") { |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 15 | sources = [ |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 16 | "util/denoiser_filter.cc", |
| 17 | "util/denoiser_filter.h", |
| 18 | "util/denoiser_filter_c.cc", |
| 19 | "util/denoiser_filter_c.h", |
jackychen | fa0befe | 2016-04-01 07:46:58 -0700 | [diff] [blame] | 20 | "util/noise_estimation.cc", |
| 21 | "util/noise_estimation.h", |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 22 | "util/skin_detection.cc", |
| 23 | "util/skin_detection.h", |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 24 | "video_denoiser.cc", |
| 25 | "video_denoiser.h", |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 26 | ] |
| 27 | |
| 28 | deps = [ |
mbonadei | 6d3c573 | 2016-12-27 06:32:08 -0800 | [diff] [blame] | 29 | "../../base:rtc_base_approved", |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 30 | "../../common_audio", |
| 31 | "../../common_video", |
| 32 | "../../modules/utility", |
| 33 | "../../system_wrappers", |
| 34 | ] |
| 35 | if (build_video_processing_sse2) { |
| 36 | deps += [ ":video_processing_sse2" ] |
| 37 | } |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 38 | if (rtc_build_with_neon) { |
| 39 | deps += [ ":video_processing_neon" ] |
| 40 | } |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 41 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 42 | if (!build_with_chromium && is_clang) { |
| 43 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 44 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 45 | } |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | if (build_video_processing_sse2) { |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 49 | rtc_static_library("video_processing_sse2") { |
mbonadei | 6d3c573 | 2016-12-27 06:32:08 -0800 | [diff] [blame] | 50 | # TODO(mbonadei): Remove (bugs.webrtc.org/6828) |
| 51 | # Errors on cyclic dependency with :video_processing if enabled. |
| 52 | check_includes = false |
| 53 | |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 54 | sources = [ |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 55 | "util/denoiser_filter_sse2.cc", |
| 56 | "util/denoiser_filter_sse2.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 57 | ] |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 58 | |
mbonadei | 6d3c573 | 2016-12-27 06:32:08 -0800 | [diff] [blame] | 59 | deps = [ |
| 60 | "../../base:rtc_base_approved", |
| 61 | "../../system_wrappers", |
| 62 | ] |
| 63 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 64 | if (!build_with_chromium && is_clang) { |
| 65 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 66 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 67 | } |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 68 | |
stefan@webrtc.org | 73823ca | 2014-07-07 11:46:43 +0000 | [diff] [blame] | 69 | if (is_posix) { |
| 70 | cflags = [ "-msse2" ] |
| 71 | } |
| 72 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 73 | } |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 74 | |
| 75 | if (rtc_build_with_neon) { |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 76 | rtc_static_library("video_processing_neon") { |
mbonadei | 6d3c573 | 2016-12-27 06:32:08 -0800 | [diff] [blame] | 77 | # TODO(mbonadei): Remove (bugs.webrtc.org/6828) |
| 78 | # Errors on cyclic dependency with :video_processing if enabled. |
| 79 | check_includes = false |
| 80 | |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 81 | sources = [ |
| 82 | "util/denoiser_filter_neon.cc", |
| 83 | "util/denoiser_filter_neon.h", |
| 84 | ] |
mbonadei | 6d3c573 | 2016-12-27 06:32:08 -0800 | [diff] [blame] | 85 | |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 86 | if (current_cpu != "arm64") { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 87 | suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 88 | cflags = [ "-mfpu=neon" ] |
| 89 | } |
| 90 | } |
| 91 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame^] | 92 | |
| 93 | if (rtc_include_tests) { |
| 94 | rtc_source_set("video_processing_unittests") { |
| 95 | testonly = true |
| 96 | sources = [ |
| 97 | "test/denoiser_test.cc", |
| 98 | ] |
| 99 | deps = [ |
| 100 | ":video_processing", |
| 101 | "../../common_video:common_video", |
| 102 | "../../test:test_support", |
| 103 | "../../test:video_test_common", |
| 104 | ] |
| 105 | if (!build_with_chromium && is_clang) { |
| 106 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 107 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 108 | } |
| 109 | } |
| 110 | } |