• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 HiHope Open Source Organization .
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//device/soc/rockchip/rk3568/hardware/omx_il/rk_omx.gni")
16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
17
18ohos_shared_library("libomxvpu_enc") {
19  sources = [
20    "Rkvpu_OMX_Venc.c",
21    "Rkvpu_OMX_VencControl.c",
22    "library_register.c",
23  ]
24  include_dirs = [
25    ".",
26    "//device/soc/rockchip/rk3568/hardware/omx_il/osal",
27    "//device/soc/rockchip/rk3568/hardware/omx_il/include/khronos",
28    "//device/soc/rockchip/rk3568/hardware/omx_il/include/rockchip",
29    "//device/soc/rockchip/rk3568/hardware/omx_il/include/librkvpu",
30    "//device/soc/rockchip/rk3568/hardware/omx_il/component/common",
31    "//device/soc/rockchip/rk3568/hardware/omx_il/core",
32    "//device/soc/rockchip/rk3568/hardware/mpp/mpp/legacy",
33    "//device/soc/rockchip/rk3568/hardware/mpp/include",
34    "//device/hihope/rk3568/hardware/rga/include",
35    "//device/soc/rockchip/rk3568/hardware/omx_il/include/librkvpu",
36    "//device/soc/rockchip/rk3568/hardware/rga/include",
37    "//drivers/peripheral/base",
38    "//drivers/peripheral/codec/interfaces/include",
39    "//drivers/peripheral/display/interfaces/include",
40    "//third_party/openmax/api/1.1.2",
41  ]
42
43  cflags = [
44    "-Wno-unused-variable",
45    "-Wno-implicit-function-declaration",
46    "-Wno-format",
47    "-Wno-switch",
48    "-DAVS100=1",
49    "-Wno-pointer-to-int-cast",
50  ]
51
52  if (USE_DRM) {
53    cflags += [
54      "-DUSE_DRM",
55      "-DHAVE_L1_SVP_MODE",
56    ]
57  }
58
59  if (USE_AFBC) {
60    cflags += [ "-DSUPPORT_AFBC" ]
61  }
62
63  if (USE_GPU) {
64    cflags += [ "-DROCKCHIP_GPU_LIB_ENABLE" ]
65  }
66
67  if (USE_RGA) {
68    cflags += [ "-DSUPPORT_RGA" ]
69  }
70
71  if (USE_HEVC_ENC) {
72    cflags += [ "-DSUPPORT_HEVC_ENC" ]
73  }
74
75  if (USE_VP8_ENC) {
76    cflags += [ "-DSUPPORT_VP8_ENC" ]
77  }
78
79  cflags += [ "-DOHOS_BUFFER_HANDLE" ]
80
81  deps = [
82    "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:RkOMX_Basecomponent",
83    "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:libRkOMX_Resourcemanager",
84    "//device/soc/rockchip/rk3568/hardware/omx_il/osal:RkOMX_OSAL",
85  ]
86  external_deps = [
87    "c_utils:utils",
88    "hiviewdfx_hilog_native:libhilog",
89  ]
90
91  install_images = [ chipset_base_dir ]
92  subsystem_name = "hdf"
93  part_name = "drivers_peripheral_codec"
94}
95