Find rocDecode - Support added (#428)

* Find rocDecode - Support added

* Find rocDecode - Updates

* Find rocDecode - Version fix

* Find rocDecode - Version Var

* Minor cleanup

* Test - Find package updates

* CTest - Upgrades

* CTest - Enhancements

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: befc6f6562]
Dieser Commit ist enthalten in:
Kiriti Gowda
2024-10-02 14:35:56 -07:00
committet von GitHub
Ursprung ffe6861569
Commit 021e32bc21
9 geänderte Dateien mit 104 neuen und 64 gelöschten Zeilen
+20 -14
Datei anzeigen
@@ -28,6 +28,15 @@ project(rocdecode-test)
enable_testing()
include(CTest)
if(NOT DEFINED ENHANCED_MESSAGE)
string(ASCII 27 Esc)
set(ColourReset "${Esc}[m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(White "${Esc}[37m")
endif()
# ROCM Path
if(DEFINED ENV{ROCM_PATH})
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "${White}${PROJECT_NAME}: Default ROCm installation path${ColourReset}")
@@ -37,20 +46,17 @@ else()
set(ROCM_PATH /opt/rocm CACHE PATH "${White}${PROJECT_NAME}: Default ROCm installation path${ColourReset}")
endif()
# find rocDecode
find_library(ROCDECODE_LIBRARY NAMES rocdecode HINTS ${ROCM_PATH}/lib)
find_path(ROCDECODE_INCLUDE_DIR NAMES rocdecode.h PATHS /opt/rocm/include/rocdecode ${ROCM_PATH}/include/rocdecode)
# add find modules
list(APPEND CMAKE_MODULE_PATH ${ROCM_PATH}/share/rocdecode/cmake)
if(ROCDECODE_LIBRARY AND ROCDECODE_INCLUDE_DIR)
set(ROCDECODE_FOUND TRUE)
message("-- ${White}Using rocDecode -- \n\tLibraries:${ROCDECODE_LIBRARY} \n\tIncludes:${ROCDECODE_INCLUDE_DIR}${ColourReset}")
endif()
# find rocDecode
find_package(rocDecode QUIET)
if(NOT ROCDECODE_FOUND)
message("-- ${Yellow}${PROJECT_NAME} requires rocDecode. Install rocDecode before running CTests")
endif()
# videoDecode
# 1 - videoDecode
add_test(
NAME
video_decode-H265
@@ -63,7 +69,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4
)
# videoDecodeMem
# 2 - videoDecodeMem
add_test(
NAME
video_decodeMem-H265
@@ -76,7 +82,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4
)
# videoDecodePerf
# 3 - videoDecodePerf
add_test(
NAME
video_decodePerf-H265
@@ -89,7 +95,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4
)
# videoDecodeRGB
# 4 - videoDecodeRGB
add_test(
NAME
video_decodeRGB-H265
@@ -102,7 +108,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4 -of rgb
)
# videoDecode H264
# 5 - videoDecode H264
add_test(
NAME
video_decode-H264
@@ -115,7 +121,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/AMD_driving_virtual_20-H264.mp4
)
# videoDecodeBatch
# 6 - videoDecodeBatch
add_test(
NAME
video_decodeBatch
@@ -128,7 +134,7 @@ add_test(
-i ${ROCM_PATH}/share/rocdecode/video/ -t 2
)
# videoDecode AV1
# 7 - videoDecode AV1
add_test(
NAME
video_decode-AV1