Add new API rocDecParserMarkFrameForReuse() for Parser (#430)

* added new API to release video frame for decoder and parser

* removed ReleseFrame() from low level parser classes

* Removed rocDecReleaseFrame() from decoder and added in parser

* address review comments

* revert un-necessary files

* minor fix

* remove unused function

* minor formatting fix
This commit is contained in:
Rajy Rawther
2024-10-09 10:29:08 -07:00
committed by GitHub
parent 64078a58cb
commit 29bfe5e3bd
8 changed files with 52 additions and 4 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ rocDecStatus RocDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo *reconf
}
rocDecStatus rocdec_status;
for (int pic_idx = 0; pic_idx < hip_interop_.size(); pic_idx++) {
rocdec_status = ReleaseVideoFrame(pic_idx);
rocdec_status = FreeVideoFrame(pic_idx);
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("Releasing the video frame for picture idx = " + TOSTR(pic_idx) + " failed during reconfiguration.");
return rocdec_status;
@@ -172,7 +172,7 @@ rocDecStatus RocDecoder::GetVideoFrame(int pic_idx, void *dev_mem_ptr[3], uint32
return rocdec_status;
}
rocDecStatus RocDecoder::ReleaseVideoFrame(int pic_idx) {
rocDecStatus RocDecoder::FreeVideoFrame(int pic_idx) {
if (pic_idx >= hip_interop_.size()) {
return ROCDEC_INVALID_PARAMETER;
}
+1 -1
View File
@@ -64,7 +64,7 @@ public:
private:
rocDecStatus InitHIP(int device_id);
rocDecStatus ReleaseVideoFrame(int pic_idx);
rocDecStatus FreeVideoFrame(int pic_idx);
int num_devices_;
RocDecoderCreateInfo decoder_create_info_;
VaapiVideoDecoder va_video_decoder_;