You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.9 KiB

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