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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,8 +219,6 @@ class RocVideoDecoder {
|
||||
|
||||
rocDecVideoCodec GetCodecId() { return codec_id_; }
|
||||
|
||||
hipStream_t GetStream() {return hip_stream_;}
|
||||
|
||||
/**
|
||||
* @brief Get the output frame width
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user