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
{{ message }}
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.
In a lot of use cases it's often better to have a resized output that's smaller than the native resolution, of course we can do this manually after the output is received, but it would be much faster to be able to down sample on GPU and then output. I'm not at all familiar with DirectX, but from what I gathered so far, we can either do this by creating and outputing mipmaps of the original frame, re-render the original frame to a smaller target-sized texture, or use some sort of compute shader to do the scaling manually. I'm not sure which way would be the fastest, from what I've learned so far, I'm guessing mipmaps would be the fastest if the scale factor is a power of two.
I'm not sure about how to approach the other methods, but mipmaps should be relatively easy to implement. However, I couldn't find a way to generate the appropriate methods & classes used by DirectX's mipmaps stuff, I tried using comtypes' GetModule('d3d11.dll'), but it doesn't seem to work and crashes with "Error loading type library/DLL".
The text was updated successfully, but these errors were encountered:
This feature is important because if we are capturing the window then it will consume a lot of memory. I am currently stuck in a situation where I have to capture to keep a buffer of frame and on pressing the hotkey I have to render the video from that frames.
I am storing 360 frames in memory for a 15 sec clip at 24 fps and 1920x1080 resolution. My application is consuming around 2.2 GB of memory which is a problem for sure.
In a lot of use cases it's often better to have a resized output that's smaller than the native resolution, of course we can do this manually after the output is received, but it would be much faster to be able to down sample on GPU and then output. I'm not at all familiar with DirectX, but from what I gathered so far, we can either do this by creating and outputing mipmaps of the original frame, re-render the original frame to a smaller target-sized texture, or use some sort of compute shader to do the scaling manually. I'm not sure which way would be the fastest, from what I've learned so far, I'm guessing mipmaps would be the fastest if the scale factor is a power of two.
I'm not sure about how to approach the other methods, but mipmaps should be relatively easy to implement. However, I couldn't find a way to generate the appropriate methods & classes used by DirectX's mipmaps stuff, I tried using
comtypes
'GetModule('d3d11.dll')
, but it doesn't seem to work and crashes with "Error loading type library/DLL".The text was updated successfully, but these errors were encountered: