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 9import("../../webrtc.gni") 10 11build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" 12 13rtc_library("video_processing") { 14 visibility = [ "*" ] 15 sources = [ 16 "util/denoiser_filter.cc", 17 "util/denoiser_filter_c.cc", 18 "util/denoiser_filter_c.h", 19 "util/noise_estimation.cc", 20 "util/noise_estimation.h", 21 "util/skin_detection.cc", 22 "util/skin_detection.h", 23 "video_denoiser.cc", 24 "video_denoiser.h", 25 ] 26 27 deps = [ 28 ":denoiser_filter", 29 "..:module_api", 30 "../../api:scoped_refptr", 31 "../../api/video:video_frame", 32 "../../api/video:video_frame_i420", 33 "../../api/video:video_rtp_headers", 34 "../../common_audio", 35 "../../common_video", 36 "../../modules/utility", 37 "../../rtc_base:checks", 38 "../../rtc_base:rtc_base_approved", 39 "../../rtc_base/system:arch", 40 "../../system_wrappers:cpu_features_api", 41 "//third_party/libyuv", 42 ] 43 if (build_video_processing_sse2) { 44 deps += [ ":video_processing_sse2" ] 45 } 46 if (rtc_build_with_neon) { 47 deps += [ ":video_processing_neon" ] 48 } 49} 50 51rtc_source_set("denoiser_filter") { 52 # Target that only exists to avoid cyclic depdency errors for the SSE2 and 53 # Neon implementations below. 54 sources = [ "util/denoiser_filter.h" ] 55 deps = [ "..:module_api" ] 56} 57 58if (build_video_processing_sse2) { 59 rtc_library("video_processing_sse2") { 60 sources = [ 61 "util/denoiser_filter_sse2.cc", 62 "util/denoiser_filter_sse2.h", 63 ] 64 65 deps = [ 66 ":denoiser_filter", 67 "../../rtc_base:rtc_base_approved", 68 "../../system_wrappers", 69 ] 70 71 if (is_posix || is_fuchsia) { 72 cflags = [ "-msse2" ] 73 } 74 } 75} 76 77if (rtc_build_with_neon) { 78 rtc_library("video_processing_neon") { 79 sources = [ 80 "util/denoiser_filter_neon.cc", 81 "util/denoiser_filter_neon.h", 82 ] 83 84 deps = [ ":denoiser_filter" ] 85 86 if (current_cpu != "arm64") { 87 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] 88 cflags = [ "-mfpu=neon" ] 89 } 90 } 91} 92 93if (rtc_include_tests) { 94 rtc_library("video_processing_unittests") { 95 testonly = true 96 97 sources = [ "test/denoiser_test.cc" ] 98 deps = [ 99 ":denoiser_filter", 100 ":video_processing", 101 "../../api:scoped_refptr", 102 "../../api/video:video_frame", 103 "../../api/video:video_frame_i420", 104 "../../api/video:video_rtp_headers", 105 "../../common_video", 106 "../../test:fileutils", 107 "../../test:frame_utils", 108 "../../test:test_support", 109 "../../test:video_test_common", 110 ] 111 } 112} 113