NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 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 
38 #define NVMEDIA_IOFST_VERSION_MAJOR 1
39 
40 #define NVMEDIA_IOFST_VERSION_MINOR 14
41 
45 typedef enum {
77 
81 typedef enum {
86 
90 typedef struct {
100  struct NvMediaIOFSTPriv_ *ofstPriv;
101 } NvMediaIOFST;
102 
106 typedef struct {
112  uint16_t width;
118  uint16_t height;
122  uint32_t features;
124 
133 typedef struct {
147 
163 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
166  NvMediaVersion *version
167 );
168 
240 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
241 NvMediaIOFST *
243  const NvMediaDevice *device,
244  NvMediaIOFSTType estimationType,
245  NvMediaSurfaceType inputFormat,
246  NvMediaSurfaceType outputFormat,
247  const NvMediaOFSTInitializeParams *initParams,
248  uint8_t maxInputBuffering,
249  NvMediaEncoderInstanceId instanceId
250 );
251 
267 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
268 void NvMediaIOFSTDestroy(const NvMediaIOFST *ofst);
269 
362 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
365  const NvMediaIOFST *ofst,
366  const NvMediaImage *frame,
367  const NvMediaImage *refFrame,
368  const NvMediaImage *mvs,
369  const NvMediaOFSTExternalHintParams *extHintParams,
370  NvMediaEncoderInstanceId instanceId
371 );
372 
416 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
419  const NvMediaIOFST *ofst,
420  const NvMediaImage *image,
421  NvMediaAccessMode accessMode
422 );
423 
470 // coverity[misra_c_2012_rule_8_7_violation : FALSE]
473  const NvMediaIOFST *ofst,
474  const NvMediaImage *image
475 );
476 
477 /*
478  * \defgroup history_nvmedia_iofst History
479  * Provides change history for the NvMedia IOFST API.
480  *
481  * \section history_nvmedia_iofst Version History
482  *
483  * <b> Version 1.0 </b> April 22, 2017
484  * - Initial release
485  *
486  * <b> Version 1.1 </b> June 08, 2017
487  * - Added enableSegmentMap parameter to \ref NvMediaOFSTInitializeParams
488  * - Added enableSegmentMap parameter to \ref NvMediaOFSTExternalHintParams
489  *
490  * <b> Version 1.2 </b/> June 13, 2017
491  * - Added instance ID parameter to NvMediaIOFSTCreate()
492  * - Added instance ID parameter to NvMediaIOFSTProcessFrame()
493  * - Added instanceId to \ref NvMediaIOFST object
494  *
495  * <b> Version 1.3 </b/> June 19, 2017
496  * - Added NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE and
497  * NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE and
498  * NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
499  * parameters \ref NvMediaIOFSTType enum
500  *
501  * <b> Version 1.4 </b/> June 19, 2018
502  * - Added features parameter to \ref NvMediaOFSTInitializeParams
503  *
504  * <b> Version 1.5 </b/> Dec 14, 2018
505  * - Fix MISRA violations 21.1 and 21.2
506  *
507  * <b> Version 1.6 </b> January 15, 2019
508  * - Fix MISRA violations 8.13
509  *
510  * <b> Version 1.7 </b> Feb 7, 2019
511  * - Added opaque handle for ofst
512  * internal usage into OFST object
513  * - Fix MISRA violations 11.3
514  * - Fix MISRA violations 8.13
515  *
516  * <b> Version 1.8 </b> February 28, 2019
517  * - Added required header includes nvmedia_core.h and nvmedia_surface.h
518  *
519  * <b> Version 1.9 </b> March 14, 2019
520  * - Removed ExternalHints related parameters from
521  * \ref NvMediaOFSTInitializeParams
522  * - Updated meExternalHints pointer type in
523  * \ref NvMediaOFSTExternalHintParams
524  *
525  * <b> Version 1.10 </b> April 03, 2019
526  * - Added NvMediaIOFSTGetVersion() API
527  *
528  * <b> Version 1.11 </b> July 10, 2019
529  * - Header include nvmedia_common.h is replaced with nvmedia_common_encode_ofst.h
530  *
531  * <b> Version 1.12 </b> July 16, 2019
532  * - Added NvMediaIOFSTImageRegister() API
533  * - Added NvMediaIOFSTImageUnRegister() API
534  *
535  * <b> Version 1.13 </b> July 17, 2019
536  * - Removed nvmedia_array dependency
537  *
538  * <b> Version 1.14 </b> October 5, 2019
539  * - Fix MISRA violations 8.13
540  * - Added Coverity Code annotations to suppress partial 8.7 violations
541  */
542 
545 #ifdef __cplusplus
546 }; /* extern "C" */
547 #endif
548 
549 #endif /* NVMEDIA_IOFST_H */
NvMediaIOFST::estimationType
NvMediaIOFSTType estimationType
Motion estimation type.
Definition: nvmedia_iofst.h:92
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
NvMediaOFSTInitializeParams::height
uint16_t height
Input height Input range: The values between 64 to 4096, in increments of 2.
Definition: nvmedia_iofst.h:118
NvMediaOFSTInitializeParams
Holds OFST estimation initialization parameters.
Definition: nvmedia_iofst.h:106
NvMediaIOFSTImageRegister
NvMediaStatus NvMediaIOFSTImageRegister(const NvMediaIOFST *ofst, const NvMediaImage *image, NvMediaAccessMode accessMode)
Registers an NvMediaImage for use with an NvMediaIOFST handle.
NvMediaOFSTExternalHintParams::meExternalHints
void * meExternalHints
Specifies a pointer to ME external hints for the current frame.
Definition: nvmedia_iofst.h:137
NVMEDIA_OFST_CONFIG_ENABLE_PROFILING
@ NVMEDIA_OFST_CONFIG_ENABLE_PROFILING
Enables OFST profiling.
Definition: nvmedia_iofst.h:84
NvMediaIOFSTProcessFrame
NvMediaStatus NvMediaIOFSTProcessFrame(const NvMediaIOFST *ofst, const NvMediaImage *frame, const NvMediaImage *refFrame, const NvMediaImage *mvs, const NvMediaOFSTExternalHintParams *extHintParams, NvMediaEncoderInstanceId instanceId)
Performs OF/ST 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:55
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:65
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:60
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:81
NvMediaOFSTInitializeParams::features
uint32_t features
Specifies bitwise OR'ed configuration feature flags.
Definition: nvmedia_iofst.h:122
NvMediaOFSTExternalHintParams
Holds OFST estimation parameters.
Definition: nvmedia_iofst.h:133
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:70
NvMediaIOFST::instanceId
NvMediaEncoderInstanceId instanceId
Instance ID.
Definition: nvmedia_iofst.h:98
NvMediaIOFSTDestroy
void NvMediaIOFSTDestroy(const NvMediaIOFST *ofst)
Destroys the created NvMediaIOFST object and frees associated resources.
NvMediaIOFST::outputFormat
NvMediaSurfaceType outputFormat
Output surface format.
Definition: nvmedia_iofst.h:96
NvMediaIOFST::ofstPriv
struct NvMediaIOFSTPriv_ * ofstPriv
An Opaque pointer for internal use.
Definition: nvmedia_iofst.h:100
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:94
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 was previously registered with NvMediaIOFST using NvMediaIOFSTImageRe...
NvMediaIOFST
Holds an OFST object created and returned by NvMediaIOFSTCreate().
Definition: nvmedia_iofst.h:90
NvMediaOFSTInitializeParams::width
uint16_t width
Input width Input range: The values between 160 to 4096, in increments of 2.
Definition: nvmedia_iofst.h:112
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 NvMediaIOFST object that can compute motion vectors or a disparity map based on difference...
NvMediaOFSTExternalHintParams::enableSegmentMap
NvMediaBool enableSegmentMap
Enables the external segment ID map, as follows:
Definition: nvmedia_iofst.h:145
NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
@ NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE
Ultra High Performance StereoDisparity.
Definition: nvmedia_iofst.h:75
NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE
@ NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE
High Performance OpticalFlow.
Definition: nvmedia_iofst.h:50
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:45