• <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
    LDC Surface and Synchronization

    Detailed Description

    The NvMedia LDC NvSci API encompasses all NvMedia LDC handling for NvSciBuf NvSciSync related functions.

    6

    Functions

    NvMediaStatus NvMediaLdcFillNvSciBufAttrList (NvMediaLdc *const handle, NvSciBufAttrList const attrList)
     Fills the NvMedia LDC specific NvSciBuf attributes. More...
     
    NvMediaStatus NvMediaLdcFillNvSciSyncAttrList (NvMediaLdc *const handle, NvSciSyncAttrList const attrList, NvMediaNvSciSyncClientType const clientType)
     Fills the NvMedia LDC specific NvSciSync attributes. More...
     
    NvMediaStatus NvMediaLdcRegisterNvSciBufObj (NvMediaLdc *const handle, NvSciBufObj const bufObj)
     Register an NvSciBufObj with NvMedia LDC. More...
     
    NvMediaStatus NvMediaLdcRegisterNvSciSyncObj (NvMediaLdc *const handle, NvMediaNvSciSyncObjType const syncObjType, NvSciSyncObj const syncObj)
     Register an NvSciSyncObj with NvMedia LDC. More...
     
    NvMediaStatus NvMediaLdcUnregisterNvSciBufObj (NvMediaLdc *const handle, NvSciBufObj const bufObj)
     Unregisters an NvSciBufObj with NvMediaLdc. More...
     
    NvMediaStatus NvMediaLdcUnregisterNvSciSyncObj (NvMediaLdc *const handle, NvSciSyncObj const syncObj)
     Unregisters an NvSciSyncObj with NvMediaLdc. More...
     
    NvMediaStatus NvMediaLdcSetNvSciSyncObjforEOF (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciSyncObj const syncObj)
     Specifies the NvSciSyncObj to be used for EOF event. More...
     
    NvMediaStatus NvMediaLdcInsertPreNvSciSyncFence (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciSyncFence const *const syncFence)
     Insert an NvSciSyncFence as a pre-fence. More...
     
    NvMediaStatus NvMediaLdcGetEOFNvSciSyncFence (NvMediaLdc *const handle, NvMediaLdcResult const *const result, NvSciSyncFence *const syncFence)
     Gets an EOF NvSciSyncFence for an NvMediaLdcProcess() operation. More...
     
    NvMediaStatus NvMediaLdcSetSrcSurface (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciBufObj const surface)
     Sets the source surface. More...
     
    NvMediaStatus NvMediaLdcSetDstSurface (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciBufObj const surface)
     Sets the destination surface. More...
     
    NvMediaStatus NvMediaLdcSetPreviousSurface (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciBufObj const surface)
     Sets the previous surface for TNR operation. More...
     
    NvMediaStatus NvMediaLdcSetXSobelDstSurface (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciBufObj const surface)
     Sets the surface for xSobel output. More...
     
    NvMediaStatus NvMediaLdcSetDownsampledXSobelDstSurface (NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciBufObj const surface)
     Sets the surface for 4x4 downsampled xSobel output. More...
     

    Function Documentation

    ◆ NvMediaLdcFillNvSciBufAttrList()

    NvMediaStatus NvMediaLdcFillNvSciBufAttrList ( NvMediaLdc *const  handle,
    NvSciBufAttrList const  attrList 
    )

    Fills the NvMedia LDC specific NvSciBuf attributes.

    This function updates the input NvSciBufAttrList with values equivalent to the following public attribute key-values:

    NvSciBufGeneralAttrKey_PeerHwEngineArray set to

    • engName: NvSciBufHwEngName_Vic
    • platName: the platform this API is used on
    Parameters
    [in]handleNot used. Can be NULL.
    [out]attrListPointer to an NvSciBufAttrList struct that will be populated with the NvSciBuf attributes.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKAttributes filled successfully.
    NVMEDIA_STATUS_BAD_PARAMETERThe attributes have already been filled, or attrList is invalid.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to populate the attribute list.
    Precondition
    • attrList must be valid NvSciBufAttrList handle.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvMediaLdcFillNvSciSyncAttrList()

    NvMediaStatus NvMediaLdcFillNvSciSyncAttrList ( NvMediaLdc *const  handle,
    NvSciSyncAttrList const  attrList,
    NvMediaNvSciSyncClientType const  clientType 
    )

    Fills the NvMedia LDC specific NvSciSync attributes.

    This function updates the input NvSciSyncAttrList with values equivalent to the following public attribute key-values:

    NvSciSyncAttrKey_RequiredPerm set to

    • NvSciSyncAccessPerm_WaitOnly for clientType NVMEDIA_WAITER
    • NvSciSyncAccessPerm_SignalOnly for clientType NVMEDIA_SIGNALER
    • NvSciSyncAccessPerm_WaitSignal for clientType NVMEDIA_SIGNALER_WAITER

    NvSciSyncAttrKey_PrimitiveInfo set to

    • NvSciSyncAttrValPrimitiveType_Syncpoint

    The application must not set these attributes for the same NvSciSyncAttrList that is passed to this function.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [out]attrListPointer to an NvSciSyncAttrList struct that will be populated with the NvSciSync attributes.
    [in]clientTypeAn NvMediaNvSciSyncClientType, to indicate whether the attributes filled should be for a waiter or a signaler. The value should be either:
    • NVMEDIA_WAITER
    • NVMEDIA_SIGNALER
    • NVMEDIA_SIGNALER_WAITER.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKAttributes filled successfully.
    NVMEDIA_STATUS_BAD_PARAMETERThe attributes have already been filled, or one of the parameters has an invalid value. This could be:
    • handle is NULL
    • attrList is invalid
    • clientType is invalid.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to populate the attribute list.
    Precondition
    • handle must be valid NvMediaLdc handle created with NvMediaLdcCreate().
    • attrList must be valid NvSciSyncAttrList handle.


    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

    ◆ NvMediaLdcGetEOFNvSciSyncFence()

    NvMediaStatus NvMediaLdcGetEOFNvSciSyncFence ( NvMediaLdc *const  handle,
    NvMediaLdcResult const *const  result,
    NvSciSyncFence *const  syncFence 
    )

    Gets an EOF NvSciSyncFence for an NvMediaLdcProcess() operation.

    The expiry of an EOF NvSciSyncFence associated with an NvMediaLdcProcess() operation indicates that the corresponding NvMediaLdcProcess() operation has finished.

    To be able to get the EOF fence using this function, the NvSciSyncObj to be used for EOF event needs to have been set for the NvMediaLdcParameters handle used with the NvMediaLdcProcess() operation with NvMediaLdcSetNvSciSyncObjforEOF().

    For example, in this sequence of code:

    NvMediaLdcSetNvSciSyncObjforEOF(handle, params, eofSyncObj);
    NvMediaLdcProcess(handle, params, &result);
    NvMediaLdcGetEOFNvSciSyncFence(handle, &result, &syncFence);

    expiry of syncFence indicates that the preceding NvMediaLdcProcess() operation has finished.

    For a given NvSciSyncObj used for the EOF event, the EOF fence for an NvMediaLdcProcess() operation can be queried using this function only until the next operation using the same NvSciSyncObj for the EOF event is submitted. When more operations are submitted, the NvMediaLdcResult structs for the previous operations are no longer considered valid by this function.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]resultPointer to the NvMediaLdcResult struct.
    [out]syncFencePointer to an NvSciSyncFence that will be populated with the EOF fence.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKEOF fence returned successfully.
    NVMEDIA_STATUS_BAD_PARAMETERNo NvSciSyncObj was set for the operation EOF event, or one of the parameters has an invalid value. This could be:
    • handle is NULL
    • result is NULL or invalid
    • syncFence is NULL.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to get the fence 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: No
      • Runtime: Yes
      • De-Init: No
    See also
    NvMediaLdcRegisterNvSciSyncObj()
    NvMediaLdcSetNvSciSyncObjforEOF()

    ◆ NvMediaLdcInsertPreNvSciSyncFence()

    NvMediaStatus NvMediaLdcInsertPreNvSciSyncFence ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciSyncFence const *const  syncFence 
    )

    Insert an NvSciSyncFence as a pre-fence.

    This function inserts the specified NvSciSyncFence as a pre-fence to the LDC operation. The NvMediaLdcProcess() operation is started only after the expiry of the syncFence. The pre-fences need to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    For example, in this sequence of code:

    NvMediaLdcInsertPreNvSciSyncFence(handle, params, syncFence);
    NvMediaLdcProcess(handle, params, NULL);

    the NvMediaLdcProcess() operation is assured to start only after the expiry of syncFence.

    You can set a maximum of 16 prefences by calling NvMediaLdcInsertPreNvSciSyncFence().

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]syncFencePointer to an NvSciSyncFence.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKPre-fence inserted successfully.
    NVMEDIA_STATUS_BAD_PARAMETERThe sync object is not registered as an PRESYNC type with NvMedia LDC, or one of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • syncFence is NULL.
    NVMEDIA_STATUS_INSUFFICIENT_BUFFERINGMaximum number of registered pre-fences has been reached.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to insert the pre-fence.
    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
    NvMediaLdcRegisterNvSciSyncObj()

    ◆ NvMediaLdcRegisterNvSciBufObj()

    NvMediaStatus NvMediaLdcRegisterNvSciBufObj ( NvMediaLdc *const  handle,
    NvSciBufObj const  bufObj 
    )

    Register an NvSciBufObj with NvMedia LDC.

    Every NvSciBufObj (even duplicate objects) used by NvMedia LDC must be registered by a call to this function before it is used. Only the exact same registered NvSciBufObj can be passed to NvMediaLdcSetSrcSurface(), NvMediaLdcSetDstSurface(), NvMediaLdcSetPreviousSurface(), NvMediaLdcSetXSobelDstSurface(), and NvMediaLdcSetDownsampledXSobelDstSurface() functions.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]bufObjThe NvSciBufObj to be registered.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKBuffer registered successfully.
    NVMEDIA_STATUS_BAD_PARAMETERReturned when:
    • handle is NULL
    • bufObj is invalid
    • bufObj has already been registered
    • duplicate of bufObj was previously registered with more strict read-only permissions.
    NVMEDIA_STATUS_INSUFFICIENT_BUFFERINGMaximum number of registered buffers has been reached.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to register the buffer.
    Precondition
    • handle must be valid NvMediaLdc handle created with NvMediaLdcCreate().
    • bufObj must be valid NvSciBufObj handle.


    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
    NvMediaLdcUnregisterNvSciBufObj()

    ◆ NvMediaLdcRegisterNvSciSyncObj()

    NvMediaStatus NvMediaLdcRegisterNvSciSyncObj ( NvMediaLdc *const  handle,
    NvMediaNvSciSyncObjType const  syncObjType,
    NvSciSyncObj const  syncObj 
    )

    Register an NvSciSyncObj with NvMedia LDC.

    Every NvSciSyncObj (even duplicate objects) used by NvMedia LDC must be registered by a call to this function before it is used.

    Only the exact same registered NvSciSyncObj can be passed to NvMediaLdcSetNvSciSyncObjforEOF() or NvMediaLdcUnregisterNvSciSyncObj(). Also the NvSciSyncObjs associated with any NvSciSyncFences passed to NvMediaLdcInsertPreNvSciSyncFence() must be registered.

    For a given NvMediaLdc handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]syncObjTypeAn NvMediaNvSciSyncClientType, to indicate what event the sync object will represent.
    [in]syncObjThe NvSciSyncObj to be registered.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKSync object registered successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • syncObjType is invalid
    • syncObj is invalid, or the sync object has been already registered.
    NVMEDIA_STATUS_INSUFFICIENT_BUFFERINGMaximum number of registered sync objects has been reached.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to register the sync object.
    Precondition
    • handle must be valid NvMediaLdc handle created with NvMediaLdcCreate().
    • syncObj must be valid NvSciSyncObj handle.


    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
    NvMediaLdcUnregisterNvSciSyncObj()
    NvMediaLdcAttributes.maxRegisteredSyncs

    ◆ NvMediaLdcSetDownsampledXSobelDstSurface()

    NvMediaStatus NvMediaLdcSetDownsampledXSobelDstSurface ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciBufObj const  surface 
    )

    Sets the surface for 4x4 downsampled xSobel output.

    The surface must be a single-plane surface with format compatible with the first plane of the source surface. The surface dimensions must equal the destination rectangle dimensions rounded up to the nearest multiple of 4, and then divided by 4. For example, if the destination rectangle is 640x478 pixels, the 4x4 downsampled xSobel surface must be 160x120 pixels.

    The 4x4 downsampled xSobel output can only be used if also full-size xSobel output has been enabled with NvMediaLdcSetXSobelDstSurface().

    The xSobel output can only be used if warp map processing has been enabled with NvMediaLdcSetWarpMapParameters() or IPT processing has been enabled with NvMediaLdcSetIptParameters(), and TNR processing has NOT been enabled with NvMediaLdcSetTnrParameters().

    The surface needs to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]surfaceThe NvSciBufObj to be used for the destination downsampled xSobel 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
    • surface is invalid, or the surface was not registered.
    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
    NvMediaLdcProcess()
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcSetDstSurface()

    NvMediaStatus NvMediaLdcSetDstSurface ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciBufObj const  surface 
    )

    Sets the destination surface.

    The surface needs to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]surfaceThe NvSciBufObj to be used for the destination 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
    • surface is invalid, or the surface was not registered.
    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
    NvMediaLdcProcess()
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcSetNvSciSyncObjforEOF()

    NvMediaStatus NvMediaLdcSetNvSciSyncObjforEOF ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciSyncObj const  syncObj 
    )

    Specifies the NvSciSyncObj to be used for EOF event.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]syncObjThe NvSciSyncObj to be used for the EOF fence.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKEOF fence set successfully.
    NVMEDIA_STATUS_BAD_PARAMETERThe sync object is not registered as an EOF event type with NvMedia LDC, or one of the parameters has an invalid value. This could be:
    • handle is NULL
    • params is invalid
    • syncObj 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
    NvMediaLdcRegisterNvSciSyncObj()

    ◆ NvMediaLdcSetPreviousSurface()

    NvMediaStatus NvMediaLdcSetPreviousSurface ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciBufObj const  surface 
    )

    Sets the previous surface for TNR operation.

    The previous surface is the surface used as the destination surface with the previous NvMediaLdcProcess() call.

    The surface needs to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]surfaceThe NvSciBufObj to be used as a previous 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
    • surface is invalid, or the surface was not registered.
    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
    NvMediaLdcProcess()
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcSetSrcSurface()

    NvMediaStatus NvMediaLdcSetSrcSurface ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciBufObj const  surface 
    )

    Sets the source surface.

    The surface needs to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]surfaceThe NvSciBufObj to be used for the 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
    • surface is invalid, or the surface was not registered.
    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
    NvMediaLdcProcess()
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcSetXSobelDstSurface()

    NvMediaStatus NvMediaLdcSetXSobelDstSurface ( NvMediaLdc *const  handle,
    NvMediaLdcParameters const  params,
    NvSciBufObj const  surface 
    )

    Sets the surface for xSobel output.

    The surface must be a single-plane surface with format compatible with the first plane of the source surface. The surface dimensions must equal the destination rectangle dimensions.

    The xSobel output can only be used if warp map processing has been enabled with NvMediaLdcSetWarpMapParameters() or IPT processing has been enabled with NvMediaLdcSetIptParameters(), and TNR processing has NOT been enabled with NvMediaLdcSetTnrParameters().

    The surface needs to be set separately for each NvMediaLdcProcess() call, even if the same NvMediaLdcParameters handle is used.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]paramsAn NvMediaLdcParameters handle.
    [in]surfaceThe NvSciBufObj to be used for the destination xSobel 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
    • surface is invalid, or the surface was not registered.
    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
    NvMediaLdcProcess()
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcUnregisterNvSciBufObj()

    NvMediaStatus NvMediaLdcUnregisterNvSciBufObj ( NvMediaLdc *const  handle,
    NvSciBufObj const  bufObj 
    )

    Unregisters an NvSciBufObj with NvMediaLdc.

    Every NvSciBufObj registered with NvMediaLdc by NvMediaLdcRegisterNvSciBufObj() must be unregistered before you call NvMediaLdcDestroy().

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]bufObjThe NvSciBufObj to be unregistered.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKBuffer unregistered successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • bufObj is invalid, or the buffer was not registered.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_PENDINGThe buffer is still being used by a pending operation.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to unregister the buffer.
    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
    NvMediaLdcRegisterNvSciBufObj()

    ◆ NvMediaLdcUnregisterNvSciSyncObj()

    NvMediaStatus NvMediaLdcUnregisterNvSciSyncObj ( NvMediaLdc *const  handle,
    NvSciSyncObj const  syncObj 
    )

    Unregisters an NvSciSyncObj with NvMediaLdc.

    Every NvSciSyncObj registered with NvMediaLdc by NvMediaLdcRegisterNvSciSyncObj() must be unregistered before you call NvMediaLdcDestroy().

    Before the application calls this function, it must ensure that any NvMediaLdcProcess() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMediaLdcProcess() operation, behavior is undefined.

    Parameters
    [in]handlePointer to the NvMediaLdc context.
    [in]syncObjThe NvSciSyncObj to be unregistered.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKSync object unregistered successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
    • handle is NULL
    • syncObj is invalid, or the sync object was not registered.
    NVMEDIA_STATUS_INVALID_STATEThe function was called in incorrect system state.
    NVMEDIA_STATUS_PENDINGThe sync object is still being used by a pending operation.
    NVMEDIA_STATUS_ERRORAn internal failure occurred when trying to unregister the sync 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: Yes
    See also
    NvMediaLdcRegisterNvSciSyncObj()
    NvMediaLdcGetEOFNvSciSyncFence
    NvMediaStatus NvMediaLdcGetEOFNvSciSyncFence(NvMediaLdc *const handle, NvMediaLdcResult const *const result, NvSciSyncFence *const syncFence)
    Gets an EOF NvSciSyncFence for an NvMediaLdcProcess() operation.
    NvMediaLdcProcess
    NvMediaStatus NvMediaLdcProcess(NvMediaLdc *const handle, NvMediaLdcParameters const params, NvMediaLdcResult *const result)
    Performs LDC operation.
    NvMediaLdcInsertPreNvSciSyncFence
    NvMediaStatus NvMediaLdcInsertPreNvSciSyncFence(NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciSyncFence const *const syncFence)
    Insert an NvSciSyncFence as a pre-fence.
    NvMediaLdcSetNvSciSyncObjforEOF
    NvMediaStatus NvMediaLdcSetNvSciSyncObjforEOF(NvMediaLdc *const handle, NvMediaLdcParameters const params, NvSciSyncObj const syncObj)
    Specifies the NvSciSyncObj to be used for EOF event.
    人人超碰97caoporen国产