New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDVDVideoCodecDRMPRIME: software decoding #17724
Conversation
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Allwinner H6 board. Works great. LGTM.
Working on Pi too. |
@jernejsk @popcornmix thanks for the review, Can you verify that the setting to disable hw decoding for DRM PRIME actually acts like it should? After that we can shove this in 👍 |
Not sure if "Allow hardware acceleration with DRM PRIME" works correctly. In both cases (that option enabled and disabled) I get "ff-vp9-drm_prime (SW)" when pressing "o". |
I think (as root):
should show frame sized allocations and frees when software decoding is using dma-heap. |
Log: http://ix.io/2mZS So, even if aforementioned option is disabled, DMA buffers are used. |
Eh, sorry, disregard my comment. I thought settings are the other way around. Yeah, settings work fine. GTG |
Pretty sure the switch worked as expected when I tested it on Pi. |
385a690
to
2b66f3e
Compare
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
…pr-2 CDVDVideoCodecDRMPRIME: software decoding
This has been in the works for some time but has finally been made possible because of #17688
This allows
CDVDVideoCodecDRMPRIME
to do sw decoding into dma-bufs. This is equivalent to the functionality that the RPi platform has where it can sw decode directly into mmal buffers.Currently this only supports
AV_PIX_FMT_YUV420
as rendering other formats is more difficult (especially on embedded hardware). Mesa has native support to render this format into EGL (using shaders) so we can allow that easily. Other sw decoded pixel formats such asAV_PIX_FMT_YUV420P10
do not have a mesa EGL equivalent. Typically this is because interleaved formats are much better suited for importing into the GPU such as NV12 or P010.I've tested this on various hw such as Amd, Intel, Amlogic (odroid-c2). The odroid-c2 is the only platform that supports YUV420 (YU12) int the drm plane so that is the only platform I have tested this with using direct-to-plane rendering and it seems to be fine for 1080P H264.
I also added a setting switch to enable/disable hw decoding methods when using
CDVDVideoCodecDRMPRIME
so this can be tested easily. This will probably need to be expanded in the future to enable/disable specific codec like we have currently for VAAPI.Also be aware that this only works with the udmabuf and dma-heap CBufferObject types so if you want to test you will need one of those methods available on your platform.