OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
10 import("../../webrtc.gni") | 10 import("../../webrtc.gni") |
11 | 11 |
12 build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" | 12 build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" |
13 | 13 |
14 rtc_static_library("video_processing") { | 14 rtc_static_library("video_processing") { |
15 sources = [ | 15 sources = [ |
16 "util/denoiser_filter.cc", | 16 "util/denoiser_filter.cc", |
17 "util/denoiser_filter.h", | |
18 "util/denoiser_filter_c.cc", | 17 "util/denoiser_filter_c.cc", |
19 "util/denoiser_filter_c.h", | 18 "util/denoiser_filter_c.h", |
20 "util/noise_estimation.cc", | 19 "util/noise_estimation.cc", |
21 "util/noise_estimation.h", | 20 "util/noise_estimation.h", |
22 "util/skin_detection.cc", | 21 "util/skin_detection.cc", |
23 "util/skin_detection.h", | 22 "util/skin_detection.h", |
24 "video_denoiser.cc", | 23 "video_denoiser.cc", |
25 "video_denoiser.h", | 24 "video_denoiser.h", |
26 ] | 25 ] |
27 | 26 |
28 deps = [ | 27 deps = [ |
| 28 ":denoiser_filter", |
29 "../../base:rtc_base_approved", | 29 "../../base:rtc_base_approved", |
30 "../../common_audio", | 30 "../../common_audio", |
31 "../../common_video", | 31 "../../common_video", |
32 "../../modules/utility", | 32 "../../modules/utility", |
33 "../../system_wrappers", | 33 "../../system_wrappers", |
34 ] | 34 ] |
35 if (build_video_processing_sse2) { | 35 if (build_video_processing_sse2) { |
36 deps += [ ":video_processing_sse2" ] | 36 deps += [ ":video_processing_sse2" ] |
37 } | 37 } |
38 if (rtc_build_with_neon) { | 38 if (rtc_build_with_neon) { |
39 deps += [ ":video_processing_neon" ] | 39 deps += [ ":video_processing_neon" ] |
40 } | 40 } |
41 | 41 |
42 if (!build_with_chromium && is_clang) { | 42 if (!build_with_chromium && is_clang) { |
43 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 43 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
44 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 44 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
| 48 rtc_source_set("denoiser_filter") { |
| 49 # Target that only exists to avoid cyclic depdency errors for the SSE2 and |
| 50 # Neon implementations below. |
| 51 sources = [ |
| 52 "util/denoiser_filter.h", |
| 53 ] |
| 54 } |
| 55 |
48 if (build_video_processing_sse2) { | 56 if (build_video_processing_sse2) { |
49 rtc_static_library("video_processing_sse2") { | 57 rtc_static_library("video_processing_sse2") { |
50 # TODO(mbonadei): Remove (bugs.webrtc.org/6828) | |
51 # Errors on cyclic dependency with :video_processing if enabled. | |
52 check_includes = false | |
53 | |
54 sources = [ | 58 sources = [ |
55 "util/denoiser_filter_sse2.cc", | 59 "util/denoiser_filter_sse2.cc", |
56 "util/denoiser_filter_sse2.h", | 60 "util/denoiser_filter_sse2.h", |
57 ] | 61 ] |
58 | 62 |
59 deps = [ | 63 deps = [ |
| 64 ":denoiser_filter", |
60 "../../base:rtc_base_approved", | 65 "../../base:rtc_base_approved", |
61 "../../system_wrappers", | 66 "../../system_wrappers", |
62 ] | 67 ] |
63 | 68 |
64 if (!build_with_chromium && is_clang) { | 69 if (!build_with_chromium && is_clang) { |
65 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 70 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
66 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 71 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
67 } | 72 } |
68 | 73 |
69 if (is_posix) { | 74 if (is_posix) { |
70 cflags = [ "-msse2" ] | 75 cflags = [ "-msse2" ] |
71 } | 76 } |
72 } | 77 } |
73 } | 78 } |
74 | 79 |
75 if (rtc_build_with_neon) { | 80 if (rtc_build_with_neon) { |
76 rtc_static_library("video_processing_neon") { | 81 rtc_static_library("video_processing_neon") { |
77 # TODO(mbonadei): Remove (bugs.webrtc.org/6828) | |
78 # Errors on cyclic dependency with :video_processing if enabled. | |
79 check_includes = false | |
80 | |
81 sources = [ | 82 sources = [ |
82 "util/denoiser_filter_neon.cc", | 83 "util/denoiser_filter_neon.cc", |
83 "util/denoiser_filter_neon.h", | 84 "util/denoiser_filter_neon.h", |
84 ] | 85 ] |
85 | 86 |
| 87 deps = [ |
| 88 ":denoiser_filter", |
| 89 ] |
| 90 |
86 if (current_cpu != "arm64") { | 91 if (current_cpu != "arm64") { |
87 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] | 92 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
88 cflags = [ "-mfpu=neon" ] | 93 cflags = [ "-mfpu=neon" ] |
89 } | 94 } |
90 } | 95 } |
91 } | 96 } |
92 | 97 |
93 if (rtc_include_tests) { | 98 if (rtc_include_tests) { |
94 rtc_source_set("video_processing_unittests") { | 99 rtc_source_set("video_processing_unittests") { |
95 testonly = true | 100 testonly = true |
96 sources = [ | 101 sources = [ |
97 "test/denoiser_test.cc", | 102 "test/denoiser_test.cc", |
98 ] | 103 ] |
99 deps = [ | 104 deps = [ |
100 ":video_processing", | 105 ":video_processing", |
101 "../../common_video:common_video", | 106 "../../common_video:common_video", |
102 "../../test:test_support", | 107 "../../test:test_support", |
103 "../../test:video_test_common", | 108 "../../test:video_test_common", |
104 ] | 109 ] |
105 if (!build_with_chromium && is_clang) { | 110 if (!build_with_chromium && is_clang) { |
106 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 111 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
107 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 112 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
108 } | 113 } |
109 } | 114 } |
110 } | 115 } |
OLD | NEW |