Commit Graph

94 Commits

Author SHA1 Message Date
Rajy Rawther 4caf46cab4 Rr/video dec mem sample update (#390)
* remove hardcoded buffer size requirement

* minor change

[ROCm/rocdecode commit: 84c1dc9d03]
2024-07-22 08:48:29 -04:00
Rajy Rawther c3f2e95f92 VideoToSequence sample (#373)
* videoToSequence sample initial commit

* add frame_num calculation when seeking

* update README

* addressed review comments

* added FlushAndReconfigure() to flush out frames with seek

[ROCm/rocdecode commit: fe5f63428c]
2024-07-22 08:42:58 -04:00
Kiriti Gowda 2626f6bc66 CMakeLists - Use -D AMDGPU_TARGETS (#379)
* Sample - Updates

* CMakeList - Accept -D AMDGPU_TARGET

[ROCm/rocdecode commit: 2014c55f11]
2024-07-09 11:03:24 -04:00
Pavel Tcherniaev 7041c520a6 Fixed bug with videoDecodeBatch (#375)
* fixed bug with videoDecodeBatch

* changed if statement to check n_frame_returned

[ROCm/rocdecode commit: 1b9dd60837]
2024-07-09 10:59:41 -04:00
Lakshmi Kumar 0ef36fec5e Add session overhead functions & modify perf app (#366)
* add session overhead funcitons & modify perf app

* remove class:: for function calls

* add session overhead funcitons & modify perf app

* remove class:: for function calls

* review comments

* fix comments

* duration to double

* update perf sample for thread_id for overhead

* remove debug statements

* revoew comments

* return value chnage to double

* remove session ID functions

* check session id validity

[ROCm/rocdecode commit: 48b56de77a]
2024-06-11 10:38:19 -04:00
jeffqjiangNew 3230cca447 rocDecode: Added decode buffer pool implementation for AVC and HEVC. (#355)
* * rocDecode: Initial check in for decode buffer pool.

* * rocDecode: All 135 streams pass.

* * rocDecode: Fixed a build error in debug mode.

* * rocDecode/HEVC: Removed two workaround in HEVC DPB management, after decode buffer pool implementa
tion.
 - WR 1: Conditional bumping (when max_num_reorder_pics > 0) to avoid synchronous job submission in
C.5.2.3.
 - WR 2: Add two more buffers in DPB to avoid buffer over-writing.

* * rocDecode/HEVC: Added display delay feature.

* * rocDecode/HEVC: Fixed the -z option issue within the context of the new decode buffer pool implementation.

* * rocDecode/HEVC: Removed redundent code.

* * rocDecode/AVC: Added decode buffer pool implementation for AVC.

* * rocDecode: Added a few changes.
 - Added display delay feature to AVC.
 - Removed a workaround for AVC: AVC_MAX_DPB_FRAMES was increased to 18. Now it is back to 16.
 - Removed a workaround for AVC: increased DPB buffer size by 2. Now it is back to normal.
 - Code format changes for HEVC.

* * rocDecode/AVC: Fixed the -z option issue within the context of the new decode buffer pool implementation.

* * rocDecode: Merged OutputDecodedPictures() method to upper class RocVideoParser.

* * rocDecode: Code cleanup. No functional changes.

* * rocDecode: Made decode buffer pool size adaptive.
 - Removed the hard coded decode buffer pool size set in the decoder.
 - Exposed the display delay parameter from RocVideoDecoder class to the user.
 - Now the decoder buffer pool size is determined from the DPB buffer size and display delay parameter.

* * rocDecode: Several changes based on code review.
 - Merged decode and display use status into one parameter.
 - Removed the surface index from DecodeFrameBuffer, which is now implicitly referred by the array index.
 - Changed a function name for better clarity.

* * rocDecode: Added a comment.

[ROCm/rocdecode commit: 61c8661b9c]
2024-05-31 13:14:02 -04:00
Pavel Tcherniaev 473b0ba595 added MD5 checksum for videodecodemem sample (#349)
[ROCm/rocdecode commit: 746877ef56]
2024-05-16 11:36:40 -04:00
Rajy Rawther 5105e2d7b3 Added a new function to get RgbStride (#352)
* re-org videodecodeRGB sample

* minor fix

* removed un-necessary include

* minor fix

* added GetRgbStride utility function for RGB stride

* fix for review comments

---------

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

[ROCm/rocdecode commit: dd30db9f51]
2024-05-13 12:39:38 -04:00
Aryan Salmanpour 0bda4c3498 Fix compilation issues on distro without std::filesystem (#348)
[ROCm/rocdecode commit: bdb08ab644]
2024-05-08 14:45:32 -04:00
Rajy Rawther 4de84d0b27 videodecodeRGB sample re-org for rocPyDecode (#343)
* re-org videodecodeRGB sample

* minor fix

* removed un-necessary include

* minor fix

[ROCm/rocdecode commit: 95f90982eb]
2024-05-07 17:11:57 -04:00
Aryan Salmanpour 6a33a32db7 Fix compilation issues on RHEL8 and SLES15.5 related to using std::filesystem (#342)
[ROCm/rocdecode commit: 1943aad663]
2024-05-06 21:12:23 -04:00
Kiriti Gowda 7fdf00a682 Sample - Added missing header (#336)
[ROCm/rocdecode commit: e2b9e7197a]
2024-05-02 17:26:11 -04:00
Pavel Tcherniaev a9a75f088d added md5 checksum with changes that Aryan and Rajy requested (#333)
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: 12fa766973]
2024-05-02 08:49:46 -04:00
Lakshmi Kumar 97be0bb3ca Seek - Bug Fixes + Sample Update (#327)
* adds seek to videodecode and seek bug fixes

* fixes both frames & timestamp with prev_key_frame option

* switch to exact key frame and bug fix

* fix decoded_frame_number from seek

* fix out_frame_duration

* clean up + exact fram fix

[ROCm/rocdecode commit: 2d50d685f7]
2024-05-01 17:03:27 -04:00
Lakshmi Kumar 2fa48d1f1d move getEnvVar function to common (#299)
[ROCm/rocdecode commit: d5b5a31881]
2024-03-26 19:07:13 -04:00
Aryan Salmanpour 805ecd6ee8 Organizing the install location of the rocdecode utils headers (#296)
[ROCm/rocdecode commit: 592195b652]
2024-03-26 12:47:37 -04:00
Lakshmi Kumar 229f9c4616 Sample Bug Fix - Batch sync issue (#289)
* bug fix for new dec creation

* move bit depth change after creating new dec

* codec update for every new dec

* bug fix for new dec creation

* move bit depth change after creating new dec

* codec update for every new dec

* fixes sync issue on MI250X for batch sample

* remove unused variable

[ROCm/rocdecode commit: e4316f009c]
2024-03-20 08:25:00 -04:00
Rajy Rawther 5ac584fad5 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>

[ROCm/rocdecode commit: 39e274d02d]
2024-03-18 08:32:19 -04:00
Lakshmi Kumar 4978dac0c0 Bug Fix - Batch sample (#283)
* bug fix for new dec creation

* move bit depth change after creating new dec

* codec update for every new dec

[ROCm/rocdecode commit: cca5f22a9a]
2024-03-12 13:27:34 -04:00
jeffqjiangNew 9e64945bdf 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>

[ROCm/rocdecode commit: e4614de461]
2024-03-11 22:35:11 -04:00
Lakshmi Kumar 9fedefeb54 README Updates (#282)
* 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

* update REAME

* update readme

---------

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

[ROCm/rocdecode commit: 264e847c5a]
2024-03-08 10:56:51 -05:00
Lakshmi Kumar 9b71383de8 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>

[ROCm/rocdecode commit: ce3ebadaab]
2024-03-07 20:29:14 -05:00
Kiriti Gowda cabcb78825 FFMPEG - Multi-version support (#270)
* FFMPEG 5.X - Support

* FFMPEG 5.X - Support

* FFMPEG - Multiversion support

* FFMPEG - Support FFMPEG AVCODEC > 58.134.X

[ROCm/rocdecode commit: ca067ae6ec]
2024-03-05 08:34:05 -05:00
Aryan Salmanpour 6f80f7e81c Revert "FFMPEG 5.X - Support (#268)" (#269)
This reverts commit 11abd055ed.

[ROCm/rocdecode commit: 6317b9f22b]
2024-02-28 14:31:07 -05:00
Kiriti Gowda 11abd055ed FFMPEG 5.X - Support (#268)
[ROCm/rocdecode commit: 4f2bf945a9]
2024-02-28 12:37:33 -05:00
jeffqjiangNew c2c567b6f2 * rocDecode: Take care of the case where DecodeFrame() does not return 1 (decoded frame number) so the accumulated decoded frame number does not match the user targeted frame number and the decoding will not stop. (#257)
[ROCm/rocdecode commit: 320c0954a3]
2024-02-23 22:54:29 -05:00
jeffqjiangNew 3501eccf0c * rocDecode: Added a command option to limit the number of decoded frames to a user set value to the video decoder app. (#252)
[ROCm/rocdecode commit: ad31866ee0]
2024-02-16 08:44:03 -05:00
Kiriti Gowda 19697e79a8 VideoDecodeRGB - Failure Fix (#248)
* Sample - ROCM PATH Fix

* Sample - Add missing lib

[ROCm/rocdecode commit: e95129ece2]
2024-02-14 13:03:34 -05:00
Aryan Salmanpour 9467760627 Fix a bug in VideoDecodeRGB for syncing between main and worker threads (#245)
[ROCm/rocdecode commit: ee3829388d]
2024-02-14 12:30:03 -05:00
Aryan Salmanpour bc48060ff0 Fix a segmentation fault on some samples when the memory type is 3 (OUT_SURFACE_MEM_NOT_MAPPED) and attempting to save the output (which is not supported) (#239)
* Fix a segmentation fault on some samples when the memory type is 3 (OUT_SURFACE_MEM_NOT_MAPPED) and attempting to save the output (which is not supported)

* update the videoDecodeMultiFiles sample

* update the readme for videoDecodeMultiFiles

* add comments

* use OUT_SURFACE_MEM_NOT_MAPPED instead of integer number 3

[ROCm/rocdecode commit: 31c7c7c104]
2024-02-12 16:50:17 -05:00
Kiriti Gowda 9b14aee579 Sample - fix path & build types (#237)
[ROCm/rocdecode commit: 1881a5a61e]
2024-02-12 12:13:37 -05:00
Aryan Salmanpour cb9f6a48ae Enable gfx941/gfx942 by default for videoDecodeRGB sample (#236)
[ROCm/rocdecode commit: de5841d249]
2024-02-12 08:35:23 -05:00
Lakshmi Kumar 6443588c8d remove fork example (#232)
[ROCm/rocdecode commit: 072d6fe0e2]
2024-02-09 15:46:48 -05:00
Kiriti Gowda 1b4792c45c Doc - Updates (#231)
[ROCm/rocdecode commit: 5e5c92abb5]
2024-02-09 13:31:44 -05:00
Kiriti Gowda a7e06826ed rocDecode Docs - Updates (#225)
* rocDecode Docs - Updates

* Copy Fix

* Fix create dir

* Online - docs Updates

* Fix indents

* Fix indent

* Create symlink to overview

* Docs - Cleanup

---------

Co-authored-by: Sam Wu <sam.wu2@amd.com>

[ROCm/rocdecode commit: adaa5f76a4]
2024-02-07 18:37:58 -08:00
Pavel Tcherniaev 0ecf54230a fixed syntax error in videodecodefork.cpp, was missing a semicolon at the end of a line (#217)
Co-authored-by: kjayapra-amd <karthik.jayaprakash@amd.com>

[ROCm/rocdecode commit: fa3f21a7df]
2024-02-02 16:46:07 -05:00
Lakshmi Kumar 96b71ddd2c Samples - Clean up and bug fixes (#203)
* clean up samples

* fixes error seen in videoDecodeMem app with big files

[ROCm/rocdecode commit: 43481ce36b]
2024-01-29 12:58:00 -05:00
Kiriti Gowda 97a6f07780 Samples - Updates (#206)
* Samples - Updates

* Readme - samples

[ROCm/rocdecode commit: 6658070d1c]
2024-01-26 10:38:20 -08:00
Kiriti Gowda f517b2ab2d Samples - Docs Updated (#204)
[ROCm/rocdecode commit: 2298d93990]
2024-01-26 05:19:24 -08:00
Rajy Rawther 9afce4a03a fix for hipOutOfMem bug when decoding large videos (#189)
* fix for issue 441908

[ROCm/rocdecode commit: 51ecd8fccf]
2024-01-19 09:46:02 -08:00
Lakshmi Kumar a186a42593 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

[ROCm/rocdecode commit: 8ec38d2d24]
2024-01-17 22:57:31 -05:00
Aryan Salmanpour a28ebcb3f2 Remove unsupported GPUs (#175)
[ROCm/rocdecode commit: 3d28911453]
2024-01-15 10:50:34 -08:00
Lakshmi Kumar c7b2172448 fixes bug with device id provided by user (#171)
* fixes bug when setting env variable

* fix for device id

[ROCm/rocdecode commit: e7be5f2bbf]
2024-01-12 14:54:44 -05:00
Lakshmi Kumar d8c4040967 fixes bug when setting env variable (#170)
[ROCm/rocdecode commit: 2a1f1d7dff]
2024-01-12 14:04:47 -05:00
Aryan Salmanpour 8512426f1b Add support for gfx1101 and gfx1102 (#165)
[ROCm/rocdecode commit: 28c00cb354]
2024-01-10 14:17:04 -05:00
jeffqjiangNew 4c9a35a6a8 * rocDecode: Updated Copyright message for 2024. (#160)
[ROCm/rocdecode commit: 04fe74f390]
2024-01-09 20:47:16 -05:00
Aryan Salmanpour 793047edb1 CMakeLists code cleanup - dont link to hip::device if there is nt any hip kernles for compilation (#156)
[ROCm/rocdecode commit: 2f2e66679b]
2024-01-09 11:51:52 -05:00
jeffqjiangNew 8c8904761d 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_.

[ROCm/rocdecode commit: ccd813a2da]
2024-01-09 10:51:30 -05:00
Aryan Salmanpour b0ffeffb8f Add multi-threaingd support for videodecodergb sample (#154)
[ROCm/rocdecode commit: c464236bdc]
2024-01-08 15:02:43 -05:00
Aryan Salmanpour af09e155f8 Use a dedicated hip stream for launching hip kernels for color space conversion (#152)
[ROCm/rocdecode commit: dd738aef48]
2024-01-05 12:55:46 -05:00