|
|
NVIDIA DriveOS Linux SDK API Reference
|
7.2.5.0 Early Access Release
|
Go to the documentation of this file.
11 #ifndef INCLUDED_nvrm_surface_fusa_H
12 #define INCLUDED_nvrm_surface_fusa_H
31 #if defined(__cplusplus)
443 #define NvYuvChromaLocation_BT601 NvYuvChromaLocation_0_0
444 #define NvYuvChromaLocation_MPEG2 NvYuvChromaLocation_0_1
445 #define NvYuvChromaLocation_MPEG1 NvYuvChromaLocation_1_1
446 #define NvYuvChromaLocation_JPEG NvYuvChromaLocation_1_1
465 #define NVRM_MAX_SURFACES 3
508 #define NVRM_SURFACE_FLAG_VPR (1ULL << 0U)
511 #define NVRM_SURFACE_FLAG_COMPRESSIBLE (1ULL << 1U)
514 #define NVRM_SURFACE_FLAG_FORCE_TEGRA_RAW_SWIZZLING (1ULL << 2U)
518 #define NVRM_SURFACE_FLAG_SIZE_VALIDATED (1ULL << 63U)
520 #define NVRM_SURFACE_FLAG_NO_FORCE_PAGE_ALIGNMENT (1ULL << 3U)
644 #if defined(NV_ANDROID) || defined(NV_HOS)
658 #define NvRmSurfaceUnitSupport
718 #define NVRM_SURFACE_FORCE_BLOCK_HEIGHT_LOG2_DONT_FORCE 0xFFFFFFFFU
843 #define NVRM_SURFACECONTAINER_MAX_SURFACES 3U
931 NvColorFormat
const colorFormat,
932 NvU32
const *
const attributes);
1010 const NvColorFormat *ColorFormats,
1011 const NvU32 *Attributes);
1120 void*
const mappedPtr);
1176 NvU32
const unitSupport,
1177 NvU32*
const pitchAlign);
1214 NvU32*
const pAlignment);
1270 NvU32*
const pOffset);
1339 void const *
const pSrcPixels);
1409 void*
const pDstPixels);
1460 return (NvU32)relocType;
1463 #if defined(__cplusplus)
NvU32 Offset
The offset where the surface starts within that allocation.
@ NvRmSurfaceAttribute_NoForcePageAlignment
If this is true, sets the NVRM_SURFACE_FLAG_NO_FORCE_PAGE_ALIGNMENT flag.
NvRmSurfaceContainerType ContainerType
This defines the container type: NvRmSurfaceContainerType.
NvYuvChromaLocation
Defines the chroma subsampling location.
@ NvRmSurfaceCompression_GpuOnly
GPU compression enabled, CDEs cannot be used.
NvDisplayScanFormat DisplayScanFormat
The display scan format of the surface - progressive/interlaced.
@ NvRmSurfaceLayout_Pitch
Pitch: Address formula is:
NvU32 Width
The width of the surface.
NvRmSurface Surfaces[NVRM_SURFACECONTAINER_MAX_SURFACES]
An array of Surfaces.
NvError
The NvError enumeration contains ALL return / error codes.
@ NvRmSurfaceAttribute_Pitch
Force the surface's Pitch to the provided value.
@ NvRmSurfaceAttribute_Size
Force the surface's size to the given size.
@ NvYuvChromaLocation_2_2
@ NvYuvColorFormat_YUV422R
Vertical sub-sampling.
@ NvRmSurfaceLayout_Force32
@ NvRmSurfaceUnitSupport_NVENC
@ NvRmSurfaceContainerAllocType_NonContiguous
Non-contiguous allocation.
@ NvRmSurfaceAttribute_ChromaLocType
Defines the chroma subsampling location.
@ NvRmSurfaceCompression_Enabled
GPU compression enabled, CDEs can be used (alias true).
struct NvRmSurfaceRec NvRmSurface
An exposed (not opaque) structure representing a surface.
NvError NvRmSurfaceWrite(NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 const width, NvU32 const height, void const *const pSrcPixels)
Writes a subregion of a surface.
NvYuvColorFormat NvRmSurfaceGetYuvColorFormat(NvRmSurface const *const *pSurf, NvU32 numSurfaces)
Returns the YUV color format from an array of the N surfaces used to represent the YUV planes.
NvYuvChromaLocation YuvChromaLocation
This defines the chroma subsampling location: NvYuvChromaLocation.
NvError NvRmSurfaceSetup(NvRmSurface *const pSurf, NvU32 const width, NvU32 const height, NvColorFormat const colorFormat, NvU32 const *const attributes)
Sets up an NvRmSurface.
NvRmSurfaceLayout NvRmSurfaceGetDefaultLayout(void)
Returns the system-wide default surface layout on the current platform.
@ NvRmStreamRelocType_Pitch
NvRmSurfaceUnitSupport
Defines engine/unit support.
@ NvRmSurfaceUnitSupport_PVA
NvU32 CdeHorizontalCompbitsOffset
Offset, within the main surface allocation, of the CDE compbits for HW engines that traverse the surf...
NvU64 Flags
Flags, See NVRM_SURFACE_FLAG_* NvRmSurfaceFlags.
@ NvRmSurfaceUnitSupport_All
@ NvRmSurfaceCompression_Disabled
Compression disabled (alias false).
@ NvYuvColorFormat_YUV444
No sub-sampling.
NvU32 CdeVerticalCompbitsOffset
Offset, within the main surface allocation, of the CDE compbits for HW engines that traverse the surf...
@ NvYuvChromaLocation_0_0
Cosited chroma location.
NvU32 CdeScatterBufferOffset
Offset, within the main surface allocation, of a buffer containing data for supporting CDE decompress...
NvError NvRmSurfaceSetDeviceMemory(NvRmSurface *const pSurf, NvRmMemHandle const hMem, NvU32 const offset, void *const mappedPtr)
Binds a surface to a region of device memory.
@ NvRmSurfaceAttribute_Last
Provides the number of attributes.
NvError NvRmMultiplanarSurfaceSetup(NvRmSurface *Surfaces, NvU32 NumSurfaces, NvU32 Width, NvU32 Height, NvYuvColorFormat YuvFormat, const NvColorFormat *ColorFormats, const NvU32 *Attributes)
Sets up a set of NvRmSurfaces describing a multiplanar surface.
#define NVRM_SURFACECONTAINER_MAX_SURFACES
Maximum number of surfaces which can be stored in the NvRmSurfaceContainer.
@ NvRmSurfaceAttribute_None
Must terminate the attribute list.
@ NvRmSurfaceUnitSupport_ISP
NvRmSurfaceAttribute
Define attribute types that can be passed into the attribute list accepted by NvRmSurfaceSetup.
NvRmSurfaceContainerType
Defines a container type for NvRmSurfaceContainer Depending of the format or how different color comp...
@ NvYuvChromaLocation_0_1
Cosited horizontally and centered vertically, typical for MPEG2.
@ NvRmSurfaceAttribute_OptimizeForDisplay
Optimize surface for display consumption.
@ NvRmSurfaceAttribute_Layout
Memory Layout to use for the surface.
@ NvRmSurfaceUnitSupport_Camera
@ NvRmSurfaceUnitSupport_Display
@ NvRmSurfaceAttribute_Compression
Selects the level of compression support desired for the surface.
NvError NvRmSurfaceGetCoordOffset(NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 *const pOffset)
Returns the byte offset of a given pixel coordinate relative to the start of the surface.
@ NvRmSurfaceAttribute_ForceTegraRawSwizzling
If this is true, sets the NVRM_SURFACE_FLAG_FORCE_TEGRA_RAW_SWIZZLING flag.
struct NvRmMemRec * NvRmMemHandle
@ NvYuvColorFormat_YUV420
Horizontal and vertical sub-sampling.
@ NvRmSurfaceUnitSupport_2D
NvColorFormat ColorFormat
The color format of the surface, e.g., ::NvColorFormat_A8R8G8B8.
@ NvRmSurfaceContainerType_Single
Single plane container.
@ NvYuvChromaLocation_0_2
Less common locations.
@ NvYuvChromaLocation_1_0
@ NvYuvColorFormat_YUV422
Horizontal sub-sampling.
NvError NvRmSurfaceGetPitchAlignment(NvRmSurfaceLayout const layout, NvU32 const unitSupport, NvU32 *const pitchAlign)
Returns the pitch alignment requirement in bytes.
@ NvRmSurfaceContainerType_Stereo
Stereo format container.
@ NvRmSurfaceLayout_Blocklinear
BlockLinear: Surface is stored in a hardware defined, opaque "blocklinear" organization.
NvRmSurfaceLayout Layout
The layout of the surface, usually, NvRmSurfaceLayout_Blocklinear.
NvError NvRmSurfaceGetAlignment(NvRmSurface const *const pSurf, NvU32 *const pAlignment)
Returns the alignment in bytes that the surface's memory will need to be allocated with.
@ NvRmSurfaceContainerType_Planar
Planar format, separate surfaces contain different planes.
@ NvYuvColorFormat_Unspecified
Placeholder error value.
NvU32 SecondFieldOffset
For interlaced surfaces, SecondFieldOffset represents the offset of all of the odd lines relative to ...
@ NvYuvChromaLocation_Unspecified
Chroma subsampling location is unknown or not specifed.
@ NvRmSurfaceAttribute_Vpr
If this is true, sets the NVRM_SURFACE_FLAG_VPR flag.
@ NvDisplayScanFormat_Progressive
@ NvDisplayScanFormat_Force32
NvRmStreamRelocTypeRec
Supported Reloc types.
#define NV_ALIGN_POINTER(t, f)
Declares a 64-bit aligned pointer.
@ NvRmSurfaceLayout_Tiled
Tiled: Surface is stored in 1024-byte blocks that are 64 bytes wide and 16 rows tall,...
NvYuvColorFormat YuvColorFormat
Color format of the data stored in the surfaces array Applicable for YUV formats only.
NvU64 Size
Size of the surface, in bytes, including all necessary padding and metadata.
@ NvRmSurfaceUnitSupport_VI
struct NvRmSurfaceContainerRec NvRmSurfaceContainer
Common container struct to represent all surface types.
@ NvRmStreamRelocType_Blocklinear
Common container struct to represent all surface types.
@ NvRmSurfaceContainerAllocType_Contiguous
Contiguous allocation.
@ NvYuvChromaLocation_1_2
@ NvRmSurfaceAttribute_DisplayScanFormat
The scanout format of displayable surfaces.
NvYuvColorFormat
Defines the different color formats in the YUV color space.
NvDisplayScanFormat
Defines the different display scan formats in the video planes.
@ NvRmSurfaceAttribute_UnitSupport
A bitmask of HW units that will access the surface.
NvRmMemKind Kind
The "kind" of the surface.
An exposed (not opaque) structure representing a surface.
@ NvRmSurfaceUnitSupport_3D
NvU32 BlockHeightLog2
The log2(block_height_in_number_of_gobs) of the surface.
NvU32 Height
The height of the surface.
@ NvRmSurfaceAttribute_AllocType
Defines the allocation type inside NvRmSurfaceContainer.
NvRmSurfaceCompression
Defines general surface compression support.
static NvU32 NvRmSurfaceLayoutToRelocType(NvRmSurfaceLayout const layout)
Convert surface layout into NvHost reloc type.
@ NvDisplayScanFormat_Interlaced
NvRmMemHandle hMem
If the surface is backed by an RM memory alloc, the handle of that memory alloc and the offset where ...
void * pBase
If the surface is not backed by an RM alloc, the pointer to the storage.
NvRmSurfaceLayout
The possible layouts that a surface can presently have.
NvU32 Pitch
The pitch of the surface in bytes.
@ NvYuvChromaLocation_2_0
@ NvRmSurfaceUnitSupport_CSI
@ NvRmSurfaceCompression_Default
Use per-platform default, modifiable with config properties.
@ NvYuvChromaLocation_2_1
NvRmSurfaceContainerAllocType
Defines an allocation type for semiplanar and planar formats inside the container.
@ NvRmSurfaceAttribute_ForceBlockHeightLog2
Force the surface's BlockHeightLog2 to the provided value.
@ NvRmSurfaceContainerType_SemiPlanar
SemiPlanar format container.
@ NvYuvColorFormat_Force32
Ensures this enum occupies at least 32 bits.
@ NvYuvChromaLocation_1_1
Centered horizontally and vertically, typical for MPEG1 and JPEG.
NvError NvRmSurfaceRead(NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 const width, NvU32 const height, void *const pDstPixels)
Reads a subregion of a surface.