Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit a2f7466

Browse files
committed
SVET 2022.3 release
Main chanages: 1.Upgrade MediaSDK to OneVPL dispather v2022.0.3 and Onevpl GPU 22.3.2. The libva, gmmlib and media-driver versions are also upgrade 2.Upgrade OpenVINO version to 2022.1 3.Add support for Intel ADL platforms 4.Drop the support for old Intel platforms like Skylake, Kabylake, Apollo Lake and Coffee Lake Signed-off-by: Elaine Wang <[email protected]>
1 parent 38622b7 commit a2f7466

File tree

207 files changed

+29347
-2440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+29347
-2440
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/******************************************************************************\
2-
Copyright (c) 2005-2021, Intel Corporation
2+
Copyright (c) 2005-2022, Intel Corporation
33
All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ See [user guide](./doc/concurrent_video_analytic_sample_application_user_guide.p
3838
# System requirements
3939

4040
**Operating System:**
41-
* Ubuntu 20.04
41+
* Ubuntu 20.04.03
4242

4343
**Software:**
44-
* [MediaSDK 21.1.3](https://github.com/Intel-Media-SDK/MediaSDK/releases/tag/intel-mediasdk-21.1.3)
45-
* [OpenVINO™ 2021.4](https://software.intel.com/en-us/openvino-toolkit)
44+
* [OneVPL dispather v2022.0.3] (https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.0.3.tar.gz)
45+
* [OneVPL GPU 22.3.2] (https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-22.3.2.tar.gz)
46+
* [OpenVINO™ 2022.1](https://software.intel.com/en-us/openvino-toolkit)
4647

4748
**Hardware:**
48-
* Intel® platforms supported by the MediaSDK 21.1.3 and OpenVINO 2021.4.
49-
* For Media SDK, the major platform dependency comes from the back-end media driver. https://github.com/intel/media-driver
49+
* Intel® platforms supported by the OneVPL GPU 22.3.2 and OpenVINO 2022.1.
50+
* For OneVPL GPU, the major platform dependency comes from the back-end media driver. https://github.com/intel/media-driver
5051
* For OpenVINO™, see details from here: https://software.intel.com/en-us/openvino-toolkit/documentation/system-requirements
5152

5253
# How to build
@@ -55,8 +56,50 @@ Run build_and_install.sh to install dependent software packages and build sample
5556

5657
Please refer to ”Installation Guide“ in [user guide](./doc/concurrent_video_analytic_sample_application_user_guide.pdf) for details.
5758

58-
## Build steps
59+
Below are the main steps
60+
61+
## Install OpenVINO 2022.1, OpenCV and NEO
62+
Install OpenVINO 2022.1 from https://software.intel.com/en-us/openvino-toolkit
63+
64+
Then install OpenCV:
65+
```sh
66+
cd /opt/intel/openvino_2022/extras/scripts/
67+
sudo -E download_opencv.sh
68+
```
69+
70+
If you see errors, you can also try below commands:
71+
```sh
72+
su
73+
cd /opt/intel/openvino_2022/extras/scripts/
74+
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.1/opencv/openvino_opencv_ubuntu20.tgz
75+
mv openvino_opencv_ubuntu20.tgz ../../
76+
cd ../../
77+
tar zxvf openvino_opencv_ubuntu20.tgz
78+
```
5979

80+
Install NEO manually according to instruction on https://github.com/intel/compute-runtime/releases/tag/22.20.23198
81+
82+
```sh
83+
mkdir neo; cd neo
84+
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.11222/intel-igc-core_1.0.11222_amd64.deb
85+
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.11222/intel-igc-opencl_1.0.11222_amd64.deb
86+
wget https://github.com/intel/compute-runtime/releases/download/22.20.23198/intel-level-zero-gpu-dbgsym_1.3.23198_amd64.ddeb
87+
wget https://github.com/intel/compute-runtime/releases/download/22.20.23198/intel-level-zero-gpu_1.3.23198_amd64.deb
88+
wget https://github.com/intel/compute-runtime/releases/download/22.20.23198/intel-opencl-icd-dbgsym_22.20.23198_amd64.ddeb
89+
wget https://github.com/intel/compute-runtime/releases/download/22.20.23198/intel-opencl-icd_22.20.23198_amd64.deb
90+
wget https://github.com/intel/compute-runtime/releases/download/22.20.23198/libigdgmm12_22.1.2_amd64.deb
91+
92+
sudo dpkg -i *.deb
93+
```
94+
Add user to group video and render:
95+
```sh
96+
usermod -a -G video $USER
97+
usermod -a -G render $USER
98+
```
99+
100+
At last, log out and log in again to make above change take effect.
101+
102+
## Build steps
60103
Get sources with the following git command:
61104
```sh
62105
git clone https://github.com/intel-iot-devkit/concurrent-video-analytic-pipeline-optimization-sample-l.git cva_sample
@@ -66,21 +109,25 @@ git clone https://github.com/intel-iot-devkit/concurrent-video-analytic-pipeline
66109
cd cva_sample
67110
./build_and_install.sh
68111
```
69-
This script will install the dependent software packages by running command "apt install". So it will ask for sudo password. Then it will download libva, libva-util, media-driver and MediaSDK source code and install these libraries. It might take 10 to 20 minutes depending on the network bandwidth.
112+
This script will install the dependent software packages by running command "apt install". So it will ask for sudo password. Then it will download libva, libva-util, gmmlib, media-driver, onevpl and onevpl_gpu source code and install these libraries. It might take 10 to 20 minutes depending on the network bandwidth.
70113

71114
After the script finishing, the sample application video_e2e_sample can be found under ./bin.
72115

73-
In order to enable the media SDK installed by SVET to coexist with different versions of media SDK installed on the same computer, we suggest (we have done so in our build script) that the media SDK environment variables of SVET should only be set in the current bash, not saved to the global system environment.
116+
In order to enable the libva/media-driver/onevpl installed by SVET to coexist with different versions of libva/media-driver/onevpl installed on the same computer, we suggest (we have done so in our build script) that the media SDK environment variables of SVET should only be set in the current bash, not saved to the global system environment.
74117
So please run 'source ./svet_env_setup.sh' first when you start a new shell (or change user in shell such as run 'su -') to run ./bin/video_e2e_sample".
75118

76119
```sh
77120
cd cva_sample
78121
source ./svet_env_setup.sh
122+
./bin/video_e2e_sample -par sanity_test/n1nodsp.par
123+
./bin/video_e2e_sample -par sanity_test/n2fd.par
79124
```
80-
Please refer to "Run sample application" in [user guide](./doc/concurrent_video_analytic_sample_application_user_guide.pdf) for details.
125+
n1nodsp.par is a basic test to check if the media stack work correctly.
126+
n2fd.par runs two video decode and face detection inference without display. It can be used to check if the OpenVINO and NEO installed correctly.
127+
Please refer to "Run sample application" for more use cases in [user guide](./doc/concurrent_video_analytic_sample_application_user_guide.pdf) for details.
81128

82129
# Known limitations
83130

84-
The sample application has been validated on Intel® platforms Skylake(i7-6770HQ), Coffee Lake(i7-8559U i7-8700), Whiskey Lake(i7-8665UE) and Tiger Lake U(i7-1185G7E, i5-1135G7E).
131+
The sample application has been validated on Intel® platforms Tiger Lake U(i7-1185G7E, i5-1135G7E, Celeron 6305E) and Adler Lake (i5-12400)
85132

86133

build_and_install.sh

Lines changed: 57 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -4,182 +4,76 @@ root_path=$PWD
44
#download_method="git"
55
download_method="wget"
66
built_with_ocv=true
7-
LIBVA_INSTALL_PREFIX="/opt/intel/svet/msdk"
8-
LIBVA_INSTALL_PATH="${LIBVA_INSTALL_PREFIX}/lib"
9-
LIBVA_DRIVERS_PATH="${LIBVA_INSTALL_PATH}/dri"
10-
LIBVA_DRIVER_NAME="iHD"
117

12-
while getopts b: flag
13-
do
8+
install_overwrite=False
9+
10+
while getopts 'b:i:' flag; do
1411
case "${flag}" in
1512
b)
16-
if [[ "no_ocv" == ${OPTARG} ]]
17-
then
13+
if [[ "no_ocv" == ${OPTARG} ]]
14+
then
1815
echo "Build SVET without OpenVINO"
1916
built_with_ocv=false
20-
fi
21-
;;
17+
fi
18+
;;
19+
i)
20+
if [[ "overwrite" == ${OPTARG} ]]
21+
then
22+
echo "Overwrite the default Intel media stack library installed."
23+
install_overwrite=True
24+
echo 'export SVET_INSTALL_OVERWRITE=True' >> ~/.bashrc
25+
export SVET_INSTALL_OVERWRITE=True
26+
fi
27+
;;
2228
esac
2329
done
2430

31+
2532
if [ ! -d "${INTEL_OPENVINO_DIR}" ] && [ $built_with_ocv = true ];
2633
then echo "Please make sure openvino has been installed and enviroment variables has been set by "
2734
echo "source intel/openvino/bin/setupvars.sh"
2835
exit -1;
2936
fi
3037

31-
sudo apt install python
38+
mkdir -p vpl
39+
cd vpl
40+
rm $root_path/svet_build.log
41+
touch $root_path/svet_build.log
42+
python3 ../onevpl_pre_install.py | tee $root_path/svet_build.log
3243

33-
if [[ $download_method == "git" ]]
44+
mkdir -p ~/cl_cache
45+
export cl_cache_dir=~/cl_cache
46+
47+
if [[ -d $cl_cache_dir ]];
3448
then
35-
python msdk_pre_install_internal.py | tee svet_download.log
49+
echo "cl_cache is enabled. \$cl_cache_dir : $cl_cache_dir"
50+
echo "Clean previous cl kernel cache"
51+
sudo rm -f $cl_cache_dir/*
3652
else
37-
python msdk_pre_install.py | tee svet_download.log
53+
echo "Add enabling cl_cache commands to ~\.bashrc"
54+
mkdir -p ~/cl_cache
55+
export cl_cache_dir=~/cl_cache
56+
echo "mkdir -p ~/cl_cache" >> ~/.bashrc
57+
echo "export cl_cache_dir=~/cl_cache" >> ~/.bashrc
3858
fi
3959

40-
git_projects="MediaSDK media-driver libva"
41-
for i in $git_projects;
42-
do
43-
if [[ ! -d $i ]];
44-
then
45-
echo "Directory $i doesn't exist. Please run ./msdk_pre_install.py manually to
46-
download the code"
47-
exit -1;
48-
fi
49-
done
60+
cd $root_path
61+
source ./svet_env_setup.sh
62+
rm -rf video_e2e_sample/build
5063

51-
#check md5sum if wget is used to download source code packages
64+
mkdir -p video_e2e_sample/build
5265

53-
if [[ $download_method == "wget" ]]
66+
if [ $built_with_ocv != true ]
5467
then
55-
echo "Checking the md5sum of downloaded packages"
56-
declare -A media_packages_md5sum
57-
media_packages_md5sum[intel-gmmlib-21.1.1.tar.gz]=100ff57bff1cb19763f729fcd00269d1
58-
media_packages_md5sum[intel-media-21.1.3.tar.gz]=98f59d7fd2c6c08808acf0ba741216b0
59-
media_packages_md5sum[intel-mediasdk-21.1.3.tar.gz]=a4747e315448ded38171b245232a5a7c
60-
media_packages_md5sum[libva.tar.gz]=ba136b5a02ee4c7bf093d09bc1635560
61-
media_packages_md5sum[libva-utils.tar.gz]=010243cc8217fd455d0ad11f2025d43c
62-
63-
for c in ${!media_packages_md5sum[@]}; do
64-
md5_res=`md5sum $c`
65-
if [[ ${media_packages_md5sum[$c]} == ${md5_res%% *} ]]
66-
then
67-
echo "$c" "${media_packages_md5sum[$c]}" correct
68-
else
69-
echo "$c" "md5sum is wrong " ${md5_res%% *} vs ${media_packages_md5sum[$c]}
70-
echo "Pleaes remove libva/media-driver/MediaSDK re-run this script"
71-
echo "If you still see md5sum not match, please refer to msdk_pre_install.py and download, uncomparess the package manually"
72-
echo "Or you can modify line 5 in this scirpt and change the download_method to \"git\". Then re-run this script."
73-
exit
74-
fi
75-
done
76-
fi
77-
78-
cd "MediaSDK"
79-
patch -N --no-backup-if-mismatch -p1 < ../patches/0001-MSDK-Enable-AVC-decode-SFC-RGB4.patch
80-
patch -N --no-backup-if-mismatch -p1 < ../patches/0002-sample_common-Add-support-to-multiple-displays.patch
81-
82-
if [ $? != 0 ]; then
83-
echo "Apply patch failed!"
68+
echo "Use the CMakefile.txt that excludes inference source code"
69+
cp script/CMakeLists_woOpenVINO.txt video_e2e_sample/CMakeLists.txt
8470
fi
8571

86-
cd ../
87-
88-
if [[ $download_method == "git" ]]
89-
then
90-
python msdk_pre_install_internal.py -b cfl| tee svet_build.log
91-
else
92-
python msdk_pre_install.py -b cfl | tee svet_build.log
93-
fi
94-
95-
#video_e2e_sample depends on libsample_common.a
96-
if [[ -f MediaSDK/build/__lib/release/libsample_common.a ]];
97-
then
98-
rm -f bin
99-
ln -s MediaSDK/build/__bin/release/ bin
100-
101-
102-
#va_env_set=`grep "LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri" ~/.bashrc -c`
103-
set -x
104-
export LD_LIBRARY_PATH=$LIBVA_INSTALL_PATH:$LD_LIBRARY_PATH
105-
export LIBRARY_PATH=$LIBVA_INSTALL_PATH:$LIBRARY_PATH
106-
export LIBVA_DRIVERS_PATH=$LIBVA_DRIVERS_PATH
107-
export LIBVA_DRIVER_NAME=$LIBVA_DRIVER_NAME
108-
export MFX_HOME=$LIBVA_INSTALL_PREFIX
109-
set +x
110-
111-
#if (( va_env_set == 0 ))
112-
#then
113-
#set -x
114-
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/lib
115-
#export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
116-
#export LIBVA_DRIVER_NAME=iHD
117-
#export MFX_HOME=/opt/intel/mediasdk
118-
#set +x
119-
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/lib' >> ~/.bashrc
120-
#echo "export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri" >> ~/.bashrc
121-
#echo "export LIBVA_DRIVER_NAME=iHD" >> ~/.bashrc
122-
#echo "export MFX_HOME=/opt/intel/mediasdk" >> ~/.bashrc
123-
124-
#fi
125-
126-
#if [[ -d "/opt/intel/mediasdk/lib64" ]]
127-
#then
128-
# echo "A old MediaSDK version is found under folder /opt/intel/mediasdk/lib64"
129-
# echo "Rename /opt/intel/mediasdk/lib64 as /opt/intel/mediasdk/oldlib64"
130-
# mv /opt/intel/mediasdk/lib64 /opt/intel/mediasdk/oldlib64
131-
#fi
132-
133-
#if [[ $LD_LIBRARY_PATH != *"/opt/intel/mediasdk/lib/"* ]]
134-
#then
135-
# export LD_LIBRARY_PATH="/opt/intel/mediasdk/lib/:$LD_LIBRARY_PATH"
136-
# echo 'export LD_LIBRARY_PATH="/opt/intel/mediasdk/lib/:$LD_LIBRARY_PATH"' >> ~/.bashrc
137-
#fi
138-
139-
if [[ -d $cl_cache_dir ]];
140-
then
141-
echo "cl_cache is enabled. \$cl_cache_dir : $cl_cache_dir"
142-
echo "Clean previous cl kernel cache"
143-
sudo rm -f $cl_cache_dir/*
144-
else
145-
echo "Add enabling cl_cache commands to ~\.bashrc"
146-
set -x
147-
mkdir -p ~/cl_cache
148-
export cl_cache_dir=~/cl_cache
149-
echo "mkdir -p ~/cl_cache" >> ~/.bashrc
150-
echo "export cl_cache_dir=~/cl_cache" >> ~/.bashrc
151-
fi
152-
153-
#install library for metric_monitor
154-
sudo cp MediaSDK/build/__bin/release/libcttmetrics.so /usr/lib/
155-
156-
#Start to build SVET sample application
157-
#Copy MediaSDK sample headers and libraries that weren't installed by default
158-
sudo -E mkdir -p $MFX_HOME/include/sample_common
159-
sudo -E mkdir -p $MFX_HOME/include/vpp_plugin
160-
sudo -E mkdir -p $MFX_HOME/include/rotate_cpu
161-
sudo -E cp -rf MediaSDK/samples/sample_common/include/ $MFX_HOME/include/sample_common/
162-
sudo -E cp -rf MediaSDK/samples/sample_plugins/vpp_plugin/include/ $MFX_HOME/include/vpp_plugin/
163-
sudo -E cp -rf MediaSDK/samples/sample_plugins/rotate_cpu/include/ $MFX_HOME/include/rotate_cpu/
164-
sudo -E cp -f MediaSDK/build/__lib/release/libsample_common.a $LIBVA_INSTALL_PATH/
165-
sudo -E cp -f MediaSDK/build/__lib/release/libvpp_plugin.a $LIBVA_INSTALL_PATH/
166-
167-
rm -rf video_e2e_sample/build
168-
169-
mkdir -p video_e2e_sample/build
170-
171-
if [ $built_with_ocv != true ]
172-
then
173-
echo "Use the CMakefile.txt that excludes inference source code"
174-
cp script/CMakeLists_woOpenVINO.txt video_e2e_sample/CMakeLists.txt
175-
fi
176-
177-
cd video_e2e_sample/build
178-
cmake ../ | tee /tmp/svet_build.log
179-
cat /tmp/svet_build.log >> svet_build.log
180-
make -j4 | tee /tmp/svet_build.log
181-
cat /tmp/svet_build.log >> svet_build.log
182-
fi
72+
cd video_e2e_sample/build
73+
cmake ../ | tee /tmp/svet_build.log
74+
cat /tmp/svet_build.log >> $root_path/svet_build.log
75+
make -j4 | tee /tmp/svet_build.log
76+
cat /tmp/svet_build.log >> $root_path/svet_build.log
18377

18478
cd $root_path
18579
if [ $built_with_ocv = true ]
@@ -218,25 +112,19 @@ then
218112
echo "************************************************************************"
219113
echo "SVET sample application building has completed!"
220114

221-
gen12=`sudo cat /sys/kernel/debug/dri/0/i915_capabilities | grep "gen: 12"`
222-
if [[ ! -z $gen12 ]];
115+
if [[ $install_overwrite == True ]]
223116
then
224-
ver=`uname -a`
225-
if [[ $ver != *5.4.102* ]] ;
226-
then
227-
echo "For TigerLake CPU, please refer to user guide chapter 1.3 to upgrade the kernel with https://github.com/intel/linux-intel-lts/releases/tag/lts-v5.4.102-yocto-210310T010318Z";
228-
fi
117+
echo "Please run ./bin/video_e2e_sample for testing"
118+
else
119+
echo "Please run the cmd below to setup running environment:"
120+
echo " "
121+
echo "source ./svet_env_setup.sh"
122+
echo " "
123+
echo "Then use ./bin/video_e2e_sample for testing"
124+
echo "IMPORTANT NOTICE: please run 'source ./svet_env_setup.sh' first when you start a new shell (or change user in shell such as run 'su -') to run ./bin/video_e2e_sample"
125+
echo "************************************************************************"
229126
fi
230-
231-
echo "Please run the cmd below to setup running environment:"
232-
echo " "
233-
echo "source ./svet_env_setup.sh"
234-
echo " "
235-
echo "Then use ./bin/video_e2e_sample for testing"
236-
echo "IMPORTANT NOTICE: please run 'source ./svet_env_setup.sh' first when you start a new shell (or change user in shell such as run 'su -') to run ./bin/video_e2e_sample"
237-
echo "************************************************************************"
238127
else
239128
echo "SVET sample application building failed!"
240-
echo "Please create an IPS with SVET in title on premiersupport.intel.com and upload ./svet_build.log ./svet_download.log to IPS."
129+
echo "Please create an IPS with SVET in title on premiersupport.intel.com and upload ./svet_build.log to IPS."
241130
fi
242-

doc/FAQ.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ Add "-fps 30" to every decoding session.
3434
## How to limit the frame number of input to 1000?
3535
Add "-n 1000" to every decoding dessions. But please not add "-n" to encode, display and fake sink session. These sink sessions will automatically stop when the source session stops. Note, this option won't work if both "-vpp_comp_only" and "-vpp_comp" are set.
3636

37-
## Where can I find tutorials for inference engine?
38-
Please refer to https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html
39-
4037
## Why HDDL card usage ratio is low for face detection inference?
4138
It can be caused by the decoded frames aren't fed to inference engine efficiently. The default inference interval of face detection is 6. You try to set the inference interval to a lower valuer when using HDDL as inference target device. For example, with 3 HDDL L2 card, adding "-infer::inverval 1" to 16-channel face detection par file can increase the HDDL usage ratio to 100%.
4239

@@ -46,7 +43,3 @@ face-detection-retail-0004, human-pose-estimation-0001, vehicle-attributes-recog
4643

4744
## Can I use other OpenVINO version rather than 2021.3 ?
4845
Yes, but you have to modify some code due to interfaces changing. And also you need to download the IR files and copy them to ./model manually. Please refer to script/download_and_copy_models.sh for how to download the IR files.
49-
50-
## When run 4 channel decode plus inference and display on APL, the CPU occupy ratio is very high and fps is low
51-
Please refer to par file par_file/inference/n4_face_detection_rgbp.par. It uses option "-dc::rgbp" that make the SFC outputs RGB4 for display and VPP outputs RGBP for inference input. Then there is no need to use OpenCV for resizing and color conversion which consume much CPU time on APL.
52-
Note, "-dc::rgbp" only works with "-infer::fd". Will support more inference types in the future.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)