Initial commit of the rocJPEG library (#1)
* rocJPEG initial commit
* Add gitignore file
* clean up
* code clean up
* CMakeLists update
* Update README
* Update readme and setup script
* add docs folder
* update rocjepg headers
* update the rocjepg header
* update the copyright year
* Add nullptr check for all APIs
* update the hip kernels execution
* follow google c++ style guide
* code clean up
* use google c++ style guide for hip kernels
* add support for rocJpegGetErrorName API
* Add ParseCommandLine function
* update the rocjpeg sample
* Update the readme, LIBVA instructions
* udate the rocJPEG script
* Update CMAKE and libdrm
* Add support for ROCJPEG_OUTPUT_UNCHANGED and SaveImage function
* code clean up
* update the drm dependencies
* remove the unused hipstream
* code clean up
* add -fmt option for selection the output format
* update the GetImageInfo API
* update the sample
* update the save image function based onn the surface and putput format
* add new sample images
* Put hip interop mem into separate functions and some code clean up
* Add support for CopyLuma and CopyChroma
* Add support for the yuv output format for NV12 surface
* Update HIP kernels
* add support for rgbi format conversion for NV12 and YUv444
* Update the status
* Add support for converting YUYV to RGB
* Add support for unpacking YUYV format
* Fix unpacking Y fron YUYV hip kernel
* Add suppoort for extractign packed YUYV to YUV planar
* hip code clean up
* code clean up
* Update the headers
* code clean up
* change hip kernel names
* hip kernel clean up
* hip clean up
* code clean up
* code clean up
* code clean up
* code clean up
* code clean up
* code clean up for jpege decoder class
* code clean up
* code clean up
* code clean up
* code clean up
* update the dockers
* code clean up
* code clean up
* hip kernels clean up
* remove unused hip kernels
* add additional test cases
* update the APIs
* add new hip yuv400torgbi kernel
* update yuv400torgbi kernel
* restructure files
* code clean up
* code clean up
* add jenkins
* code clean up
* code clean up
* update readme
* update docker's README
* make changes based on the reviewers comments
* make changes based on the reviewers comments
* return ROCJPEG_STATUS_JPEG_NOT_SUPPORTED if the resolution of the jpeg is not supported for HW decoding
[ROCm/rocjpeg commit: 6ad4a76177]
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
# ##############################################################################
|
||||
# Copyright (c) 2024 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.
|
||||
#
|
||||
# ##############################################################################
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(ROCJPEG-test)
|
||||
|
||||
# make test with CTest
|
||||
enable_testing()
|
||||
include(CTest)
|
||||
|
||||
# ROCM Path
|
||||
if(DEFINED ENV{ROCM_PATH})
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "${White}${PROJECT_NAME}: Default ROCm installation path${ColourReset}")
|
||||
elseif(ROCM_PATH)
|
||||
message("-- ${White}${PROJECT_NAME} :ROCM_PATH Set -- ${ROCM_PATH}${ColourReset}")
|
||||
else()
|
||||
set(ROCM_PATH /opt/rocm CACHE PATH "${White}${PROJECT_NAME}: Default ROCm installation path${ColourReset}")
|
||||
endif()
|
||||
|
||||
# find rocJPEG
|
||||
find_library(ROCJPEG_LIBRARY NAMES ROCJPEG HINTS ${ROCM_PATH}/lib)
|
||||
find_path(ROCJPEG_INCLUDE_DIR NAMES rocjpeg.h PATHS /opt/rocm/include/rocjpeg ${ROCM_PATH}/include/rocjpeg)
|
||||
|
||||
if(ROCJPEG_LIBRARY AND ROCJPEG_INCLUDE_DIR)
|
||||
set(ROCJPEG_FOUND TRUE)
|
||||
message("-- ${White}Using ROCJPEG -- \n\tLibraries:${ROCJPEG_LIBRARY} \n\tIncludes:${ROCJPEG_INCLUDE_DIR}${ColourReset}")
|
||||
endif()
|
||||
|
||||
if(NOT ROCJPEG_FOUND)
|
||||
message("-- ${Yellow}${PROJECT_NAME} requires rocJPEG. Install rocJPEG before running CTests")
|
||||
endif()
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
jpeg-decode-fmt-unchanged
|
||||
COMMAND
|
||||
"${CMAKE_CTEST_COMMAND}"
|
||||
--build-and-test "${ROCM_PATH}/share/rocjpeg/samples/jpegDecode"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/jpegDecode"
|
||||
--build-generator "${CMAKE_GENERATOR}"
|
||||
--test-command "jpegdecode"
|
||||
-i ${ROCM_PATH}/share/rocjpeg/images/
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
jpeg-decode-fmt-yuv
|
||||
COMMAND
|
||||
"${CMAKE_CTEST_COMMAND}"
|
||||
--build-and-test "${ROCM_PATH}/share/rocjpeg/samples/jpegDecode"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/jpegDecode"
|
||||
--build-generator "${CMAKE_GENERATOR}"
|
||||
--test-command "jpegdecode"
|
||||
-i ${ROCM_PATH}/share/rocjpeg/images/ -fmt yuv
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
jpeg-decode-fmt-y
|
||||
COMMAND
|
||||
"${CMAKE_CTEST_COMMAND}"
|
||||
--build-and-test "${ROCM_PATH}/share/rocjpeg/samples/jpegDecode"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/jpegDecode"
|
||||
--build-generator "${CMAKE_GENERATOR}"
|
||||
--test-command "jpegdecode"
|
||||
-i ${ROCM_PATH}/share/rocjpeg/images/ -fmt y
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
jpeg-decode-fmt-rgbi
|
||||
COMMAND
|
||||
"${CMAKE_CTEST_COMMAND}"
|
||||
--build-and-test "${ROCM_PATH}/share/rocjpeg/samples/jpegDecode"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/jpegDecode"
|
||||
--build-generator "${CMAKE_GENERATOR}"
|
||||
--test-command "jpegdecode"
|
||||
-i ${ROCM_PATH}/share/rocjpeg/images/ -fmt rgbi
|
||||
)
|
||||
Reference in New Issue
Block a user