• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Lens Distortion Correction

    Detailed Description

    The LDC API encompasses all NvMedia LDC/TNR image processing related functionality.

    6

    Data Structures

    struct  NvMediaLdcAttributes
     Attributes structure for NvMediaLdcCreate(). More...
     
    struct  NvMediaLdcParametersAttributes
     Attributes that specify resources needed for NvMediaLdcParameters instance. More...
     
    struct  NvMediaLdcResult
     Stores information returned from NvMediaLdcProcess(). More...
     
    struct  NvMediaLdcRegionParameters
     Holds the NvMedia LDC region configuration. More...
     
    struct  NvMediaLdcIptParameters
     Holds inverse perspective transformation configuration. More...
     
    struct  NvMediaLdcControlPoint
     Represents a control point. More...
     
    struct  NvMediaLdcWarpMapParameters
     Holds the NvMedia LDC definition of a Warp Map. More...
     
    struct  NvMediaLdcMaskMapParameters
     Holds the Mask Map information. More...
     
    struct  NvMediaLdcTnrParameters
     Holds the TNR3 initialization parameters. More...
     
    struct  NvMediaLdcChecksum
     Represents a checksum. More...
     

    Macros

    #define NVMEDIA_LDC_VERSION_MAJOR   10
     Major version number of NvMedia LDC header. More...
     
    #define NVMEDIA_LDC_VERSION_MINOR   0
     Minor version number of NvMedia LDC header. More...
     
    #define NVMEDIA_LDC_VERSION_PATCH   0
     Patch version number of NvMedia LDC header. More...
     
    #define NVMEDIA_LDC_MAX_REGIONS_X   4u
     Maximum number of horizontal regions. More...
     
    #define NVMEDIA_LDC_MAX_REGIONS_Y   4u
     Maximum number of vertical regions. More...
     
    #define NVMEDIA_LDC_CHECKSUM_NUM_BYTES   24u
     Number of bytes in NvMedia LDC checksums. More...
     

    Typedefs

    typedef struct NvMediaLdc NvMediaLdc
     NvMediaLdc context. More...
     
    typedef uint32_t NvMediaLdcParameters
     Stores configuration for the NvMediaLdcProcess() operation. More...
     

    Enumerations

    enum  NvMediaLdcFilter {
      NVMEDIA_LDC_FILTER_OFF,
      NVMEDIA_LDC_FILTER_LOW,
      NVMEDIA_LDC_FILTER_MEDIUM
    }
     VIC filter mode. More...
     
    enum  NvMediaLdcChecksumMode {
      NVMEDIA_LDC_CHECKSUM_MODE_DISABLED,
      NVMEDIA_LDC_CHECKSUM_MODE_SRC_SURFACE
    }
     NvMedia LDC checksum mode. More...
     

    Functions

    NvMediaStatus NvMediaLdcGetVersion (NvMediaVersion *const version)
     Returns the version number of the NvMedia LDC library. More...
     
    NvMediaStatus NvMediaLdcCreate (NvMediaLdc **const handle, NvMediaLdcAttributes const *const attr)
     Creates a new NvMediaLdc context. More...
     
    NvMediaStatus NvMediaLdcDestroy (NvMediaLdc *const handle)
     Destroys the NvMediaLdc context. More...
     
    NvMediaStatus NvMediaLdcCreateParameters (NvMediaLdc *const handle, NvMediaLdcParametersAttributes const *const attr, NvMediaLdcParameters *const params)
     Creates and returns an NvMediaLdcParameters instance. More...
     
    NvMediaStatus NvMediaLdcDestroyParameters (NvMediaLdc *const handle, NvMediaLdcParameters const params)
     Destroys an NvMediaLdcParameters instance. More...
     
    NvMediaStatus NvMediaLdcSetFilter (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcFilter const filter)
     Sets the filter mode to use for LDC pixel interpolation. More...
     
    NvMediaStatus NvMediaLdcSetGeometry (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaRect const *const srcRect, NvMediaRect const *const dstRect)
     Sets source and destination rectangles for LDC operation. More...
     
    NvMediaStatus NvMediaLdcSetIptParameters (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcIptParameters const *const iptParams)
     Sets parameters for LDC Inverse Perspective Transform (IPT) operation. More...
     
    NvMediaStatus NvMediaLdcSetWarpMapParameters (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcWarpMapParameters const *const warpMapParams)
     Sets parameters for LDC Warp Map. More...
     
    NvMediaStatus NvMediaLdcSetMaskMapParameters (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcMaskMapParameters const *const maskMapParams)
     Sets parameters for LDC Mask Map. More...
     
    NvMediaStatus NvMediaLdcSetTnrParameters (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcTnrParameters const *const tnrParams)
     Sets Temporal Noise Reduction (TNR) parameters. More...
     
    NvMediaStatus NvMediaLdcResetTnr (NvMediaLdc *const handle, NvMediaLdcParameters const params)
     Resets TNR algorithm state. More...
     
    NvMediaStatus NvMediaLdcSetChecksumMode (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcChecksumMode const checksumMode)
     Sets checksum calculation mode. More...
     
    NvMediaStatus NvMediaLdcGetChecksum (NvMediaLdc *const handle, NvMediaLdcResult const *const result, NvMediaLdcChecksum *const checksum)
     Gets a checksum calculated for an NvMediaLdcProcess() operation. More...
     
    NvMediaStatus NvMediaLdcProcess (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcResult *const result)
     Performs LDC operation. More...
     

    Macro Definition Documentation

    ◆ NVMEDIA_LDC_CHECKSUM_NUM_BYTES

    #define NVMEDIA_LDC_CHECKSUM_NUM_BYTES   24u

    Number of bytes in NvMedia LDC checksums.

    Definition at line 611 of file nvmedia_ldc.h.

    ◆ NVMEDIA_LDC_MAX_REGIONS_X

    #define NVMEDIA_LDC_MAX_REGIONS_X   4u

    Maximum number of horizontal regions.

    Definition at line 243 of file nvmedia_ldc.h.

    ◆ NVMEDIA_LDC_MAX_REGIONS_Y

    #define NVMEDIA_LDC_MAX_REGIONS_Y   4u

    Maximum number of vertical regions.

    Definition at line 246 of file nvmedia_ldc.h.

    ◆ NVMEDIA_LDC_VERSION_MAJOR

    #define NVMEDIA_LDC_VERSION_MAJOR   10

    Major version number of NvMedia LDC header.

    This defines the major version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMediaLdcGetVersion() function.

    See also
    NvMediaLdcGetVersion()

    Definition at line 48 of file nvmedia_ldc.h.

    ◆ NVMEDIA_LDC_VERSION_MINOR

    #define NVMEDIA_LDC_VERSION_MINOR   0

    Minor version number of NvMedia LDC header.

    This defines the minor version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMediaLdcGetVersion() function.

    See also
    NvMediaLdcGetVersion()

    Definition at line 58 of file nvmedia_ldc.h.

    ◆ NVMEDIA_LDC_VERSION_PATCH

    #define NVMEDIA_LDC_VERSION_PATCH   0

    Patch version number of NvMedia LDC header.

    This defines the patch version of the API defined in this header. This might be used to validate the version number returned by the NvMediaLdcGetVersion() function in case when the client needs a revision with a particular patch included.

    See also
    NvMediaLdcGetVersion()

    Definition at line 69 of file nvmedia_ldc.h.

    Typedef Documentation

    ◆ NvMediaLdc

    typedef struct NvMediaLdc NvMediaLdc

    NvMediaLdc context.

    This type represents a context for the NvMediaLdc library. This context is an opaque data type that encapsulates the state needed to service the NvMediaLdc API calls.

    See also
    NvMediaLdcCreate()

    Definition at line 79 of file nvmedia_ldc.h.

    ◆ NvMediaLdcParameters

    typedef uint32_t NvMediaLdcParameters

    Stores configuration for the NvMediaLdcProcess() operation.

    This object stores the information needed to configure the LDC operation that is executed inside the NvMediaLdcProcess() function.

    The underlying object cannot be instantiated directly by the client. Instead use the NvMediaLdcCreateParameters() function to create and retrieve a handle to an available instance with resources allocated in respect to used NvMediaLdcParametersAttributes. Use NvMediaLdcDestroyParameters() function to deallocate resources allocated by NvMediaLdcCreateParameters() and release an instance.

    Value 0 is never a valid handle value, and can be used to initialize an NvMediaLdcParameters handle to a known value.

    See also
    NvMediaLdcCreateParameters()
    NvMediaLdcDestroyParameters()
    NvMediaLdcSetFilter()
    NvMediaLdcSetGeometry()
    NvMediaLdcSetIptParameters()
    NvMediaLdcSetWarpMapParameters()
    NvMediaLdcSetMaskMapParameters()
    NvMediaLdcSetTnrParameters()
    NvMediaLdcProcess()

    Definition at line 106 of file nvmedia_ldc.h.

    Enumeration Type Documentation

    ◆ NvMediaLdcChecksumMode

    NvMedia LDC checksum mode.

    This enum describes the different checksum calculation modes that are supported by NvMedia LDC.

    Enumerator
    NVMEDIA_LDC_CHECKSUM_MODE_DISABLED 

    No checksum calculated. This is the default behavior.

    NVMEDIA_LDC_CHECKSUM_MODE_SRC_SURFACE 

    Checksum calculated from source surface pixel data.

    Definition at line 625 of file nvmedia_ldc.h.

    ◆ NvMediaLdcFilter

    VIC filter mode.

    This enum describes the filter modes that are supported by NvMedia LDC.

    Enumerator
    NVMEDIA_LDC_FILTER_OFF 

    Filtering is disabled.

    NVMEDIA_LDC_FILTER_LOW 

    Low quality filtering.

    NVMEDIA_LDC_FILTER_MEDIUM 

    Medium quality filtering.

    Definition at line 230 of file nvmedia_ldc.h.

    Function Documentation

    ◆ NvMediaLdcCreate()

    NvMediaStatus NvMediaLdcCreate ( NvMediaLdc **const  handle,
    NvMediaLdcAttributes const *const  attr 
    )

    Creates a new NvMediaLdc context.

    This function creates a new instance of an NvMediaLdc context, and returns a pointer to that context. Ownership of this context is passed to the caller. When no longer in use, the caller must destroy the context using the NvMediaLdcDestroy() function.

    Default attributes (when not specified by caller):

    • maxParameters: 1
    • maxRegisteredBuffers: 16
    • maxRegisteredSyncs: 16
    • flags: 0.
    Parameters
    [out]handlePointer to receive the handle to the new NvMediaLdc context.
    [in]attrPointer to NvMediaLdcAttributes struct, or NULL for default attributes.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKContext created successfully.
    NVMEDIA_STATUS_BAD_PARAMETERhandle is NULL, or attr has bad attribute values.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_NOT_SUPPORTEDNvMedia LDC is not supported on this hardware platform.
    NVMEDIA_STATUS_OUT_OF_MEMORYMemory allocation failed for internal data structures or device memory buffers.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to create the context.
    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    See also
    NvMediaLdc
    NvMediaLdcDestroy()

    ◆ NvMediaLdcCreateParameters()

    NvMediaStatus NvMediaLdcCreateParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParametersAttributes const *const  attr,
    NvMediaLdcParameters *const  params 
    )

    Creates and returns an NvMediaLdcParameters instance.

    This functions returns a handle to an NvMediaLdcParameters object. The object will be initialised and ready to use. The attributes attr define resources preallocated per parameters instance. The parameters instance must be destroyed with NvMediaLdcDestroyParameters() during the De-Init stage.

    The object will be initialised with these default values:

    • source rectangle: set to the dimensions of the source surface
    • destination rectangle: set to the dimensions of the destination surface
    • filter: NVMEDIA_LDC_FILTER_OFF
    • Temporal Noise Reduction: Disabled
    • Inverse Perspective Transform: Disabled
    • Warp Map mode: Disabled
    • Mask Map: Disabled
    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]attrPointer to NvMediaLdcParametersAttributes. The pointer can be NULL, in which case TNR, Warp Map, and Mask Map mode will be disabled, and no memory resources will be pre-allocated.
    [out]paramsPointer to an NvMediaLdcParameters, which will be populated with the handle.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters are created successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value, either:
    • handle is NULL
    • attr has bad attribute values
    • params is NULL.
    NVMEDIA_STATUS_INSUFFICIENT_BUFFERINGMaximum number of parameters objects has been created.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_OUT_OF_MEMORYFailed to allocate memory for the parameters.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to create the parameters object.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    See also
    NvMediaLdcParameters
    NvMediaLdcParametersAttributes
    NvMediaLdcDestroyParameters()
    NvMediaLdcProcess()

    ◆ NvMediaLdcDestroy()

    NvMediaStatus NvMediaLdcDestroy ( NvMediaLdc *const  handle)

    Destroys the NvMediaLdc context.

    This function destroys the specified NvMediaLdc context.

    Before calling this function, the caller must ensure:

    • There are no NvSciSync or NvSyncBuf objects still registered against the NvMediaLdc context.
    • All previous LDC operations submitted using NvMediaLdcProcess() have completed.
    Parameters
    [in]handlePointer to the NvMediaLdc context.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKContext destroyed successfully.
    NVMEDIA_STATUS_BAD_PARAMETERhandle is NULL.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_PENDINGThere are still some NvSciSync or NvSciBuf objects registered against the NvMediaLdc context.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to destroy the context. The context is in state where the only valid operation is to attempt to destroy it again.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: Yes
    See also
    NvMediaLdc
    NvMediaLdcCreate()

    ◆ NvMediaLdcDestroyParameters()

    NvMediaStatus NvMediaLdcDestroyParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params 
    )

    Destroys an NvMediaLdcParameters instance.

    This functions destroys an NvMediaLdcParameters object.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [out]paramsAn NvMediaLdcParameters handle.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters are destroyed successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value, either:
    • handle is NULL
    • params is invalid.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_PENDINGThe parameters object is still being used by a pending operation. The object is in state where the only valid operation is to attempt to destroy it again.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to destroy the parameters object. The object is in state where the only valid operation is to attempt to destroy it again.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: Yes
    See also
    NvMediaLdcParameters
    NvMediaLdcCreateParameters()

    ◆ NvMediaLdcGetChecksum()

    NvMediaStatus NvMediaLdcGetChecksum ( NvMediaLdc *const  handle,
    NvMediaLdcResult const *const  result,
    NvMediaLdcChecksum *const  checksum 
    )

    Gets a checksum calculated for an NvMediaLdcProcess() operation.

    This function gets a checksum calculated for an NvMediaLdcProcess() operation. The operation must have had checksum calculation configured with NvMediaLdcSetChecksumMode().

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]resultPointer to the NvMediaLdcResult object of the operation.
    [out]checksumPointer to an NvMediaLdcChecksum object that will be populated with the checksum.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKChecksum returned successfully in checksum.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • result is NULL
    • result indicates no operation was submitted
    • No checksum was found for operation represented by result
    • checksum is NULL.
    NVMEDIA_STATUS_NOT_SUPPORTEDChecksums are not supported on current platform.
    NVMEDIA_STATUS_PENDINGThe operation is still pending.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to read the checksum.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcChecksum
    NvMediaLdcSetChecksumMode()

    ◆ NvMediaLdcGetVersion()

    NvMediaStatus NvMediaLdcGetVersion ( NvMediaVersion *const  version)

    Returns the version number of the NvMedia LDC library.

    This function returns the major, minor, and patch version number of the NvMedia LDC library. The client must pass an NvMediaVersion struct to this function, and the version information will be returned in this struct.

    This allows the client to verify that the version of the library matches and is compatible with the the version number of the header file they are using.

    Parameters
    [out]versionPointer to an NvMediaVersion struct that will be populated with the version information.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKVersion information returned successfully.
    NVMEDIA_STATUS_BAD_PARAMETERversion is NULL.
    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes
    See also
    NVMEDIA_LDC_VERSION_MAJOR
    NVMEDIA_LDC_VERSION_MINOR
    NVMEDIA_LDC_VERSION_PATCH
    NvMediaVersion

    ◆ NvMediaLdcProcess()

    NvMediaStatus NvMediaLdcProcess ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcResult *const  result 
    )

    Performs LDC operation.

    LDC performs transformations depending on the parameters set:

    1. LDC performs a geometric transformation if NvMediaLdcSetIptParameters() was called with proper IPT parameters or if NvMediaLdcSetWarpMapParameters() was called with proper Warp Map parameters. It fetches the pixels in the source image and renders onto the destination rectangle of the destination image. The source image and the destination image must have the same format. LDC bypasses the transform stage if no IPT or Warp Map parameters are set.

      The region of interest in the destination image is defined by:

    2. LDC outputs xSobel if #setXSobelDstSurface() was called prior. The xSobel image must have the same bit-depth as the source image.
    3. LDC outputs 4x4 downsampled xSobel output if NvMediaLdcSetDownsampledXSobelDstSurface() was called prior. The downsampled image must have the same bit depth as the source image.

      In order to produce xSobel output, xSobel surface must be explicitly set prior to every NvMediaLdcProcess() call, just like all other surfaces. If xSobel surface is not explicitly set between NvMediaLdcProcess() calls, the xSobel output will be disabled. The same applies to downsampled xSobel.

    4. LDC performs Temporal Noise Reduction is NvMediaLdcSetTnrParameters() was called with proper TNR parameters.

    Restrictions on dimensions for source and destination images:

    • Width must be even and within the range: [64, 16384]
    • Height must be even and within the range: [16, 16384]

    Restrictions on the source rectangle:

    • Must be within the bounds of the source image.
    • Width and height must be greater than zero.
    • All corners must be aligned to a a multiple of 2.

    Restrictions on the destination rectangle:

    • Top-left corner must be (0, 0).
    • Must be within the bounds of the destination image.
    • Width must be at least 64 and height at least 16.
    • All corners must be aligned to a a multiple of 2.

    Restrictions on concurrency:

    • There can be a maximum of 16 operations submitted through the same NvMediaLdc handle pending simultaneously.

    If any of the restrictions are violated, this function will fail with an error code.

    Performance considerations:

    • Using block linear memory layout for surfaces generally provides better performance than pitch linear layout.
    • Using (semi-)planar YUV formats generally provides better performance than interleaved (Y8U8Y8V8 etc.) formats.
    • The hardware accelerator utilized by NvMedia LDC accesses the surfaces in 64x16 (width x height) pixel tiles. Using surface sizes and rectangle dimensions that are exact multiples of the tile size most optimally aligns with this hardware access pattern.
    • In IPT and warp map mode, using control point log2 interval of at least 2 provides the best performance.
    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [out]resultPointer to NvMediaLdcResult struct that will be populated with result info. May be NULL.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKOperation submitted successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • some of the parameters configured through params have invalid values (see restrictions on parameters).
    NVMEDIA_STATUS_NOT_SUPPORTEDRequested operation is not supported by current platform or some of the parameters combinations are not supported by the current implementation (see restrictions on parameters).
    NVMEDIA_STATUS_TIMED_OUTNo space available in the command buffer for this operation, because previous operations are still pending (see restrictions on concurrency). The caller should wait for the least recently submitted operation to complete and then try again.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to perform the LDC operation. This error indicates the system is potentially in an unrecoverable state.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcParameters
    NvMediaLdcCreateParameters()
    NvMediaLdcSetFilter()
    NvMediaLdcSetGeometry()
    NvMediaLdcSetIptParameters()
    NvMediaLdcSetMaskMapParameters()
    NvMediaLdcSetTnrParameters()
    NvMediaLdcSetWarpMapParameters()
    NvMediaLdcInsertPreNvSciSyncFence()
    NvMediaLdcSetNvSciSyncObjforEOF()
    NvMediaLdcGetEOFNvSciSyncFence()
    NvMediaLdcSetSrcSurface()
    NvMediaLdcSetDstSurface()
    NvMediaLdcSetPreviousSurface()
    NvMediaLdcSetXSobelDstSurface()
    NvMediaLdcSetDownsampledXSobelDstSurface()

    ◆ NvMediaLdcResetTnr()

    NvMediaStatus NvMediaLdcResetTnr ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params 
    )

    Resets TNR algorithm state.

    This function resets NvMedia LDC internal TNR algorithm state. After a successful call to this function, the next frame submitted for TNR processing with NvMediaLdcProcess() will be treated by the algorithm as the first one and no previous surface needs to be set for it with NvMediaLdcSetPreviousSurface().

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKState reset successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvMediaLdcSetChecksumMode()

    NvMediaStatus NvMediaLdcSetChecksumMode ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcChecksumMode const  checksumMode 
    )

    Sets checksum calculation mode.

    This function configures the checksums to calculate for the NvMediaLdcProcess() operations performed using params.

    NvMedia LDC maintains the checksums from 16 most recent NvMediaLdcProcess() operations that had the checksum calculation configured using this function. When more operations are performed, the oldest checksums are overwritten. The client must ensure the checksums are read with NvMediaLdcGetChecksum() before they are overwritten by subsequent operations.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]checksumModeThe checksum to calculate.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • checksumMode is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcChecksumMode
    NvMediaLdcGetChecksum()

    ◆ NvMediaLdcSetFilter()

    NvMediaStatus NvMediaLdcSetFilter ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcFilter const  filter 
    )

    Sets the filter mode to use for LDC pixel interpolation.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]filterAn NvMediaLdcFilter to use when reading the the layer's source surface.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • filter value is invalid
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcFilter
    NvMediaLdcParameters
    NvMediaLdcProcess()

    ◆ NvMediaLdcSetGeometry()

    NvMediaStatus NvMediaLdcSetGeometry ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaRect const *const  srcRect,
    NvMediaRect const *const  dstRect 
    )

    Sets source and destination rectangles for LDC operation.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]srcRectPointer to an NvMediaRect that contains the source rectangle, or NULL for default rectangle.
    [in]dstRectPointer to an NvMediaRect that contains the destination rectangle, or NULL for default rectangle.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcParameters
    NvMediaLdcSetTnrParameters()
    NvMediaLdcProcess()

    ◆ NvMediaLdcSetIptParameters()

    NvMediaStatus NvMediaLdcSetIptParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcIptParameters const *const  iptParams 
    )

    Sets parameters for LDC Inverse Perspective Transform (IPT) operation.

    This enables VIC geotrans processing in IPT mode. To disable IPT mode iptParams must be set to NULL.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]iptParamsPointer to NvMediaLdcIptParameters.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • iptParams is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcIptParameters
    NvMediaLdcParameters
    NvMediaLdcProcess()

    ◆ NvMediaLdcSetMaskMapParameters()

    NvMediaStatus NvMediaLdcSetMaskMapParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcMaskMapParameters const *const  maskMapParams 
    )

    Sets parameters for LDC Mask Map.

    This enables VIC Mask Map feature. This feature can be used only if IPT or Warp Map mode is enabled. The map data accessed through maskMapParams is copied to NvMediaLdc internal data structures.

    To disable the feature maskMapParams must be set to NULL.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]maskMapParamsPointer to NvMediaLdcMaskMapParameters.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • maskMapParams is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcMaskMapParameters
    NvMediaLdcParameters
    NvMediaLdcProcess()

    ◆ NvMediaLdcSetTnrParameters()

    NvMediaStatus NvMediaLdcSetTnrParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcTnrParameters const *const  tnrParams 
    )

    Sets Temporal Noise Reduction (TNR) parameters.

    This enables VIC TNR3 processing. To disable TNR3 tnrParams must set to NULL.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]tnrParamsPointer to NvMediaLdcTnrParameters.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • tnrParams is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcTnrParameters
    NvMediaLdcParameters
    NvMediaLdcProcess()

    ◆ NvMediaLdcSetWarpMapParameters()

    NvMediaStatus NvMediaLdcSetWarpMapParameters ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvMediaLdcWarpMapParameters const *const  warpMapParams 
    )

    Sets parameters for LDC Warp Map.

    This enables VIC geotrans processing in Warp Map mode. The map data accessed through warpMapParams is copied to NvMediaLdc internal data structures.

    To disable Warp Map mode warpMapParams must be set to NULL.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]warpMapParamsPointer to NvMediaLdcWarpMapParameters.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKParameters set successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • warpMapParams is invalid.
    Precondition


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different NvMediaLdc handle
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcWarpMapParameters
    NvMediaLdcParameters
    NvMediaLdcProcess()
    人人超碰97caoporen国产