I'm writing UWP app that give's user an opportunity to add video effect's on video stream receiving by some camera. I used C# MediaFrameReader to send SoftwareBitmap in C++/CX OpenCV to add effects. After that I noticed that C# has IBasicVideoEffect interface that can add effects directly to the CaptureElement. (https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/custom-video-effects)
But according the MSDN, IBasicVideEffect implementation works good only with ARGB32 subtype.
Unfortunately, my camera has only NV12 subtype. Is there a way to convert context.OutputFrame.SoftwareBitmap to ARGB32 format and then show it on the screen without convering it back to NV12?
I founded the solution. Provided article says that there're tho ways of implementing video effects. Second one is Win2D.uwp with IDirect3DDevice. That's worked for me without any convertations from NV12. Moreover, I've reached performance by using GPU resources for it, as MSDN say's.
My code sample: