NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only
nvmedia_iofst.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
14 #ifndef NVMEDIA_IOFST_H
15 #define NVMEDIA_IOFST_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <stdint.h>
22 #include "nvmedia_image.h"
24 #include "nvmedia_core.h"
25 #include "nvmedia_surface.h"
26 
37 #define NVMEDIA_IOFST_VERSION_MAJOR 1
38 
39 #define NVMEDIA_IOFST_VERSION_MINOR 14
40 
44 typedef enum {
58 
62 typedef enum {
66 
70 typedef struct {
80  struct NvMediaIOFSTPriv_ *ofstPriv;
81 } NvMediaIOFST;
82 
86 typedef struct {
88  uint16_t width;
90  uint16_t height;
93  uint32_t features;
95 
100 typedef struct {
110 
119 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
122  NvMediaVersion *version
123 );
124 
183 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
184 NvMediaIOFST *
186  const NvMediaDevice *device,
187  NvMediaIOFSTType estimationType,
188  NvMediaSurfaceType inputFormat,
189  NvMediaSurfaceType outputFormat,
190  const NvMediaOFSTInitializeParams *initParams,
191  uint8_t maxInputBuffering,
192  NvMediaEncoderInstanceId instanceId
193 );
194 
201 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
202 void NvMediaIOFSTDestroy(const NvMediaIOFST *ofst);
203 
253 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
256  const NvMediaIOFST *ofst,
257  const NvMediaImage *frame,
258  const NvMediaImage *refFrame,
259  const NvMediaImage *mvs,
260  const NvMediaOFSTExternalHintParams *extHintParams,
261  NvMediaEncoderInstanceId instanceId
262 );
263 
292 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
295  const NvMediaIOFST *ofst,
296  const NvMediaImage *image,
297  NvMediaAccessMode accessMode
298 );
299 
331 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
334  const NvMediaIOFST *ofst,
335  const NvMediaImage *image
336 );
337 
338 /*
339  * \defgroup history_nvmedia_iofst History
340  * Provides change history for the NvMedia IOFST API.
341  *
342  * \section history_nvmedia_iofst Version History
343  *
344  * <b> Version 1.0 </b> April 22, 2017
345  * - Initial release
346  *
347  * <b> Version 1.1 </b> June 08, 2017
348  * - Added enableSegmentMap parameter to \ref NvMediaOFSTInitializeParams
349  * - Added enableSegmentMap parameter to \ref NvMediaOFSTExternalHintParams
350  *
351  * <b> Version 1.2 </b/> June 13, 2017
352  * - Added instance ID parameter to \ref NvMediaIOFSTCreate()
353  * - Added instance ID parameter to \ref NvMediaIOFSTProcessFrame()
354  * - Added instanceId to \ref NvMediaIOFST object
355  *
356  * <b> Version 1.3 </b/> June 19, 2017
357  * - Added NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE and
358  * NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE and
359  * NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
360  * parameters \ref NvMediaIOFSTType enum
361  *
362  * <b> Version 1.4 </b/> June 19, 2018
363  * - Added features parameter to \ref NvMediaOFSTInitializeParams
364  *
365  * <b> Version 1.5 </b/> Dec 14, 2018
366  * - Fix MISRA violations 21.1 and 21.2
367  *
368  * <b> Version 1.6 </b> January 15, 2019
369  * - Fix MISRA violations 8.13
370  *
371  * <b> Version 1.7 </b> Feb 7, 2019
372  * - Added opaque handle for ofst
373  * internal usage into OFST object
374  * - Fix MISRA violations 11.3
375  * - Fix MISRA violations 8.13
376  *
377  * <b> Version 1.8 </b> February 28, 2019
378  * - Added required header includes nvmedia_core.h and nvmedia_surface.h
379  *
380  * <b> Version 1.9 </b> March 14, 2019
381  * - Removed ExternalHints related parameters from
382  * \ref NvMediaOFSTInitializeParams
383  * - Updated meExternalHints pointer type in
384  * \ref NvMediaOFSTExternalHintParams
385  *
386  * <b> Version 1.10 </b> April 03, 2019
387  * - Added \ref NvMediaIOFSTGetVersion API
388  *
389  * <b> Version 1.11 </b> July 10, 2019
390  * - Header include nvmedia_common.h is replaced with nvmedia_common_encode_ofst.h
391  *
392  * <b> Version 1.12 </b> July 16, 2019
393  * - Added \ref NvMediaIOFSTImageRegister API
394  * - Added \ref NvMediaIOFSTImageUnRegister API
395  *
396  * <b> Version 1.13 </b> July 17, 2019
397  * - Removed nvmedia_array dependency
398  *
399  * <b> Version 1.14 </b> October 5, 2019
400  * - Fix MISRA violations 8.13
401  * - Added Coverity Code annotations to suppress partial 8.7 violations
402  */
403 
406 #ifdef __cplusplus
407 }; /* extern "C" */
408 #endif
409 
410 #endif /* NVMEDIA_IOFST_H */
NvMediaIOFST::estimationType
NvMediaIOFSTType estimationType
Motion estimation type.
Definition: nvmedia_iofst.h:72
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
NvMediaOFSTInitializeParams::height
uint16_t height
OFST height.
Definition: nvmedia_iofst.h:90
NvMediaOFSTInitializeParams
Holds OFST estimation initialization parameters.
Definition: nvmedia_iofst.h:86
NvMediaIOFSTImageRegister
NvMediaStatus NvMediaIOFSTImageRegister(const NvMediaIOFST *ofst, const NvMediaImage *image, NvMediaAccessMode accessMode)
Registers NvMediaImage for use with a NvMediaIOFST handle.
NvMediaOFSTExternalHintParams::meExternalHints
void * meExternalHints
Specifies a pointer to ME external hints for the current frame.
Definition: nvmedia_iofst.h:102
NVMEDIA_OFST_CONFIG_ENABLE_PROFILING
@ NVMEDIA_OFST_CONFIG_ENABLE_PROFILING
Enables OFST profiling.
Definition: nvmedia_iofst.h:64
NvMediaIOFSTProcessFrame
NvMediaStatus NvMediaIOFSTProcessFrame(const NvMediaIOFST *ofst, const NvMediaImage *frame, const NvMediaImage *refFrame, const NvMediaImage *mvs, const NvMediaOFSTExternalHintParams *extHintParams, NvMediaEncoderInstanceId instanceId)
Performs OFST estimation on a specified frame pair.
NvMediaDevice
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:348
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HP_MODE
@ NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HP_MODE
High Performance StereoDisparity.
Definition: nvmedia_iofst.h:48
NvMediaImageRec
Holds a handle representing image objects.
Definition: nvmedia_image.h:71
NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HQ_MODE
@ NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HQ_MODE
High Quality StereoDisparity.
Definition: nvmedia_iofst.h:52
NvMediaIOFSTGetVersion
NvMediaStatus NvMediaIOFSTGetVersion(NvMediaVersion *version)
Returns the version information for the NvMedia IOFST library.
NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE
@ NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE
High Quality OpticalFlow.
Definition: nvmedia_iofst.h:50
nvmedia_core.h
NVIDIA Media Interface: Core
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:550
NvMediaOFSTConfigFeatures
NvMediaOFSTConfigFeatures
Defines OFST estimation configuration features.
Definition: nvmedia_iofst.h:62
NvMediaOFSTInitializeParams::features
uint32_t features
Specifies bitwise OR'ed configuration feature flags.
Definition: nvmedia_iofst.h:93
NvMediaOFSTExternalHintParams
Holds OFST estimation parameters.
Definition: nvmedia_iofst.h:100
NvMediaAccessMode
NvMediaAccessMode
Definition: nvmedia_core.h:299
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE
@ NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE
Ultra High Performance OpticalFlow.
Definition: nvmedia_iofst.h:54
NvMediaIOFST::instanceId
NvMediaEncoderInstanceId instanceId
Instance ID.
Definition: nvmedia_iofst.h:78
NvMediaIOFSTDestroy
void NvMediaIOFSTDestroy(const NvMediaIOFST *ofst)
Destroys an NvMediaIOFST object.
NvMediaIOFST::outputFormat
NvMediaSurfaceType outputFormat
Output surface format.
Definition: nvmedia_iofst.h:76
NvMediaIOFST::ofstPriv
struct NvMediaIOFSTPriv_ * ofstPriv
An Opaque pointer for internal use.
Definition: nvmedia_iofst.h:80
NvMediaEncoderInstanceId
NvMediaEncoderInstanceId
Specifies the encoder instance ID.
Definition: nvmedia_common_encode_ofst.h:36
NvMediaIOFST::inputFormat
NvMediaSurfaceType inputFormat
Input surface format.
Definition: nvmedia_iofst.h:74
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
NvMediaIOFSTImageUnRegister
NvMediaStatus NvMediaIOFSTImageUnRegister(const NvMediaIOFST *ofst, const NvMediaImage *image)
Un-registers NvMediaImage which is registered with NvMediaIOFST.
NvMediaIOFST
Holds an OFST object created by NvMediaIOFSTCreate.
Definition: nvmedia_iofst.h:70
NvMediaOFSTInitializeParams::width
uint16_t width
OFST width.
Definition: nvmedia_iofst.h:88
nvmedia_image.h
NVIDIA Media Interface: Image Processing
NvMediaIOFSTCreate
NvMediaIOFST * NvMediaIOFSTCreate(const NvMediaDevice *device, NvMediaIOFSTType estimationType, NvMediaSurfaceType inputFormat, NvMediaSurfaceType outputFormat, const NvMediaOFSTInitializeParams *initParams, uint8_t maxInputBuffering, NvMediaEncoderInstanceId instanceId)
Creates an OFST object that can create motion vectors based on the difference between two frames.
NvMediaOFSTExternalHintParams::enableSegmentMap
NvMediaBool enableSegmentMap
Enables the external segment ID map, as follows: A value of NVMEDIA_TRUE enables it.
Definition: nvmedia_iofst.h:108
NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
@ NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
Ultra High Performance StereoDisparity.
Definition: nvmedia_iofst.h:56
NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE
@ NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE
High Performance OpticalFlow.
Definition: nvmedia_iofst.h:46
nvmedia_common_encode_ofst.h
NVIDIA Media Interface: Common Types for Video/Image Encode and OFST
NvMediaIOFSTType
NvMediaIOFSTType
Defines the image estimation type.
Definition: nvmedia_iofst.h:44