xref: /aosp_15_r20/external/webrtc/modules/video_coding/codecs/av1/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1# Copyright (c) 2020 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("//third_party/libaom/options.gni")
10import("../../../../webrtc.gni")
11
12rtc_library("av1_svc_config") {
13  sources = [
14    "av1_svc_config.cc",
15    "av1_svc_config.h",
16  ]
17  deps = [
18    "../../../../api/video_codecs:video_codecs_api",
19    "../../../../rtc_base:checks",
20    "../../../../rtc_base:logging",
21    "../../../../rtc_base:stringutils",
22    "../../svc:scalability_mode_util",
23    "../../svc:scalability_structures",
24    "../../svc:scalable_video_controller",
25  ]
26
27  absl_deps = [ "//third_party/abseil-cpp/absl/container:inlined_vector" ]
28}
29
30rtc_library("dav1d_decoder") {
31  visibility = [ "*" ]
32  poisonous = [ "software_video_codecs" ]
33  public = [ "dav1d_decoder.h" ]
34  sources = [ "dav1d_decoder.cc" ]
35
36  deps = [
37    "../..:video_codec_interface",
38    "../../../../api:scoped_refptr",
39    "../../../../api/video:encoded_image",
40    "../../../../api/video:video_frame",
41    "../../../../api/video_codecs:video_codecs_api",
42    "../../../../common_video",
43    "../../../../rtc_base:logging",
44    "//third_party/dav1d",
45    "//third_party/libyuv",
46  ]
47  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
48}
49
50rtc_library("libaom_av1_encoder") {
51  visibility = [ "*" ]
52  poisonous = [ "software_video_codecs" ]
53  public = [ "libaom_av1_encoder.h" ]
54  sources = [ "libaom_av1_encoder.cc" ]
55  deps = [
56    "../..:video_codec_interface",
57    "../../../../api:scoped_refptr",
58    "../../../../api/video:encoded_image",
59    "../../../../api/video:video_frame",
60    "../../../../api/video_codecs:video_codecs_api",
61    "../../../../common_video",
62    "../../../../rtc_base:checks",
63    "../../../../rtc_base:logging",
64    "../../../../rtc_base:rtc_numerics",
65    "../../svc:scalability_structures",
66    "../../svc:scalable_video_controller",
67    "//third_party/libaom",
68  ]
69  absl_deps = [
70    "//third_party/abseil-cpp/absl/algorithm:container",
71    "//third_party/abseil-cpp/absl/base:core_headers",
72    "//third_party/abseil-cpp/absl/strings:strings",
73    "//third_party/abseil-cpp/absl/types:optional",
74  ]
75}
76
77if (rtc_include_tests) {
78  rtc_library("video_coding_codecs_av1_tests") {
79    testonly = true
80
81    sources = [ "av1_svc_config_unittest.cc" ]
82    deps = [
83      ":av1_svc_config",
84      "../../../../api/video_codecs:video_codecs_api",
85      "../../../../test:test_support",
86    ]
87
88    if (enable_libaom) {
89      sources += [
90        "libaom_av1_encoder_unittest.cc",
91        "libaom_av1_unittest.cc",
92      ]
93      deps += [
94        ":dav1d_decoder",
95        ":libaom_av1_encoder",
96        "../..:encoded_video_frame_producer",
97        "../..:video_codec_interface",
98        "../../../../api:mock_video_encoder",
99        "../../../../api/units:data_size",
100        "../../../../api/units:time_delta",
101        "../../../../api/video:video_frame",
102        "../../svc:scalability_mode_util",
103        "../../svc:scalability_structures",
104        "../../svc:scalable_video_controller",
105      ]
106      absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
107    }
108  }
109}
110