Open martin19 opened 1 week ago
Definitely you can.
@MikhailAMD it works like you've described it (i use amf::AMF_SURFACE_RGBA
). Thank you.
The output horizontal pitch for 1920x1080 video is 2048 so I'll need to crop the result before displaying it.
Video memory is always allocated with horizontal alignment so pitch could be present,. But if you consume it in GPU, it doesn't matter, as D3D11 texture in this case will be 1920x1080. If you map to system memory, yes, you will see pitch.
Does it mean I can display the result texture directly via directx? think this would be the fastest path.
Sure: (ID3D11Texture2D*)surface->GetPlaneAt(0)->GetNative(). Don't forget about serializing access to ID3D11DeviceContext if you use multithreading: AMFDX11Locker locker(context);
Hello, I'm integrating AMF encoder and decoder into a screen-sharing app. Currently I'm decoding to
NV12
format via amf and converting toRGBA
in RAM/software and blitting everything to screen viaQImage
. Is there any way to accelerate this - get RGBA directly from the decoder, converting or displaying via directx? Writing a converter (amf::AMF_SURFACE_NV12
->amf::AMF_SURFACE_RGBA
) gives meAMF_INVALID_FORMAT
when callingconverter->Init
.