-
Notifications
You must be signed in to change notification settings - Fork 149
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
AMF on Linux/Windows (and ffmpeg) - the missing features list - will they get fixed/implemented? #348
Comments
Few answers:
|
Any chance AMF team can setup a staging area for ffmpeg and keep a custom fork with full AMF hwcontext and features? Here are two nice repos from Intel devs to demonstrate this process. Also if AMD can get in touch with the core developers of ffmpeg and express your intentions for AMF code maintenance, I believe this will push the integration of AMF into ffmpeg. Patches on the ffmpeg mailing list seem to be easily ignored unless you re-send patches regularly, or you are an accredited maintainer. |
This is feasible for d3d11va<->opencl on Windows with two of my patches:
Mapping from AMD proprietary Vulkan driver to Vaapi is not available since they don't support the necessary image modifier |
Thank you for the quick answers, @MikhailAMD - you accurately describe the current situation. @nyanmisaka very good ideas, the staging repo is a quick win but in the long run ffmpeg maintainers should merge it - I have never read a real reason from them why not to. regarding mapping - I noticed it only works very limited at the moment and investigated some time like you obviously did with those patches for windows. |
With first AMF integration we had asked for maintainer rights, didn't happen. |
Intel is contributing to FFmpeg for many years with 5-10 developers. Only less than a year ago, one of them became a maintainer, so this will require patience, endurance and continued presence and participation.
This won't work out as easy as that. You will always have a lag between patch submission and inclusion in ffmpeg, possibly even for many months. You won't be able to work in a way that you submit one patch and wait on that patch to be merged before working on another patch. It's unavoidable that a queue of unmerged patches will emerge as your own baseline and you'll need some build mechanism for dealing with it.
You'll surely want to perform automated tests of your patches on a hardware farm to make sure that those patches are working across the full range of supported hardware and to identify regressions early. For that purpose alone, you'll need automated builds. I'm afraid to say that, but watching the (marginal) progress over the past years and reading the responses above only confirms my impression that AMD is not strongly invested in providing software (driver/middleware) support for the media acceleration capabilities of its range of dGPU products. AMD is way behind its competitors in that area and I can't see intensive efforts like would be required to close that gap. What's missing in the list above and IMO one of the TOP3 shortcomings is the lack of hardware video processing through filters in ffmpeg like supported by the competition. Mapping to other hw contexts (e.g. OpenCL) is sometimes useful, but it can only be a last resort in case when there's no other way. All those context mappings introduce an additional source of error - and that's one that is difficult to foresee and deal with. Scaling, deinterlacing, color conversion, overlay, transforms - at minimum those basics would need to be available as native hw filters, to make some significant step out of the shadow of the two big ones (= we're still talking about hw media acceleration - only ;-) I don't just want to sound pessimistic. I really wish and hope to see some more progress and stronger movement from AMD in this area. But it should be clear to the AMD program managers that simply continuing like before won't suffice. Best wishes. |
10-bit encoding patch was re-sent: http://ffmpeg.org/pipermail/ffmpeg-devel/2022-September/301109.html |
There is still no p010le support thou, after the patch? Specifying "-profile:v main10" in the FFMpeg command, without specifying the pix_fmt results in yuv420p (8-bit) output, while specifying yuv420p10le or p010le (which will become nv12) will halt the program and crash the driver (19044.2006 Win10, 22.5.1 WHQL, RX 6800 XT RDNA2). |
Not sure I understand. http://ffmpeg.org/pipermail/ffmpeg-devel/2022-September/301110.html claims that p010le supported as encoder input. This patch doesn't change decoding. Input can be p010le in system memory or DXGI_FORMAT_P010. |
Just so you all know, AMD is actively working on improving this case, Dmitrii Ovchinnikov will help ffmpeg development now:
Thank you Dmitrii |
ping @OvchinnikovDmitrii - much appreciated |
Hello AMD developers,
I tested your current software stack on Windows 10 and Linux and I found the following issues or missing features that should have been working:
1. Linux-only: AMFVideoDecoderHW_H265_MAIN10 is not implemented in AMF (Vulkan)
Details/Example:
Unsupported codec MPEG2:
[AMFDecodeEngineImplVulkan] Warning: InitDecoder() - WARRNING: Vulkan supports H264 and HEVC only for now
Not implemented codec HEVC/MAIN10:
[AMFDecodeEngineImplVulkan] Error: ../../../../../runtime/src/components/DecoderUVD/DecodeEngines/Vulkan/DecodeEngineVulkan.cpp(121):InitDecoder() Codec is not supported by HW
--> Problem in NAVI2x ( see #341 ) and also VCN2.x block as NAVI1x and many APUs
2. Windows/Linux: ffmpeg is missing the AMF decoder
... since ~ 2 years - see #199 (feature was not accepted/merged the 1st time)
btw. VA-API decoder working fine with mesa/gallium/radeonsi (ALL input formats, like the windows version)
3. Windows/Linux: ffmpeg is missing the AMF HEVC Main10 encoder
... - that feature is not implemented yet #259
btw. VA-API encoder working fine with mesa/gallium/radeonsi (H264 and HEVC - Main and Main10)
4. Linux-only: performance problems when combining AMF encoder with the AMD OpenCL runtime
(for example resizing or tonemapping with vceencc/ffmpeg incl. encoding)
example processing speeds with identical API options, same input, same AMF version and latest AMD driver stack:
5. Windows/Linux: ffmpeg context/hardware mapping doesn't work with AMD
(only Intel and Nvidia hw context mapping works):
usecase - Map hardware frames to system memory or to another device. (hwmap - FFmpeg):
example:
all those operations should be possible without transferring GPU memory to system memory and back again.
if you need more information just ask, I'm still testing the other features to see if everything works as expected or not - I will let you know of any more issues I find while testing AMD Windows/Linux stack regarding Video/AMF
Kind regards and thanks for all your hard work in amdgpu/mesa/ffmpeg and AMF! Your open source efforts are much appreciated!
The text was updated successfully, but these errors were encountered: