Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
Aryan Salmanpour 9d01934065 Fix a bug casued by the reuse of the surfaces (#162) 2025-06-30 13:43:02 -04:00
Aryan Salmanpour 6046873054 Improve the memory pool logic to enable the reuse of VA-API surfaces (#159)
* Improve the memory pool logic to enable the reuse of VA-API surfaces.

* Update the version
2025-06-13 11:51:26 -04:00
Aryan Salmanpour 78de581773 Perform the VA-API/HIP interop once for each surface in the memory pool and store it for reuse (#157)
* Perform the VA-API/HIP interop once for each surface in the memory pool and store it for reuse

* rename the compiler option to ENABLE_INTEROP_BUFFER_REUSE
2025-06-11 15:49:40 -04:00
Aryan Salmanpour 0415c78cbf Code cleanup (#149) 2025-05-12 16:15:33 -04:00
Aryan Salmanpour 232a9c6906 CTest: Add a test to perform negative testing on all rocJPEG APIs (#143)
* CTest: Add a test to perform negative testing on all rocJPEG APIs

* clean up
2025-04-18 10:02:12 -07:00
Aryan Salmanpour 664d2808ac Enable and fix compiler warnings (#136) 2025-03-20 11:53:42 -04:00
Aryan Salmanpour c27f1daf39 Utilize the explicit constructor of the vector's type when resizing the vector for the memory pool (#132) 2025-03-19 11:59:35 -04:00
Kiriti Gowda f8f3f423fd Find rocJPEG - Updates (#129)
* CMake Config - updates

* Find rocjpeg - updates

* Build Fix

* CMake Prefix - Updates

* CMakeLists - Prefix updates

* CMakeLists - Remove cmake modules from package

* CMakeLists - Fix typo

* Include file - SRC Location updates
2025-03-13 20:23:22 -04:00
Aryan Salmanpour 692d4bb72c Add support for multiple regions of interest (ROI) for batch JPEG decoding (#126) 2025-03-05 17:06:04 -05:00
Aryan Salmanpour e074cb2f9b Fix a bug that prevented copying the decoded image into the output buffer when the output buffer is larger than the input image (#122)
* Fix a bug that prevented copying the decoded image into the output buffer when the output buffer is larger than the input image

* add check for a valid roi_width
2025-02-20 20:33:54 -05:00
Aryan Salmanpour 391ae1da73 remove unused code (#117) 2025-02-03 14:01:01 -05:00
Aryan Salmanpour 23a1d7e03c Eliminate the use of std::fs (#115) 2025-01-28 16:22:52 -05:00
Aryan Salmanpour 758aefbb29 query number of jpeg cores through amdgpu (#113) 2025-01-22 20:16:31 -05:00
Aryan Salmanpour 6fb149d1eb Optimize finding the compute partition mode (#111) 2025-01-18 10:12:45 -05:00
Aryan Salmanpour eb97d3517d code cleanup - remove unnecessary check (#109) 2025-01-15 20:31:07 -05:00
Aryan Salmanpour 9f41913587 code cleanup (#106) 2025-01-09 10:38:29 -05:00
Aryan Salmanpour de14139d09 Update copyright year to 2025 (#103) 2025-01-02 17:25:30 -05:00
Aryan Salmanpour 832cb88ccc Add support for mapping GPU UUIDs to render nodes (#101) 2024-12-20 15:17:20 -05:00
Aryan Salmanpour 916f6ac806 Fix a regression caused by PR#88 on MI300A (#99) 2024-12-11 15:03:56 -05:00
David Rosca d9b89264d5 Create surfaces with linear modifier (#88)
Mesa will be enabling tiling for all VA surfaces by default,
but HIP doesn't support modifiers for dmabuf import.
2024-12-09 16:27:40 -05:00
David Rosca c8cdda6be2 Use VA_FOURCC_YUY2 instead of YUYV (#92)
Mesa <= 24.3 incorrectly uses non-standard VA YUYV fourcc.
2024-12-05 11:25:51 -05:00
Aryan Salmanpour a17a7e9119 Add support for rocJPEG APIs dispatch table (#91)
* Add support for rocJPEG APIs dispatch table

* code clean-up
2024-12-04 13:34:34 -05:00
David Rosca ed919ec7d4 Don't use dummy surface for vaCreateContext (#87)
Mesa ignores this parameter.
2024-12-03 08:49:57 -05:00
Kiriti Gowda b414b5ed6c GPU Arch - Updates & Fixes (#72) 2024-11-07 15:13:48 -08:00
Aryan Salmanpour 6d31992746 use a single context for decoding (#68) 2024-10-30 11:48:47 -04:00
Aryan Salmanpour de144cd941 Exclude YUV 4:4:0 for RGB format conversion in VCN on MI300, as it is not supported. Instead, use HIP kernels. (#63) 2024-10-10 15:42:38 -04:00
Aryan Salmanpour ad90eb4582 Optimize the memory pool allocation bso that its size doesn't exceed the max_pool_size_ (#58) 2024-10-01 09:14:15 -04:00
Aryan Salmanpour 7b321a86ed Add support for ROI decode on MI300 (#53)
* Add support for ROI decode on MI300

* Add ROI decode support for batched decoding

* clean up

* clean up

* Fix a typo and update sample's readme
2024-08-22 17:04:03 -04:00
Aryan Salmanpour 7129a01f88 Modify the memory pool access for batch decode submission (#50) 2024-08-14 16:45:05 -04:00
Pavel Tcherniaev b68b9ba8ea Roi decode feature (#48)
* implemented ROI for NATIVE, YUV_PLANAR, Y, RGB and RGB_PLANAR

* added the changes requested by Aryan in the PR

* prelim check in of ROI

* finished RGB and RGB_PLANAR ROI implementation and testing in rocjpeg_decoder.cpp, updated the versions to 0.6.0, updated jpegdecode.cpp and jpegdecodedbatched.cpp. Still need to modify jpegmultithreads.cpp. Need to run tests on JPEG 444 and 440. And need to add test to ctests and make test. Will update this PR when I've added everything mentioned here.

* changed new_offset and new_uv_offset to roi_offset and roi_uv_offset in rocjpeg_decoder.cpp. Added ROI handling in jpegdecodemultithreads sample. Still need to run tests on jpegdecodemultithreads and jpegdecodebatched.

* addressed all changes Aryan mentioned for PR 48 on August 12

* added tests to ctests and make tests and fixed conflict in jpegdecodemultithreads.cpp

* addressed latest change requests

* removed spaces after case VA_FOURCC_444P

* updated ctests and make tests

* fixed copy/paste error for ctests

* fixed typo with extra $

* added print statement for cropped image dimensions

* addressed latest change requests from Aryan. Ran make tests and ctests, all passed

* added workaround for YUV440 to RGB conversion
2024-08-13 21:30:26 -04:00
Aryan Salmanpour 92d545f42b CMakeLists - updates and clean up (#46)
* CMakeLists - updates and clean up

* Update the vcn joeg spec table
2024-07-24 12:36:54 -04:00
Aryan Salmanpour 6d7d72c6da Update the MemoryPool by defining the max pool size, and use it when adding a new entry to the pool (#44)
* Update the MemoryPool by defining the max pool size, and use it when adding a new entry to the pool

* Fix finding the gfx942_mi300x
2024-07-19 19:04:31 -04:00
Aryan Salmanpour 3f0be8387e Add support for rocJpegDecodeBatched API - part 2 of 2 (#39)
* Modify the batchDecode submission

* Add support for grouping the jpeg streams based on their chroma_subsampling, width, and height

* Modify the RocJpegVappiMemPoolEntry to use vectors for va_surface_ids and hip_interops

* Add a function to get the current vcn jpeg spec

* Add support to get hip interop mem for the batched submission

* switch to std::mutext

* Updatet the rocJPEG version

* use std::find to find the surface_id

* correct the vcn_jpeg_spec_ table for gfx942-mi300a/mi300x

* Fix typos

* pass the decode_params to the SubmitDecode function
2024-07-12 15:20:38 -04:00
Aryan Salmanpour 03f8bd0fa1 update the vcn_jpeg_spec_ table (#38) 2024-07-08 09:32:01 -04:00
Aryan Salmanpour 6f5b8f35a5 use supported VA_FOURCC_* instead of the VA_RT_FORMAT_* for the internel mem_pool_ key entries (#36) 2024-07-04 15:15:50 -04:00
Aryan Salmanpour bd09811662 Fix a bug where the dcoded output is not updated (#35)
* Fix a bug where the dcoded output is not updated

* code clean up - remove redundant if check
2024-07-04 13:13:39 -04:00
Aryan Salmanpour c660aeab43 Add support for rocJpegDecodeBatched API - part 1 of 2 (#31)
* Add initial support for batch decoding

* Add support for reading and parsing the images in batches and allocating the output buffers

* Add initial support for the rocJpegDecodeBatched API

* use recursive_mutex to allow DecodeBatched and Decode functions called concurrently

* code cleanup

* Add a CTEST for jpegdecodebatched

* modify the help message

* code clean up
2024-06-13 14:04:53 -04:00
Aryan Salmanpour d0b812bc26 Add support for YUV440 (#28)
* Add support for YUV440

* Add YUV440 to RGB kernels

* code clean up
2024-05-30 22:00:07 -04:00
Aryan Salmanpour b7edd5de5b Add support for handling exceptions while using the std::filesystem::recursive_directory_iterator (#27) 2024-05-30 09:08:35 -04:00
Aryan Salmanpour 73c0b10f6a Add/update comments to the code (#25)
* Add/update comments to the code

* update comments

* Update comments
2024-05-15 13:44:51 -04:00
Aryan Salmanpour e73ec1412c Add support for new APIs for parsing jpeg streams independently from decoder APIs (#24)
* Add support for new APIs for parsing jpeg streams independently from decoder APIs

* Update document and code clean-up

* code clean-up
2024-05-13 16:11:15 -04:00
Aryan Salmanpour 764ae2a348 Fix compilation issues on systems without std::filesystem (#23) 2024-05-08 15:57:19 -04:00
Aryan Salmanpour 7bdd495214 Add support for adding a new struct RocJpegDecodeParams for passing the decode parameters to rocJpegDecode API (#22) 2024-05-08 11:30:36 -04:00
Aryan Salmanpour 694a4bc07f Add support for memory pool management for vaapi surfaces and vaapi-hip interops (#17)
* Add support for memory pool management for vaapi surfaces

* reuse memories for each channel if the sizes remain unchanged

* rename hip_interop to hip_interop_dev_mem
2024-04-22 14:37:45 -04:00
Aryan Salmanpour c591c342aa Add support for ROCJPEG_OUTPUT_RGB_PLANAR output format (#15)
* Add support for ROCJPEG_OUTPUT_RGB_PLANAR output format

* update the jpegdecode sample based on the review comments

* use make_float3 when it's possible
2024-04-16 18:27:22 -04:00
Aryan Salmanpour 63dc882415 Add support for HW-based RGB format conversion on MI300 (#13)
* Add support for HW-based RGB format conversion on MI300

* code clean up

* change variable names
2024-04-11 13:37:08 -04:00
Aryan Salmanpour 214187ce11 Use the correct offset when creating render nodes on each partition mode on MI300 (#11)
* Use the correct offset when creating render nodes on each partition mode on MI300

* code clean up
2024-04-09 20:28:57 -04:00
Aryan Salmanpour 363205c9a8 Add support for passing the correct device id when initializing the va-api decoder (#8) 2024-04-01 18:06:44 -04:00
Aryan Salmanpour 1844e3349c Add support for various partition modes for MI300 (#7) 2024-04-01 14:51:56 -04:00
Aryan Salmanpour e93199e3d8 Add support for detecting visible devices before initializing va-api (#4) 2024-03-27 14:14:27 -04:00