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.

[ROCm/rocdecode commit: 1f53dedd4a]
此提交包含在:
jeffqjiangNew
2025-02-18 13:09:16 -05:00
提交者 GitHub
父節點 3b6a4d3293
當前提交 4ac1b8dd67
共有 4 個檔案被更改,包括 22 行新增13 行删除
+5 -1
查看文件
@@ -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;
}