Optimization: Reduced decode session start latency for certain output surface memory types. (#512)

* *rocDecode/Optimization: Reduced decode session start latency for certain output surface memory types.

* * rocDecode/Optimization: Video decode RGB sample creates itsown HIP
  stream.

* * rocDecode/Optimization: Created separate HIP stream in each thread in
  video decode RGB sample.

* * rocDecode/Optimization: Addressed the lower FPS report in RGB sample:
  move HIP stream creation out of FPS calculation scope.

* * rocDecode/Optimize: Removed comments.
This commit is contained in:
jeffqjiangNew
2025-02-18 13:09:16 -05:00
committed by GitHub
parent c4fe8f5258
commit 1f53dedd4a
4 changed files with 22 additions and 13 deletions
+5 -1
View File
@@ -1044,7 +1044,11 @@ bool RocVideoDecoder::InitHIP(int device_id) {
}
HIP_API_CALL(hipSetDevice(device_id));
HIP_API_CALL(hipGetDeviceProperties(&hip_dev_prop_, device_id));
HIP_API_CALL(hipStreamCreate(&hip_stream_));
if (out_mem_type_ == OUT_SURFACE_MEM_DEV_INTERNAL || out_mem_type_ == OUT_SURFACE_MEM_NOT_MAPPED) {
hip_stream_ = 0; // Null stream. For internal device or unmapped memory, we don't need to create a hip stream.
} else {
HIP_API_CALL(hipStreamCreate(&hip_stream_));
}
return true;
}
-2
View File
@@ -219,8 +219,6 @@ class RocVideoDecoder {
rocDecVideoCodec GetCodecId() { return codec_id_; }
hipStream_t GetStream() {return hip_stream_;}
/**
* @brief Get the output frame width
*/