-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Video - rocDecode integration in rocAL (#253)
* Add CMakeList changes Requires VideoDemuxer to have .cpp file * Add rocDecode utils files and cmake changes * rocDecode integration for rocAL * merge with tot * Add initial support for rocDecode integration * Add fix to decode sequences * VideoDemuxer - support to return dts * Support to seek exact frame Facing seg fault * Add intermediary buffers to copy * Change the name of rocdec files * Temporary rocDecode cmake changes Add utils folder to rocAL hip to compile with rocDecode * Fix CMake for rocDecode * Minor fix * Fix stride for rocdecode video decoder * Revert "Temporary rocDecode cmake changes" This reverts commit 21b0538. * Introduce CMake for rocDecode Revert additional changes * Fix issues with CMake * rocDecode Flush decoder after decoding each sequence * Add changes to flush decoder after seek * Add support in rocDecode to seek to exact frame using dts * Add changes in API to pass device ID to video decoder * Add stream synchronize * Minor changes * Minor change * Change rocDecode to all caps in CMake * Minor changes * Minor CMake change * Minor changes * Introduce enable rocdecode flag in CMake * Minor fix * Minor changes * Modify CMake to use only ROCM_PATH * Use Pascal case for fn names in Video Decoder and other derived classes * Fix CMakeLists * Minor change * Fix rocAL_hip CMakeLists for rocDecode * Add decoder type argument to Video readers * Fix video metadata reader * Minor changes * Move default constructor to class * Minor fix * Update CHANGELOG and docs * Add link to rocDecode * Update README with rocDecode installation instructions * Update rocAL version * Update README with rocDecode manual installation --------- Co-authored-by: rrawther <[email protected]> Co-authored-by: Sundar Rajan Vaithiyanathan <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]>
- Loading branch information
1 parent
57b6bcd
commit 7ac767e
Showing
33 changed files
with
496 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
################################################################################ | ||
# | ||
# MIT License | ||
# | ||
# Copyright (c) 2025 Advanced Micro Devices, Inc. | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
################################################################################ | ||
|
||
# ROCM Path | ||
if(ROCM_PATH) | ||
message("-- ${White}FindrocDecode: ROCM_PATH Set -- ${ROCM_PATH}${ColourReset}") | ||
else() | ||
set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path") | ||
endif() | ||
|
||
# find rocDecode - library and headers | ||
find_path(ROCDECODE_INCLUDE_DIR NAMES rocdecode.h PATHS ${ROCM_PATH}/include/rocdecode) | ||
find_library(ROCDECODE_LIBRARY NAMES rocdecode HINTS ${ROCM_PATH}/lib) | ||
mark_as_advanced(ROCDECODE_INCLUDE_DIR) | ||
mark_as_advanced(ROCDECODE_LIBRARY) | ||
|
||
if(ROCDECODE_INCLUDE_DIR AND ROCDECODE_LIBRARY) | ||
message("-- ${White}FindrocDecode -- Using rocDecode: \n\tIncludes:${ROCDECODE_INCLUDE_DIR}\n\tLib:${ROCDECODE_LIBRARY}${ColourReset}") | ||
set(ROCDECODE_FOUND TRUE) | ||
else() | ||
if(rocDecode_FIND_REQUIRED) | ||
message(FATAL_ERROR "FindrocDecode -- Failed to find rocDecode Library") | ||
endif() | ||
message( "-- ${Yellow}NOTE: FindrocDecode failed to find rocDecode -- INSTALL rocDecode${ColourReset}" ) | ||
endif() | ||
|
||
if(ROCDECODE_FOUND) | ||
# Find rocDecode Version | ||
file(READ "${ROCDECODE_INCLUDE_DIR}/rocdecode_version.h" ROCDECODE_VERSION_FILE) | ||
string(REGEX MATCH "ROCDECODE_MAJOR_VERSION ([0-9]*)" _ ${ROCDECODE_VERSION_FILE}) | ||
set(ROCDECODE_VER_MAJOR ${CMAKE_MATCH_1}) | ||
string(REGEX MATCH "ROCDECODE_MINOR_VERSION ([0-9]*)" _ ${ROCDECODE_VERSION_FILE}) | ||
set(ROCDECODE_VER_MINOR ${CMAKE_MATCH_1}) | ||
string(REGEX MATCH "ROCDECODE_MICRO_VERSION ([0-9]*)" _ ${ROCDECODE_VERSION_FILE}) | ||
set(ROCDECODE_VER_MICRO ${CMAKE_MATCH_1}) | ||
message("-- ${White}Found rocDecode Version: ${ROCDECODE_VER_MAJOR}.${ROCDECODE_VER_MINOR}.${ROCDECODE_VER_MICRO}${ColourReset}") | ||
mark_as_advanced(ROCDECODE_VER_MAJOR) | ||
mark_as_advanced(ROCDECODE_VER_MINOR) | ||
mark_as_advanced(ROCDECODE_VER_MICRO) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args( | ||
rocDecode | ||
FOUND_VAR | ||
ROCDECODE_FOUND | ||
REQUIRED_VARS | ||
ROCDECODE_INCLUDE_DIR | ||
ROCDECODE_LIBRARY | ||
) | ||
|
||
set(ROCDECODE_FOUND ${ROCDECODE_FOUND} CACHE INTERNAL "") | ||
set(ROCDECODE_INCLUDE_DIR ${ROCDECODE_INCLUDE_DIR} CACHE INTERNAL "") | ||
set(ROCDECODE_LIBRARY ${ROCDECODE_LIBRARY} CACHE INTERNAL "") | ||
set(ROCDECODE_VER_MAJOR ${ROCDECODE_VER_MAJOR} CACHE INTERNAL "") | ||
set(ROCDECODE_VER_MINOR ${ROCDECODE_VER_MINOR} CACHE INTERNAL "") | ||
set(ROCDECODE_VER_MICRO ${ROCDECODE_VER_MICRO} CACHE INTERNAL "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.