Architecture and Data Flow

nvm_iep Stack Diagram

Component Descriptions

Name Description
nvm_iep_sci The sample application which calls the NvMedia IEP APIs. On receipt of the headers and bitstream, packetizes the encoded stream and saves the result to an output file.
NvMedia IEP API Calls the low-level hardware driver interface to issue encoding commands to NVENC microcode.
Low-level hardware driver

Writes out high level headers, including SPS, PPS, VUI and SEI.

The driver creates and maintains reference picture surfaces, the output bitstream buffers, and the internal status buffers.

For each input picture, the driver provides a configuration data structure (a picture setup) that contains encoder parameters along with the encode commands to the NVENC microcode. This structure contains:

  • Buffer information (current picture, reference pictures)
  • Sequence and picture parameter set information and rate control configuration
  • Other module configurations as needed
NVENC microcode Accesses the hardware engine to schedule the encoding commands, and return the encode status including bitstreams, statistics, etc.
NVENC hardware engine Handles slice header and data.

NvMedia Low-Level Encode Driver Inputs and Outputs

Picture buffers must be in block linear format. Pitch linear input data is not supported due to inefficiency in the memory accesses.

The picture dimensions of the encoded streams are always in multiples of X pixels, where X is:

  • 16 for H.264 encoding
  • 32 for H.265 encoding
  • 64 for VP9 encoding

If the input needs cropping, it is cropped at the right and bottom of the picture. If the input picture’s horizontal/vertical dimensions are not X pixels aligned, the application software must verify the padding on the right/bottom side to make it X pixels aligned, where X is dependent on the codec as listed above.