Increase number of EGL stream surfaces?

I’m curious to know if it is possible to increase the number of surfaces that are used for EGL/CUDA streaming in libArgus?

e.g. in tegra_multimedia_api/argus/samples/cudaHistogram

if we comment out the lines

// cuResult = cuSurfObjectDestroy(cudaSurfObj);
...
// cuResult = cuEGLStreamConsumerReleaseFrame(&cudaConnection, cudaResource, &cudaStream);

we see we will receive 10 surfaces before subsequent calls to cuEGLStreamConsumerAcquireFrame() will block (seems to be waiting for one or more frames to be freed).

The point here is for our application, we would like to have a cache of frames we can process at a later time. For example, we would like to hold 30+ frames at any given time, not just 10.

Is this possible? If not, what is the limitation? GPU texture memory?

Thanks

Hi,
Having 30+ working buffers is not a general usecase. Are you able to copy frames to other sapplication-allocated buffers and return them back to Argus directly?

We could, but I am trying to avoid unnecessary frame copying.

The idea here is we want to pick and choose a few of the cached frames, sometime after they are taken, for further CUDA processing. Having them available as a surface is ideal. Having to copy to another surface, or other memory only to copy back to a surface is something we would prefer to avoid.

I’m just wondering if the 10 surface limit is adjustable, or if this is a physical memory limitation?

Thanks

Any thoughts on this?

Hi,
We would like to suggest you prepare buffers in application since 10 surface limit looks fine to most cases. Is it possible to use NvBuffer APIs in you rimplementation? The APIs leverage VIC hardware engine for copying buffers.