Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Support for resizing (downscaling) the output #41

Open
jackz314 opened this issue Dec 21, 2020 · 2 comments
Open

Support for resizing (downscaling) the output #41

jackz314 opened this issue Dec 21, 2020 · 2 comments

Comments

@jackz314
Copy link

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".

@CryptoSingh1337
Copy link

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.

@CryptoSingh1337
Copy link

If any body could help then please CryptoSingh1337/GMoments#3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants