Batch Overview#

Some video effects have higher performance when multiple images are submitted in a contiguous batch. All video effects can process batches, regardless of whether they have a specifically tuned model.

Submitting a batch differs from submitting an image in the following ways:

  • Allocating batched buffers.

  • Selecting a batched model.

  • Setting the batched images.

  • Setting the batch size for NvVFX_Run().

What Is a Batch?#

In the Video Effects SDK, a batch is a contiguous buffer that contains multiple images with the same structure. For some effects, this process can yield a higher throughput than submitting the images individually.

The batch is represented by an NvCVImage descriptor for the first image and a separate batch size parameter that is set when you run the following command:

This value is sampled each time NvVFX_Run() is called, which allows the batch size to change with each call to NvVFX_Run().