Skip to content
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

--check-features differences between Windows / Linux versions #63

Closed
bavdevc opened this issue Aug 27, 2022 · 7 comments
Closed

--check-features differences between Windows / Linux versions #63

bavdevc opened this issue Aug 27, 2022 · 7 comments

Comments

@bavdevc
Copy link

bavdevc commented Aug 27, 2022

Hello Rigaya,

I tested on the same hardware (AMD 5700G) using your precompiled 7.08 version with the latest AMF 1.4.26 on Windows 10 and Linux with the latest AMD drivers.

result:
amf_linux_caps_vce_7.08.txt
amf_windows_caps_vce_7.08.txt

then I tested different supported input formats with the hardware decoder:

  • H264 / 8bit -> Windows OK - Linux OK
  • H265 / 8bit -> Windows OK - Linux OK
  • H265 / 10bit -> Windows OK - Linux AMF_FAIL

The VCEEnc check features command returns the same on Windows and Linux:

H.265/HEVC decode features
10bit depth: yes
acceleration: Hardware-accelerated
max streams: 0

--> But the AMFVideoDecoderHW_H265_MAIN10 as input result in an AMF_FAIL - so I checked the AMF SDK - there is an example called CapabilityManager (https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/samples/CPPSamples/CapabilityManager/CapabilityManager.cpp) that shows the API features:
amf_linux_caps.txt
amf_windows_caps.txt

There are some differences between Windows and Linux: (DX11 <> Vulkan)
Windows version:

Codec AMFVideoDecoderHW_H265_MAIN10 is Hardware-accelerated
Decoder input:
Width: [32-7680]
Height: [32-4320]
Vertical alignment: 32 lines.
Interlaced support: YES
Total of 0 pixel format(s) supported:
Total of 1 memory type(s) supported:
0: HOST (native)
Decoder output:
Width: [32-7680]
Height: [32-4320]
Vertical alignment: 32 lines.
Interlaced support: YES
Total of 3 pixel format(s) supported:
0: NV12 (native)
1: BGRA
2: RGBA
Total of 1 memory type(s) supported:
0: DX11 (native)

Linux version:

Codec AMFVideoDecoderHW_H265_MAIN10 is Not supported
Decoder input:
Decoder output:

==> Does that mean the decoder AMFVideoDecoderHW_H265_MAIN10 does not work under linux because of Vulkan limitations or is this feature not implemented in the AMD amdgpu-pro stack? Or does it work at your end and I have a config error with that AMDGPU driver stack?

@rigaya
Copy link
Owner

rigaya commented Aug 28, 2022

I think result of CapabilityManager.cpp is true (AMFVideoDecoderHW_H265_MAIN10 does not work under linux) and VCEEnc detection is wrong.

Actually, VCEEncC is checking HEVC 10bit decode support by combination of AMFVideoDecoderHW_H265 support and P010 format support, which seems to be causing false detection.

I think I should updated to simply checking AMFVideoDecoderHW_H265_MAIN10 support in the future.

@bavdevc
Copy link
Author

bavdevc commented Aug 28, 2022

Thank you for the clarification!

I also did some tests with VCEEnc debug log activated:

MPEG2 Input (not supported on linux)

0122-07-27 22:53:29 4E1092C0 [AMFDecoderUVDImpl] Debug: AMFDecoderUVDImpl::Init(NV12, 1920, 1080)
[A] 00122-07-27 22:53:29 4E1092C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Init(NV12, 1920, 1080)
[A] 00122-07-27 22:53:29 4E1092C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Terminate()
[A] 00122-07-27 22:53:29 4E1092C0 [AMFDecodeEngineImplVulkan] Warning: InitDecoder() - WARRNING: Vulkan supports H264 and HEVC only for now
[A] 00122-07-27 22:53:29 4E1092C0 [AMFDecodeEngineImplVulkan] Error: ../../../../../runtime/src/components/DecoderUVD/DecodeEngines/Vulkan/DecodeEngineVulkan.cpp(79):InitDecoder() - ERROR: Vulkan decoder unsupported codec - AMF_CODEC_ID=1, width=1920, height=1080, maxWidth=0, maxHeight=0

[A] 0Failed to init decoder: AMF_FAIL

HEVC 10bit input (not supported by linux driver)

0122-07-27 22:57:26 FFA1A2C0 [AMFDecoderUVDImpl] Debug: AMFDecoderUVDImpl::Init(P010, 3840, 2160)
[A] 00122-07-27 22:57:26 FFA1A2C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Init(P010, 3840, 2160)
[A] 00122-07-27 22:57:26 FFA1A2C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Terminate()
[A] 00122-07-27 22:57:26 FFA1A2C0 [AMFDecodeEngineImplVulkan] Error: ../../../../../runtime/src/components/DecoderUVD/DecodeEngines/Vulkan/DecodeEngineVulkan.cpp(121):InitDecoder() Codec is not supported by HW
[A] 0Failed to init decoder: AMF_FAIL

HEVC 8bit input

0122-07-27 23:11:45 B1A2F2C0 [AMFDecoderUVDImpl] Debug: AMFDecoderUVDImpl::Init(NV12, 1920, 1080)
[A] 00122-07-27 23:11:45 B1A2F2C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Init(NV12, 1920, 1080)
[A] 00122-07-27 23:11:45 B1A2F2C0 [AMFVideoStreamParserImpl] Debug: AMFVideoStreamParserImpl::Terminate()
[A] 00122-07-27 23:11:45 B1A2F2C0 [AMFDecodeEngineImplVulkan] Info: InitDecoder() OK! Video Vulkan HW DECODER (1920x1080) for input stream
[A] 0Initialized decoder

So far with vaapi and current mesa the AMD HW decoder (vcn_dec) is in better shape than AMD's own AMF implementation on linux.

@bavdevc
Copy link
Author

bavdevc commented Aug 28, 2022

btw. could someone with a discrete graphics test that linux-hevc-10bit decoder, please? If it's the same for the GPUs as for the APUs, I would open an issue at AMD AMF component.

I'm not sure if the error/missing implementation is only for the xnacks(APU) or all GPUs when using linux.

@bavdevc
Copy link
Author

bavdevc commented Sep 2, 2022

Hello @rigaya - I opened an issue at AMD/AMF with all the bugs/missing features - it's number 348 in GPUOpen-LibrariesAndSDKs/AMF

Do you want me to close this vceenc issue or do you want to keep it open for the AMFVideoDecoderHW_H265_MAIN10 change in --check-features option?

@rigaya
Copy link
Owner

rigaya commented Sep 3, 2022

Thank you for the issue in AMF SDK.

Please keep this issue open till I change AMFVideoDecoderHW_H265_MAIN10 in --check-features, which will be changed in next release.

@rigaya
Copy link
Owner

rigaya commented Sep 4, 2022

VCEEnc 7.09 will fix AMFVideoDecoderHW_H265_MAIN10 detection in --check-features.

@bavdevc
Copy link
Author

bavdevc commented Nov 16, 2022

fixed in VCEEnc, AMD still working on their issue

@bavdevc bavdevc closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants