You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use AMF MJPEG MFT for decoding MJPEG data from USB camera.
I set input frame 320x240, output is 320x256 NV12, because vertical alignment is 32.
Output NV12 frame has 16 extra lines. But Y and UV value of these line are all zero. That add high luminance green bar on bottom.
I can copy frame to CPU and remove 16 line and back to GPU, but it takes time. Because GPU-CPU copy is slow.
It become slower than software MJPEG decoder.
I like to know one of these option is possible.
Remove extra 16 lines on 320x240 case on AMF decoder
Change extra 16 lines color to black.
MFT DLL location on my Windows10 PC.
C:\Windows\System32\DriverStore\FileRepository\u0361313.inf_amd64_07132764fbaf152d\B361334\amf-mft-mjpeg-decoder64.dll
The text was updated successfully, but these errors were encountered:
This is not unique for MJPEG but rather common for all HW decoders: they need aligned output textures in video memory. Some codecs need 16 pixels, some like MJPEG - 32 pixels. Note, that it could be horizontal and/or vertical alignment. The common practice is that HW decoder returns cropping area and it is up to the calling app to deal with it (MF_MT_MINIMUM_DISPLAY_APERTURE for MFTs). Adding GPU copy for solely removing borders in the HW decoder is inefficient. As you said, using CPU to remove lines is also inefficient. The usual solution is, that the component after the decoder should recognize cropping and deal with it: if it is color converter, it should remove borders. But implementation depends on your pipeline. The next component could be Video Processor MFT (from MSFT) or your custom code. If the latter, you can run D3D11 compute shader to remove lines or combine the removal with other processing.
I use AMF MJPEG MFT for decoding MJPEG data from USB camera.
I set input frame 320x240, output is 320x256 NV12, because vertical alignment is 32.
Output NV12 frame has 16 extra lines. But Y and UV value of these line are all zero. That add high luminance green bar on bottom.
I can copy frame to CPU and remove 16 line and back to GPU, but it takes time. Because GPU-CPU copy is slow.
It become slower than software MJPEG decoder.
I like to know one of these option is possible.
MFT DLL location on my Windows10 PC.
C:\Windows\System32\DriverStore\FileRepository\u0361313.inf_amd64_07132764fbaf152d\B361334\amf-mft-mjpeg-decoder64.dll
The text was updated successfully, but these errors were encountered: