NVIDIA DRIVE OS Linux SDK API Reference

6.0.5 Release
NvMediaLdcWarpMapParameters Struct Reference

Detailed Description

Holds the NvMedia LDC definition of a Warp Map.

Warp Map stores the mappings of each control point from destination image to input image. The coordinates of control points in a destination image are defined by regionParams.

If warp map region N has controlPointXSpacingLog2[N] = 0 it is considered to have "full columns", and with controlPointYSpacingLog2[N] = 0 "full rows". Otherwise, the region has "sparse columns/rows".

The warp map processing always operates on 64x16 pixel tiles, so when determining the number of control points in warp map region N, regionWidth[N] is rounded up to the next multiple of 64 and regionHeight[N] to the next multiple of 16.

In a warp map region with full columns/rows, the number of columns/rows of control points equals the 64x16 rounded up width/height of the region.

In a warp map region with sparse columns/rows,

  • First control point column/row is at position 0 within the region.
  • There's always an odd number of columns/rows of control points.
  • The position of the last control point column/row is always outside the 64x16 rounded up width/height of the region.

For example, if region width is 192 and control point interval is 64, it will result in 5 columns of control points with X-coordinates 0, 64, 128, 192 and 256.

The code below shows how to calculate the exact number of control points for a single region:

...
w = RoundUp(regionInfo.regionWidth[i], 64);
dx = 1 << regionInfo.controlPointXSpacingLog2[i];
numColumns = RoundUp(w, 2 * dx) / dx + (dx == 1 ? 0 : 1);
h = RoundUp(regionInfo.regionHeight[i], 16);
dy = 1 << regionInfo.controlPointYSpacingLog2[i];
numRows = RoundUp(h, 2 * dy) / dy + (dy == 1 ? 0 : 1);

Where RoundUp() rounds the first argument up to the nearest multiple of the second argument.

See also
NvMediaLdcRegionParameters
NvMediaLdcSetWarpMapParameters()

Definition at line 402 of file nvmedia_ldc.h.

Collaboration diagram for NvMediaLdcWarpMapParameters:

Data Fields

NvMediaLdcRegionParameters regionParams
 Specifies the regions paramters. More...
 
uint32_t numControlPoints
 Number of control points. More...
 
const NvMediaLdcControlPointcontrolPoints
 Array of control points across all the regions stored in a row-major order. More...
 

Field Documentation

◆ controlPoints

const NvMediaLdcControlPoint* NvMediaLdcWarpMapParameters::controlPoints

Array of control points across all the regions stored in a row-major order.

Definition at line 412 of file nvmedia_ldc.h.

◆ numControlPoints

uint32_t NvMediaLdcWarpMapParameters::numControlPoints

Number of control points.

Definition at line 408 of file nvmedia_ldc.h.

◆ regionParams

NvMediaLdcRegionParameters NvMediaLdcWarpMapParameters::regionParams

Specifies the regions paramters.

Definition at line 405 of file nvmedia_ldc.h.


The documentation for this struct was generated from the following file:
NvMediaLdcRegionParameters::regionWidth
uint32_t regionWidth[NVMEDIA_LDC_MAX_REGIONS_X]
Holds the width of regions.
Definition: nvmedia_ldc.h:312
NvMediaLdcRegionParameters::controlPointXSpacingLog2
uint32_t controlPointXSpacingLog2[NVMEDIA_LDC_MAX_REGIONS_X]
Holds the horizontal interval between the control points in each region in log2 space.
Definition: nvmedia_ldc.h:319
NvMediaLdcRegionParameters
Holds the NvMedia LDC region configuration.
Definition: nvmedia_ldc.h:301
NvMediaLdcRegionParameters::regionHeight
uint32_t regionHeight[NVMEDIA_LDC_MAX_REGIONS_Y]
Holds the height of regions.
Definition: nvmedia_ldc.h:315
NvMediaLdcRegionParameters::controlPointYSpacingLog2
uint32_t controlPointYSpacingLog2[NVMEDIA_LDC_MAX_REGIONS_Y]
Holds the vertical interval between the control points in each region in log2 space.
Definition: nvmedia_ldc.h:323