├── .gitmodules ├── LICENSE ├── NOTICE ├── README.md ├── VERSION ├── build_install_vvas.sh ├── clean_vvas.sh ├── hooks └── pre-commit.hook ├── install_gst.sh ├── setup.sh ├── uninstall_vvas.sh ├── vvas-accel-hw ├── README.md └── image_processing │ ├── Makefile │ ├── image_processing_config.h │ └── src │ ├── hls │ ├── hls_axi_io.h │ ├── hls_video_arithm.h │ ├── hls_video_core.h │ ├── hls_video_fast.h │ ├── hls_video_haar.h │ ├── hls_video_harris.h │ ├── hls_video_histogram.h │ ├── hls_video_hough.h │ ├── hls_video_imgbase.h │ ├── hls_video_imgproc.h │ ├── hls_video_io.h │ ├── hls_video_mem.h │ ├── hls_video_stereobm.h │ ├── hls_video_types.h │ └── hls_video_undistort.h │ ├── hls_opencv.h │ ├── hls_video.h │ ├── image_processing.cpp │ ├── image_processing.h │ ├── v_csc.cpp │ ├── v_dma.cpp │ ├── v_hresampler.cpp │ ├── v_hscaler.cpp │ ├── v_vresampler.cpp │ └── v_vscaler.cpp ├── vvas-accel-sw-libs ├── README.md ├── meson.build ├── meson.cross.template ├── meson_options.txt └── utils │ ├── meson.build │ ├── vvas_accel_utils.c │ └── vvas_accel_utils.h ├── vvas-examples ├── Embedded │ ├── README.md │ ├── multichannel_ml │ │ ├── Makefile │ │ ├── Readme.md │ │ ├── create_imgproc_config.sh │ │ ├── dpu_conf.vh │ │ ├── image_processing_config.h │ │ ├── kernel_xml │ │ │ ├── dpu │ │ │ │ └── kernel.xml │ │ │ └── sfm │ │ │ │ └── kernel.xml │ │ ├── prj_conf │ │ │ ├── preplace.tcl │ │ │ ├── prj_config │ │ │ ├── stage1_suggestions.rqs │ │ │ └── strip_interconnects.tcl │ │ ├── scripts │ │ │ ├── bip_proc.tcl │ │ │ ├── create_release_pkg.sh │ │ │ ├── gen_dpu_xo.tcl │ │ │ ├── gen_sfm_xo.tcl │ │ │ ├── package_dpu_kernel.tcl │ │ │ └── package_sfm_kernel.tcl │ │ └── src │ │ │ ├── labels │ │ │ ├── label_yolov3_adas_pruned_0_9.json │ │ │ └── label_yolov3_voc.json │ │ │ └── scripts_n_utils │ │ │ ├── cascade │ │ │ ├── 1_level_cascade.sh │ │ │ ├── 2_level_cascade.sh │ │ │ ├── 3_level_cascade.sh │ │ │ ├── kernel_plate_num.json │ │ │ ├── kernel_platedetect.json │ │ │ ├── kernel_pp.json │ │ │ ├── kernel_yolov3_voc.json │ │ │ └── metaconvert_config.json │ │ │ └── multichannel_ml │ │ │ ├── kernel_densebox_320_320.json │ │ │ ├── kernel_pp.json │ │ │ ├── kernel_refinedet_pruned_0_96.json │ │ │ ├── kernel_resnet50.json │ │ │ ├── kernel_yolov3_adas_pruned_0_9.json │ │ │ ├── metaconvert_config.json │ │ │ └── multichannel_ml.sh │ └── smart_model_select │ │ ├── Makefile │ │ ├── Readme.md │ │ ├── create_imgproc_config.sh │ │ ├── dpu_conf.vh │ │ ├── image_processing_config.h │ │ ├── kernel_xml │ │ ├── dpu │ │ │ └── kernel.xml │ │ └── sfm │ │ │ └── kernel.xml │ │ ├── prj_conf │ │ ├── preplace.tcl │ │ ├── prj_config │ │ ├── stage1_suggestions.rqs │ │ └── strip_interconnects.tcl │ │ ├── scripts │ │ ├── bip_proc.tcl │ │ ├── create_release_pkg.sh │ │ ├── gen_dpu_xo.tcl │ │ ├── gen_sfm_xo.tcl │ │ ├── package_dpu_kernel.tcl │ │ └── package_sfm_kernel.tcl │ │ └── src │ │ ├── Makefile │ │ ├── jsons │ │ ├── kernel_dpu.json │ │ ├── kernel_preprocessor.json │ │ ├── label_ssd_adas_pruned_0_95.json │ │ ├── label_ssd_mobilenet_v2.json │ │ ├── label_ssd_pedestrian_pruned_0_97.json │ │ ├── label_ssd_traffic_pruned_0_9.json │ │ ├── label_tiny_yolov3_vmss.json │ │ ├── label_yolov2_voc.json │ │ ├── label_yolov2_voc_pruned_0_77.json │ │ ├── label_yolov3_adas_pruned_0_9.json │ │ ├── label_yolov3_voc_tf.json │ │ └── metaconvert_config.json │ │ ├── setup.sh │ │ ├── smart_model_select.c │ │ └── templates │ │ ├── file_fake_template.cfg │ │ ├── file_fake_template_perf.cfg │ │ ├── file_file_template.cfg │ │ ├── file_kms_template.cfg │ │ ├── rtsp_fake_template.cfg │ │ ├── rtsp_file_template.cfg │ │ ├── rtsp_kms_template.cfg │ │ ├── welcome.cfg │ │ └── welcome_1080.jpg └── README.md ├── vvas-gst-plugins ├── README.md ├── gst-libs │ ├── gst │ │ ├── meson.build │ │ └── vvas │ │ │ ├── gstinferenceclassification.c │ │ │ ├── gstinferenceclassification.h │ │ │ ├── gstinferencemeta.c │ │ │ ├── gstinferencemeta.h │ │ │ ├── gstinferenceprediction.c │ │ │ ├── gstinferenceprediction.h │ │ │ ├── gstvvasallocator.c │ │ │ ├── gstvvasallocator.h │ │ │ ├── gstvvasbufferpool.c │ │ │ ├── gstvvasbufferpool.h │ │ │ ├── gstvvascommon.h │ │ │ ├── gstvvascoreutils.c │ │ │ ├── gstvvascoreutils.h │ │ │ ├── gstvvashdrmeta.c │ │ │ ├── gstvvashdrmeta.h │ │ │ ├── gstvvasinpinfer.c │ │ │ ├── gstvvasinpinfer.h │ │ │ ├── gstvvaslameta.c │ │ │ ├── gstvvaslameta.h │ │ │ ├── gstvvasofmeta.c │ │ │ ├── gstvvasofmeta.h │ │ │ ├── gstvvasoverlaymeta.c │ │ │ ├── gstvvasoverlaymeta.h │ │ │ ├── gstvvassrcidmeta.c │ │ │ ├── gstvvassrcidmeta.h │ │ │ ├── gstvvasusrmeta.c │ │ │ ├── gstvvasusrmeta.h │ │ │ ├── gstvvasutils.c │ │ │ ├── gstvvasutils.h │ │ │ ├── meson.build │ │ │ └── mpsoc_vcu_hdr.h │ └── meson.build ├── gst │ ├── defunnel │ │ ├── gstvvas_xdefunnel.c │ │ ├── gstvvas_xdefunnel.h │ │ └── meson.build │ ├── funnel │ │ ├── gstvvas_xfunnel.c │ │ ├── gstvvas_xfunnel.h │ │ └── meson.build │ ├── meson.build │ ├── metaaffixer │ │ ├── gstvvas_xmetaaffixer.c │ │ ├── gstvvas_xmetaaffixer.h │ │ └── meson.build │ ├── metaconvert │ │ ├── gstvvas_xmetaconvert.c │ │ ├── gstvvas_xmetaconvert.h │ │ ├── meson.build │ │ └── metaconvert_config.json │ ├── reorderframe │ │ ├── gstvvas_xreorderframe.c │ │ ├── gstvvas_xreorderframe.h │ │ └── meson.build │ ├── roigen │ │ ├── gstvvas_xroigen.c │ │ ├── gstvvas_xroigen.h │ │ └── meson.build │ ├── skipframe │ │ ├── gstvvas_xskipframe.c │ │ ├── gstvvas_xskipframe.h │ │ └── meson.build │ └── tracker │ │ ├── gstvvas_xtracker.cpp │ │ ├── gstvvas_xtracker.h │ │ └── meson.build ├── meson.build ├── meson.cross.template ├── meson_options.txt ├── pkgconfig │ ├── meson.build │ ├── vvas-gst-plugins-uninstalled.pc.in │ └── vvas-gst-plugins.pc.in └── sys │ ├── abrscaler │ ├── gstvvas_xabrscaler.c │ ├── gstvvas_xabrscaler.h │ └── meson.build │ ├── compositor │ ├── README.md │ ├── gstvvas_xcompositor.c │ ├── gstvvas_xcompositor.h │ └── meson.build │ ├── filter │ ├── gstvvas_xfilter.c │ ├── gstvvas_xfilter.h │ └── meson.build │ ├── infer │ ├── gstvvas_xinfer.c │ ├── gstvvas_xinfer.h │ └── meson.build │ ├── meson.build │ ├── multicrop │ ├── gstvvas_xmulticrop.c │ ├── gstvvas_xmulticrop.h │ └── meson.build │ ├── multisrc │ ├── gstvvas_xmultisrc.c │ ├── gstvvas_xmultisrc.h │ └── meson.build │ ├── optflow │ ├── gstvvas_xoptflow.c │ ├── gstvvas_xoptflow.h │ └── meson.build │ ├── overlay │ ├── gstvvas_xoverlay.cpp │ ├── gstvvas_xoverlay.h │ └── meson.build │ └── videodec │ ├── gstvvas_xvideodec.c │ ├── gstvvas_xvideodec.h │ └── meson.build ├── vvas-platforms ├── DC │ └── README.md ├── Embedded │ ├── zcu104_vcuDec_DP │ │ ├── Makefile │ │ ├── petalinux │ │ │ ├── .petalinux │ │ │ │ └── metadata │ │ │ ├── Makefile │ │ │ ├── config.project │ │ │ └── project-spec │ │ │ │ ├── attributes │ │ │ │ ├── configs │ │ │ │ ├── busybox │ │ │ │ │ └── inetd.conf │ │ │ │ ├── config │ │ │ │ ├── init-ifupdown │ │ │ │ │ └── interfaces │ │ │ │ ├── rootfs_config │ │ │ │ └── systemd-conf │ │ │ │ │ └── wired.network │ │ │ │ ├── decoupling-dtsi │ │ │ │ └── system-user.dtsi │ │ │ │ ├── hw-description │ │ │ │ └── metadata │ │ │ │ └── meta-user │ │ │ │ ├── COPYING.MIT │ │ │ │ ├── README │ │ │ │ ├── conf │ │ │ │ ├── layer.conf │ │ │ │ ├── petalinuxbsp.conf │ │ │ │ └── user-rootfsconfig │ │ │ │ ├── meta-xilinx-tools │ │ │ │ └── recipes-bsp │ │ │ │ │ └── uboot-device-tree │ │ │ │ │ ├── files │ │ │ │ │ └── system-user.dtsi │ │ │ │ │ └── uboot-device-tree.bbappend │ │ │ │ ├── recipes-bsp │ │ │ │ ├── device-tree │ │ │ │ │ ├── device-tree.bbappend │ │ │ │ │ └── files │ │ │ │ │ │ ├── openamp.dtsi │ │ │ │ │ │ ├── pl-custom.dtsi │ │ │ │ │ │ ├── system-user.dtsi │ │ │ │ │ │ ├── xen-qemu.dtsi │ │ │ │ │ │ └── xen.dtsi │ │ │ │ └── u-boot │ │ │ │ │ ├── files │ │ │ │ │ ├── 0001-ubifs-distroboot-support.patch │ │ │ │ │ ├── bsp.cfg │ │ │ │ │ └── platform-top.h │ │ │ │ │ └── u-boot-xlnx_%.bbappend │ │ │ │ ├── recipes-kernel │ │ │ │ └── linux │ │ │ │ │ ├── linux-xlnx │ │ │ │ │ ├── 0001-misc-xlnx_dpu-support-softmax-40bit-addressing-from-.patch │ │ │ │ │ └── bsp.cfg │ │ │ │ │ └── linux-xlnx_%.bbappend │ │ │ │ ├── recipes-multimedia │ │ │ │ ├── gstreamer │ │ │ │ │ ├── files │ │ │ │ │ │ └── 0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch │ │ │ │ │ └── gstreamer1.0-plugins-bad_%.bbappend │ │ │ │ └── vcu │ │ │ │ │ ├── files │ │ │ │ │ ├── 0001-fix-2022.2-Store-initial-GST-display-resolution.patch │ │ │ │ │ └── 0001-fix-4444-Round-up-display-parameters-before-calling-.patch │ │ │ │ │ └── libomxil-xlnx.bbappend │ │ │ │ ├── recipes-vai │ │ │ │ ├── target-factory │ │ │ │ │ └── target-factory_3.0.bb │ │ │ │ ├── unilog │ │ │ │ │ ├── files │ │ │ │ │ │ └── 0001-fix-python-path-for-petalinux.patch │ │ │ │ │ └── unilog_3.0.bb │ │ │ │ ├── vart │ │ │ │ │ └── vart_3.0.bb │ │ │ │ ├── vitis-ai-library │ │ │ │ │ ├── vitis-ai-library_3.0.bb │ │ │ │ │ └── vitisai_3.0.inc │ │ │ │ └── xir │ │ │ │ │ └── xir_3.0.bb │ │ │ │ ├── recipes-vvas │ │ │ │ └── vvas │ │ │ │ │ ├── vvas-accel-libs_3.0.bb │ │ │ │ │ ├── vvas-core_1.0.bb │ │ │ │ │ ├── vvas-gst_3.0.bb │ │ │ │ │ ├── vvas-utils_3.0.bb │ │ │ │ │ └── vvas.inc │ │ │ │ └── recipes-xrt │ │ │ │ └── xrt │ │ │ │ └── xrt_git.bbappend │ │ ├── scripts │ │ │ └── xilinx_zcu104_vcuDec_DP_pfm.tcl │ │ └── vivado │ │ │ ├── Makefile │ │ │ ├── dynamic_postlink.tcl │ │ │ ├── src │ │ │ ├── a53 │ │ │ │ └── xrt │ │ │ │ │ ├── image │ │ │ │ │ └── init.sh │ │ │ │ │ └── linux.bif │ │ │ ├── generic.readme │ │ │ └── qemu │ │ │ │ └── lnx │ │ │ │ ├── pmu_args.txt │ │ │ │ └── qemu_args.txt │ │ │ └── xilinx_zcu104_vcuDec_DP_xsa.tcl │ └── zcu104_vcuDec_vmixHdmiTx │ │ ├── Makefile │ │ ├── petalinux │ │ ├── .petalinux │ │ │ └── metadata │ │ ├── Makefile │ │ ├── config.project │ │ └── project-spec │ │ │ ├── attributes │ │ │ ├── configs │ │ │ ├── busybox │ │ │ │ └── inetd.conf │ │ │ ├── config │ │ │ ├── init-ifupdown │ │ │ │ └── interfaces │ │ │ ├── rootfs_config │ │ │ └── systemd-conf │ │ │ │ └── wired.network │ │ │ ├── decoupling-dtsi │ │ │ └── system-user.dtsi │ │ │ ├── hw-description │ │ │ └── metadata │ │ │ └── meta-user │ │ │ ├── COPYING.MIT │ │ │ ├── README │ │ │ ├── conf │ │ │ ├── layer.conf │ │ │ ├── petalinuxbsp.conf │ │ │ └── user-rootfsconfig │ │ │ ├── meta-xilinx-tools │ │ │ └── recipes-bsp │ │ │ │ └── uboot-device-tree │ │ │ │ ├── files │ │ │ │ └── system-user.dtsi │ │ │ │ └── uboot-device-tree.bbappend │ │ │ ├── recipes-bsp │ │ │ ├── device-tree │ │ │ │ ├── device-tree.bbappend │ │ │ │ └── files │ │ │ │ │ ├── openamp.dtsi │ │ │ │ │ ├── pl-custom.dtsi │ │ │ │ │ ├── system-user.dtsi │ │ │ │ │ ├── xen-qemu.dtsi │ │ │ │ │ └── xen.dtsi │ │ │ └── u-boot │ │ │ │ ├── files │ │ │ │ ├── 0001-ubifs-distroboot-support.patch │ │ │ │ ├── bsp.cfg │ │ │ │ └── platform-top.h │ │ │ │ └── u-boot-xlnx_%.bbappend │ │ │ ├── recipes-kernel │ │ │ └── linux │ │ │ │ ├── linux-xlnx │ │ │ │ ├── 0001-misc-xlnx_dpu-support-softmax-40bit-addressing-from-.patch │ │ │ │ └── bsp.cfg │ │ │ │ └── linux-xlnx_%.bbappend │ │ │ ├── recipes-multimedia │ │ │ ├── gstreamer │ │ │ │ ├── files │ │ │ │ │ └── 0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch │ │ │ │ └── gstreamer1.0-plugins-bad_%.bbappend │ │ │ └── vcu │ │ │ │ ├── files │ │ │ │ ├── 0001-fix-2022.2-Store-initial-GST-display-resolution.patch │ │ │ │ └── 0001-fix-4444-Round-up-display-parameters-before-calling-.patch │ │ │ │ └── libomxil-xlnx.bbappend │ │ │ ├── recipes-vai │ │ │ ├── target-factory │ │ │ │ └── target-factory_3.0.bb │ │ │ ├── unilog │ │ │ │ ├── files │ │ │ │ │ └── 0001-fix-python-path-for-petalinux.patch │ │ │ │ └── unilog_3.0.bb │ │ │ ├── vart │ │ │ │ └── vart_3.0.bb │ │ │ ├── vitis-ai-library │ │ │ │ ├── vitis-ai-library_3.0.bb │ │ │ │ └── vitisai_3.0.inc │ │ │ └── xir │ │ │ │ └── xir_3.0.bb │ │ │ ├── recipes-vvas │ │ │ └── vvas │ │ │ │ ├── vvas-accel-libs_3.0.bb │ │ │ │ ├── vvas-core_1.0.bb │ │ │ │ ├── vvas-gst_3.0.bb │ │ │ │ ├── vvas-utils_3.0.bb │ │ │ │ └── vvas.inc │ │ │ └── recipes-xrt │ │ │ └── xrt │ │ │ └── xrt_git.bbappend │ │ ├── scripts │ │ └── xilinx_zcu104_vcuDec_vmixHdmiTx_pfm.tcl │ │ └── vivado │ │ ├── Makefile │ │ ├── dynamic_postlink.tcl │ │ ├── ip_repo │ │ └── hdmi_hb │ │ │ ├── component.xml │ │ │ ├── constrs_1 │ │ │ └── new │ │ │ │ ├── hdmi_hb.xdc │ │ │ │ └── hdmi_hb_ooc.xdc │ │ │ ├── sources_1 │ │ │ └── new │ │ │ │ └── hdmi_hb.v │ │ │ └── xgui │ │ │ └── hdmi_hb_v1_0.tcl │ │ ├── src │ │ ├── a53 │ │ │ └── xrt │ │ │ │ ├── image │ │ │ │ └── init.sh │ │ │ │ └── linux.bif │ │ ├── generic.readme │ │ └── qemu │ │ │ └── lnx │ │ │ ├── pmu_args.txt │ │ │ └── qemu_args.txt │ │ ├── xilinx_zcu104_vcuDec_vmixHdmiTx_xsa.tcl │ │ └── zcu104.xdc └── README.md └── vvas-utils ├── README.md ├── meson.build ├── meson.cross.template ├── pkgconfig ├── meson.build ├── vvas-structure.pc.in ├── vvas-utils-uninstalled.pc.in └── vvas-utils.pc.in └── utils ├── meson.build ├── vvas ├── vvas_kernel.h ├── vvas_structure.h ├── vvaslogs.h └── vvasmeta.h ├── vvas_kernel_utils.c └── vvas_structure.c /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vvas-core"] 2 | path = vvas-core 3 | url = https://github.com/Xilinx/vvas-core 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | VVAS source code and HLS source code authored by Xilinx are released 2 | under the terms of the: 3 | Apache License, Version 2.0 4 | 5 | Copyright 2022 Xilinx, Inc. 6 | Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 7 | 8 | Licensed under the Apache License, Version 2.0 (the "License"); 9 | you may not use this file except in compliance with the License. 10 | You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, software 15 | distributed under the License is distributed on an "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | See the License for the specific language governing permissions and 18 | limitations under the License. 19 | 20 | This product will also download various third party sources during run time. 21 | All these sources and their corrosponding copy right information is downloadable 22 | from www.xilinx.com at the following location: 23 | 24 | Various third party sources used in pre-built binaries for this product and 25 | their copy right information location will be available along with the 26 | pre-built binaries download location on the respective example design pages 27 | when these pre-built binaries will be available for download. 28 | 29 | The pre-built binaries will be made available for the two example designs 30 | mentioned below: 31 | 32 | 1. smart-model-select 33 | 2. Multichannel_ML 34 | 35 | The information about these example designs are available at VVAS Product page: https://xilinx.github.io/VVAS/ 36 | 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vitis™ Video Analytics SDK 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 7 | 8 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 9 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 10 | 11 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 12 | 13 | ## View the [Documentation](https://xilinx.github.io/VVAS/) 14 | 15 | ### To clone this repo: 16 | 17 | ``` 18 | git clone --recurse-submodules https://github.com/Xilinx/VVAS.git 19 | ``` 20 | 21 | ## Folder Structure 22 | 23 | - **vvas-utils** core contains infrastructure libraries for VVAS gstreamer plugins and kernel libraries 24 | - **vvas-gst-plugins** contains VVAS specific gstreamer plugins 25 | - **vvas-accel-sw-libs** contains VVAS specific kernel libs which are supported by VVAS gstreamer infrastructure plugins 26 | - **vvas-accel-hw** contains VVAS HW kernels which can be build with vitis 27 | - **vvas-examples** contains examples for using VVAS stack 28 | - **vvas-platform** contains sample VVAS platforms 29 | 30 | ## Build and install VVAS essentials for embedded solutions: 31 | 32 | A helper script, **./build_install_vvas.sh**, is provided in root of this repo to build and install VVAS components. 33 | 34 | Step 1 : Source sysroot path if not done already 35 | ``` 36 | source /environment-setup-aarch64-xilinx-linux 37 | ``` 38 | Step 2 : Build 39 | ``` 40 | ./build_install_vvas.sh Edge 41 | ``` 42 | Step 3 : copy VVAS installer to embedded board 43 | ``` 44 | scp install/vvas_installer.tar.gz :/ 45 | ``` 46 | Step 4 : Install VVAS on embedded board 47 | ``` 48 | cd / 49 | tar -xvf vvas_installer.tar.gz 50 | ``` 51 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 3.0.0 2 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | source /opt/xilinx/xrt/setup.sh 19 | export LD_LIBRARY_PATH=/opt/xilinx/vvas/lib:$LD_LIBRARY_PATH 20 | export PKG_CONFIG_PATH=/opt/xilinx/vvas/lib/pkgconfig:$PKG_CONFIG_PATH 21 | export PATH=/opt/xilinx/vvas/bin:$PATH 22 | export GST_PLUGIN_PATH=/opt/xilinx/vvas/lib/gstreamer-1.0:$GST_PLUGIN_PATH 23 | -------------------------------------------------------------------------------- /vvas-accel-hw/README.md: -------------------------------------------------------------------------------- 1 | # vvas-accel-hw 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | - Step 1: Source 2022.2 vitis 12 | - Step 2: edit Makefile to point PLATFORM_FILE to any 2022.2 vitis platform (tested with zcu104 base platform) 13 | - Step 3: edit options eg: image_processing/image_processing_config.h of your choice 14 | - Step 4: make 15 | 16 | Kernels will be generate at xo folder. eg: image_processing kernel will be generated as xo/image_processing.xo 17 | -------------------------------------------------------------------------------- /vvas-accel-hw/image_processing/Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ########################################################################### 17 | 18 | #PLATFORM_FILE := /proj/xbuilds/2022.1_released/internal_platforms/xilinx_zcu104_base_202210_1/xilinx_zcu104_base_202210_1.xpfm 19 | 20 | TARGET := hw 21 | 22 | XOCCFLAGS := --platform $(PLATFORM_FILE) -t $(TARGET) -s -g 23 | 24 | IMAGE_PROCESSING_FLAGS := --kernel image_processing -I. -I./src/hls 25 | 26 | .PHONY: clean 27 | 28 | all: image_processing.xo 29 | 30 | image_processing.xo: src/image_processing.cpp src/v_hresampler.cpp src/v_hscaler.cpp src/v_dma.cpp src/v_csc.cpp src/v_vresampler.cpp src/v_vscaler.cpp 31 | v++ $(XOCCFLAGS) $(IMAGE_PROCESSING_FLAGS) -c -o xo/$@ $^ 32 | 33 | clean: 34 | $(RM) -r xo/* *_x .Xil sd_card* *.xclbin *.ltx *.log *.info packaged_kernel* tmp_kernel* vivado* pfm_sw dpu_conf.vh 35 | $(RM) *summary* *.str *.hwh 36 | -------------------------------------------------------------------------------- /vvas-accel-hw/image_processing/src/hls_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /* 19 | * HLS Video Header File 20 | */ 21 | 22 | #ifndef ___HLS__VIDEO__ 23 | #define ___HLS__VIDEO__ 24 | 25 | #ifndef __cplusplus 26 | #error C++ is required to include this header file 27 | #endif 28 | 29 | /* for safety*/ 30 | #if (defined(ROWS)|| defined(COLS) || defined(SRC_T) || defined(SRC1_T) || defined(SRC2_T) || defined(DST_T)) 31 | #error One or more of the following is defined: ROWS, COLS, SRC_T, SRC1_T, SRC2_T, DST_T. Definition conflicts with their usage as template parameters. 32 | #endif 33 | 34 | #include "hls/hls_axi_io.h" 35 | #include "hls_math.h" 36 | #include "hls_stream.h" 37 | 38 | #include "utils/x_hls_utils.h" 39 | #include "utils/x_hls_traits.h" 40 | #include "utils/x_hls_defines.h" 41 | #include "hls/hls_video_types.h" 42 | #include "hls/hls_video_mem.h" 43 | #include "hls/hls_video_core.h" 44 | #include "hls/hls_video_imgbase.h" 45 | #include "hls/hls_video_io.h" 46 | 47 | #include "hls/hls_video_arithm.h" 48 | #include "hls/hls_video_imgproc.h" 49 | #include "hls/hls_video_histogram.h" 50 | #include "hls/hls_video_fast.h" 51 | #include "hls/hls_video_undistort.h" 52 | #include "hls/hls_video_hough.h" 53 | #include "hls/hls_video_harris.h" 54 | #include "hls/hls_video_haar.h" 55 | #include "hls/hls_video_stereobm.h" 56 | 57 | #endif 58 | 59 | 60 | -------------------------------------------------------------------------------- /vvas-accel-sw-libs/README.md: -------------------------------------------------------------------------------- 1 | # VVAS Accelerator Software libraries 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | ## Steps for Cross Compilation for Embedded Platforms 12 | : 13 | 1. Copy sdk.sh file to on build machine 14 | 15 | 2. Prepare SYSROOT and set environment variables 16 | ``` 17 | cd 18 | ./sdk.sh -d `pwd` -y 19 | ``` 20 | 3. Edit vvas-accel-sw-libs/meson.cross to point to SYSROOT path 21 | 22 | 4. Build & Compile VVAS accelerator libs 23 | ``` 24 | meson build --cross-file meson.cross 25 | cd build; 26 | ninja; 27 | ``` 28 | 5. For installing user to copy .so to target in respective locations 29 | 30 | ***Note:***
31 | Following packages need to be available in sysroot : 32 | ``` 33 | - jansson >= 2.7 34 | - Vitis AI 2.0 (https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2021.2-r2.0.0.tar.gz) 35 | - vvas-utils and vvas-gst-plugins 36 | ``` 37 | 38 | ***Note:***
39 | 40 | ***Enable/disable accelerator sw libraries/features*** 41 | By default, all libraries are enabled in build process. User can selectively enable/disable libraries in build using build option “-D”.
42 | Below is example to disable vvas_xmongodblib library in build process 43 | ``` 44 | meson -Dvvas_xmongodblib=disabled --libdir=/usr/local/lib/vvas/ build; 45 | ``` 46 | 47 | ***Example to enable all accel sw libraries in meson build is*** 48 | 49 | ``` 50 | meson -Dvvas_xmongodblib=enabled --libdir=/usr/local/lib/vvas/ build; 51 | cd build; 52 | ninja; 53 | sudo ninja install; 54 | ``` 55 | 56 | -------------------------------------------------------------------------------- /vvas-accel-sw-libs/meson.cross.template: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | [host_machine] 19 | system = 'linux' 20 | cpu_family = 'aarch64' 21 | cpu = 'arm64' 22 | endian = 'little' 23 | 24 | [build_machine] 25 | system = 'linux' 26 | cpu_family = 'x86_64' 27 | cpu = 'x86_64' 28 | endian = 'little' 29 | 30 | [built-in options] 31 | c_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 32 | cpp_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 33 | c_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 34 | cpp_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 35 | 36 | [properties] 37 | pkg_config_libdir = ['/usr/lib/pkgconfig:/usr/share/pkgconfig'] 38 | sys_root = '' 39 | 40 | [binaries] 41 | c = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-gcc'] 42 | cpp = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++'] 43 | ar = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ar'] 44 | pkgconfig = ['/usr/bin/pkg-config'] 45 | strip = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-strip'] 46 | -------------------------------------------------------------------------------- /vvas-accel-sw-libs/meson_options.txt: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | # Feature options for plugins without external deps 19 | option('utils', type : 'feature', value : 'auto') 20 | -------------------------------------------------------------------------------- /vvas-accel-sw-libs/utils/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | vvas_accel_utils = library('vvas_accel_utils', 19 | 'vvas_accel_utils.c', 20 | c_args : [vvas_accel_sw_libs_args], 21 | include_directories : [configinc], 22 | dependencies : [vvasutils_dep, vvascore_dep, xrt_dep], 23 | install : true, 24 | ) 25 | 26 | #VVAS Accel Util Headers to install 27 | vvas_accel_uril_headers = ['vvas_accel_utils.h'] 28 | 29 | install_headers(vvas_accel_uril_headers) 30 | 31 | vvas_accel_utils_dep = declare_dependency(link_with : [vvas_accel_utils], dependencies : [vvasutils_dep, vvascore_dep]) 32 | -------------------------------------------------------------------------------- /vvas-accel-sw-libs/utils/vvas_accel_utils.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2022 Xilinx, Inc. 4 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | VvasVideoFrame * 24 | vvas_videoframe_from_vvasframe (VvasContext * vvas_ctx, int8_t mbank_idx, 25 | VVASFrame * vframe); 26 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/README.md: -------------------------------------------------------------------------------- 1 | ## Copyright and license statement 2 | Copyright 2020-2022 Xilinx Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | 9 | # VVAS embedded examples 10 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/Readme.md: -------------------------------------------------------------------------------- 1 | ## Copyright and license statement 2 | Copyright 2020-2022 Xilinx Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | 9 | # MultiChannel ML 10 | 11 | For details about how to build and use this example, refer to [multichannel_ml](https://xilinx.github.io/VVAS/main/build/html/docs/Embedded/Tutorials/MultiChannelML.html) documentation. 12 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/create_imgproc_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo -n "Creating image_processing.cfg... " 3 | echo "[color-formats]" > image_processing.cfg 4 | 5 | grep "#define HA.*\s\+1" image_processing_config.h >> image_processing.cfg 6 | sed -e 's:\s\+1::' -e 's:^#define ::' -i image_processing.cfg 7 | 8 | sed -i image_processing.cfg \ 9 | -e 's:HAS_Y_UV8_Y_UV8_420:VVAS_VIDEO_FORMAT_Y_UV8_420:' \ 10 | -e 's:HAS_RGB8_YUV8:VVAS_VIDEO_FORMAT_RGB:' \ 11 | -e 's:HAS_BGR8:VVAS_VIDEO_FORMAT_BGR:' \ 12 | -e 's:HAS_Y_UV10_Y_UV10_420:VVAS_VIDEO_FORMAT_NV12_10LE32:' \ 13 | -e 's:HAS_Y8:VVAS_VIDEO_FORMAT_GRAY8:' \ 14 | -e 's:HAS_Y10:VVAS_VIDEO_FORMAT_GRAY10_LE32:' \ 15 | -e 's:HAS_Y_U_V8_420:VVAS_VIDEO_FORMAT_I420:' 16 | 17 | echo Done! 18 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/kernel_xml/sfm/kernel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/prj_conf/preplace.tcl: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ########################################################################### 17 | 18 | set script_path [ file dirname [ file normalize [ info script ] ] ] 19 | puts $script_path 20 | puts "${script_path}/stage1_suggestions.rqs" 21 | read_qor_suggestions ${script_path}/stage1_suggestions.rqs 22 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/prj_conf/stage1_suggestions.rqs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-examples/Embedded/multichannel_ml/prj_conf/stage1_suggestions.rqs -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/scripts/gen_dpu_xo.tcl: -------------------------------------------------------------------------------- 1 | # /* 2 | # * Copyright 2022 Xilinx Inc. 3 | # * 4 | # * Licensed under the Apache License, Version 2.0 (the "License"); 5 | # * you may not use this file except in compliance with the License. 6 | # * You may obtain a copy of the License at 7 | # * 8 | # * http://www.apache.org/licenses/LICENSE-2.0 9 | # * 10 | # * Unless required by applicable law or agreed to in writing, software 11 | # * distributed under the License is distributed on an "AS IS" BASIS, 12 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # * See the License for the specific language governing permissions and 14 | # * limitations under the License. 15 | # */ 16 | 17 | 18 | if { $::argc != 4 } { 19 | puts "ERROR: Program \"$::argv0\" requires 4 arguments!\n" 20 | puts "Usage: $::argv0 \n" 21 | exit 22 | } 23 | 24 | set xoname [lindex $::argv 0] 25 | set krnl_name [lindex $::argv 1] 26 | set target [lindex $::argv 2] 27 | set device [lindex $::argv 3] 28 | puts $xoname 29 | set suffix "${krnl_name}_${target}_${device}" 30 | if { [info exists ::env(DIR_PATH)] } { 31 | source -notrace $env(DIR_PRJ)/scripts/package_dpu_kernel.tcl 32 | } else { 33 | source -notrace ./scripts/package_dpu_kernel.tcl 34 | } 35 | 36 | if {[file exists "${xoname}"]} { 37 | file delete -force "${xoname}" 38 | } 39 | 40 | if { [info exists ::env(DIR_PATH)] } { 41 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml $env(DIR_PRJ)/kernel_xml/dpu/kernel.xml 42 | } else { 43 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml ./kernel_xml/dpu/kernel.xml 44 | } 45 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/scripts/gen_sfm_xo.tcl: -------------------------------------------------------------------------------- 1 | # /* 2 | # * Copyright 2022 Xilinx Inc. 3 | # * 4 | # * Licensed under the Apache License, Version 2.0 (the "License"); 5 | # * you may not use this file except in compliance with the License. 6 | # * You may obtain a copy of the License at 7 | # * 8 | # * http://www.apache.org/licenses/LICENSE-2.0 9 | # * 10 | # * Unless required by applicable law or agreed to in writing, software 11 | # * distributed under the License is distributed on an "AS IS" BASIS, 12 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # * See the License for the specific language governing permissions and 14 | # * limitations under the License. 15 | # */ 16 | 17 | if { $::argc != 4 } { 18 | puts "ERROR: Program \"$::argv0\" requires 4 arguments!\n" 19 | puts "Usage: $::argv0 \n" 20 | exit 21 | } 22 | 23 | set xoname [lindex $::argv 0] 24 | set krnl_name [lindex $::argv 1] 25 | set target [lindex $::argv 2] 26 | set device [lindex $::argv 3] 27 | 28 | set suffix "${krnl_name}_${target}_${device}" 29 | 30 | if { [info exists ::env(DIR_PATH)] } { 31 | source -notrace $env(DIR_PRJ)/scripts/package_sfm_kernel.tcl 32 | } else { 33 | source -notrace ./scripts/package_sfm_kernel.tcl 34 | } 35 | 36 | if {[file exists "${xoname}"]} { 37 | file delete -force "${xoname}" 38 | } 39 | 40 | if { [info exists ::env(DIR_PATH)] } { 41 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml $env(DIR_PRJ)/kernel_xml/sfm/kernel.xml 42 | } else { 43 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml ./kernel_xml/sfm/kernel.xml 44 | } 45 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/labels/label_yolov3_adas_pruned_0_9.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "yolov3_adas_pruned_0_9", 3 | "num-labels": 3, 4 | "labels" :[ 5 | { 6 | "name": "car", 7 | "label": 0, 8 | "display_name" : "car" 9 | }, 10 | { 11 | "name": "person", 12 | "label": 1, 13 | "display_name" : "person" 14 | }, 15 | { 16 | "name": "cycle", 17 | "label": 2, 18 | "display_name" : "cycle" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/1_level_cascade.sh: -------------------------------------------------------------------------------- 1 | gst-launch-1.0 -v --no-position \ 2 | filesrc location=/home/root/videos/PLATEDETECT.mp4 \ 3 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 4 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_yolov3_voc.json name=infer1 ! queue \ 5 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 6 | ! kmssink plane-id=34 bus-id="a0130000.v_mix" sync=false 7 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/2_level_cascade.sh: -------------------------------------------------------------------------------- 1 | gst-launch-1.0 -v --no-position \ 2 | filesrc location=/home/root/videos/PLATEDETECT.mp4 \ 3 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 4 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_yolov3_voc.json name=infer1 ! queue \ 5 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_platedetect.json name=infer2 ! queue \ 6 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 7 | ! kmssink plane-id=34 bus-id="a0130000.v_mix" sync=false 8 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/3_level_cascade.sh: -------------------------------------------------------------------------------- 1 | gst-launch-1.0 -v --no-position \ 2 | filesrc location=/home/root/videos/PLATEDETECT.mp4 \ 3 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 4 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_yolov3_voc.json name=infer1 ! queue \ 5 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_platedetect.json name=infer2 ! queue \ 6 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_plate_num.json name=infer3 ! queue \ 7 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 8 | ! kmssink plane-id=34 bus-id="a0130000.v_mix" sync=false 9 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/kernel_plate_num.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : false, 3 | "inference-level" : 3, 4 | "low-latency" : false, 5 | "inference-max-queue" : 0, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 0, 9 | "model-name" : "plate_num", 10 | "model-class" : "PLATENUM", 11 | "model-format" : "BGR", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/kernel_platedetect.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : false, 3 | "inference-level" : 2, 4 | "low-latency" : false, 5 | "inference-max-queue" : 0, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "plate_detect", 10 | "model-class" : "PLATEDETECT", 11 | "model-format" : "BGR", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/kernel_pp.json: -------------------------------------------------------------------------------- 1 | { 2 | "xclbin-location" : "/run/media/mmcblk0p1/dpu.xclbin", 3 | "device-index": 0, 4 | "kernel" :{ 5 | "kernel-name":"image_processing:{image_processing_1}", 6 | "library-name": "libvvas_xpreprocessor.so", 7 | "config": { 8 | "ppc": 2, 9 | "in-mem-bank": 0, 10 | "out-mem-bank": 0, 11 | "inference-level" : 1, 12 | "debug_level" : 0 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/kernel_yolov3_voc.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : false, 3 | "inference-level" : 1, 4 | "low-latency" : false, 5 | "inference-max-queue" : 0, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "yolov3_voc", 10 | "model-class" : "YOLOV3", 11 | "model-format" : "RGB", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/cascade/metaconvert_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "display-level": 0, 4 | "font-size" : 1, 5 | "font" : 3, 6 | "thickness" : 2, 7 | "radius": 5, 8 | "mask-level" : 0, 9 | "y-offset" : 0, 10 | "label-filter" : [ "class" ], 11 | "classes" : [ 12 | { 13 | "name" : "car", 14 | "blue" : 255, 15 | "green" : 0, 16 | "red" : 0, 17 | "masking" : 0 18 | }, 19 | { 20 | "name" : "person", 21 | "blue" : 0, 22 | "green" : 255, 23 | "red" : 0, 24 | "masking" : 0 25 | }, 26 | { 27 | "name" : "bus", 28 | "blue" : 0, 29 | "green" : 0, 30 | "red" : 255, 31 | "masking" : 0 32 | }, 33 | { 34 | "name" : "bicycle", 35 | "blue" : 0, 36 | "green" : 0, 37 | "red" : 255, 38 | "masking" : 0 39 | } 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/kernel_densebox_320_320.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : false, 3 | "inference-level" : 1, 4 | "low-latency" : false, 5 | "inference-max-queue" : 0, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "densebox_320_320", 10 | "model-class" : "FACEDETECT", 11 | "model-format" : "BGR", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/kernel_pp.json: -------------------------------------------------------------------------------- 1 | { 2 | "xclbin-location":"/run/media/mmcblk0p1/dpu.xclbin", 3 | "vvas-library-repo": "/usr/lib", 4 | "device-index": 0, 5 | "kernel" :{ 6 | "kernel-name":"image_processing:{image_processing_1}", 7 | "library-name": "libvvas_xpreprocessor.so", 8 | "config": { 9 | "ppc": 2, 10 | "in-mem-bank": 0, 11 | "out-mem-bank": 0, 12 | "inference-level" : 1, 13 | "debug_level" : 0 14 | } 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/kernel_refinedet_pruned_0_96.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : true, 3 | "inference-level" : 1, 4 | "low-latency" : false, 5 | "inference-max-queue": 30, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "refinedet_pruned_0_96", 10 | "model-class" : "REFINEDET", 11 | "model-format" : "BGR", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/kernel_resnet50.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf" : true, 3 | "inference-level" : 1, 4 | "low-latency" : false, 5 | "inference-max-queue" : 30, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "resnet50", 10 | "model-class" : "CLASSIFICATION", 11 | "model-format" : "BGR", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/kernel_yolov3_adas_pruned_0_9.json: -------------------------------------------------------------------------------- 1 | { 2 | "attach-ppe-outbuf": false, 3 | "inference-level": 1, 4 | "low-latency" : false, 5 | "inference-max-queue": 0, 6 | "kernel" : { 7 | "config": { 8 | "batch-size" : 1, 9 | "model-name" : "yolov3_adas_pruned_0_9", 10 | "model-class" : "YOLOV3", 11 | "model-format" : "RGB", 12 | "model-path" : "/usr/share/vitis_ai_library/models/", 13 | "vitis-ai-preprocess" : false, 14 | "performance-test" : false, 15 | "max-objects" : 3, 16 | "float-feature" : 1, 17 | "segoutfactor" : 1.0, 18 | "seg-out-format" : "BGR", 19 | "debug-level" : 0 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/metaconvert_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "display-level": 0, 4 | "font-size" : 1, 5 | "font" : 3, 6 | "thickness" : 2, 7 | "radius": 5, 8 | "mask-level" : 0, 9 | "y-offset" : 0, 10 | "label-filter" : [ "class" ], 11 | "classes" : [ 12 | { 13 | "name" : "car", 14 | "blue" : 255, 15 | "green" : 0, 16 | "red" : 0, 17 | "masking" : 0 18 | }, 19 | { 20 | "name" : "person", 21 | "blue" : 0, 22 | "green" : 255, 23 | "red" : 0, 24 | "masking" : 0 25 | }, 26 | { 27 | "name" : "bus", 28 | "blue" : 0, 29 | "green" : 0, 30 | "red" : 255, 31 | "masking" : 0 32 | }, 33 | { 34 | "name" : "bicycle", 35 | "blue" : 0, 36 | "green" : 0, 37 | "red" : 255, 38 | "masking" : 0 39 | } 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/multichannel_ml/src/scripts_n_utils/multichannel_ml/multichannel_ml.sh: -------------------------------------------------------------------------------- 1 | gst-launch-1.0 -v --no-position \ 2 | filesrc location=/home/root/videos/FACEDETECT.mp4 \ 3 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 4 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_densebox_320_320.json name=infer1 ! queue \ 5 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 6 | ! fpsdisplaysink video-sink="kmssink plane-id=34 bus-id=a0130000.v_mix render-rectangle=<0,0,1920,1080>" text-overlay=false sync=false \ 7 | filesrc location=/home/root/videos/YOLOV3.mp4 \ 8 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 9 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_yolov3_adas_pruned_0_9.json name=infer2 ! queue \ 10 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 11 | ! fpsdisplaysink video-sink="kmssink plane-id=35 bus-id=a0130000.v_mix render-rectangle=<1920,0,1920,1080>" text-overlay=false sync=false \ 12 | filesrc location=/home/root/videos/CLASSIFICATION.mp4 \ 13 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 14 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_resnet50.json name=infer3 ! queue \ 15 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 16 | ! fpsdisplaysink video-sink="kmssink plane-id=36 bus-id=a0130000.v_mix render-rectangle=<0,1080,1920,1080>" text-overlay=false sync=false \ 17 | filesrc location=/home/root/videos/REFINEDET.mp4 \ 18 | ! qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=2 ! queue \ 19 | ! vvas_xinfer preprocess-config=kernel_pp.json infer-config=kernel_refinedet_pruned_0_96.json name=infer4 ! queue \ 20 | ! vvas_xmetaconvert config-location="metaconvert_config.json" ! vvas_xoverlay ! queue \ 21 | ! fpsdisplaysink video-sink="kmssink plane-id=37 bus-id=a0130000.v_mix render-rectangle=<1920,1080,1920,1080>" text-overlay=false sync=false \ 22 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/Readme.md: -------------------------------------------------------------------------------- 1 | ## Copyright and license statement 2 | Copyright 2020-2022 Xilinx Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | 9 | # smart_model_select 10 | 11 | For details about how to build and use this example, refer to [smart_model_select](https://xilinx.github.io/VVAS/main/build/html/docs/Embedded/smart_model_select.html) documentation. 12 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/create_imgproc_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo -n "Creating image_processing.cfg... " 3 | echo "[color-formats]" > image_processing.cfg 4 | 5 | grep "#define HA.*\s\+1" image_processing_config.h >> image_processing.cfg 6 | sed -e 's:\s\+1::' -e 's:^#define ::' -i image_processing.cfg 7 | 8 | sed -i image_processing.cfg \ 9 | -e 's:HAS_Y_UV8_Y_UV8_420:VVAS_VIDEO_FORMAT_Y_UV8_420:' \ 10 | -e 's:HAS_RGB8_YUV8:VVAS_VIDEO_FORMAT_RGB:' \ 11 | -e 's:HAS_BGR8:VVAS_VIDEO_FORMAT_BGR:' \ 12 | -e 's:HAS_Y_UV10_Y_UV10_420:VVAS_VIDEO_FORMAT_NV12_10LE32:' \ 13 | -e 's:HAS_Y8:VVAS_VIDEO_FORMAT_GRAY8:' \ 14 | -e 's:HAS_Y10:VVAS_VIDEO_FORMAT_GRAY10_LE32:' \ 15 | -e 's:HAS_Y_U_V8_420:VVAS_VIDEO_FORMAT_I420:' 16 | 17 | echo Done! 18 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/kernel_xml/sfm/kernel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/prj_conf/preplace.tcl: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ########################################################################### 17 | 18 | set script_path [ file dirname [ file normalize [ info script ] ] ] 19 | puts $script_path 20 | read_qor_suggestions ${script_path}/stage1_suggestions.rqs 21 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/prj_conf/stage1_suggestions.rqs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-examples/Embedded/smart_model_select/prj_conf/stage1_suggestions.rqs -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/scripts/gen_dpu_xo.tcl: -------------------------------------------------------------------------------- 1 | # /* 2 | # * Copyright 2022 Xilinx Inc. 3 | # * 4 | # * Licensed under the Apache License, Version 2.0 (the "License"); 5 | # * you may not use this file except in compliance with the License. 6 | # * You may obtain a copy of the License at 7 | # * 8 | # * http://www.apache.org/licenses/LICENSE-2.0 9 | # * 10 | # * Unless required by applicable law or agreed to in writing, software 11 | # * distributed under the License is distributed on an "AS IS" BASIS, 12 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # * See the License for the specific language governing permissions and 14 | # * limitations under the License. 15 | # */ 16 | 17 | 18 | if { $::argc != 4 } { 19 | puts "ERROR: Program \"$::argv0\" requires 4 arguments!\n" 20 | puts "Usage: $::argv0 \n" 21 | exit 22 | } 23 | 24 | set xoname [lindex $::argv 0] 25 | set krnl_name [lindex $::argv 1] 26 | set target [lindex $::argv 2] 27 | set device [lindex $::argv 3] 28 | puts $xoname 29 | set suffix "${krnl_name}_${target}_${device}" 30 | if { [info exists ::env(DIR_PATH)] } { 31 | source -notrace $env(DIR_PRJ)/scripts/package_dpu_kernel.tcl 32 | } else { 33 | source -notrace ./scripts/package_dpu_kernel.tcl 34 | } 35 | 36 | if {[file exists "${xoname}"]} { 37 | file delete -force "${xoname}" 38 | } 39 | 40 | if { [info exists ::env(DIR_PATH)] } { 41 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml $env(DIR_PRJ)/kernel_xml/dpu/kernel.xml 42 | } else { 43 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml ./kernel_xml/dpu/kernel.xml 44 | } 45 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/scripts/gen_sfm_xo.tcl: -------------------------------------------------------------------------------- 1 | # /* 2 | # * Copyright 2022 Xilinx Inc. 3 | # * 4 | # * Licensed under the Apache License, Version 2.0 (the "License"); 5 | # * you may not use this file except in compliance with the License. 6 | # * You may obtain a copy of the License at 7 | # * 8 | # * http://www.apache.org/licenses/LICENSE-2.0 9 | # * 10 | # * Unless required by applicable law or agreed to in writing, software 11 | # * distributed under the License is distributed on an "AS IS" BASIS, 12 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # * See the License for the specific language governing permissions and 14 | # * limitations under the License. 15 | # */ 16 | 17 | if { $::argc != 4 } { 18 | puts "ERROR: Program \"$::argv0\" requires 4 arguments!\n" 19 | puts "Usage: $::argv0 \n" 20 | exit 21 | } 22 | 23 | set xoname [lindex $::argv 0] 24 | set krnl_name [lindex $::argv 1] 25 | set target [lindex $::argv 2] 26 | set device [lindex $::argv 3] 27 | 28 | set suffix "${krnl_name}_${target}_${device}" 29 | 30 | if { [info exists ::env(DIR_PATH)] } { 31 | source -notrace $env(DIR_PRJ)/scripts/package_sfm_kernel.tcl 32 | } else { 33 | source -notrace ./scripts/package_sfm_kernel.tcl 34 | } 35 | 36 | if {[file exists "${xoname}"]} { 37 | file delete -force "${xoname}" 38 | } 39 | 40 | if { [info exists ::env(DIR_PATH)] } { 41 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml $env(DIR_PRJ)/kernel_xml/sfm/kernel.xml 42 | } else { 43 | package_xo -xo_path ${xoname} -kernel_name ${krnl_name} -ip_directory ./packaged_kernel_${suffix} -kernel_xml ./kernel_xml/sfm/kernel.xml 44 | } 45 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2021-2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | 19 | SYSROOT ?= ${SDKTARGETSYSROOT} 20 | CC := aarch64-xilinx-linux-gcc 21 | #CC := gcc 22 | RM := rm -rf 23 | 24 | # Add inputs and outputs from these tool invocations to the build variables 25 | C_SRCS += \ 26 | ./smart_model_select.c 27 | 28 | OBJS += \ 29 | ./smart_model_select.o 30 | 31 | C_DEPS += \ 32 | ./smart_model_select.d 33 | 34 | ifneq ($(MAKECMDGOALS),clean) 35 | ifneq ($(strip $(S_UPPER_DEPS)),) 36 | -include $(S_UPPER_DEPS) 37 | endif 38 | ifneq ($(strip $(C_DEPS)),) 39 | -include $(C_DEPS) 40 | endif 41 | endif 42 | 43 | LIBS := -lpthread 44 | 45 | # All Target 46 | all: smart_model_select 47 | 48 | %.o: ./%.c 49 | @echo 'Invoking: ${CC} compiler' 50 | ${CC} -Wall -O0 -g3 -I${SYSROOT}/usr/include -c -fmessage-length=0 -MT"$@" --sysroot=${SYSROOT} -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" 51 | @echo ' ' 52 | 53 | 54 | # Tool invocations 55 | smart_model_select: $(OBJS) $(USER_OBJS) 56 | @echo 'Invoking: ${CC} linker' 57 | ${CC} -L=/lib -L=/usr/lib --sysroot=${SYSROOT} -Xlinker -rpath-link=${SYSROOT}/lib -Xlinker -rpath-link=${SYSROOT}/usr/lib -o "smart_model_select" $(OBJS) $(USER_OBJS) $(LIBS) 58 | -$(RM) $(OBJS) $(S_UPPER_DEPS) $(C_DEPS) 59 | 60 | # Other Targets 61 | clean: 62 | -$(RM) $(OBJS) $(S_UPPER_DEPS) $(C_DEPS) smart_model_select 63 | -@echo ' ' 64 | 65 | .PHONY: all clean 66 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/kernel_dpu.json: -------------------------------------------------------------------------------- 1 | { 2 | "xclbin-location":"XCLBIN_PATH", 3 | "vvas-library-repo": "/usr/lib/", 4 | "element-mode":"inplace", 5 | "kernel" : { 6 | "library-name":"libvvas_xdpuinfer.so", 7 | "config": { 8 | "model-name" : "MODEL", 9 | "model-class" : "CLASS", 10 | "model-format" : "FORMAT", 11 | "model-path" : "/usr/share/vitis_ai_library/models/", 12 | "run_time_model" : false, 13 | "need_preprocess" : false, 14 | "performance_test" : false, 15 | "debug_level" : 1 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/kernel_preprocessor.json: -------------------------------------------------------------------------------- 1 | { 2 | "xclbin-location" : "/run/media/mmcblk0p1/dpu.xclbin", 3 | "device-index": 0, 4 | "kernel" :{ 5 | "kernel-name":"image_processing:{image_processing_1}", 6 | "config": { 7 | "ppc": 2, 8 | "in-mem-bank": 0, 9 | "out-mem-bank": 0, 10 | "debug-level" : 0 11 | } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_ssd_adas_pruned_0_95.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "ssd_adas_pruned_0_95", 3 | "num-labels": 4, 4 | "labels" :[ 5 | { 6 | "name": "none_of_the_above", 7 | "label": 0, 8 | "display_name" : "background" 9 | }, 10 | { 11 | "name": "car", 12 | "label": 1, 13 | "display_name" : "car" 14 | }, 15 | { 16 | "name": "cycle", 17 | "label": 2, 18 | "display_name" : "cycle" 19 | }, 20 | { 21 | "name": "person", 22 | "label": 3, 23 | "display_name" : "person" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_ssd_mobilenet_v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "ssd_mobilenet_v2", 3 | "num-labels": 11, 4 | "labels" :[ 5 | { 6 | "name": "none_of_the_above", 7 | "label": 0, 8 | "display_name" : "background" 9 | }, 10 | { 11 | "name": "person", 12 | "label": 1, 13 | "display_name" : "person" 14 | }, 15 | { 16 | "name": "rider", 17 | "label": 2, 18 | "display_name" : "rider" 19 | }, 20 | { 21 | "name": "car", 22 | "label": 3, 23 | "display_name" : "car" 24 | }, 25 | { 26 | "name": "truck", 27 | "label": 4, 28 | "display_name" : "truck" 29 | }, 30 | { 31 | "name": "bus", 32 | "label": 5, 33 | "display_name" : "bus" 34 | }, 35 | { 36 | "name": "train", 37 | "label": 6, 38 | "display_name" : "train" 39 | }, 40 | { 41 | "name": "motor", 42 | "label": 7, 43 | "display_name" : "motor" 44 | }, 45 | { 46 | "name": "bike", 47 | "label": 8, 48 | "display_name" : "bike" 49 | }, 50 | { 51 | "name": "sign", 52 | "label": 9, 53 | "display_name" : "sign" 54 | }, 55 | { 56 | "name": "light", 57 | "label": 10, 58 | "display_name" : "light" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_ssd_pedestrian_pruned_0_97.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "ssd_mobilenet_v2", 3 | "num-labels": 2, 4 | "labels" :[ 5 | { 6 | "name": "none_of_the_above", 7 | "label": 0, 8 | "display_name" : "background" 9 | }, 10 | { 11 | "name": "person", 12 | "label": 1, 13 | "display_name" : "person" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_ssd_traffic_pruned_0_9.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "ssd_adas_pruned_0_95", 3 | "num-labels": 4, 4 | "labels" :[ 5 | { 6 | "name": "none_of_the_above", 7 | "label": 0, 8 | "display_name" : "background" 9 | }, 10 | { 11 | "name": "car", 12 | "label": 1, 13 | "display_name" : "car" 14 | }, 15 | { 16 | "name": "cycle", 17 | "label": 2, 18 | "display_name" : "cycle" 19 | }, 20 | { 21 | "name": "person", 22 | "label": 3, 23 | "display_name" : "person" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_tiny_yolov3_vmss.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | { 5 | "model-name": "yolov3_tiny", 6 | "num-labels": 10, 7 | "labels" :[ 8 | { 9 | "name": "KELLOGS", 10 | "label": 0, 11 | "display_name" : "KELLOGS" 12 | }, 13 | { 14 | "name": "CHOCOLATE", 15 | "label": 1, 16 | "display_name" : "CHOCOLATE" 17 | }, 18 | { 19 | "name": "CANDLE", 20 | "label": 2, 21 | "display_name" : "CANDLE" 22 | }, 23 | { 24 | "name": "SHAMPOO", 25 | "label": 3, 26 | "display_name" : "SHAMPOO" 27 | }, 28 | { 29 | "name": "BULB", 30 | "label": 4, 31 | "display_name" : "BULB" 32 | }, 33 | { 34 | "name": "PLIERS", 35 | "label": 5, 36 | "display_name" : "PLIERS" 37 | }, 38 | { 39 | "name": "DETERGENT", 40 | "label": 6, 41 | "display_name" : "DETERGENT" 42 | }, 43 | { 44 | "name": "KOOLAID", 45 | "label": 7, 46 | "display_name" : "KOOLAID" 47 | }, 48 | { 49 | "name": "LIPSTICK", 50 | "label": 8, 51 | "display_name" : "LIPSTICK" 52 | }, 53 | { 54 | "name": "BOX", 55 | "label": 9, 56 | "display_name" : "BOX" 57 | } 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/label_yolov3_adas_pruned_0_9.json: -------------------------------------------------------------------------------- 1 | { 2 | "model-name": "yolov3_adas_pruned_0_9", 3 | "num-labels": 3, 4 | "labels" :[ 5 | { 6 | "name": "car", 7 | "label": 0, 8 | "display_name" : "car" 9 | }, 10 | { 11 | "name": "person", 12 | "label": 1, 13 | "display_name" : "person" 14 | }, 15 | { 16 | "name": "cycle", 17 | "label": 2, 18 | "display_name" : "cycle" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/jsons/metaconvert_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "display-level": 0, 4 | "font-size" : 1, 5 | "font" : 3, 6 | "thickness" : 2, 7 | "radius": 5, 8 | "mask-level" : 0, 9 | "y-offset" : 0, 10 | "label-filter" : [ "class" ], 11 | "classes" : [ 12 | { 13 | "name" : "car", 14 | "blue" : 255, 15 | "green" : 0, 16 | "red" : 0, 17 | "masking" : 0 18 | }, 19 | { 20 | "name" : "person", 21 | "blue" : 0, 22 | "green" : 255, 23 | "red" : 0, 24 | "masking" : 0 25 | }, 26 | { 27 | "name" : "bus", 28 | "blue" : 0, 29 | "green" : 0, 30 | "red" : 255, 31 | "masking" : 0 32 | }, 33 | { 34 | "name" : "bicycle", 35 | "blue" : 0, 36 | "green" : 0, 37 | "red" : 255, 38 | "masking" : 0 39 | } 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/setup.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2021 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Set alpha plane. 18 | modetest -M xlnx -w 40:alpha:0 19 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/file_fake_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position filesrc location=INPUTFILENAME ! \ 19 | qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="fakesink" text-overlay=false sync=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/file_file_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position filesrc location=INPUTFILENAME ! \ 19 | qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="filesink location=output.nv12" text-overlay=false sync=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/file_kms_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position filesrc location=INPUTFILENAME ! \ 19 | qtdemux ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="kmssink fullscreen-overlay=1 driver-name=xlnx sync=false" text-overlay=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/rtsp_fake_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position rtspsrc location=INPUTFILENAME ! \ 19 | rtph264depay ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="fakesink" text-overlay=false sync=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/rtsp_file_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position rtspsrc location=INPUTFILENAME ! \ 19 | rtph264depay ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="filesink location=output.nv12" text-overlay=false sync=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/rtsp_kms_template.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position rtspsrc location=INPUTFILENAME ! \ 19 | rtph264depay ! h264parse ! omxh264dec internal-entropy-buffers=3 ! \ 20 | vvas_xinfer preprocess-config="./jsons/kernel_preprocessor.json" infer-config="./jsons/kernel_dpu_MODEL.json" ! \ 21 | vvas_xmetaconvert config-location="./jsons/metaconvert_config.json" ! vvas_xoverlay ! \ 22 | queue ! fpsdisplaysink video-sink="kmssink fullscreen-overlay=1 driver-name=xlnx sync=false" text-overlay=false 23 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/welcome.cfg: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gst-launch-1.0 --no-position multifilesrc location=templates/welcome_1080.jpg ! \ 19 | jpegparse ! jpegdec ! \ 20 | queue ! fpsdisplaysink video-sink="kmssink fullscreen-overlay=1 driver-name=xlnx sync=false" text-overlay=false sync=false 21 | -------------------------------------------------------------------------------- /vvas-examples/Embedded/smart_model_select/src/templates/welcome_1080.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-examples/Embedded/smart_model_select/src/templates/welcome_1080.jpg -------------------------------------------------------------------------------- /vvas-examples/README.md: -------------------------------------------------------------------------------- 1 | # vvas-examples 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | 12 | This directory has sources for the example designs for Embedded Platforms. 13 | Using these sources, user can create binaries (sd_card.img) that can be flashed onto the target board. 14 | -------------------------------------------------------------------------------- /vvas-gst-plugins/README.md: -------------------------------------------------------------------------------- 1 | # Gstreamer plugins for VVAS SDK 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | ## Steps to Compile vvas-gst-plugins 12 | 13 | Use the below mentioned steps to update and compile VVAS Gstreamer plug-ins for Embedded platform. 14 | Alternatively, these plug-ins can be compiled using top level build_install_vvas.sh script located at the root of VVAS repository. 15 | 16 | # Steps for Cross Compilation for Embedded platforms: 17 | 18 | 1. Copy sdk.sh file to on build machine 19 | 20 | 2. Prepare SYSROOT and set environment variables 21 | ``` 22 | cd 23 | ./sdk.sh -d `pwd` -y 24 | ``` 25 | ***Note: Following packages need to be available in sysroot :*** 26 | ``` 27 | - jansson >= 2.7 28 | - vvas-utils 29 | ``` 30 | 31 | 3. Edit gst-plugins-vvas/meson.cross to point to SYSROOT path 32 | 33 | 4. Build & Compile VVAS GStreamer plugins 34 | ``` 35 | meson build --cross-file meson.cross 36 | cd build; 37 | ninja; 38 | ``` 39 | 5. For installing user to copy .so to target in respective locations 40 | 41 | Note: In case pip3 is not installed in system run the following command 42 | 43 | python3 -m pip install --user --upgrade pip==20.2.2 44 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | subdir('vvas') 19 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvascommon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software 10 | * is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 16 | * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 18 | * EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 20 | * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. Except as contained in this notice, the name of the Xilinx shall 22 | * not be used in advertising or otherwise to promote the sale, use or other 23 | * dealings in this Software without prior written authorization from Xilinx. 24 | */ 25 | #ifndef __GST_VVAS_COMMON_H__ 26 | #define __GST_VVAS_COMMON_H__ 27 | 28 | typedef enum _vvas_codec_type{ 29 | VVAS_CODEC_NONE = -1, 30 | VVAS_CODEC_H264, 31 | VVAS_CODEC_H265, 32 | } VvasCodecType; 33 | #endif 34 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvascoreutils.h: -------------------------------------------------------------------------------- 1 | #ifndef __VVAS_GST_CORE_UTILS__ 2 | #define __VVAS_GST_CORE_UTILS__ 3 | 4 | #ifdef HAVE_CONFIG_H 5 | #include "config.h" 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include "gstinferenceprediction.h" 19 | 20 | #define DEFAULT_DEBUG_LOG_LEVEL LOG_LEVEL_ERROR 21 | #ifdef __cplusplus 22 | extern "C" 23 | { 24 | #endif 25 | 26 | GST_EXPORT 27 | VvasLogLevel vvas_get_core_log_level (GstDebugLevel gst_level); 28 | 29 | GST_EXPORT 30 | VvasMemory * vvas_memory_from_gstbuffer (VvasContext * vvas_ctx, uint8_t mbank_idx, GstBuffer * buf); 31 | 32 | GST_EXPORT 33 | VvasVideoFrame *vvas_videoframe_from_gstbuffer (VvasContext *vvas_ctx, 34 | int8_t mbank_idx, GstBuffer * buf, GstVideoInfo * gst_vinfo, 35 | GstMapFlags flags); 36 | 37 | GST_EXPORT 38 | VvasInferPrediction * vvas_infer_from_gstinfer (GstInferencePrediction *pred); 39 | 40 | GST_EXPORT 41 | VvasList * vvas_inferprediction_get_nodes (VvasInferPrediction * self); 42 | 43 | GST_EXPORT 44 | GstInferencePrediction * gst_infer_node_from_vvas_infer (VvasInferPrediction * vinfer); 45 | 46 | GST_EXPORT 47 | GstVideoFormat gst_coreutils_get_gst_fmt_from_vvas (VvasVideoFormat format); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | #endif 53 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvashdrmeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021-2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_HDR_META_H__ 19 | #define __GST_VVAS_HDR_META_H__ 20 | 21 | #include 22 | #include 23 | #include "mpsoc_vcu_hdr.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GST_VVAS_HDR_META_API_TYPE (gst_vvas_hdr_meta_api_get_type()) 28 | #define GST_VVAS_HDR_META_INFO (gst_vvas_hdr_meta_get_info()) 29 | 30 | typedef struct _GstVvasHdrMeta GstVvasHdrMeta; 31 | 32 | struct _GstVvasHdrMeta { 33 | GstMeta meta; 34 | 35 | vcu_hdr_data hdr_metadata; 36 | }; 37 | 38 | GST_EXPORT 39 | GType gst_vvas_hdr_meta_api_get_type (void); 40 | 41 | GST_EXPORT 42 | const GstMetaInfo * gst_vvas_hdr_meta_get_info (void); 43 | 44 | #define gst_buffer_get_vvas_hdr_meta(b) ((GstVvasHdrMeta*)gst_buffer_get_meta((b), GST_VVAS_HDR_META_API_TYPE)) 45 | #define gst_buffer_add_vvas_hdr_meta(b) ((GstVvasHdrMeta*)gst_buffer_add_meta((b), GST_VVAS_HDR_META_INFO, NULL)) 46 | 47 | G_END_DECLS 48 | 49 | #endif /* __GST_VVAS_HDR_META_H__ */ 50 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvasinpinfer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_INP_INFER_META_H__ 19 | #define __GST_VVAS_INP_INFER_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _GstVvasInpInferMeta GstVvasInpInferMeta; 29 | 30 | struct _GstVvasInpInferMeta { 31 | GstMeta meta; 32 | VvasClass ml_class; 33 | gchar *model_name; 34 | }; 35 | 36 | GST_EXPORT 37 | GstVvasInpInferMeta * 38 | gst_buffer_add_vvas_inp_infer_meta (GstBuffer *buffer, VvasClass ml_class, gchar *model_name); 39 | 40 | GType gst_vvas_inp_infer_meta_api_get_type (void); 41 | #define GST_VVAS_INP_INFER_META_API_TYPE (gst_vvas_inp_infer_meta_api_get_type()) 42 | 43 | GST_EXPORT 44 | const GstMetaInfo *gst_vvas_inp_infer_meta_get_info (void); 45 | #define GST_VVAS_INP_INFER_EXAMPLE_META_INFO ((gst_vvas_inp_infer_meta_get_info())) 46 | 47 | #define gst_buffer_get_vvas_inp_infer_meta(b) ((GstVvasInpInferMeta*)gst_buffer_get_meta((b),GST_VVAS_INP_INFER_META_API_TYPE)) 48 | 49 | G_END_DECLS 50 | #endif /* __GST_VVAS_INP_INFER_META_H__ */ 51 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvaslameta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_LA_META_H__ 19 | #define __GST_VVAS_LA_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GST_VVAS_LA_META_API_TYPE (gst_vvas_la_meta_api_get_type()) 29 | #define GST_VVAS_LA_META_INFO (gst_vvas_la_meta_get_info()) 30 | 31 | typedef struct _GstVvasLAMeta GstVvasLAMeta; 32 | 33 | struct _GstVvasLAMeta { 34 | GstMeta meta; 35 | 36 | /*parameters used for generating qpmap & FSFA data */ 37 | guint gop_length; 38 | guint num_bframes; 39 | guint lookahead_depth; 40 | VvasCodecType codec_type; 41 | gboolean is_idr; 42 | gboolean spatial_aq; 43 | gboolean temporal_aq; 44 | guint spatial_aq_gain; 45 | 46 | GstBuffer *qpmap; 47 | GstBuffer *rc_fsfa; 48 | }; 49 | 50 | GST_EXPORT 51 | GType gst_vvas_la_meta_api_get_type (void); 52 | 53 | GST_EXPORT 54 | const GstMetaInfo * gst_vvas_la_meta_get_info (void); 55 | 56 | #define gst_buffer_get_vvas_la_meta(b) ((GstVvasLAMeta*)gst_buffer_get_meta((b), GST_VVAS_LA_META_API_TYPE)) 57 | #define gst_buffer_add_vvas_la_meta(b) ((GstVvasLAMeta*)gst_buffer_add_meta((b), GST_VVAS_LA_META_INFO, NULL)) 58 | 59 | G_END_DECLS 60 | 61 | #endif /* __GST_VVAS_LA_META_H__ */ 62 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvasofmeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_OF_META_H__ 19 | #define __GST_VVAS_OF_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_VVAS_OF_META_API_TYPE (gst_vvas_of_meta_api_get_type()) 30 | #define GST_VVAS_OF_META_INFO (gst_vvas_of_meta_get_info()) 31 | 32 | #define DIR_NAME_SZ 128 33 | 34 | typedef struct _vvas_obj_motinfo vvas_obj_motinfo; 35 | typedef struct _GstVvasOFMeta GstVvasOFMeta; 36 | 37 | struct _vvas_obj_motinfo 38 | { 39 | float mean_x_displ; 40 | float mean_y_displ; 41 | float angle; 42 | float dist; 43 | char dirc_name[DIR_NAME_SZ]; 44 | BoundingBox bbox; 45 | }; 46 | 47 | struct _GstVvasOFMeta { 48 | GstMeta meta; 49 | 50 | guint num_objs; 51 | GList *obj_mot_infos; 52 | 53 | GstBuffer *x_displ; 54 | GstBuffer *y_displ; 55 | }; 56 | 57 | GST_EXPORT 58 | GType gst_vvas_of_meta_api_get_type (void); 59 | 60 | GST_EXPORT 61 | const GstMetaInfo * gst_vvas_of_meta_get_info (void); 62 | 63 | #define gst_buffer_get_vvas_of_meta(b) ((GstVvasOFMeta*)gst_buffer_get_meta((b), GST_VVAS_OF_META_API_TYPE)) 64 | #define gst_buffer_add_vvas_of_meta(b) ((GstVvasOFMeta*)gst_buffer_add_meta((b), GST_VVAS_OF_META_INFO, NULL)) 65 | 66 | G_END_DECLS 67 | 68 | #endif /* __GST_VVAS_OF_META_H__ */ 69 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvasoverlaymeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_OVERLAY_META_H__ 19 | #define __GST_VVAS_OVERLAY_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GST_VVAS_OVERLAY_META_API_TYPE (gst_vvas_overlay_meta_api_get_type()) 30 | #define GST_VVAS_OVERLAY_META_INFO (gst_vvas_overlay_meta_get_info()) 31 | 32 | typedef struct _GstVvasOverlayMeta GstVvasOverlayMeta; 33 | 34 | struct _GstVvasOverlayMeta { 35 | GstMeta meta; 36 | 37 | /** Overlay information */ 38 | VvasOverlayShapeInfo shape_info; 39 | }; 40 | 41 | GST_EXPORT 42 | GType gst_vvas_overlay_meta_api_get_type (void); 43 | 44 | GST_EXPORT 45 | const GstMetaInfo * gst_vvas_overlay_meta_get_info (void); 46 | 47 | #define gst_buffer_get_vvas_overlay_meta(b) ((GstVvasOverlayMeta*)gst_buffer_get_meta((b), GST_VVAS_OVERLAY_META_API_TYPE)) 48 | #define gst_buffer_add_vvas_overlay_meta(b) ((GstVvasOverlayMeta*)gst_buffer_add_meta((b), GST_VVAS_OVERLAY_META_INFO, NULL)) 49 | 50 | G_END_DECLS 51 | 52 | #endif /* __GST_VVAS_OVERLAY_META_H__ */ 53 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvassrcidmeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_SRCID_META_H__ 19 | #define __GST_VVAS_SRCID_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GST_VVAS_SRCID_META_API_TYPE (gst_vvas_srcid_meta_api_get_type()) 28 | #define GST_VVAS_SRCID_META_INFO (gst_vvas_srcid_meta_get_info()) 29 | 30 | typedef struct _GstVvasSrcIDMeta GstVvasSrcIDMeta; 31 | 32 | struct _GstVvasSrcIDMeta { 33 | GstMeta meta; 34 | 35 | guint src_id; /* source id */ 36 | gulong frame_id; /* frame sequence number */ 37 | }; 38 | 39 | GST_EXPORT 40 | GType gst_vvas_srcid_meta_api_get_type (void); 41 | 42 | GST_EXPORT 43 | const GstMetaInfo * gst_vvas_srcid_meta_get_info (void); 44 | 45 | #define gst_buffer_get_vvas_srcid_meta(b) ((GstVvasSrcIDMeta*)gst_buffer_get_meta((b), GST_VVAS_SRCID_META_API_TYPE)) 46 | #define gst_buffer_add_vvas_srcid_meta(b) ((GstVvasSrcIDMeta*)gst_buffer_add_meta((b), GST_VVAS_SRCID_META_INFO, NULL)) 47 | 48 | G_END_DECLS 49 | 50 | #endif /* __GST_VVAS_SRCID_META_H__ */ 51 | 52 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvasusrmeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __GST_VVAS_USR_META_H__ 19 | #define __GST_VVAS_USR_META_H__ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS typedef struct _GstVvasUsrMeta GstVvasUsrMeta; 26 | 27 | typedef gpointer (*VvasUsrMetaCopyFunc) (gpointer user_data); 28 | typedef void (*VvasUsrMetaReleaseFunc) (gpointer user_data); 29 | 30 | struct _GstVvasUsrMeta 31 | { 32 | GstMeta meta; 33 | 34 | /** Copy/ Release function to be provided by the user. 35 | * These are called when meta_data needs to copied / transformed 36 | * and freed respectively. 37 | */ 38 | VvasUsrMetaCopyFunc copy_func; 39 | VvasUsrMetaReleaseFunc release_func; 40 | 41 | void *usr_data; 42 | }; 43 | 44 | GST_EXPORT 45 | GstVvasUsrMeta * 46 | gst_buffer_add_vvas_usr_meta (GstBuffer * buffer, VvasUsrMetaCopyFunc copy_func, 47 | VvasUsrMetaReleaseFunc release_func, void *usr_data); 48 | 49 | GType gst_vvas_usr_meta_api_get_type (void); 50 | #define GST_VVAS_USR_META_API_TYPE (gst_vvas_usr_meta_api_get_type()) 51 | 52 | GST_EXPORT const GstMetaInfo *gst_vvas_usr_meta_get_info (void); 53 | #define GST_VVAS_USR_EXAMPLE_META_INFO ((gst_vvas_usr_meta_get_info())) 54 | 55 | #define gst_buffer_get_vvas_usr_meta(b) ((GstVvasUsrMeta*)gst_buffer_get_meta((b),GST_VVAS_USR_META_API_TYPE)) 56 | 57 | G_END_DECLS 58 | #endif /* __GST_VVAS_USR_META_H__ */ 59 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/gst/vvas/gstvvasutils.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <1999> Erik Walthinsen 3 | * Copyright (C) 2005-2012 David Schleef 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #include 22 | 23 | GST_EXPORT 24 | GstCaps * gst_vvas_utils_fixate_caps (GstElement * self, 25 | GstPadDirection direction, GstCaps * caps, GstCaps * othercaps); 26 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst-libs/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | subdir('gst') 19 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/defunnel/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xdefunnel = library('gstvvas_xdefunnel', 'gstvvas_xdefunnel.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvassrcidmeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xdefunnel, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xdefunnel] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/funnel/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xfunnel = library('gstvvas_xfunnel', 'gstvvas_xfunnel.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvassrcidmeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xfunnel, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xfunnel] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | foreach plugin : ['roigen', 'metaaffixer', 'funnel', 'defunnel', 'metaconvert', 'tracker', 'skipframe', 'reorderframe'] 19 | if not get_option(plugin).disabled() 20 | subdir(plugin) 21 | endif 22 | endforeach 23 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/metaaffixer/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xmetaaffixer = library('gstvvas_xmetaaffixer', 'gstvvas_xmetaaffixer.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasinfermeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xmetaaffixer, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xmetaaffixer] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/metaconvert/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xmetaconvert = library('gstvvas_xmetaconvert', 'gstvvas_xmetaconvert.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasinfermeta_dep, gstvvasoverlaymeta_dep, vvascore_dep, gstvvascoreutils_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xmetaconvert, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xmetaconvert] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/metaconvert/metaconvert_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "display-level": 0, 4 | "font-size" : 0.5, 5 | "font" : 3, 6 | "thickness" : 2, 7 | "radius": 5, 8 | "mask-level" : 0, 9 | "y-offset" : 0, 10 | "draw-above-bbox-flag" : true, 11 | "label-filter" : [ "class", "probability" ], 12 | "classes" : [ 13 | { 14 | "name" : "car", 15 | "blue" : 255, 16 | "green" : 0, 17 | "red" : 0, 18 | "masking" : 0 19 | }, 20 | { 21 | "name" : "person", 22 | "blue" : 0, 23 | "green" : 255, 24 | "red" : 0, 25 | "masking" : 0 26 | }, 27 | { 28 | "name" : "bus", 29 | "blue" : 0, 30 | "green" : 0, 31 | "red" : 255, 32 | "masking" : 0 33 | }, 34 | { 35 | "name" : "bicycle", 36 | "blue" : 0, 37 | "green" : 0, 38 | "red" : 255, 39 | "masking" : 0 40 | } 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/reorderframe/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xreorderframe = library('gstvvas_xreorderframe', 'gstvvas_xreorderframe.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvassrcidmeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xreorderframe, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xreorderframe] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/roigen/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xroigen = library('gstvvas_xroigen', 'gstvvas_xroigen.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasinfermeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xroigen, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xroigen] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/skipframe/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xskipframe= library('gstvvas_xskipframe', 'gstvvas_xskipframe.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvassrcidmeta_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xskipframe, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xskipframe] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/gst/tracker/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xtracker = library('gstvvas_xtracker', 'gstvvas_xtracker.cpp', 19 | c_args : gst_plugins_vvas_args, 20 | cpp_args : [gst_plugins_vvas_args, '-std=c++17'], 21 | include_directories : [configinc, libsinc], 22 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, xrt_dep, dl_dep, gstallocators_dep, uuid_dep, vvasutils_dep, gstvvasutils_dep, xrm_dep, gstvvasinfermeta_dep, vvascore_dep, gstvvascoreutils_dep, gstvvassrcidmeta_dep], 23 | install : true, 24 | install_dir : plugins_install_dir, 25 | ) 26 | 27 | pkgconfig.generate(gstvvas_xtracker, install_dir : plugins_pkgconfig_install_dir) 28 | plugins += [gstvvas_xtracker] 29 | -------------------------------------------------------------------------------- /vvas-gst-plugins/meson.cross.template: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | [host_machine] 19 | system = 'linux' 20 | cpu_family = 'aarch64' 21 | cpu = 'arm64' 22 | endian = 'little' 23 | 24 | [build_machine] 25 | system = 'linux' 26 | cpu_family = 'x86_64' 27 | cpu = 'x86_64' 28 | endian = 'little' 29 | 30 | [built-in options] 31 | c_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 32 | cpp_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 33 | c_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 34 | cpp_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 35 | 36 | [properties] 37 | pkg_config_libdir = ['/usr/lib/pkgconfig:/usr/share/pkgconfig'] 38 | sys_root = '' 39 | 40 | [binaries] 41 | c = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-gcc'] 42 | cpp = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++'] 43 | ar = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ar'] 44 | pkgconfig = ['/usr/bin/pkg-config'] 45 | strip = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-strip'] 46 | -------------------------------------------------------------------------------- /vvas-gst-plugins/pkgconfig/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | pkgconf = configuration_data() 19 | 20 | pkgconf.set('prefix', join_paths(get_option('prefix'))) 21 | pkgconf.set('exec_prefix', '${prefix}') 22 | pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) 23 | pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) 24 | pkgconf.set('VERSION', gst_version) 25 | pkgconf.set('VVAS_VERSION', vvas_version) 26 | 27 | pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) 28 | 29 | pkg_files = [ 30 | 'vvas-gst-plugins', 31 | ] 32 | 33 | foreach p : pkg_files 34 | infile = p + '.pc.in' 35 | outfile = p + '.pc' 36 | configure_file(input : infile, 37 | output : outfile, 38 | configuration : pkgconf, 39 | install_dir : pkg_install_dir) 40 | endforeach 41 | -------------------------------------------------------------------------------- /vvas-gst-plugins/pkgconfig/vvas-gst-plugins-uninstalled.pc.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-gst-plugins/pkgconfig/vvas-gst-plugins-uninstalled.pc.in -------------------------------------------------------------------------------- /vvas-gst-plugins/pkgconfig/vvas-gst-plugins.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: VVAS Gstreamer Library 7 | Description: VVAS Gstreamer Library Implementation 8 | Requires: xrt jansson vvas-utils glib-2.0 gobject-2.0 gstreamer-1.0 gstreamer-base-1.0 gstreamer-allocators-1.0 gstreamer-video-1.0 uuid 9 | Version: @VERSION@ 10 | Libs: -L${libdir} -lgstvvasinfermeta-@VVAS_VERSION@ -lgstvvasinpinfermeta-@VVAS_VERSION@ -lgstvvasallocator-@VVAS_VERSION@ -lgstvvasbufferpool-@VVAS_VERSION@ -lgstvvasusrmeta-@VVAS_VERSION@ -lgstvvasoverlaymeta-@VVAS_VERSION@ -lgstvvasofmeta-@VVAS_VERSION@ 11 | Cflags: -I${includedir} 12 | 13 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/abrscaler/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | gstvvas_xabrscaler = library('gstvvas_xabrscaler', 'gstvvas_xabrscaler.c', 18 | c_args : gst_plugins_vvas_args, 19 | include_directories : [configinc, libsinc], 20 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, gstallocators_dep, uuid_dep, gstvvasinfermeta_dep, gstvvashdrmeta_dep, xrm_dep, gstvvasoverlaymeta_dep, vvasstructure_dep, gstvvascoreutils_dep, vvascore_dep], 21 | install : true, 22 | install_dir : plugins_install_dir, 23 | ) 24 | 25 | pkgconfig.generate(gstvvas_xabrscaler, install_dir : plugins_pkgconfig_install_dir) 26 | plugins += [gstvvas_xabrscaler] 27 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/compositor/meson.build: -------------------------------------------------------------------------------- 1 | # /* 2 | # * Copyright 2022 Xilinx Inc. 3 | # * 4 | # * Licensed under the Apache License, Version 2.0 (the "License"); 5 | # * you may not use this file except in compliance with the License. 6 | # * You may obtain a copy of the License at 7 | # * 8 | # * http://www.apache.org/licenses/LICENSE-2.0 9 | # * 10 | # * Unless required by applicable law or agreed to in writing, software 11 | # * distributed under the License is distributed on an "AS IS" BASIS, 12 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # * See the License for the specific language governing permissions and 14 | # * limitations under the License. 15 | # */ 16 | 17 | gstvvas_xcompositor = library('gstvvas_xcompositor', 'gstvvas_xcompositor.c', 18 | c_args : gst_plugins_vvas_args, 19 | include_directories : [configinc, libsinc], 20 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, gstallocators_dep, vvasutils_dep, xrm_dep, math_dep, gstvvascoreutils_dep, vvascore_dep], 21 | install : true, 22 | install_dir : plugins_install_dir, 23 | ) 24 | 25 | pkgconfig.generate(gstvvas_xcompositor, install_dir : plugins_pkgconfig_install_dir) 26 | plugins += [gstvvas_xcompositor] 27 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/filter/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xfilter = library('gstvvas_xfilter', 'gstvvas_xfilter.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, jansson_dep, gstallocators_dep, uuid_dep, vvasutils_dep, gstvvasutils_dep, xrm_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xfilter, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xfilter] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/infer/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | dpucore_path = vvascore_dep.get_variable(pkgconfig : 'libdir') 19 | dpucore_version = vvascore_dep.version() 20 | dpuinfer_libdep = cc.find_library('vvascore_dpuinfer-' + dpucore_version, dirs : [dpucore_path], required : false) 21 | 22 | if not dpuinfer_libdep.found() 23 | if host_machine.cpu_family() == 'x86_64' 24 | message('vvas core dpu library is not available. Skipping infer plugin build.') 25 | subdir_done() 26 | else 27 | error('Failed to find vvas core dpu library') 28 | endif 29 | endif 30 | 31 | gstvvas_xinfer = library('gstvvas_xinfer', 'gstvvas_xinfer.c', 32 | c_args : gst_plugins_vvas_args, 33 | include_directories : [configinc, libsinc], 34 | dependencies : [gstvideo_dep, gst_dep, gstvvaspool_dep, gstvvasalloc_dep, dl_dep, jansson_dep, gstallocators_dep, uuid_dep, vvascore_dep, gstvvasutils_dep, gstvvasinfermeta_dep, math_dep, gstvvascoreutils_dep, vvasstructure_dep], 35 | install : true, 36 | install_dir : plugins_install_dir, 37 | ) 38 | 39 | pkgconfig.generate(gstvvas_xinfer, install_dir : plugins_pkgconfig_install_dir) 40 | plugins += [gstvvas_xinfer] 41 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | foreach plugin : ['filter', 'multisrc', 'abrscaler', 'infer', 'overlay', 'optflow', 'multicrop', 'compositor'] 19 | if not get_option(plugin).disabled() 20 | subdir(plugin) 21 | endif 22 | endforeach 23 | 24 | if host_machine.cpu_family() == 'x86_64' 25 | if get_option('pci_platform') == 'U30' 26 | cdata.set('XLNX_U30_PLATFORM ', 1) 27 | else 28 | cdata.set('XLNX_V70_PLATFORM ', 1) 29 | endif 30 | 31 | if not get_option('videodec').disabled() 32 | subdir('videodec') 33 | endif 34 | endif 35 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/multicrop/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xmulticrop = library('gstvvas_xmulticrop', 'gstvvas_xmulticrop.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, gstallocators_dep, uuid_dep, gstvvasinfermeta_dep, gstvvashdrmeta_dep, gstvvascoreutils_dep, vvascore_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xmulticrop, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xmulticrop] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/multisrc/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | vvas_xmultisrc = library('gstvvas_xmultisrc', 'gstvvas_xmultisrc.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, dl_dep, jansson_dep, gstvvaspool_dep,gstallocators_dep, gstvvasalloc_dep, uuid_dep, vvasutils_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(vvas_xmultisrc, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [vvas_xmultisrc] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/optflow/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xoptflow = library('gstvvas_xoptflow', 'gstvvas_xoptflow.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, xrt_dep, dl_dep, gstallocators_dep, uuid_dep, gstvvasinfermeta_dep, gstvvasofmeta_dep, gstvvashdrmeta_dep, xrm_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xoptflow, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xoptflow] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/overlay/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xoverlay = library('gstvvas_xoverlay', 'gstvvas_xoverlay.cpp', 19 | cpp_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, gstallocators_dep, uuid_dep, gstvvasoverlaymeta_dep, vvasutils_dep,gstvvascoreutils_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xoverlay, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xoverlay] 28 | -------------------------------------------------------------------------------- /vvas-gst-plugins/sys/videodec/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | gstvvas_xvideodec = library('gstvvas_xvideodec', 'gstvvas_xvideodec.c', 19 | c_args : gst_plugins_vvas_args, 20 | include_directories : [configinc, libsinc], 21 | dependencies : [gstvideo_dep, gst_dep, gstvvasalloc_dep, gstvvaspool_dep, dl_dep, gstallocators_dep, uuid_dep, gstvvashdrmeta_dep, vvasutils_dep, xrm_dep, gstvvascoreutils_dep, vvascore_dep], 22 | install : true, 23 | install_dir : plugins_install_dir, 24 | ) 25 | 26 | pkgconfig.generate(gstvvas_xvideodec, install_dir : plugins_pkgconfig_install_dir) 27 | plugins += [gstvvas_xvideodec] 28 | -------------------------------------------------------------------------------- /vvas-platforms/DC/README.md: -------------------------------------------------------------------------------- 1 | ## Copyright and license statement 2 | Copyright 2020-2022 Xilinx Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | 9 | # x86 Host based Platforms 10 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/.petalinux/metadata: -------------------------------------------------------------------------------- 1 | PETALINUX_VER=2022.2 2 | VALIDATE_HW_CHKSUM=1 3 | HDF_EXT=xsa 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/config.project: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # PetaLinux SDK Project Configuration 4 | # 5 | CONFIG_PROJECT_ADDITIONAL_COMPONENTS_SEARCH_PATH="" 6 | 7 | # 8 | # Subsystems of the project 9 | # 10 | CONFIG_PROJECT_SUBSYSTEM_LINUX_INSTANCE_LINUX=y 11 | CONFIG_PROJECT_SUBSYSTEMS=y 12 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/attributes: -------------------------------------------------------------------------------- 1 | #Virtual Providers 2 | 3 | 4 | 5 | #defconfigs 6 | 7 | UBOOT_DEFAULT_DEFCONFIG="xilinx_zynqmp_virt_defconfig" 8 | 9 | #atf 10 | 11 | CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE=0x10080000 12 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/configs/busybox/inetd.conf: -------------------------------------------------------------------------------- 1 | #/etc/inetd.conf: see inetd(8) for further informations. 2 | # 3 | # Internet server configuration database 4 | # 5 | # If you want to disable an entry so it isn't touched during 6 | # package updates just comment it out with a single '#' character. 7 | # 8 | # 9 | # 10 | #:INTERNAL: Internal services 11 | #echo stream tcp nowait root internal 12 | #echo dgram udp wait root internal 13 | #chargen stream tcp nowait root internal 14 | #chargen dgram udp wait root internal 15 | #discard stream tcp nowait root internal 16 | #discard dgram udp wait root internal 17 | #daytime stream tcp nowait root internal 18 | #daytime dgram udp wait root internal 19 | #time stream tcp nowait root internal 20 | #time dgram udp wait root internal 21 | telnet stream tcp nowait root telnetd telnetd -i 22 | ftp stream tcp nowait root ftpd ftpd -w 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/configs/init-ifupdown/interfaces: -------------------------------------------------------------------------------- 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) 2 | 3 | # The loopback interface 4 | auto lo 5 | iface lo inet loopback 6 | 7 | # Wireless interfaces 8 | iface wlan0 inet dhcp 9 | wireless_mode managed 10 | wireless_essid any 11 | wpa-driver wext 12 | wpa-conf /etc/wpa_supplicant.conf 13 | 14 | iface atml0 inet dhcp 15 | 16 | # Wired or wireless interfaces 17 | auto eth0 18 | iface eth0 inet dhcp 19 | iface eth1 inet dhcp 20 | 21 | # Ethernet/RNDIS gadget (g_ether) 22 | # ... or on host side, usbnet and random hwaddr 23 | iface usb0 inet static 24 | address 192.168.7.2 25 | netmask 255.255.255.0 26 | network 192.168.7.0 27 | gateway 192.168.7.1 28 | 29 | # Bluetooth networking 30 | iface bnep0 inet dhcp 31 | 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/configs/systemd-conf/wired.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Type=ether 3 | Name=!veth* 4 | KernelCommandLine=!nfsroot 5 | KernelCommandLine=!ip 6 | 7 | [Network] 8 | DHCP=yes 9 | 10 | [DHCP] 11 | UseMTU=yes 12 | RouteMetric=10 13 | ClientIdentifier=mac 14 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/decoupling-dtsi/system-user.dtsi: -------------------------------------------------------------------------------- 1 | /include/ "system-conf.dtsi" 2 | / { 3 | }; 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/hw-description/metadata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/hw-description/metadata -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/COPYING.MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, add to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have recipes-* directories, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" 7 | 8 | # Define dynamic layers 9 | BBFILES_DYNAMIC += " \ 10 | xilinx-tools:${LAYERDIR}/meta-xilinx-tools/recipes-*/*/*.bbappend \ 11 | " 12 | 13 | BBFILE_COLLECTIONS += "meta-user" 14 | BBFILE_PATTERN_meta-user = "^${LAYERDIR}/" 15 | BBFILE_PRIORITY_meta-user = "7" 16 | LAYERSERIES_COMPAT_meta-user = "honister" 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/conf/petalinuxbsp.conf: -------------------------------------------------------------------------------- 1 | #User Configuration 2 | 3 | #OE_TERMINAL = "tmux" 4 | 5 | IMAGE_BOOT_FILES:zynqmp = "BOOT.BIN boot.scr Image" 6 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/conf/user-rootfsconfig: -------------------------------------------------------------------------------- 1 | #Note: Mention Each package in individual line 2 | #These packages will get added into rootfs menu entry 3 | 4 | CONFIG_gpio-demo 5 | CONFIG_peekpoke 6 | CONFIG_gstreamer-vcu-examples 7 | CONFIG_packagegroup-petalinux-v4lutils 8 | CONFIG_packagegroup-petalinux-audio 9 | CONFIG_gstreamer-vcu-notebooks 10 | CONFIG_xrt 11 | CONFIG_jansson 12 | CONFIG_zocl 13 | CONFIG_opencl-clhpp-dev 14 | CONFIG_opencl-headers-dev 15 | CONFIG_htop 16 | CONFIG_unilog 17 | CONFIG_target-factory 18 | CONFIG_vart 19 | CONFIG_xir 20 | CONFIG_vitis-ai-library 21 | CONFIG_vvas-utils 22 | CONFIG_vvas-gst 23 | CONFIG_vvas-accel-libs 24 | CONFIG_vvas-core 25 | CONFIG_simd 26 | CONFIG_ne10 27 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/meta-xilinx-tools/recipes-bsp/uboot-device-tree/files/system-user.dtsi: -------------------------------------------------------------------------------- 1 | /include/ "system-conf.dtsi" 2 | / { 3 | }; 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/meta-xilinx-tools/recipes-bsp/uboot-device-tree/uboot-device-tree.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:${SYSCONFIG_PATH}:" 2 | 3 | SRC_URI:append = " file://config file://system-user.dtsi" 4 | 5 | python () { 6 | if d.getVar("CONFIG_DISABLE"): 7 | d.setVarFlag("do_configure", "noexec", "1") 8 | } 9 | export PETALINUX 10 | do_configure:append () { 11 | script="${PETALINUX}/etc/hsm/scripts/petalinux_hsm_bridge.tcl" 12 | data=${PETALINUX}/etc/hsm/data/ 13 | eval xsct -sdx -nodisp ${script} -c ${WORKDIR}/config \ 14 | -hdf ${DT_FILES_PATH}/hardware_description.${HDF_EXT} -repo ${S} \ 15 | -data ${data} -sw ${DT_FILES_PATH} -o ${DT_FILES_PATH} -a "soc_mapping" 16 | } 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:${SYSCONFIG_PATH}:" 2 | 3 | SRC_URI:append = " file://config file://system-user.dtsi" 4 | DEPENDS:append = "${@' lopper-native' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 5 | 6 | # We need the deployed output 7 | PROC_TUNE:versal = "${@'cortexa72' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 8 | PROC_TUNE:zynqmp = "${@'cortexa53' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 9 | 10 | python () { 11 | if d.getVar("CONFIG_DISABLE"): 12 | d.setVarFlag("do_configure", "noexec", "1") 13 | } 14 | 15 | export PETALINUX 16 | do_configure:append () { 17 | if [ ! -z "${SYSTEM_DTFILE}" ]; then 18 | user_dtsi="${TOPDIR}/../project-spec/decoupling-dtsi/system-user.dtsi" 19 | apu_dts="${TOPDIR}/../project-spec/decoupling-dtsi/${PROC_TUNE}-${SOC_FAMILY}-linux.dts" 20 | lopper -f -v --enhanced --permissive -i ${user_dtsi} ${apu_dts} system-default.dtb 21 | else 22 | script="${PETALINUX}/etc/hsm/scripts/petalinux_hsm_bridge.tcl" 23 | data=${PETALINUX}/etc/hsm/data/ 24 | eval xsct -sdx -nodisp ${script} -c ${WORKDIR}/config \ 25 | -hdf ${DT_FILES_PATH}/hardware_description.${HDF_EXT} -repo ${S} \ 26 | -data ${data} -sw ${DT_FILES_PATH} -o ${DT_FILES_PATH} -a "soc_mapping" 27 | fi 28 | } 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/pl-custom.dtsi: -------------------------------------------------------------------------------- 1 | /*Add pl custom nodes for pl.dtsi which is generated from base xsa file. 2 | Changes in this file reflects only when enabled the FPGA manager/Device tree overlay.*/ 3 | / { 4 | }; 5 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/xen-qemu.dtsi: -------------------------------------------------------------------------------- 1 | / { 2 | cpus { 3 | cpu@1 { 4 | //compatible = "disabled"; 5 | device_type = "none"; 6 | }; 7 | cpu@2 { 8 | //compatible = "disabled"; 9 | device_type = "none"; 10 | }; 11 | cpu@3 { 12 | //compatible = "disabled"; 13 | device_type = "none"; 14 | }; 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi: -------------------------------------------------------------------------------- 1 | &smmu { 2 | status = "okay"; 3 | mmu-masters = < &gem0 0x874 4 | &gem1 0x875 5 | &gem2 0x876 6 | &gem3 0x877 7 | &dwc3_0 0x860 8 | &dwc3_1 0x861 9 | &qspi 0x873 10 | &lpd_dma_chan1 0x868 11 | &lpd_dma_chan2 0x869 12 | &lpd_dma_chan3 0x86a 13 | &lpd_dma_chan4 0x86b 14 | &lpd_dma_chan5 0x86c 15 | &lpd_dma_chan6 0x86d 16 | &lpd_dma_chan7 0x86e 17 | &lpd_dma_chan8 0x86f 18 | &fpd_dma_chan1 0x14e8 19 | &fpd_dma_chan2 0x14e9 20 | &fpd_dma_chan3 0x14ea 21 | &fpd_dma_chan4 0x14eb 22 | &fpd_dma_chan5 0x14ec 23 | &fpd_dma_chan6 0x14ed 24 | &fpd_dma_chan7 0x14ee 25 | &fpd_dma_chan8 0x14ef 26 | &sdhci0 0x870 27 | &sdhci1 0x871 28 | &nand0 0x872 29 | &pcie 0x4d0 30 | &zynqmp_dpsub 0xce3 31 | &zynqmp_dpdma 0xce4>; 32 | }; 33 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/0001-ubifs-distroboot-support.patch: -------------------------------------------------------------------------------- 1 | From 357b3eebaa54be1ec8d14b306625eb73732ee5dc Mon Sep 17 00:00:00 2001 2 | From: Ashok Reddy Soma 3 | Date: Wed, 19 Aug 2020 05:29:40 -0600 4 | Subject: [UBOOT PATCH] ubifs: distroboot support 5 | 6 | Signed-off-by: Ashok Reddy Soma 7 | --- 8 | include/configs/xilinx_zynqmp.h | 5 ++++- 9 | 1 file changed, 4 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h 12 | index d3f465a..dc231b8 100644 13 | --- a/include/configs/xilinx_zynqmp.h 14 | +++ b/include/configs/xilinx_zynqmp.h 15 | @@ -154,7 +154,10 @@ 16 | 17 | #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ 18 | "bootcmd_" #devtypel #instance "=sf probe " #instance " 0 0 && " \ 19 | - "sf read $scriptaddr $script_offset_f $script_size_f && " \ 20 | + "setenv mtdids 'nor0=nor0' && " \ 21 | + "setenv mtdparts 'mtdparts=nor0:16m(raw),-(boot)' && " \ 22 | + "mtdparts && " \ 23 | + "ubi part boot; ubifsmount ubi0:boot; ubifsload $scriptaddr boot.scr; && " \ 24 | "echo QSPI: Trying to boot script at ${scriptaddr} && " \ 25 | "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0" 26 | 27 | -- 28 | 2.7.4 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_SYS_CONFIG_NAME="platform-top" 2 | CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20 3 | CONFIG_SYS_TEXT_BASE=0x10080000 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " file://platform-top.h file://bsp.cfg" 4 | 5 | do_configure:append () { 6 | install ${WORKDIR}/platform-top.h ${S}/include/configs/ 7 | } 8 | 9 | do_configure:append:microblaze () { 10 | if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then 11 | install ${WORKDIR}/platform-auto.h ${S}/include/configs/ 12 | install -d ${B}/source/board/xilinx/microblaze-generic/ 13 | install ${WORKDIR}/config.mk ${B}/source/board/xilinx/microblaze-generic/ 14 | fi 15 | } 16 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/bsp.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4 2 | CONFIG_XILINX_DPU=y 3 | # CONFIG_SENSORS_IRPS5401 is not set 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" 2 | 3 | SRC_URI:append = " file://bsp.cfg \ 4 | file://0001-misc-xlnx_dpu-support-softmax-40bit-addressing-from-.patch \ 5 | " 6 | KERNEL_FEATURES:append = " bsp.cfg" 7 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-multimedia/gstreamer/files/0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch: -------------------------------------------------------------------------------- 1 | From 7c53501dde3c1e8a0dcc5ccf0e8224f65a44df00 Mon Sep 17 00:00:00 2001 2 | From: Jeevan Sai Madira 3 | Date: Mon, 20 Feb 2023 16:57:49 +0530 4 | Subject: [PATCH] Populating video alignment info in GstVideometa of kmsbuffer. 5 | 6 | DESCRIPTION : 7 | Since gstreamer 1.18 it is required to set alignment in GstVideoMeta. 8 | If it is not set, it defaults to no padding and no alignment. 9 | 10 | Signed-off-by: Jeevan Sai Madira 11 | --- 12 | sys/kms/gstkmsbufferpool.c | 14 +++++++++++++- 13 | 1 file changed, 13 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/sys/kms/gstkmsbufferpool.c b/sys/kms/gstkmsbufferpool.c 16 | index 7c02aa2..a1545bd 100644 17 | --- a/sys/kms/gstkmsbufferpool.c 18 | +++ b/sys/kms/gstkmsbufferpool.c 19 | @@ -160,12 +160,24 @@ gst_kms_buffer_pool_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer, 20 | gst_buffer_append_memory (*buffer, mem); 21 | 22 | if (priv->add_videometa) { 23 | + GstVideoMeta *meta; 24 | + GstVideoAlignment align; 25 | + GstStructure *config = gst_buffer_pool_get_config (pool); 26 | GST_DEBUG_OBJECT (pool, "adding GstVideoMeta"); 27 | 28 | - gst_buffer_add_video_meta_full (*buffer, GST_VIDEO_FRAME_FLAG_NONE, 29 | + meta = gst_buffer_add_video_meta_full (*buffer, GST_VIDEO_FRAME_FLAG_NONE, 30 | GST_VIDEO_INFO_FORMAT (info), 31 | GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info), 32 | GST_VIDEO_INFO_N_PLANES (info), info->offset, info->stride); 33 | + config = gst_buffer_pool_get_config (pool); 34 | + gst_video_alignment_reset (&align); 35 | + if (gst_buffer_pool_config_get_video_alignment (config, &align)) { 36 | + /* Set Alignment info in GstVideoMeta */ 37 | + gst_video_meta_set_alignment (meta, align); 38 | + } 39 | + if (config) { 40 | + gst_structure_free (config); 41 | + } 42 | } 43 | 44 | return GST_FLOW_OK; 45 | -- 46 | 1.8.3.1 47 | 48 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " file://0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch" 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-multimedia/vcu/files/0001-fix-4444-Round-up-display-parameters-before-calling-.patch: -------------------------------------------------------------------------------- 1 | From 01c14b7d782184ce52400bf6f7df4c85b544172d Mon Sep 17 00:00:00 2001 2 | From: Ray Clenaghan 3 | Date: Wed, 15 Feb 2023 11:44:25 +0000 4 | Subject: [PATCH] fix(4444): Round up display parameters before calling 5 | AL_Decoder_Create 6 | 7 | --- 8 | module/module_dec.cpp | 6 ++++++ 9 | 1 file changed, 6 insertions(+) 10 | 11 | diff --git a/module/module_dec.cpp b/module/module_dec.cpp 12 | index 39b2aa5..51fa1d9 100644 13 | --- a/module/module_dec.cpp 14 | +++ b/module/module_dec.cpp 15 | @@ -352,6 +352,12 @@ ModuleInterface::ErrorType DecModule::CreateDecoder(bool shouldPrealloc) 16 | if(inputParsed) 17 | decCallbacks.parsedSeiCB = { nullptr, nullptr }; 18 | 19 | + if(shouldPrealloc) 20 | + { 21 | + media->settings.tStream.tDim.iHeight = RoundUp(media->settings.tStream.tDim.iHeight, 16); 22 | + media->settings.tStream.tDim.iWidth = RoundUp(media->settings.tStream.tDim.iWidth, 16); 23 | + } 24 | + 25 | auto errorCode = AL_Decoder_Create(&decoder, channel, allocator.get(), &media->settings, &decCallbacks); 26 | 27 | if(AL_IS_ERROR_CODE(errorCode)) 28 | -- 29 | 2.30.2 30 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-multimedia/vcu/libomxil-xlnx.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " \ 4 | file://0001-fix-2022.2-Store-initial-GST-display-resolution.patch \ 5 | file://0001-fix-4444-Round-up-display-parameters-before-calling-.patch \ 6 | " 7 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/target-factory/target-factory_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Target Factory" 2 | DESCRIPTION = "A factory to manage DPU target description infos. Register targets and then you can get infos by name or fingerprint." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/target_factory" 7 | 8 | DEPENDS = "unilog protobuf-native protobuf-c" 9 | 10 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 11 | PACKAGECONFIG[python] = ",,," 12 | 13 | inherit cmake 14 | 15 | EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON" 16 | 17 | # target-factory contains only one shared lib and will therefore become subject to renaming 18 | # by debian.bbclass. Prevent renaming in order to keep the package name consistent 19 | AUTO_LIBNAME_PKGS = "" 20 | 21 | FILES_SOLIBSDEV = "" 22 | INSANE_SKIP:${PN} += "dev-so" 23 | FILES:${PN} += "${libdir}/*.so" 24 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/unilog/files/0001-fix-python-path-for-petalinux.patch: -------------------------------------------------------------------------------- 1 | From 0f40c10b8f4b2313d3d9fb61139b296f9500acb1 Mon Sep 17 00:00:00 2001 2 | From: Tianfang Meng 3 | Date: Thu, 20 May 2021 17:30:46 +0800 4 | Subject: [PATCH] fix python path for petalinux 5 | 6 | --- 7 | cmake/vai_add_pybind11_module.cmake | 5 +++-- 8 | 1 file changed, 3 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/cmake/vai_add_pybind11_module.cmake b/cmake/vai_add_pybind11_module.cmake 11 | index e76c299..7696786 100644 12 | --- a/cmake/vai_add_pybind11_module.cmake 13 | +++ b/cmake/vai_add_pybind11_module.cmake 14 | @@ -3,8 +3,9 @@ option(INSTALL_HOME "install python lib in cmake install path" OFF) 15 | option(INSTALL_USER "install python lib in user space" OFF) 16 | if(BUILD_PYTHON) 17 | if(CMAKE_CROSSCOMPILING) 18 | - find_package (Python3 REQUIRED COMPONENTS Interpreter Development) 19 | - EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; import os;stdout.write(os.path.basename(os.path.dirname(sysconfig.get_python_lib())))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) 20 | + # find_package (Python3 REQUIRED COMPONENTS Interpreter Development) 21 | + find_package (Python3 REQUIRED COMPONENTS Development) 22 | + # EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; import os;stdout.write(os.path.basename(os.path.dirname(sysconfig.get_python_lib())))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) 23 | find_path( 24 | _PYBIND11_PATH pybind11 25 | HINTS 26 | -- 27 | 2.17.1 28 | 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/unilog/unilog_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI UNILOG" 2 | DESCRIPTION = "Xilinx Vitis AI components - a wrapper for glog. Define unified log formats for vitis ai tools." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | SRC_URI += "file://0001-fix-python-path-for-petalinux.patch" 7 | 8 | S = "${WORKDIR}/git/src/vai_runtime/unilog" 9 | 10 | DEPENDS = "glog boost" 11 | 12 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 13 | PACKAGECONFIG[python] = ",,," 14 | 15 | inherit cmake 16 | 17 | EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release" 18 | 19 | # unilog contains only one shared lib and will therefore become subject to renaming 20 | # by debian.bbclass. Prevent renaming in order to keep the package name consistent 21 | AUTO_LIBNAME_PKGS = "" 22 | 23 | FILES_SOLIBSDEV = "" 24 | INSANE_SKIP:${PN} += "dev-so" 25 | FILES:${PN} += "${libdir}/*.so" 26 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/vart/vart_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI RunTime" 2 | DESCRIPTION = "Runner is an application level runtime interface for DPU IPs based on XRT. It use XIR subgraph as input, and run it on different targets. There are also emulators implemented with same interface to make debuging eaiser." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/vart" 7 | 8 | DEPENDS = "json-c xir target-factory" 9 | 10 | # By default, Vart enables vitis-flow which depends on xrt. Please remove this line if use vivado-flow 11 | PACKAGECONFIG:append = " vitis" 12 | 13 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,opencv," 14 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,,python3-core" 15 | PACKAGECONFIG[vitis] = ",,xrt," 16 | 17 | inherit cmake python3-dir 18 | 19 | EXTRA_OECMAKE += " -DBUILD_SHARED_LIBS=ON -DENABLE_CPU_RUNNER=OFF -DENABLE_SIM_RUNNER=OFF -DENABLE_DPU_RUNNER=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSROOT=${STAGING_DIR_HOST}" 20 | 21 | do_configure:prepend() { 22 | 23 | rm -rf ${STAGING_DIR_HOST}/usr/share/cmake/XRT/ 24 | } 25 | 26 | # Vart uses dl_open, so package the .so files in the runtime package 27 | FILES_SOLIBSDEV = "" 28 | INSANE_SKIP:${PN} += "dev-so" 29 | FILES:${PN} += " \ 30 | ${libdir}/*.so \ 31 | ${PYTHON_SITEPACKAGES_DIR} \ 32 | " 33 | 34 | SYSROOT_DIRS += "${bindir}" 35 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/vitis-ai-library/vitis-ai-library_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI LIBRARY" 2 | DESCRIPTION = "Xilinx Vitis AI components - VITIS AI LIBRARY" 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_library" 7 | 8 | DEPENDS = "protobuf-native vart opencv googletest libeigen libeigen-native" 9 | 10 | PACKAGECONFIG[test] = ",,," 11 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,, graphviz python3-graphviz bash" 12 | 13 | inherit cmake python3-dir 14 | 15 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSROOT=${STAGING_DIR_HOST} -DBUILD_SHARED_LIBS=ON" 16 | 17 | FILES_SOLIBSDEV = "" 18 | INSANE_SKIP:${PN} += "dev-so" 19 | 20 | FILES:${PN} += " \ 21 | ${datadir} \ 22 | ${libdir}/*.so \ 23 | ${prefix}/settings.sh \ 24 | ${PYTHON_SITEPACKAGES_DIR} \ 25 | " 26 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/vitis-ai-library/vitisai_3.0.inc: -------------------------------------------------------------------------------- 1 | LICENSE = "Apache-2.0" 2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" 3 | 4 | BRANCH = "master" 5 | SRC_URI = "git://github.com/Xilinx/Vitis-AI.git;protocol=https;branch=${BRANCH}" 6 | 7 | SRCREV = "c5d2bd43d951c174185d728b8e5bcda3869e0b39" 8 | 9 | PACKAGECONFIG:append = " python" 10 | PACKAGECONFIG:append = " test" 11 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vai/xir/xir_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI XIR" 2 | DESCRIPTION = "Xilinx Intermediate Representation for deep learning algorithm. Define a graph based represention, provide APIs to serialize or deserialize a model and APIs for basic graph operations." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/xir" 7 | 8 | DEPENDS = "protobuf-native protobuf-c boost unilog" 9 | 10 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 11 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,python3-pybind11," 12 | 13 | inherit cmake python3-dir 14 | 15 | EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_CONTRIB=OFF -DBUILD_DOC=OFF -DINSTALL_USER=OFF -DCMAKE_SYSROOT=${STAGING_DIR_HOST}" 16 | 17 | FILES_SOLIBSDEV = "" 18 | INSANE_SKIP:${PN} += "dev-so" 19 | FILES:${PN} += " \ 20 | ${libdir}/*.so \ 21 | ${PYTHON_SITEPACKAGES_DIR} \ 22 | " 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-accel-libs_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS accel sw libs" 2 | DESCRIPTION = "VVAS accelerator libraries" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native jansson vvas-utils vvas-gst opencv vitis-ai-library vart protobuf glog" 9 | 10 | inherit meson pkgconfig gettext 11 | 12 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 13 | 14 | S = "${WORKDIR}/git/vvas-accel-sw-libs" 15 | B = "${S}/build" 16 | 17 | GIR_MESON_ENABLE_FLAG = "enabled" 18 | GIR_MESON_DISABLE_FLAG = "disabled" 19 | 20 | FILES:${PN} += "${libdir}/vvas/*.so ${libdir}/*.so" 21 | FILES:${PN}-dev = "${includedir}" 22 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-core_1.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS Core" 2 | DESCRIPTION = "VVAS Core C-library" 3 | SECTION = "multimedia" 4 | LICENSE = "MIT" 5 | 6 | include vvas.inc 7 | 8 | PV = "1.0+git${SRCPV}" 9 | 10 | DEPENDS = "glib-2.0 glib-2.0-native xrt opencv vitis-ai-library vart protobuf jansson ne10 simd" 11 | 12 | inherit meson pkgconfig gettext 13 | 14 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 15 | 16 | S = "${WORKDIR}/git/vvas-core" 17 | B = "${S}/build" 18 | 19 | EXTRA_OEMESON += " \ 20 | -Denable_ppe=1 \ 21 | -Dtracker_use_simd=1 \ 22 | -Dvvas_core_utils='GLIB' \ 23 | " 24 | 25 | GIR_MESON_ENABLE_FLAG = "enabled" 26 | GIR_MESON_DISABLE_FLAG = "disabled" 27 | 28 | SOLIBS = ".so" 29 | FILES_SOLIBSDEV = "" 30 | FILES:${PN} += " ${libdir}/*.so ${libdir}/vvas_core/*.so" 31 | FILES:${PN}-dev += " ${includedir}/vvas_core/* ${includedir}/vvas_utils/* ${libdir}/pkgconfig/*.pc" 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-gst_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS gst" 2 | DESCRIPTION = "VVAS gstreamer plugins for VVAS SDK" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0 & LGPLv2 & MIT & BSD-3-Clause" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native gstreamer1.0 jansson vvas-utils opencv ne10 simd" 9 | 10 | RDEPENDS:${PN} = "gstreamer1.0-plugins-base" 11 | 12 | inherit meson pkgconfig gettext 13 | 14 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 15 | 16 | S = "${WORKDIR}/git/vvas-gst-plugins" 17 | B = "${S}/build" 18 | 19 | EXTRA_OEMESON += " \ 20 | -Denable_ppe=1 \ 21 | -Dvvas_core_utils='GLIB' \ 22 | " 23 | 24 | GIR_MESON_ENABLE_FLAG = "enabled" 25 | GIR_MESON_DISABLE_FLAG = "disabled" 26 | 27 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" 28 | FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" 29 | 30 | #CVE_PRODUCT = "gstreamer" 31 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-utils_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS util" 2 | DESCRIPTION = "VVAS utils for VVAS SDK" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native gstreamer1.0-plugins-base jansson vvas-core" 9 | 10 | inherit meson pkgconfig gettext 11 | 12 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 13 | 14 | S = "${WORKDIR}/git/vvas-utils" 15 | 16 | GIR_MESON_ENABLE_FLAG = "enabled" 17 | GIR_MESON_DISABLE_FLAG = "disabled" 18 | 19 | FILES:${PN} += " ${libdir}/libvvasutil-*.so ${libdir}/libvvasstructure-*.so" 20 | FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig/*" 21 | 22 | #CVE_PRODUCT = "gstreamer" 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas.inc: -------------------------------------------------------------------------------- 1 | SRC_URI = "gitsm://github.com/Xilinx/VVAS.git;protocol=https;branch=master" 2 | SRCREV = "542935a020cf12b4554c337f8cd4812c273928e4" 3 | PV = "3.0" 4 | 5 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=e92ba3dde58c378d55eb7c198eabb316" 6 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/petalinux/project-spec/meta-user/recipes-xrt/xrt/xrt_git.bbappend: -------------------------------------------------------------------------------- 1 | REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" 2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 3 | SRC_URI = "${REPO};${BRANCHARG}" 4 | 5 | BRANCH= "2022.2" 6 | SRCREV= "d6130b0b762eddb7ac32a24f09c28e5719d4bb1e" 7 | PV = "202220.2.14.0" 8 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/scripts/xilinx_zcu104_vcuDec_DP_pfm.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2022 Xilinx Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | set platform_name [lindex $argv 0] 18 | puts "The platform name is \"$platform_name\"" 19 | 20 | set xsa_path [lindex $argv 1] 21 | puts "The xsa path is \"$xsa_path\"" 22 | 23 | set output_path [lindex $argv 2] 24 | puts "The output path is \"$output_path\"" 25 | 26 | set OUTPUT platform_repo 27 | set SW_COMP platform_repo/tmp/sw_components/ 28 | platform -name $platform_name -desc "A basic static platform targeting the ZCU104 evaluation board, which includes 2GB DDR4, GEM, USB, SDIO interface and UART of the Processing System. It reserves most of the PL resources for user to add acceleration kernels" -hw $xsa_path/$platform_name.xsa -out $output_path -no-boot-bsp 29 | 30 | domain -name xrt -proc psu_cortexa53 -os linux -image $SW_COMP/src/a53/xrt/image 31 | domain config -boot $SW_COMP/src/boot 32 | domain config -bif $SW_COMP/src/a53/xrt/linux.bif 33 | domain -runtime opencl 34 | domain -pmuqemu-args $SW_COMP/src/qemu/lnx/pmu_args.txt 35 | domain -qemu-args $SW_COMP/src/qemu/lnx/qemu_args.txt 36 | domain -qemu-data $SW_COMP/src/boot 37 | #domain -sysroot ./src/aarch64-xilinx-linux 38 | 39 | platform -generate 40 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/vivado/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2022 Xilinx Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | OUTPUT=../platform_repo/tmp 18 | HW_PATH=$(OUTPUT)/vivado 19 | VIVADO=$(XILINX_VIVADO)/bin/vivado 20 | 21 | all: hw 22 | 23 | .PHONY: all hw clean 24 | 25 | hw: 26 | mkdir -p $(HW_PATH) 27 | $(VIVADO) -mode batch -notrace -source xilinx_zcu104_vcuDec_DP_xsa.tcl 28 | echo ${PLATFORM} > src/a53/xrt/image/platform_desc.txt 29 | 30 | clean: 31 | $(RM) -r vivado.* $(PLATFORM) $(PLATFORM).xsa .Xil *log *jou 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/vivado/src/a53/xrt/linux.bif: -------------------------------------------------------------------------------- 1 | /* linux */ 2 | the_ROM_image: 3 | { 4 | [fsbl_config] a53_x64 5 | [bootloader] 6 | [pmufw_image] 7 | [destination_device=pl] 8 | [destination_cpu=a53-0, exception_level=el-3, trustzone] 9 | [load=0x00100000] 10 | [destination_cpu=a53-0, exception_level=el-2] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/vivado/src/generic.readme: -------------------------------------------------------------------------------- 1 | -= SD card boot image =- 2 | 3 | Platform: 4 | Application: 5 | 6 | 1. Copy the contents of this directory to an SD card 7 | 2. Set boot mode to SD 8 | DIP switch SW6: 9 | Mode0 (#1) OFF 10 | Mode1 (#2) OFF 11 | Mode2 (#3) OFF 12 | Mode3 (#4) ON 13 | 3. Insert SD card and turn board on 14 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/vivado/src/qemu/lnx/pmu_args.txt: -------------------------------------------------------------------------------- 1 | -M 2 | microblaze-fdt 3 | -device 4 | loader,file= 5 | -machine-path 6 | . 7 | -display 8 | none 9 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_DP/vivado/src/qemu/lnx/qemu_args.txt: -------------------------------------------------------------------------------- 1 | -M 2 | arm-generic-fdt 3 | -serial 4 | mon:stdio 5 | -global 6 | xlnx,zynqmp-boot.cpu-num=0 7 | -global 8 | xlnx,zynqmp-boot.use-pmufw=true 9 | -net 10 | nic 11 | -net 12 | nic 13 | -net 14 | nic 15 | -net 16 | nic 17 | -net 18 | user 19 | -m 20 | 4G 21 | -device 22 | loader,file=,cpu-num=0 23 | -device 24 | loader,file= 25 | -boot 26 | mode=5 27 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/.petalinux/metadata: -------------------------------------------------------------------------------- 1 | PETALINUX_VER=2022.2 2 | VALIDATE_HW_CHKSUM=1 3 | HDF_EXT=xsa 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/config.project: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # PetaLinux SDK Project Configuration 4 | # 5 | CONFIG_PROJECT_ADDITIONAL_COMPONENTS_SEARCH_PATH="" 6 | 7 | # 8 | # Subsystems of the project 9 | # 10 | CONFIG_PROJECT_SUBSYSTEM_LINUX_INSTANCE_LINUX=y 11 | CONFIG_PROJECT_SUBSYSTEMS=y 12 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/attributes: -------------------------------------------------------------------------------- 1 | #Virtual Providers 2 | 3 | 4 | 5 | #defconfigs 6 | 7 | UBOOT_DEFAULT_DEFCONFIG="xilinx_zynqmp_virt_defconfig" 8 | 9 | #atf 10 | 11 | CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE=0x10080000 12 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/configs/busybox/inetd.conf: -------------------------------------------------------------------------------- 1 | #/etc/inetd.conf: see inetd(8) for further informations. 2 | # 3 | # Internet server configuration database 4 | # 5 | # If you want to disable an entry so it isn't touched during 6 | # package updates just comment it out with a single '#' character. 7 | # 8 | # 9 | # 10 | #:INTERNAL: Internal services 11 | #echo stream tcp nowait root internal 12 | #echo dgram udp wait root internal 13 | #chargen stream tcp nowait root internal 14 | #chargen dgram udp wait root internal 15 | #discard stream tcp nowait root internal 16 | #discard dgram udp wait root internal 17 | #daytime stream tcp nowait root internal 18 | #daytime dgram udp wait root internal 19 | #time stream tcp nowait root internal 20 | #time dgram udp wait root internal 21 | telnet stream tcp nowait root telnetd telnetd -i 22 | ftp stream tcp nowait root ftpd ftpd -w 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/configs/init-ifupdown/interfaces: -------------------------------------------------------------------------------- 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) 2 | 3 | # The loopback interface 4 | auto lo 5 | iface lo inet loopback 6 | 7 | # Wireless interfaces 8 | iface wlan0 inet dhcp 9 | wireless_mode managed 10 | wireless_essid any 11 | wpa-driver wext 12 | wpa-conf /etc/wpa_supplicant.conf 13 | 14 | iface atml0 inet dhcp 15 | 16 | # Wired or wireless interfaces 17 | auto eth0 18 | iface eth0 inet dhcp 19 | iface eth1 inet dhcp 20 | 21 | # Ethernet/RNDIS gadget (g_ether) 22 | # ... or on host side, usbnet and random hwaddr 23 | iface usb0 inet static 24 | address 192.168.7.2 25 | netmask 255.255.255.0 26 | network 192.168.7.0 27 | gateway 192.168.7.1 28 | 29 | # Bluetooth networking 30 | iface bnep0 inet dhcp 31 | 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/configs/systemd-conf/wired.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Type=ether 3 | Name=!veth* 4 | KernelCommandLine=!nfsroot 5 | KernelCommandLine=!ip 6 | 7 | [Network] 8 | DHCP=yes 9 | 10 | [DHCP] 11 | UseMTU=yes 12 | RouteMetric=10 13 | ClientIdentifier=mac 14 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/decoupling-dtsi/system-user.dtsi: -------------------------------------------------------------------------------- 1 | /include/ "system-conf.dtsi" 2 | / { 3 | }; 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/hw-description/metadata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/hw-description/metadata -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/COPYING.MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, add to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have recipes-* directories, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" 7 | 8 | # Define dynamic layers 9 | BBFILES_DYNAMIC += " \ 10 | xilinx-tools:${LAYERDIR}/meta-xilinx-tools/recipes-*/*/*.bbappend \ 11 | " 12 | 13 | BBFILE_COLLECTIONS += "meta-user" 14 | BBFILE_PATTERN_meta-user = "^${LAYERDIR}/" 15 | BBFILE_PRIORITY_meta-user = "7" 16 | LAYERSERIES_COMPAT_meta-user = "honister" 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/conf/petalinuxbsp.conf: -------------------------------------------------------------------------------- 1 | #User Configuration 2 | 3 | #OE_TERMINAL = "tmux" 4 | 5 | IMAGE_BOOT_FILES:zynqmp = "BOOT.BIN boot.scr Image" 6 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/conf/user-rootfsconfig: -------------------------------------------------------------------------------- 1 | #Note: Mention Each package in individual line 2 | #These packages will get added into rootfs menu entry 3 | 4 | CONFIG_gpio-demo 5 | CONFIG_peekpoke 6 | CONFIG_gstreamer-vcu-examples 7 | CONFIG_packagegroup-petalinux-v4lutils 8 | CONFIG_packagegroup-petalinux-audio 9 | CONFIG_gstreamer-vcu-notebooks 10 | CONFIG_xrt 11 | CONFIG_jansson 12 | CONFIG_zocl 13 | CONFIG_opencl-clhpp-dev 14 | CONFIG_opencl-headers-dev 15 | CONFIG_htop 16 | CONFIG_unilog 17 | CONFIG_target-factory 18 | CONFIG_vart 19 | CONFIG_xir 20 | CONFIG_vitis-ai-library 21 | CONFIG_vvas-utils 22 | CONFIG_vvas-gst 23 | CONFIG_vvas-accel-libs 24 | CONFIG_vvas-core 25 | CONFIG_simd 26 | CONFIG_ne10 27 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/meta-xilinx-tools/recipes-bsp/uboot-device-tree/files/system-user.dtsi: -------------------------------------------------------------------------------- 1 | /include/ "system-conf.dtsi" 2 | / { 3 | }; 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/meta-xilinx-tools/recipes-bsp/uboot-device-tree/uboot-device-tree.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:${SYSCONFIG_PATH}:" 2 | 3 | SRC_URI:append = " file://config file://system-user.dtsi" 4 | 5 | python () { 6 | if d.getVar("CONFIG_DISABLE"): 7 | d.setVarFlag("do_configure", "noexec", "1") 8 | } 9 | export PETALINUX 10 | do_configure:append () { 11 | script="${PETALINUX}/etc/hsm/scripts/petalinux_hsm_bridge.tcl" 12 | data=${PETALINUX}/etc/hsm/data/ 13 | eval xsct -sdx -nodisp ${script} -c ${WORKDIR}/config \ 14 | -hdf ${DT_FILES_PATH}/hardware_description.${HDF_EXT} -repo ${S} \ 15 | -data ${data} -sw ${DT_FILES_PATH} -o ${DT_FILES_PATH} -a "soc_mapping" 16 | } 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:${SYSCONFIG_PATH}:" 2 | 3 | SRC_URI:append = " file://config file://system-user.dtsi" 4 | DEPENDS:append = "${@' lopper-native' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 5 | 6 | # We need the deployed output 7 | PROC_TUNE:versal = "${@'cortexa72' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 8 | PROC_TUNE:zynqmp = "${@'cortexa53' if d.getVar('SYSTEM_DTFILE') != '' else ''}" 9 | 10 | python () { 11 | if d.getVar("CONFIG_DISABLE"): 12 | d.setVarFlag("do_configure", "noexec", "1") 13 | } 14 | 15 | export PETALINUX 16 | do_configure:append () { 17 | if [ ! -z "${SYSTEM_DTFILE}" ]; then 18 | user_dtsi="${TOPDIR}/../project-spec/decoupling-dtsi/system-user.dtsi" 19 | apu_dts="${TOPDIR}/../project-spec/decoupling-dtsi/${PROC_TUNE}-${SOC_FAMILY}-linux.dts" 20 | lopper -f -v --enhanced --permissive -i ${user_dtsi} ${apu_dts} system-default.dtb 21 | else 22 | script="${PETALINUX}/etc/hsm/scripts/petalinux_hsm_bridge.tcl" 23 | data=${PETALINUX}/etc/hsm/data/ 24 | eval xsct -sdx -nodisp ${script} -c ${WORKDIR}/config \ 25 | -hdf ${DT_FILES_PATH}/hardware_description.${HDF_EXT} -repo ${S} \ 26 | -data ${data} -sw ${DT_FILES_PATH} -o ${DT_FILES_PATH} -a "soc_mapping" 27 | fi 28 | } 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/pl-custom.dtsi: -------------------------------------------------------------------------------- 1 | /*Add pl custom nodes for pl.dtsi which is generated from base xsa file. 2 | Changes in this file reflects only when enabled the FPGA manager/Device tree overlay.*/ 3 | / { 4 | }; 5 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/xen-qemu.dtsi: -------------------------------------------------------------------------------- 1 | / { 2 | cpus { 3 | cpu@1 { 4 | //compatible = "disabled"; 5 | device_type = "none"; 6 | }; 7 | cpu@2 { 8 | //compatible = "disabled"; 9 | device_type = "none"; 10 | }; 11 | cpu@3 { 12 | //compatible = "disabled"; 13 | device_type = "none"; 14 | }; 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi: -------------------------------------------------------------------------------- 1 | &smmu { 2 | status = "okay"; 3 | mmu-masters = < &gem0 0x874 4 | &gem1 0x875 5 | &gem2 0x876 6 | &gem3 0x877 7 | &dwc3_0 0x860 8 | &dwc3_1 0x861 9 | &qspi 0x873 10 | &lpd_dma_chan1 0x868 11 | &lpd_dma_chan2 0x869 12 | &lpd_dma_chan3 0x86a 13 | &lpd_dma_chan4 0x86b 14 | &lpd_dma_chan5 0x86c 15 | &lpd_dma_chan6 0x86d 16 | &lpd_dma_chan7 0x86e 17 | &lpd_dma_chan8 0x86f 18 | &fpd_dma_chan1 0x14e8 19 | &fpd_dma_chan2 0x14e9 20 | &fpd_dma_chan3 0x14ea 21 | &fpd_dma_chan4 0x14eb 22 | &fpd_dma_chan5 0x14ec 23 | &fpd_dma_chan6 0x14ed 24 | &fpd_dma_chan7 0x14ee 25 | &fpd_dma_chan8 0x14ef 26 | &sdhci0 0x870 27 | &sdhci1 0x871 28 | &nand0 0x872 29 | &pcie 0x4d0 30 | &zynqmp_dpsub 0xce3 31 | &zynqmp_dpdma 0xce4>; 32 | }; 33 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/0001-ubifs-distroboot-support.patch: -------------------------------------------------------------------------------- 1 | From 357b3eebaa54be1ec8d14b306625eb73732ee5dc Mon Sep 17 00:00:00 2001 2 | From: Ashok Reddy Soma 3 | Date: Wed, 19 Aug 2020 05:29:40 -0600 4 | Subject: [UBOOT PATCH] ubifs: distroboot support 5 | 6 | Signed-off-by: Ashok Reddy Soma 7 | --- 8 | include/configs/xilinx_zynqmp.h | 5 ++++- 9 | 1 file changed, 4 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h 12 | index d3f465a..dc231b8 100644 13 | --- a/include/configs/xilinx_zynqmp.h 14 | +++ b/include/configs/xilinx_zynqmp.h 15 | @@ -154,7 +154,10 @@ 16 | 17 | #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ 18 | "bootcmd_" #devtypel #instance "=sf probe " #instance " 0 0 && " \ 19 | - "sf read $scriptaddr $script_offset_f $script_size_f && " \ 20 | + "setenv mtdids 'nor0=nor0' && " \ 21 | + "setenv mtdparts 'mtdparts=nor0:16m(raw),-(boot)' && " \ 22 | + "mtdparts && " \ 23 | + "ubi part boot; ubifsmount ubi0:boot; ubifsload $scriptaddr boot.scr; && " \ 24 | "echo QSPI: Trying to boot script at ${scriptaddr} && " \ 25 | "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0" 26 | 27 | -- 28 | 2.7.4 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_SYS_CONFIG_NAME="platform-top" 2 | CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20 3 | CONFIG_SYS_TEXT_BASE=0x10080000 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " file://platform-top.h file://bsp.cfg" 4 | 5 | do_configure:append () { 6 | install ${WORKDIR}/platform-top.h ${S}/include/configs/ 7 | } 8 | 9 | do_configure:append:microblaze () { 10 | if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then 11 | install ${WORKDIR}/platform-auto.h ${S}/include/configs/ 12 | install -d ${B}/source/board/xilinx/microblaze-generic/ 13 | install ${WORKDIR}/config.mk ${B}/source/board/xilinx/microblaze-generic/ 14 | fi 15 | } 16 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/bsp.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4 2 | CONFIG_XILINX_DPU=y 3 | # CONFIG_SENSORS_IRPS5401 is not set 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" 2 | 3 | SRC_URI:append = " file://bsp.cfg \ 4 | file://0001-misc-xlnx_dpu-support-softmax-40bit-addressing-from-.patch \ 5 | " 6 | KERNEL_FEATURES:append = " bsp.cfg" 7 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-multimedia/gstreamer/files/0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch: -------------------------------------------------------------------------------- 1 | From 7c53501dde3c1e8a0dcc5ccf0e8224f65a44df00 Mon Sep 17 00:00:00 2001 2 | From: Jeevan Sai Madira 3 | Date: Mon, 20 Feb 2023 16:57:49 +0530 4 | Subject: [PATCH] Populating video alignment info in GstVideometa of kmsbuffer. 5 | 6 | DESCRIPTION : 7 | Since gstreamer 1.18 it is required to set alignment in GstVideoMeta. 8 | If it is not set, it defaults to no padding and no alignment. 9 | 10 | Signed-off-by: Jeevan Sai Madira 11 | --- 12 | sys/kms/gstkmsbufferpool.c | 14 +++++++++++++- 13 | 1 file changed, 13 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/sys/kms/gstkmsbufferpool.c b/sys/kms/gstkmsbufferpool.c 16 | index 7c02aa2..a1545bd 100644 17 | --- a/sys/kms/gstkmsbufferpool.c 18 | +++ b/sys/kms/gstkmsbufferpool.c 19 | @@ -160,12 +160,24 @@ gst_kms_buffer_pool_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer, 20 | gst_buffer_append_memory (*buffer, mem); 21 | 22 | if (priv->add_videometa) { 23 | + GstVideoMeta *meta; 24 | + GstVideoAlignment align; 25 | + GstStructure *config = gst_buffer_pool_get_config (pool); 26 | GST_DEBUG_OBJECT (pool, "adding GstVideoMeta"); 27 | 28 | - gst_buffer_add_video_meta_full (*buffer, GST_VIDEO_FRAME_FLAG_NONE, 29 | + meta = gst_buffer_add_video_meta_full (*buffer, GST_VIDEO_FRAME_FLAG_NONE, 30 | GST_VIDEO_INFO_FORMAT (info), 31 | GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info), 32 | GST_VIDEO_INFO_N_PLANES (info), info->offset, info->stride); 33 | + config = gst_buffer_pool_get_config (pool); 34 | + gst_video_alignment_reset (&align); 35 | + if (gst_buffer_pool_config_get_video_alignment (config, &align)) { 36 | + /* Set Alignment info in GstVideoMeta */ 37 | + gst_video_meta_set_alignment (meta, align); 38 | + } 39 | + if (config) { 40 | + gst_structure_free (config); 41 | + } 42 | } 43 | 44 | return GST_FLOW_OK; 45 | -- 46 | 1.8.3.1 47 | 48 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " file://0001-Populating-video-alignment-info-in-GstVideometa-of-k.patch" 4 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-multimedia/vcu/files/0001-fix-4444-Round-up-display-parameters-before-calling-.patch: -------------------------------------------------------------------------------- 1 | From 01c14b7d782184ce52400bf6f7df4c85b544172d Mon Sep 17 00:00:00 2001 2 | From: Ray Clenaghan 3 | Date: Wed, 15 Feb 2023 11:44:25 +0000 4 | Subject: [PATCH] fix(4444): Round up display parameters before calling 5 | AL_Decoder_Create 6 | 7 | --- 8 | module/module_dec.cpp | 6 ++++++ 9 | 1 file changed, 6 insertions(+) 10 | 11 | diff --git a/module/module_dec.cpp b/module/module_dec.cpp 12 | index 39b2aa5..51fa1d9 100644 13 | --- a/module/module_dec.cpp 14 | +++ b/module/module_dec.cpp 15 | @@ -352,6 +352,12 @@ ModuleInterface::ErrorType DecModule::CreateDecoder(bool shouldPrealloc) 16 | if(inputParsed) 17 | decCallbacks.parsedSeiCB = { nullptr, nullptr }; 18 | 19 | + if(shouldPrealloc) 20 | + { 21 | + media->settings.tStream.tDim.iHeight = RoundUp(media->settings.tStream.tDim.iHeight, 16); 22 | + media->settings.tStream.tDim.iWidth = RoundUp(media->settings.tStream.tDim.iWidth, 16); 23 | + } 24 | + 25 | auto errorCode = AL_Decoder_Create(&decoder, channel, allocator.get(), &media->settings, &decCallbacks); 26 | 27 | if(AL_IS_ERROR_CODE(errorCode)) 28 | -- 29 | 2.30.2 30 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-multimedia/vcu/libomxil-xlnx.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2 | 3 | SRC_URI:append = " \ 4 | file://0001-fix-2022.2-Store-initial-GST-display-resolution.patch \ 5 | file://0001-fix-4444-Round-up-display-parameters-before-calling-.patch \ 6 | " 7 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/target-factory/target-factory_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Target Factory" 2 | DESCRIPTION = "A factory to manage DPU target description infos. Register targets and then you can get infos by name or fingerprint." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/target_factory" 7 | 8 | DEPENDS = "unilog protobuf-native protobuf-c" 9 | 10 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 11 | PACKAGECONFIG[python] = ",,," 12 | 13 | inherit cmake 14 | 15 | EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON" 16 | 17 | # target-factory contains only one shared lib and will therefore become subject to renaming 18 | # by debian.bbclass. Prevent renaming in order to keep the package name consistent 19 | AUTO_LIBNAME_PKGS = "" 20 | 21 | FILES_SOLIBSDEV = "" 22 | INSANE_SKIP:${PN} += "dev-so" 23 | FILES:${PN} += "${libdir}/*.so" 24 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/unilog/files/0001-fix-python-path-for-petalinux.patch: -------------------------------------------------------------------------------- 1 | From 0f40c10b8f4b2313d3d9fb61139b296f9500acb1 Mon Sep 17 00:00:00 2001 2 | From: Tianfang Meng 3 | Date: Thu, 20 May 2021 17:30:46 +0800 4 | Subject: [PATCH] fix python path for petalinux 5 | 6 | --- 7 | cmake/vai_add_pybind11_module.cmake | 5 +++-- 8 | 1 file changed, 3 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/cmake/vai_add_pybind11_module.cmake b/cmake/vai_add_pybind11_module.cmake 11 | index e76c299..7696786 100644 12 | --- a/cmake/vai_add_pybind11_module.cmake 13 | +++ b/cmake/vai_add_pybind11_module.cmake 14 | @@ -3,8 +3,9 @@ option(INSTALL_HOME "install python lib in cmake install path" OFF) 15 | option(INSTALL_USER "install python lib in user space" OFF) 16 | if(BUILD_PYTHON) 17 | if(CMAKE_CROSSCOMPILING) 18 | - find_package (Python3 REQUIRED COMPONENTS Interpreter Development) 19 | - EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; import os;stdout.write(os.path.basename(os.path.dirname(sysconfig.get_python_lib())))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) 20 | + # find_package (Python3 REQUIRED COMPONENTS Interpreter Development) 21 | + find_package (Python3 REQUIRED COMPONENTS Development) 22 | + # EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; import os;stdout.write(os.path.basename(os.path.dirname(sysconfig.get_python_lib())))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) 23 | find_path( 24 | _PYBIND11_PATH pybind11 25 | HINTS 26 | -- 27 | 2.17.1 28 | 29 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/unilog/unilog_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI UNILOG" 2 | DESCRIPTION = "Xilinx Vitis AI components - a wrapper for glog. Define unified log formats for vitis ai tools." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | SRC_URI += "file://0001-fix-python-path-for-petalinux.patch" 7 | 8 | S = "${WORKDIR}/git/src/vai_runtime/unilog" 9 | 10 | DEPENDS = "glog boost" 11 | 12 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 13 | PACKAGECONFIG[python] = ",,," 14 | 15 | inherit cmake 16 | 17 | EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release" 18 | 19 | # unilog contains only one shared lib and will therefore become subject to renaming 20 | # by debian.bbclass. Prevent renaming in order to keep the package name consistent 21 | AUTO_LIBNAME_PKGS = "" 22 | 23 | FILES_SOLIBSDEV = "" 24 | INSANE_SKIP:${PN} += "dev-so" 25 | FILES:${PN} += "${libdir}/*.so" 26 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/vart/vart_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI RunTime" 2 | DESCRIPTION = "Runner is an application level runtime interface for DPU IPs based on XRT. It use XIR subgraph as input, and run it on different targets. There are also emulators implemented with same interface to make debuging eaiser." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/vart" 7 | 8 | DEPENDS = "json-c xir target-factory" 9 | 10 | # By default, Vart enables vitis-flow which depends on xrt. Please remove this line if use vivado-flow 11 | PACKAGECONFIG:append = " vitis" 12 | 13 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,opencv," 14 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,,python3-core" 15 | PACKAGECONFIG[vitis] = ",,xrt," 16 | 17 | inherit cmake python3-dir 18 | 19 | EXTRA_OECMAKE += " -DBUILD_SHARED_LIBS=ON -DENABLE_CPU_RUNNER=OFF -DENABLE_SIM_RUNNER=OFF -DENABLE_DPU_RUNNER=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSROOT=${STAGING_DIR_HOST}" 20 | 21 | do_configure:prepend() { 22 | 23 | rm -rf ${STAGING_DIR_HOST}/usr/share/cmake/XRT/ 24 | } 25 | 26 | # Vart uses dl_open, so package the .so files in the runtime package 27 | FILES_SOLIBSDEV = "" 28 | INSANE_SKIP:${PN} += "dev-so" 29 | FILES:${PN} += " \ 30 | ${libdir}/*.so \ 31 | ${PYTHON_SITEPACKAGES_DIR} \ 32 | " 33 | 34 | SYSROOT_DIRS += "${bindir}" 35 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/vitis-ai-library/vitis-ai-library_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI LIBRARY" 2 | DESCRIPTION = "Xilinx Vitis AI components - VITIS AI LIBRARY" 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_library" 7 | 8 | DEPENDS = "protobuf-native vart opencv googletest libeigen libeigen-native" 9 | 10 | PACKAGECONFIG[test] = ",,," 11 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,, graphviz python3-graphviz bash" 12 | 13 | inherit cmake python3-dir 14 | 15 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSROOT=${STAGING_DIR_HOST} -DBUILD_SHARED_LIBS=ON" 16 | 17 | FILES_SOLIBSDEV = "" 18 | INSANE_SKIP:${PN} += "dev-so" 19 | 20 | FILES:${PN} += " \ 21 | ${datadir} \ 22 | ${libdir}/*.so \ 23 | ${prefix}/settings.sh \ 24 | ${PYTHON_SITEPACKAGES_DIR} \ 25 | " 26 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/vitis-ai-library/vitisai_3.0.inc: -------------------------------------------------------------------------------- 1 | LICENSE = "Apache-2.0" 2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" 3 | 4 | BRANCH = "master" 5 | SRC_URI = "git://github.com/Xilinx/Vitis-AI.git;protocol=https;branch=${BRANCH}" 6 | 7 | SRCREV = "c5d2bd43d951c174185d728b8e5bcda3869e0b39" 8 | 9 | PACKAGECONFIG:append = " python" 10 | PACKAGECONFIG:append = " test" 11 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vai/xir/xir_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Vitis AI XIR" 2 | DESCRIPTION = "Xilinx Intermediate Representation for deep learning algorithm. Define a graph based represention, provide APIs to serialize or deserialize a model and APIs for basic graph operations." 3 | 4 | require recipes-vai/vitis-ai-library/vitisai_3.0.inc 5 | 6 | S = "${WORKDIR}/git/src/vai_runtime/xir" 7 | 8 | DEPENDS = "protobuf-native protobuf-c boost unilog" 9 | 10 | PACKAGECONFIG[test] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,," 11 | PACKAGECONFIG[python] = "-DBUILD_PYTHON=ON -DPYTHON_INSTALL_DIR=${PYTHON_DIR},-DBUILD_PYTHON=OFF,python3-pybind11," 12 | 13 | inherit cmake python3-dir 14 | 15 | EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_CONTRIB=OFF -DBUILD_DOC=OFF -DINSTALL_USER=OFF -DCMAKE_SYSROOT=${STAGING_DIR_HOST}" 16 | 17 | FILES_SOLIBSDEV = "" 18 | INSANE_SKIP:${PN} += "dev-so" 19 | FILES:${PN} += " \ 20 | ${libdir}/*.so \ 21 | ${PYTHON_SITEPACKAGES_DIR} \ 22 | " 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-accel-libs_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS accel sw libs" 2 | DESCRIPTION = "VVAS accelerator libraries" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native jansson vvas-utils vvas-gst opencv vitis-ai-library vart protobuf glog" 9 | 10 | inherit meson pkgconfig gettext 11 | 12 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 13 | 14 | S = "${WORKDIR}/git/vvas-accel-sw-libs" 15 | B = "${S}/build" 16 | 17 | GIR_MESON_ENABLE_FLAG = "enabled" 18 | GIR_MESON_DISABLE_FLAG = "disabled" 19 | 20 | FILES:${PN} += "${libdir}/vvas/*.so ${libdir}/*.so" 21 | FILES:${PN}-dev = "${includedir}" 22 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-core_1.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS Core" 2 | DESCRIPTION = "VVAS Core C-library" 3 | SECTION = "multimedia" 4 | LICENSE = "MIT" 5 | 6 | include vvas.inc 7 | 8 | PV = "1.0+git${SRCPV}" 9 | 10 | DEPENDS = "glib-2.0 glib-2.0-native xrt opencv vitis-ai-library vart protobuf jansson ne10 simd" 11 | 12 | inherit meson pkgconfig gettext 13 | 14 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 15 | 16 | S = "${WORKDIR}/git/vvas-core" 17 | B = "${S}/build" 18 | 19 | EXTRA_OEMESON += " \ 20 | -Denable_ppe=1 \ 21 | -Dtracker_use_simd=1 \ 22 | -Dvvas_core_utils='GLIB' \ 23 | " 24 | 25 | GIR_MESON_ENABLE_FLAG = "enabled" 26 | GIR_MESON_DISABLE_FLAG = "disabled" 27 | 28 | SOLIBS = ".so" 29 | FILES_SOLIBSDEV = "" 30 | FILES:${PN} += " ${libdir}/*.so ${libdir}/vvas_core/*.so" 31 | FILES:${PN}-dev += " ${includedir}/vvas_core/* ${includedir}/vvas_utils/* ${libdir}/pkgconfig/*.pc" 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-gst_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS gst" 2 | DESCRIPTION = "VVAS gstreamer plugins for VVAS SDK" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0 & LGPLv2 & MIT & BSD-3-Clause" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native gstreamer1.0 jansson vvas-utils opencv ne10 simd" 9 | 10 | RDEPENDS:${PN} = "gstreamer1.0-plugins-base" 11 | 12 | inherit meson pkgconfig gettext 13 | 14 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 15 | 16 | S = "${WORKDIR}/git/vvas-gst-plugins" 17 | B = "${S}/build" 18 | 19 | EXTRA_OEMESON += " \ 20 | -Denable_ppe=1 \ 21 | -Dvvas_core_utils='GLIB' \ 22 | " 23 | 24 | GIR_MESON_ENABLE_FLAG = "enabled" 25 | GIR_MESON_DISABLE_FLAG = "disabled" 26 | 27 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" 28 | FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" 29 | 30 | #CVE_PRODUCT = "gstreamer" 31 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas-utils_3.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "VVAS util" 2 | DESCRIPTION = "VVAS utils for VVAS SDK" 3 | SECTION = "multimedia" 4 | LICENSE = "Apache-2.0" 5 | 6 | include vvas.inc 7 | 8 | DEPENDS = "glib-2.0 glib-2.0-native xrt libcap libxml2 bison-native flex-native gstreamer1.0-plugins-base jansson vvas-core" 9 | 10 | inherit meson pkgconfig gettext 11 | 12 | TARGET_CPPFLAGS:append = " -I=/usr/include/xrt" 13 | 14 | S = "${WORKDIR}/git/vvas-utils" 15 | 16 | GIR_MESON_ENABLE_FLAG = "enabled" 17 | GIR_MESON_DISABLE_FLAG = "disabled" 18 | 19 | FILES:${PN} += " ${libdir}/libvvasutil-*.so ${libdir}/libvvasstructure-*.so" 20 | FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig/*" 21 | 22 | #CVE_PRODUCT = "gstreamer" 23 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-vvas/vvas/vvas.inc: -------------------------------------------------------------------------------- 1 | SRC_URI = "gitsm://github.com/Xilinx/VVAS.git;protocol=https;branch=master" 2 | SRCREV = "542935a020cf12b4554c337f8cd4812c273928e4" 3 | PV = "3.0" 4 | 5 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=e92ba3dde58c378d55eb7c198eabb316" 6 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/petalinux/project-spec/meta-user/recipes-xrt/xrt/xrt_git.bbappend: -------------------------------------------------------------------------------- 1 | REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" 2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 3 | SRC_URI = "${REPO};${BRANCHARG}" 4 | 5 | BRANCH= "2022.2" 6 | SRCREV= "d6130b0b762eddb7ac32a24f09c28e5719d4bb1e" 7 | PV = "202220.2.14.0" 8 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/scripts/xilinx_zcu104_vcuDec_vmixHdmiTx_pfm.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2022 Xilinx Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | set platform_name [lindex $argv 0] 18 | puts "The platform name is \"$platform_name\"" 19 | 20 | set xsa_path [lindex $argv 1] 21 | puts "The xsa path is \"$xsa_path\"" 22 | 23 | set output_path [lindex $argv 2] 24 | puts "The output path is \"$output_path\"" 25 | 26 | set OUTPUT platform_repo 27 | set SW_COMP platform_repo/tmp/sw_components/ 28 | platform -name $platform_name -desc "A basic static platform targeting the ZCU104 evaluation board, which includes 2GB DDR4, GEM, USB, SDIO interface and UART of the Processing System. It reserves most of the PL resources for user to add acceleration kernels" -hw $xsa_path/$platform_name.xsa -out $output_path -no-boot-bsp 29 | 30 | domain -name xrt -proc psu_cortexa53 -os linux -image $SW_COMP/src/a53/xrt/image 31 | domain config -boot $SW_COMP/src/boot 32 | domain config -bif $SW_COMP/src/a53/xrt/linux.bif 33 | domain -runtime opencl 34 | domain -pmuqemu-args $SW_COMP/src/qemu/lnx/pmu_args.txt 35 | domain -qemu-args $SW_COMP/src/qemu/lnx/qemu_args.txt 36 | domain -qemu-data $SW_COMP/src/boot 37 | #domain -sysroot ./src/aarch64-xilinx-linux 38 | 39 | platform -generate 40 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2022 Xilinx Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | OUTPUT=../platform_repo/tmp 18 | HW_PATH=$(OUTPUT)/vivado 19 | VIVADO=$(XILINX_VIVADO)/bin/vivado 20 | 21 | all: hw 22 | 23 | .PHONY: all hw clean 24 | 25 | hw: 26 | mkdir -p $(HW_PATH) 27 | $(VIVADO) -mode batch -notrace -source xilinx_zcu104_vcuDec_vmixHdmiTx_xsa.tcl 28 | echo ${PLATFORM} > src/a53/xrt/image/platform_desc.txt 29 | 30 | clean: 31 | $(RM) -r vivado.* $(PLATFORM) $(PLATFORM).xsa .Xil *log *jou 32 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/ip_repo/hdmi_hb/constrs_1/new/hdmi_hb.xdc: -------------------------------------------------------------------------------- 1 | # # Copyright 2022 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # set_false_path -to [get_pins -hierarchical -filter {NAME =~ */hdmi_hb_cnt_reg[*]/CLR}] 2 | set_false_path -to [get_pins -hierarchical -filter {NAME =~ */hdmi_hb_i_reg/CLR}] -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/ip_repo/hdmi_hb/constrs_1/new/hdmi_hb_ooc.xdc: -------------------------------------------------------------------------------- 1 | # # Copyright 2022 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # create_clock -period 10.000 -name status_sb_aclk [get_ports status_sb_aclk] 2 | #set_property HD.CLK_SRC BUFGCTRL_X0Y0 [get_ports status_sb_aclk] 3 | 4 | create_clock -period 3.333 -name link_clk [get_ports link_clk] 5 | #set_property HD.CLK_SRC BUFGCTRL_X0Y1 [get_ports link_clk] 6 | 7 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/ip_repo/hdmi_hb/xgui/hdmi_hb_v1_0.tcl: -------------------------------------------------------------------------------- 1 | # # Copyright 2022 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Definitional proc to organize widgets for parameters. 2 | proc init_gui { IPINST } { 3 | ipgui::add_param $IPINST -name "Component_Name" 4 | 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/src/a53/xrt/linux.bif: -------------------------------------------------------------------------------- 1 | /* linux */ 2 | the_ROM_image: 3 | { 4 | [fsbl_config] a53_x64 5 | [bootloader] 6 | [pmufw_image] 7 | [destination_device=pl] 8 | [destination_cpu=a53-0, exception_level=el-3, trustzone] 9 | [load=0x00100000] 10 | [destination_cpu=a53-0, exception_level=el-2] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/src/generic.readme: -------------------------------------------------------------------------------- 1 | -= SD card boot image =- 2 | 3 | Platform: 4 | Application: 5 | 6 | 1. Copy the contents of this directory to an SD card 7 | 2. Set boot mode to SD 8 | DIP switch SW6: 9 | Mode0 (#1) OFF 10 | Mode1 (#2) OFF 11 | Mode2 (#3) OFF 12 | Mode3 (#4) ON 13 | 3. Insert SD card and turn board on 14 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/src/qemu/lnx/pmu_args.txt: -------------------------------------------------------------------------------- 1 | -M 2 | microblaze-fdt 3 | -device 4 | loader,file= 5 | -machine-path 6 | . 7 | -display 8 | none 9 | -------------------------------------------------------------------------------- /vvas-platforms/Embedded/zcu104_vcuDec_vmixHdmiTx/vivado/src/qemu/lnx/qemu_args.txt: -------------------------------------------------------------------------------- 1 | -M 2 | arm-generic-fdt 3 | -serial 4 | mon:stdio 5 | -global 6 | xlnx,zynqmp-boot.cpu-num=0 7 | -global 8 | xlnx,zynqmp-boot.use-pmufw=true 9 | -net 10 | nic 11 | -net 12 | nic 13 | -net 14 | nic 15 | -net 16 | nic 17 | -net 18 | user 19 | -m 20 | 4G 21 | -device 22 | loader,file=,cpu-num=0 23 | -device 24 | loader,file= 25 | -boot 26 | mode=5 27 | -------------------------------------------------------------------------------- /vvas-platforms/README.md: -------------------------------------------------------------------------------- 1 | # VVAS Platforms 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | 12 | This directory contains the sources for various reference platforms supported by this VVAS release. These platforms are used in example designs (vvas-examples) shared with this VVAS release. 13 | -------------------------------------------------------------------------------- /vvas-utils/README.md: -------------------------------------------------------------------------------- 1 | # VVAS utility for VVAS Gstreamer plugins and VVAS Kernel libs 2 | 3 | ## Copyright and license statement 4 | Copyright 2022 Xilinx Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 7 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 10 | 11 | 12 | ***Note: We do not suggest to modify vvas-util code.*** 13 | 14 | 15 | # Steps for Cross Compilation for Embedded platforms: 16 | 1. Copy sdk.sh file to on build machine 17 | 18 | 2. Prepare SYSROOT and set environment variables 19 | ``` 20 | cd 21 | ./sdk.sh -d `pwd` -y 22 | ``` 23 | 24 | ***Note: Following packages need to be available in sysroot :*** 25 | ``` 26 | - jansson >= 2.7 27 | ``` 28 | 3. Edit vvas-utils/meson.cross to point to SYSROOT path 29 | 30 | 4. Build & Compile VVAS utility 31 | ``` 32 | meson build --cross-file meson.cross 33 | cd build; 34 | ninja; 35 | ``` 36 | 5. For installing user to copy .so to target in respective locations 37 | -------------------------------------------------------------------------------- /vvas-utils/meson.cross.template: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | [host_machine] 19 | system = 'linux' 20 | cpu_family = 'aarch64' 21 | cpu = 'arm64' 22 | endian = 'little' 23 | 24 | [build_machine] 25 | system = 'linux' 26 | cpu_family = 'x86_64' 27 | cpu = 'x86_64' 28 | endian = 'little' 29 | 30 | [built-in options] 31 | c_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 32 | cpp_args = ['--sysroot=', '-I/usr/include', '-I/usr/include/xrt'] 33 | c_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 34 | cpp_link_args = ['--sysroot=','-L/lib', '-L/usr/lib'] 35 | 36 | [properties] 37 | pkg_config_libdir = ['/usr/lib/pkgconfig:/usr/share/pkgconfig'] 38 | sys_root = '' 39 | 40 | [binaries] 41 | c = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-gcc'] 42 | cpp = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++'] 43 | ar = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ar'] 44 | pkgconfig = ['/usr/bin/pkg-config'] 45 | strip = ['/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-strip'] 46 | -------------------------------------------------------------------------------- /vvas-utils/pkgconfig/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | pkgconf = configuration_data() 19 | 20 | pkgconf.set('prefix', join_paths(get_option('prefix'))) 21 | pkgconf.set('exec_prefix', '${prefix}') 22 | pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) 23 | pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) 24 | pkgconf.set('VERSION', utils_version) 25 | 26 | pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) 27 | 28 | pkg_files = [ 29 | 'vvas-utils', 30 | 'vvas-structure', 31 | ] 32 | 33 | foreach p : pkg_files 34 | infile = p + '.pc.in' 35 | outfile = p + '.pc' 36 | configure_file(input : infile, 37 | output : outfile, 38 | configuration : pkgconf, 39 | install_dir : pkg_install_dir) 40 | endforeach 41 | -------------------------------------------------------------------------------- /vvas-utils/pkgconfig/vvas-structure.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: VVAS Structure Library 7 | Description: VVAS Structure Library Implementation 8 | Requires: glib-2.0 >= 2.44.0 \ 9 | gobject-2.0 10 | Version: @VERSION@ 11 | Libs: -L${libdir} -lvvasstructure-@VERSION@ 12 | Cflags: -I${includedir} 13 | 14 | -------------------------------------------------------------------------------- /vvas-utils/pkgconfig/vvas-utils-uninstalled.pc.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xilinx/VVAS/c5705780f4a47dfe02888e22f3aad6e6eb021ef8/vvas-utils/pkgconfig/vvas-utils-uninstalled.pc.in -------------------------------------------------------------------------------- /vvas-utils/pkgconfig/vvas-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: GStreamer VVAS Utility Library 7 | Description: VVAS Utility Library Implementation 8 | Requires: xrt >= 2.11.0 \ 9 | jansson >= 2.11 10 | Version: @VERSION@ 11 | Libs: -L${libdir} -lvvasutil-@VERSION@ 12 | Cflags: -I${includedir} 13 | 14 | -------------------------------------------------------------------------------- /vvas-utils/utils/meson.build: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Copyright 2020 - 2022 Xilinx, Inc. 3 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ######################################################################### 17 | 18 | vvasutil_sources = ['vvas_kernel_utils.c'] 19 | 20 | vvasutil = library('vvasutil-' + utils_version, 21 | vvasutil_sources, 22 | c_args : vvas_utils_args, 23 | include_directories : [configinc], 24 | install : true, 25 | dependencies : [xrt_dep, jansson_dep, vvascore_dep], 26 | ) 27 | 28 | #VVAS Common Headers to install 29 | vvas_common_headers = ['vvas/vvas_kernel.h', 'vvas/vvasmeta.h', 'vvas/vvaslogs.h', 'vvas/vvas_structure.h'] 30 | install_headers(vvas_common_headers, subdir : 'vvas/') 31 | 32 | vvasutils_dep = declare_dependency(link_with : vvasutil, 33 | include_directories : [utilsinc], 34 | dependencies : [vvascore_dep]) 35 | 36 | vvasstructure_sources = ['vvas_structure.c'] 37 | 38 | vvasstructure = library('vvasstructure-' + utils_version, 39 | vvasstructure_sources, 40 | cpp_args : vvas_utils_args, 41 | include_directories : [configinc], 42 | install : true, 43 | dependencies : [glib_deps], 44 | ) 45 | 46 | vvasstructure_dep = declare_dependency(link_with : vvasstructure, 47 | include_directories : [utilsinc], 48 | dependencies : [glib_deps]) 49 | -------------------------------------------------------------------------------- /vvas-utils/utils/vvas/vvaslogs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #pragma once 19 | #ifndef DPU_H 20 | #define DPU_H 21 | 22 | /* Update of this file by the user is not encouraged */ 23 | #include 24 | 25 | enum 26 | { 27 | LOG_LEVEL_ERROR, 28 | LOG_LEVEL_WARNING, 29 | LOG_LEVEL_INFO, 30 | LOG_LEVEL_DEBUG 31 | }; 32 | 33 | #define NOT_FOUND -1 34 | 35 | #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) 36 | #define LOG_MESSAGE(level, set_level, ...) {\ 37 | do {\ 38 | char *str; \ 39 | if (level == LOG_LEVEL_ERROR)\ 40 | str = (char*)"ERROR";\ 41 | else if (level == LOG_LEVEL_WARNING)\ 42 | str = (char*)"WARNING";\ 43 | else if (level == LOG_LEVEL_INFO)\ 44 | str = (char*)"INFO";\ 45 | else if (level == LOG_LEVEL_DEBUG)\ 46 | str = (char*)"DEBUG";\ 47 | if (level <= set_level) {\ 48 | printf("[%s %s:%d] %s: ",__FILENAME__, __func__, __LINE__, str);\ 49 | printf(__VA_ARGS__);\ 50 | printf("\n");\ 51 | }\ 52 | } while (0); \ 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /vvas-utils/utils/vvas/vvasmeta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 - 2022 Xilinx, Inc. 3 | * Copyright (C) 2022-2023 Advanced Micro Devices, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __VVAS_META_H__ 19 | #define __VVAS_META_H__ 20 | 21 | /* Update of this file by the user is not encouraged */ 22 | #include 23 | 24 | #define MAX_NAME_LENGTH 256 25 | 26 | typedef struct _VvasColorMetadata { 27 | uint8_t red; 28 | uint8_t green; 29 | uint8_t blue; 30 | uint8_t alpha; 31 | } VvasColorMetadata; 32 | 33 | typedef struct _VvasTextMetadata { 34 | 35 | int8_t disp_text[MAX_NAME_LENGTH]; 36 | 37 | VvasColorMetadata text_color; 38 | } VvasTextMetadata; 39 | 40 | 41 | typedef struct _XVABBoxMeta { 42 | float xmin; 43 | float ymin; 44 | float xmax; 45 | float ymax; 46 | 47 | VvasColorMetadata box_color; 48 | } VvasBBoxMetadata; 49 | 50 | typedef struct _VvasObjectMetadata { 51 | int32_t obj_id; 52 | int8_t obj_class[MAX_NAME_LENGTH]; 53 | double obj_prob; 54 | VvasBBoxMetadata bbox_meta; 55 | 56 | VvasTextMetadata text_meta; 57 | 58 | GList *obj_list; 59 | } VvasObjectMetadata; 60 | 61 | #endif 62 | --------------------------------------------------------------------------------