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_dec") { 19 sources = [ 20 "Rkvpu_OMX_Vdec.c", 21 "Rkvpu_OMX_VdecControl.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/component/common", 30 "//device/soc/rockchip/rk3568/hardware/omx_il/core", 31 "//device/hihope/rk3568/hardware/rga/include", 32 "//device/soc/rockchip/rk3568/hardware/omx_il/include/librkvpu", 33 "//device/soc/rockchip/rk3568/hardware/mpp/mpp/legacy", 34 "//device/soc/rockchip/rk3568/hardware/mpp/include", 35 "//device/soc/rockchip/rk3568/hardware/rga/include", 36 "//drivers/peripheral/base", 37 "//drivers/peripheral/codec/interfaces/include", 38 "//drivers/peripheral/display/interfaces/include", 39 "//third_party/libdrm/include/drm", 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-switch", 47 ] 48 49 if (USE_DRM) { 50 defines += [ "USE_DRM" ] 51 } 52 53 if (USE_AFBC) { 54 defines += [ "SUPPORT_AFBC" ] 55 } 56 57 if (USE_GPU) { 58 defines += [ "ROCKCHIP_GPU_LIB_ENABLE" ] 59 } 60 61 if (USE_RGA) { 62 defines += [ "SUPPORT_RGA" ] 63 } 64 65 if (USE_HEVC_DEC) { 66 defines += [ "SUPPORT_HEVC" ] 67 } 68 69 if (USE_VP9_DEC) { 70 defines += [ "SUPPORT_VP9" ] 71 } 72 73 if (USE_AVS80) { 74 defines += [ "AVS80" ] 75 } 76 defines += [ "OHOS_BUFFER_HANDLE" ] 77 78 deps = [ 79 "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:RkOMX_Basecomponent", 80 "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:libRkOMX_Resourcemanager", 81 "//device/soc/rockchip/rk3568/hardware/omx_il/osal:RkOMX_OSAL", 82 "//device/soc/rockchip/rk3568/hardware/rga:librga", 83 ] 84 external_deps = [ 85 "c_utils:utils", 86 "hilog:libhilog", 87 ] 88 89 innerapi_tags = [ "passthrough_indirect" ] 90 install_images = [ chipset_base_dir ] 91 subsystem_name = "hdf" 92 part_name = "rockchip_products" 93} 94