-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_ia_mediasdk.sh
executable file
·56 lines (49 loc) · 2.28 KB
/
build_ia_mediasdk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#set -x
if [ "$2" == "no_hddl" ]; then
unset CMAKE_OPT
elif [ "$2" == "no_onevpl" ]; then
export HOST_INSTALL_DIR=/opt/intel/
export KMB_INSTALL_DIR=${HOST_INSTALL_DIR}/hddlunite
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${KMB_INSTALL_DIR}/lib
export PATH=$PATH:${KMB_INSTALL_DIR}/bin
export CMAKE_OPT="-DMFX_VSI_HDDL=ON -DMFX_ONEVPL=OFF"
elif [ "$1" == "vsi_kmb" ]; then
export HDDL_ROOT=/opt/intel/hddlunite
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HDDL_ROOT}/lib
export PATH=$PATH:${HDDL_ROOT}/bin
else
export HOST_INSTALL_DIR=/opt/intel/
export KMB_INSTALL_DIR=${HOST_INSTALL_DIR}/hddlunite
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${KMB_INSTALL_DIR}/lib
export PATH=$PATH:${KMB_INSTALL_DIR}/bin
export CMAKE_OPT="-DMFX_VSI_HDDL=ON -DMFX_ONEVPL=ON"
fi
if [ "$1" == "kmb" ]; then
echo "Build MediaSDK for $1"
cmake .. -DCMAKE_BUILD_TYPE=Debug -DMFX_HW_KMB=ON $CMAKE_OPT -DAPI=latest
make -j$(nproc) mfxhw64 mfx_hevce_hw64 mfx_hevcd_hw64 sample_encode sample_decode sample_multi_transcode
cd ../open_source/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DMFX_HW_THB=ON $CMAKE_OPT -DAPI=latest
make -j$(nproc) sample_encode sample_decode sample_multi_transcode
elif [ "$1" == "tbh_rt" ]; then
echo "Build oneVPL runtime for $1"
cmake .. -DCMAKE_BUILD_TYPE=Debug -DMFX_HW_VSI=ON $CMAKE_OPT -DAPI=latest -DMFX_EXTRINSIC_VPL=ON -DVPL_ROOT=${VPL_ROOT}
make -j$(nproc) mfxhw64 sample_encode sample_decode sample_multi_transcode simple_decode_hddl simple_transcode_hddl
elif [ "$1" == "vsi" ]; then
echo "Build MediaSDK/oneVPL for $1"
cmake .. -DCMAKE_BUILD_TYPE=Debug -DMFX_HW_VSI=ON $CMAKE_OPT -DAPI=latest
make -j$(nproc) mfxhw64 sample_encode sample_decode sample_multi_transcode simple_decode_hddl simple_transcode_hddl simple_decode_dynamic_pp
elif [ "$1" == "vsi_kmb" ]; then
echo "Build MediaSDK for $1"
cmake ..
make -j$(nproc)
else
echo "Usage: $0 kmb/tbh/vsi/vsi_kmb [no_hddl/no_onevpl]"
echo -e "\tkmb for closed source KMB target"
echo -e "\ttbh_rt for TBH oneVPL runtime target only"
echo -e "\tvsi for open source TBH target"
echo -e "\tvsi_kmb for open source KMB target"
echo -e "\tno_hddl to disable HDDL unite build option"
echo -e "\tno_onevpl to disable oneVPL build option"
fi