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

46 Коммитов

Автор SHA1 Сообщение Дата
Rajy Rawther 95f90982eb videodecodeRGB sample re-org for rocPyDecode (#343)
* re-org videodecodeRGB sample

* minor fix

* removed un-necessary include

* minor fix
2024-05-07 17:11:57 -04:00
Pavel Tcherniaev 12fa766973 added md5 checksum with changes that Aryan and Rajy requested (#333)
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
2024-05-02 08:49:46 -04:00
Lakshmi Kumar d5b5a31881 move getEnvVar function to common (#299) 2024-03-26 19:07:13 -04:00
Rajy Rawther 39e274d02d rocDecode resize sample implementation (#285)
* WIP: resize kernels

* hipified kernels for scaling from cuda

* updated videodecodeRGB sample for scaling

* added stream parameter to kernels

* add scale kernels using tex2d and NN

* enable tex2D kernels

* add NN resize kernels

* fixed scaling kernels

* fixed tex2D scaling kernel for UV scaling

* minor formatting

* address review comments

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
2024-03-18 08:32:19 -04:00
jeffqjiangNew e4614de461 Fixed several issues with cropping. (#275)
* * rocDecode: Fixed several issues with cropping.
  - Fixed the pixel start offset error on streams with non-zero top/left cropping in MD5 calculation.
  - Fixed the pixel start offset error on streams with non-zero top/left cropping, and/or with user specified cropping in YUV frame output.
  - Sorted out code which deals with cropping area specifiied by the bitstream, and cropping area specified by the user.

* * rocDecode: Additional changes after discussion.
 - Set display rect for decoder create/reconfig to displayable area or user specified ROI area.
 - Do not set target rect for decoder create/reconfig. Leave it for future use.
 - Unified naming of display rect in decoder create/reconfig structs.

* * rocDecode: Put back the extra rounding to target width/height specifiied by the coded stream, for peace of mind, based on code review.

* * rocDecode: Added the missing stream specified cropping offset to the starting pixel pointer for none-internal memory modes.

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
2024-03-11 22:35:11 -04:00
Lakshmi Kumar ce3ebadaab Samples - Multi Threaded Multi FIles (#255)
* adding new sample for decoding mulitple files on multiple threads

* threads work ; no decoding yet

* working version

* code clean up

* review comments

* removing spaces

* review comments

* fps cal + name changes for files

* code clean up

* update readme

* update readme

* remove spaces

* change to lambda functions

* changes for using reconfig

* adding dumping of yuv frames + review comments

* review comments

* remove extra lines/spaces

* adding struct for decoder info

* make separate decoders for 8 & 10bit

* code clean up

* addign reset for Saving frames

* review comments

* fixes dump issue for new file

* cmake update for threads

* support for avc

* name change for sample

* cmake soource name change

* readme update

* fixing typo in readme

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
2024-03-07 20:29:14 -05:00
Rajy Rawther 79184aeacc fix copy buffer for memory modes 1 and 2 (#238) 2024-02-12 14:32:50 -05:00
Aryan Salmanpour 15526253c7 Enhance logging error in rocDecode library - let the upper level class prints the correct error code string instead of integer code from lower levels (#223) 2024-02-06 13:35:41 -05:00
Aryan Salmanpour 38f50a1a10 rename roDecMapVideoFrame to rocDecoGetVideoFrame and some other minor code cleanups (#222) 2024-02-06 11:38:54 -05:00
Aryan Salmanpour 929123abff Fix the performance issue introduced after PR#192 (#220)
* Fix the performance issue introduced after PR#192

* Destroy the current interop memories before reconfiguration

* initialize the interop to 0 after unmapping a surface

* code clean up

* check the mapped device mem/ext mem to be valid before destrying them

* code cleanup - add some comments

* make changes based on the reviewer comments
2024-02-05 17:12:39 -05:00
jeffqjiangNew cd6401750e Changed rocDecode API header variable naming to Google C++ style. (#196)
* * rocDecode: Changed rocDecode API header variable naming to Google C++ style.

* * rocDecode: Unified AVC/H264 naming to AVC. Minor naming changes on HEVC related names.

* * rocDecode: Minor comment fix based on code review.
2024-01-24 18:03:46 -05:00
Lakshmi Kumar 6ae9ba8be2 fixes missing variable (#193) 2024-01-22 15:18:02 -05:00
Lakshmi Kumar 1393311656 fixes mesa warning/error (#192)
* fixes mesa warning/error

* merge conflicts
2024-01-22 12:00:06 -08:00
Rajy Rawther 51ecd8fccf fix for hipOutOfMem bug when decoding large videos (#189)
* fix for issue 441908
2024-01-19 09:46:02 -08:00
Lakshmi Kumar 8ec38d2d24 Adding support for reading Environmental variable for samples (#186)
* check if env var set and choose device

* clean up for env var

* app modification

* move getEnvVar function to header

* fork example

* spacing adjust

* review comments

* use hipGetErrorName to throw errors
2024-01-17 22:57:31 -05:00
Aryan Salmanpour f7997b716d Add support for rocDecGetErrorName for getting the rocDecStatus error string (#185)
* Add support for rocDecGetErrorName for getting the rocDecStatus error string

* Add description of the API
2024-01-17 14:00:54 -05:00
Aryan Salmanpour b188989f3f Remove unnecessary device id check (#180) 2024-01-17 10:27:06 -05:00
jeffqjiangNew 395a1249c1 Added initial AVC parser. (#176)
* * rocDecode/AVC: Added initial AVC parser.
 - Added AVC SPS, PPS and slice header parsing functions.
 - Merged common parsing code from AVC and HEVC parsers to their super class.

* * rocDecode/AVC: Formating changes. No functional changes.
2024-01-16 20:57:40 -05:00
kiritigowda cce46982a5 Documentation - Updates 2024-01-10 12:14:41 -08:00
jeffqjiangNew 04fe74f390 * rocDecode: Updated Copyright message for 2024. (#160) 2024-01-09 20:47:16 -05:00
jeffqjiangNew ccd813a2da Decoder reconfigure fixes. (#157)
* * rocDecode/HEVC: Fixed a couple of issues with reconfiguration of decoder when video size is changed.
  - Picture width and height variables were interchangeably used to represent coded picture size and display size, resulting reconfiguration errors. Now we use different variables to represent coded and display sizes.
  - Fixed a file overwriting issue in video size change case, where the display size can remain the same when coded size changes with specific cropping offsets.

* * rocDecode/HEVC: Added some fixes to decoder reconfiguration.
  - Added support for MD5 calculation in reconfigure flush callback. This fixed MD5 check failure on conformance streams with size changes.
  - Fixed total decoded frame number report with reconfigure when file dump or MD5 is not enabled. We need to call flush with reconfigure unconditionally (but with different actions).
  - Added the missing reconfigure flush when coded size is not changed but display size is changed.

* * rocDecode/HEVC: Corrected an error in GetDecodedWidth() method. Should use coded_width_, instead of disp_width_.
2024-01-09 10:51:30 -05:00
Rajy Rawther a5211189f5 Add mechanism to flush last frames during reconfigure (#142)
* add mechanism to flush last frames during reconfigure

* reconfig mode updated support

* addressed review comments

* addressed review comments

* change condition according to review comment
2023-12-19 08:49:17 -05:00
jeffqjiangNew 7240ee8973 * rocDecode/HEVC: Added frame rate info report when it is available, from the parser. (#130) 2023-12-12 13:47:19 -05:00
Rajy Rawther 1dc5a9d798 added release of copied buffers in host and hip (#126)
* added release of copied buffers in host and hip

* address review comments

* addressed review comment
2023-12-08 17:29:00 -05:00
jeffqjiangNew 5d45ac6d92 Changed MD5 calculation of 10 bit to match reference MD5. (#127)
* * rocDecode/HEVC: Changed MD5 calculation of 10 bit to match reference MD5.
  - Need to convert P010 YUV to little endian.

* * rocDecode/HEVC: Convert to C++ type cast style.
2023-12-07 17:06:51 -05:00
Aryan Salmanpour bbd2fa5916 Don't save frames into a single file if decoder reconfigure is detected for resolution changes - save into separate files for each resolution (#123) 2023-12-06 14:35:10 -05:00
Aryan Salmanpour 875994bb4f Add support for rocDecReconfigureDecoder API (#116)
* Add support for rocDecReconfigureDecoder API

* adrress reviewer's comemnts

* Add doxygen comment for ReconfigureDecoder function
2023-12-05 11:16:32 -05:00
Rajy Rawther 15fb3e0b91 Samples - Add a sample for decoding a video and converting the raw decoded YUV frames to RGB format using HIP kernels (#108)
* WIP: class implementation

* add more definitions

* rocvideodecode implementation

* formatting fixes

* address review comments

* rocvideodecode class update

* videodec sample app-enable all apis

* video_dec_rgb_sample implementation

* fix issue with release mode execution and other clean_up

* add copyright block

* address review comments

* sync with tot and addressed review comments

* convert to snake_case
2023-12-01 13:26:30 -05:00
Aryan Salmanpour e001d78859 remove the b_low_latency_ from the RocVideoDecoder class (#111) 2023-11-30 22:09:13 -05:00
jeffqjiangNew ad20961c4a MD5 digest generation support (#109)
* * rocDecode/HEVC: Added support for MD5 message digest generation.
  - Command option "-md5" triggers MD5 calculation and output.

* * rocDecode/HEVC: Changed C type casting to C++ type casting.
2023-11-30 17:40:45 -05:00
Aryan Salmanpour 72bfa50c21 Fix a perf issue where we didn't pass the device id correctly to rocDecCreateDecoder API (#91) 2023-11-28 11:26:34 -05:00
jeffqjiangNew 624c3c0f09 End of stream flush (#86)
* * rocDecode/HEVC: Added picture output operation in DPB and display callback function.
  - To avoid serialization of decode submissions and/or display callback in certain cases, increased DPB buffer size by 1 and tweaked picture bumping procedure.

* * rocDecode/HEVC: Added flushing of the remaining pictures from DPB at the end of decode session.

* * rocDecode/HEVC: Changed output_pic_num to num_output_pics to void some confusion. Set top_field_first to 1.

* * rocDecode/HEVC: Added a few return error checks.
2023-11-27 13:03:26 -05:00
Aryan Salmanpour 8898af78a6 D not fuse - zwhen runnnin gthesmake test. Don't force b_force_latency ofr Perf/Fork sample (#85) 2023-11-27 12:33:28 -05:00
jeffqjiangNew ad186a90da Re-enabled SEI message processing. (#79)
* * rocDecode/HEVC: Re-enabled SEI message processing.
  - Added "-sei" command option to extract SEI messages from stream.
  - Added support for SEI info parsing for multiple SEI NAL units with multiple payloads.
  - Fixed a SEI syntax parsing issue and several procssing issues.
  - Fixed a double free memory issue in SEI data buffer handling in HandlePictureDisplay().

* * rocDecode/HEVC: Coding format changes.

* * rocDecode/HEVC: Minor format changes.
2023-11-21 14:33:15 -05:00
Rajy Rawther 012f96c8c5 Rr/check sei function pointer (#78)
* commending out ParseSeiMessage because it is causing segfault

* CMake changes for valgrind

* added function pointer validity for sei callback

* fix review comments
2023-11-21 11:23:47 -05:00
Aryan Salmanpour 851c537904 code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change (#65)
* code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change

* rename SaveSurfToFile to SaveFrameToFile
2023-11-15 15:49:16 -05:00
Rajy Rawther a4652d6a53 Rr/fix output surface dims (#64)
* fix output surface dimensions

* fix bug
2023-11-15 13:46:37 -05:00
Aryan Salmanpour 592426595e Fix a seg fault when saving a frame in SaveSurfToFile (#60) 2023-11-13 14:38:29 -05:00
Rajy Rawther d163eb1764 Rr/add low latency (#59)
* added picture_index associated with frame and fixed bug

* added option to force low_latency display

* add force_zero_latency option for videodecode sample
2023-11-13 13:53:19 -05:00
Aryan Salmanpour eb5614d250 Add support for the rocDecUnMapVideoFrame API (#58) 2023-11-13 12:54:32 -05:00
Rajy Rawther ddded3a6d2 added picture_index associated with frame and fixed bug (#56) 2023-11-13 12:22:22 -05:00
Rajy Rawther 55ebf353cc fix exception handling to gracefully exit (#49)
* fix exception handling to gracefully exit

* addressed review comments
2023-11-10 15:44:40 -05:00
Aryan Salmanpour 0d9b056ee5 Fix a bug in GetVideoCodecString function where it didn't return the correct codec string (#35) 2023-11-06 08:20:53 -05:00
Rajy Rawther 89a278bd1b roc_video_decode class update (#29)
* WIP: class implementation

* add more definitions

* rocvideodecode implementation

* formatting fixes

* address review comments

* rocvideodecode class update

* videodec sample app-enable all apis
2023-11-01 21:16:02 -04:00
Aryan Salmanpour 32f854c159 Add support for rocDecCreateDecoder API (#28)
* Add support for rocDecCreateDecoder API

* check the decoder config support before initializing the vaapi

* rename RocdecDecoderCreateInfo to RocDecoderCreateInfo

* fix a typo
2023-11-01 09:22:46 -04:00
Rajy Rawther d0e6743872 Rr/roc video decode class (#20)
* WIP: class implementation

* add more definitions

* rocvideodecode implementation

* formatting fixes

* address review comments
2023-10-23 12:16:45 -04:00