1# Copyright (c) 2023 Shenzhen Kaihong DID Co., Ltd.
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.
13import("//build/ohos.gni")
14import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
15HARDWARE_PATH = "../../"
16ohos_shared_library("libjpeg_vdi_impl") {
17  include_dirs = [
18    "include",
19    "//drivers/hdf_core/interfaces/inner_api/osal/uhdf",
20    "//drivers/hdf_core/interfaces/inner_api/utils",
21    "//drivers/peripheral/codec/image/vdi",
22    "//drivers/peripheral/codec/utils/include",
23    "//drivers/peripheral/display/buffer/hdi_service/include",
24    "//drivers/peripheral/display/interfaces/include",
25    "${HARDWARE_PATH}/codec/include",
26    "${HARDWARE_PATH}/mpp/include",
27    "${HARDWARE_PATH}/rga/include",
28    "${hdf_framework_path}/include/utils",
29    "$hdf_uhdf_path/osal/include",
30  ]
31  sources = [
32    "${HARDWARE_PATH}/codec/src/hdi_mpp_mpi.c",
33    "src/codec_jpeg_decoder.cpp",
34    "src/codec_jpeg_helper.cpp",
35    "src/codec_jpeg_impl.cpp",
36    "src/codec_jpeg_interface.cpp",
37  ]
38  if (is_standard_system) {
39    external_deps = [
40      "c_utils:utils",
41      "drivers_interface_display:display_buffer_idl_headers",
42      "drivers_interface_display:display_buffer_idl_headers_1.2",
43      "graphic_surface:buffer_handle",
44      "hilog:libhilog",
45    ]
46  } else {
47    external_deps = [ "hilog:libhilog" ]
48  }
49  defines = [ "LOG_TAG_IMAGE" ]
50  install_images = [ chipset_base_dir ]
51  subsystem_name = "rockchip_products"
52  part_name = "rockchip_products"
53}
54