* rocDecode: Removed the workaround for the previous non-blocking implementation of vaSyncSurface() in the driver, since the correct implementation has been put into the driver already. (#340)
[ROCm/rocdecode commit: 3ade0f31ff]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0ac8dd3bae
Коммит
80eaa4963c
@@ -414,22 +414,8 @@ rocDecStatus VaapiVideoDecoder::SyncSurface(int pic_idx) {
|
||||
}
|
||||
VASurfaceStatus surface_status;
|
||||
CHECK_VAAPI(vaQuerySurfaceStatus(va_display_, va_surface_ids_[pic_idx], &surface_status));
|
||||
while (surface_status != VASurfaceReady) {
|
||||
VAStatus va_status = vaSyncSurface(va_display_, va_surface_ids_[pic_idx]);
|
||||
/* Current implementation of vaSyncSurface() does not block indefinitely (contrary to VA-API spec), it returns
|
||||
* VA_STATUS_ERROR_TIMEDOUT error when it blocks for a certain amount of time. Although time out can come from
|
||||
* various reasons, we treat it as non-fatal and contiue waiting.
|
||||
*/
|
||||
if (va_status != VA_STATUS_SUCCESS) {
|
||||
if (va_status == 0x26 /*VA_STATUS_ERROR_TIMEDOUT*/) {
|
||||
CHECK_VAAPI(vaQuerySurfaceStatus(va_display_, va_surface_ids_[pic_idx], &surface_status));
|
||||
} else {
|
||||
std::cout << "vaSyncSurface() failed with error code: 0x" << std::hex << va_status << std::dec << "', status: " << vaErrorStr(va_status) << "' at " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
return ROCDEC_RUNTIME_ERROR;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if (surface_status != VASurfaceReady) {
|
||||
CHECK_VAAPI(vaSyncSurface(va_display_, va_surface_ids_[pic_idx]));
|
||||
}
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user