-
Notifications
You must be signed in to change notification settings - Fork 460
sample decode on-screen rendering fails under ubuntu 19.04 #1396
Comments
Fixes: Intel-Media-SDK#1396 In case of X11 DRI3 we try to directly render output surfaces via memory sharing mechanism. For that we extract DMA buffer handle (file descriptor) from video surfaces and create XCB pixmap from it, but this operation might fail since rendering scanout might not be supported for some color formats we use for media. For example, typically we decode into NV12 which is not supported for scanouts. Hence the following might fail: sample_decode h264 -i input.264 -r -f 30 Before this patch user will see the following error which is not very descriptive: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 149 () Minor opcode of failed request: 2 Serial number of failed request: 19 Current serial number in output stream: 22 After this patch user will get: Failed to create xcb pixmap from the NV12 surface: try another color format (e.g. RGB4) DeliverOutput return error = -6 Which hopefull will lead user trying to run the following command line which should work assuming scanout from rgb4 is supported (which usually is): sample_decode h264 -i input.264 -r -f 30 -rgb4 Signed-off-by: Dmitry Rogozhkin <[email protected]>
This is a bad error reporting issue from sample_decode. Effectively sample tried to render NV12 frames via XCB pixmaps. For that it exports DMA file descriptor handle from NV12 frames and creates pixmap. The problem is that not all color formats can be used for rendering scanout. NV12 usually can not, hence pixmap creation just fails. PR #1397 improves error reporting and transforms the above error to:
As implied by the error message, NV12 simply can not be rendered and color conversion is required. Since this is a sample application, I don't think it is needed to be handled automatically. For the successful rendering we need to run:
Mind that NV12->RGB4 color conversion should be supported by underlying VAAPI driver. In case of iHD it is definitely supported by
|
Fixes: #1396 In case of X11 DRI3 we try to directly render output surfaces via memory sharing mechanism. For that we extract DMA buffer handle (file descriptor) from video surfaces and create XCB pixmap from it, but this operation might fail since rendering scanout might not be supported for some color formats we use for media. For example, typically we decode into NV12 which is not supported for scanouts. Hence the following might fail: sample_decode h264 -i input.264 -r -f 30 Before this patch user will see the following error which is not very descriptive: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 149 () Minor opcode of failed request: 2 Serial number of failed request: 19 Current serial number in output stream: 22 After this patch user will get: Failed to create xcb pixmap from the NV12 surface: try another color format (e.g. RGB4) DeliverOutput return error = -6 Which hopefull will lead user trying to run the following command line which should work assuming scanout from rgb4 is supported (which usually is): sample_decode h264 -i input.264 -r -f 30 -rgb4 Signed-off-by: Dmitry Rogozhkin <[email protected]>
As clarified above, that's bad error reporting behavior of sample decode. It was improved and fix is available in Ubuntu 19.10. Please, consider switching from Ubuntu 19.04 to Ubuntu 19.10 if you are affected by this issue. |
It should be #1397. I'll fix a comment above. Thx. |
Install Ubuntu 19.04 and mediasdk coming from the OS:
And run the following sample decode rendering command which will fail:
The text was updated successfully, but these errors were encountered: