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_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 43 cflags = [ 44 "-Wno-unused-variable", 45 "-Wno-implicit-function-declaration", 46 "-Wno-switch", 47 "-DAVS100=1", 48 ] 49 50 if (USE_DRM) { 51 cflags += [ "-DUSE_DRM" ] 52 } 53 54 if (USE_AFBC) { 55 cflags += [ "-DSUPPORT_AFBC" ] 56 } 57 58 if (USE_GPU) { 59 cflags += [ "-DROCKCHIP_GPU_LIB_ENABLE" ] 60 } 61 62 if (USE_RGA) { 63 cflags += [ "-DSUPPORT_RGA" ] 64 } 65 66 if (USE_HEVC_DEC) { 67 cflags += [ "-DSUPPORT_HEVC" ] 68 } 69 70 if (USE_VP9_DEC) { 71 cflags += [ "-DSUPPORT_VP9" ] 72 } 73 74 cflags += [ "-DOHOS_BUFFER_HANDLE" ] 75 76 deps = [ 77 "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:RkOMX_Basecomponent", 78 "//device/soc/rockchip/rk3568/hardware/omx_il/component/common:libRkOMX_Resourcemanager", 79 "//device/soc/rockchip/rk3568/hardware/omx_il/osal:RkOMX_OSAL", 80 "//device/soc/rockchip/rk3568/hardware/rga:librga", 81 ] 82 external_deps = [ 83 "c_utils:utils", 84 "hiviewdfx_hilog_native:libhilog", 85 ] 86 87 install_images = [ chipset_base_dir ] 88 subsystem_name = "hdf" 89 part_name = "drivers_peripheral_codec" 90} 91