1# Copyright (C) 2021-2023 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 defines = [ "AVS100" ] 43 cflags = [ 44 "-Wno-unused-variable", 45 "-Wno-implicit-function-declaration", 46 "-Wno-format", 47 "-Wno-switch", 48 "-Wno-pointer-to-int-cast", 49 ] 50 51 if (USE_DRM) { 52 defines += [ "USE_DRM" ] 53 defines += [ "HAVE_L1_SVP_MODE" ] 54 } 55 56 if (USE_AFBC) { 57 defines += [ "SUPPORT_AFBC" ] 58 } 59 60 if (USE_GPU) { 61 defines += [ "ROCKCHIP_GPU_LIB_ENABLE" ] 62 } 63 64 if (USE_RGA) { 65 defines += [ "SUPPORT_RGA" ] 66 } 67 68 if (USE_HEVC_ENC) { 69 defines += [ "SUPPORT_HEVC_ENC" ] 70 } 71 72 if (USE_VP8_ENC) { 73 defines += [ "SUPPORT_VP8_ENC" ] 74 } 75 76 if (USE_AVS80) { 77 defines += [ "AVS80" ] 78 } 79 defines += [ "OHOS_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 "hilog:libhilog", 89 ] 90 91 innerapi_tags = [ "passthrough_indirect" ] 92 install_images = [ chipset_base_dir ] 93 subsystem_name = "hdf" 94 part_name = "rockchip_products" 95} 96