• <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

    Detailed Description

    The NvMediaIEP object takes uncompressed image data and turns it into a codec specific bitstream. Only H.264, H.265 and VP9 encoding is supported.

    6

    Modules

     Data types for H.264 encoding
     Types and declarations for H.264 Encoding.
     
     Image Encoder Output Extradata
     Defines Image Encoder Output Extradata data types which can be used with NvMedia IEP APIs to retrieve encoder statistics/configurations. This feature is not available on the QNX Safety configuration.
     

    Macros

    #define NVMEDIA_IEP_VERSION_MAJOR   1
     Major Version number. More...
     
    #define NVMEDIA_IEP_VERSION_MINOR   0
     Minor Version number. More...
     
    #define NVMEDIA_IEP_VERSION_PATCH   2
     Patch Version number. More...
     
    #define NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES   (16U)
     Specifies the maximum number of times NvMediaIEPInsertPreNvSciSyncFence() can be called before each call to NvMediaIEPFeedFrame(). More...
     

    Typedefs

    typedef struct NvMediaIEP NvMediaIEP
     Opaque NvMediaIEP object created by NvMediaIEPCreate. More...
     

    Enumerations

    enum  NvMediaIEPType {
      NVMEDIA_IMAGE_ENCODE_H264,
      NVMEDIA_IMAGE_ENCODE_HEVC,
      NVMEDIA_IMAGE_ENCODE_VP9,
      NVMEDIA_IMAGE_ENCODE_AV1,
      NVMEDIA_IMAGE_ENCODE_END
    }
     Image encode type. More...
     

    Functions

    NvMediaStatus NvMediaIEPGetVersion (NvMediaVersion *version)
     Retrieves the version information for the NvMedia IEP library. More...
     
    NvMediaIEPNvMediaIEPCreate (NvMediaIEPType encodeType, const void *initParams, NvSciBufAttrList bufAttrList, uint8_t maxInOutBuffering, NvMediaEncoderInstanceId instanceId)
     Create an NvMediaIEP object instance. More...
     
    NvMediaIEPNvMediaIEPCreateEx (NvMediaIEPType encodeType, const void *initParams, const NvSciBufSurfSampleType subsampleType, const NvSciBufSurfBPC bitdepth, uint8_t maxInOutBuffering, NvMediaEncoderInstanceId instanceId)
     Create an NvMediaIEP object instance. More...
     
    NvMediaIEPNvMediaIEPCreateCtx (void)
     Create an NvMediaIEP object instance. More...
     
    NvMediaStatus NvMediaIEPInit (const NvMediaIEP *encoder, NvMediaIEPType encodeType, const void *initParams, NvSciBufAttrList bufAttrList, uint8_t maxBuffering, NvMediaEncoderInstanceId instanceId)
     Initialize an NvMediaIEP object instance. More...
     
    void NvMediaIEPDestroy (NvMediaIEP *encoder)
     Destroys an NvMediaIEP object instance. More...
     
    NvMediaStatus NvMediaIEPFeedFrame (NvMediaIEP *encoder, const NvSciBufObj frame, const void *picParams, NvMediaEncoderInstanceId instanceId)
     Submits the specified frame for encoding. More...
     
    NvMediaStatus NvMediaIEPSetConfiguration (NvMediaIEP *encoder, const void *configuration)
     Sets the encoder configuration. More...
     
    NvMediaStatus NvMediaIEPGetBits (const NvMediaIEP *encoder, uint32_t *numBytes, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, void *extradata)
     Returns the bitstream for a slice or a frame. More...
     
    NvMediaStatus NvMediaIEPBitsAvailable (const NvMediaIEP *encoder, uint32_t *numBytesAvailable, NvMediaBlockingType blockingType, uint32_t millisecondTimeout)
     Returns the status of an encoding task submitted using NvMediaIEPFeedFrame, whose encoded output is to be retrieved next. More...
     
    NvMediaStatus NvMediaIEPGetAttribute (const NvMediaIEP *encoder, NvMediaEncAttrType attrType, uint32_t attrSize, void *AttributeData)
     Gets the encoder attribute for the current encoding session. More...
     
    NvMediaStatus NvMediaIEPRegisterNvSciBufObj (NvMediaIEP *encoder, const NvSciBufObj bufObj)
     Registers NvSciBufObj for use with a NvMediaIEP handle. More...
     
    NvMediaStatus NvMediaIEPUnregisterNvSciBufObj (const NvMediaIEP *encoder, const NvSciBufObj bufObj)
     Un-registers NvSciBufObj which was previously registered with NvMediaIEP using NvMediaIEPRegisterNvSciBufObj(). More...
     
    NvMediaStatus NvMediaIEPFillNvSciBufAttrList (NvMediaEncoderInstanceId instanceId, NvSciBufAttrList attrlist)
     Fills the NvMediaIEP specific NvSciBuf attributes which than then be used to allocate an NvSciBufObj that NvMediaIEP can consume. More...
     
    NvMediaStatus NvMediaIEPFillNvSciSyncAttrList (const NvMediaIEP *encoder, NvSciSyncAttrList attrlist, NvMediaNvSciSyncClientType clienttype)
     Fills the NvMediaIEP specific NvSciSync attributes. More...
     
    NvMediaStatus NvMediaIEPRegisterNvSciSyncObj (const NvMediaIEP *encoder, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj syncObj)
     Registers an NvSciSyncObj with NvMediaIEP. More...
     
    NvMediaStatus NvMediaIEPUnregisterNvSciSyncObj (const NvMediaIEP *encoder, NvSciSyncObj syncObj)
     Unregisters an NvSciSyncObj with NvMediaIEP. More...
     
    NvMediaStatus NvMediaIEPSetNvSciSyncObjforEOF (const NvMediaIEP *encoder, NvSciSyncObj nvscisyncEOF)
     Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence. More...
     
    NvMediaStatus NvMediaIEPInsertPreNvSciSyncFence (const NvMediaIEP *encoder, const NvSciSyncFence *prenvscisyncfence)
     Sets an NvSciSyncFence as a prefence for an NvMediaIEPFeedFrame() NvSciSyncFence operation. More...
     
    NvMediaStatus NvMediaIEPGetEOFNvSciSyncFence (const NvMediaIEP *encoder, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
     Gets EOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation. More...
     
    enum  NvMediaEncoderInstanceId {
      NVMEDIA_ENCODER_INSTANCE_0 = 0,
      NVMEDIA_ENCODER_INSTANCE_1,
      NVMEDIA_ENCODER_INSTANCE_AUTO
    }
     Specifies the encoder instance ID. More...
     
    enum  NvMediaEncodeParamsRCMode {
      NVMEDIA_ENCODE_PARAMS_RC_CBR = 0,
      NVMEDIA_ENCODE_PARAMS_RC_CONSTQP = 1,
      NVMEDIA_ENCODE_PARAMS_RC_VBR = 2,
      NVMEDIA_ENCODE_PARAMS_RC_VBR_MINQP = 3,
      NVMEDIA_ENCODE_PARAMS_RC_CBR_MINQP = 4
    }
     Rate Control Modes. More...
     
    enum  NvMediaBlockingType {
      NVMEDIA_ENCODE_BLOCKING_TYPE_NEVER,
      NVMEDIA_ENCODE_BLOCKING_TYPE_IF_PENDING
    }
     Blocking type. More...
     
    enum  NvMediaEncodePicType {
      NVMEDIA_ENCODE_PIC_TYPE_AUTOSELECT = 0,
      NVMEDIA_ENCODE_PIC_TYPE_P = 1,
      NVMEDIA_ENCODE_PIC_TYPE_B = 2,
      NVMEDIA_ENCODE_PIC_TYPE_I = 3,
      NVMEDIA_ENCODE_PIC_TYPE_IDR = 4,
      NVMEDIA_ENCODE_PIC_TYPE_P_INTRA_REFRESH = 5
    }
     Input picture type. More...
     
    enum  NvMediaEncodeProfile {
      NVMEDIA_ENCODE_PROFILE_AUTOSELECT = 0,
      NVMEDIA_ENCODE_PROFILE_BASELINE = 66,
      NVMEDIA_ENCODE_PROFILE_MAIN = 77,
      NVMEDIA_ENCODE_PROFILE_EXTENDED = 88,
      NVMEDIA_ENCODE_PROFILE_HIGH = 100,
      NVMEDIA_ENCODE_PROFILE_HIGH10 = 110,
      NVMEDIA_ENCODE_PROFILE_HIGH422 = 122,
      NVMEDIA_ENCODE_PROFILE_HIGH444 = 244,
      NVMEDIA_ENCODE_PROFILE_CAVLC444_INTRA = 44
    }
     Defines encoding profiles. More...
     
    enum  NvMediaEncodeExtProfile {
      NVMEDIA_ENCODE_EXT_PROFILE_AUTOSELECT = 0,
      NVMEDIA_ENCODE_EXT_PROFILE_BASELINE,
      NVMEDIA_ENCODE_EXT_PROFILE_CONSTRAINED_BASELINE,
      NVMEDIA_ENCODE_EXT_PROFILE_MAIN,
      NVMEDIA_ENCODE_EXT_PROFILE_EXTENDED,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH,
      NVMEDIA_ENCODE_EXT_PROFILE_PROGRESSIVE_HIGH,
      NVMEDIA_ENCODE_EXT_PROFILE_CONSTRAINED_HIGH,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH10,
      NVMEDIA_ENCODE_EXT_PROFILE_PROGRESSIVE_HIGH10,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH422,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH444_PREDICTIVE,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH10_INTRA,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH422_INTRA,
      NVMEDIA_ENCODE_EXT_PROFILE_HIGH444_INTRA,
      NVMEDIA_ENCODE_EXT_PROFILE_CAVLC444_INTRA
    }
     Defines extended encoding profiles. More...
     
    enum  NvMediaEncodeLevel {
      NVMEDIA_ENCODE_LEVEL_AUTOSELECT = 0,
      NVMEDIA_ENCODE_LEVEL_H264_1 = 10,
      NVMEDIA_ENCODE_LEVEL_H264_1b = 9,
      NVMEDIA_ENCODE_LEVEL_H264_11 = 11,
      NVMEDIA_ENCODE_LEVEL_H264_12 = 12,
      NVMEDIA_ENCODE_LEVEL_H264_13 = 13,
      NVMEDIA_ENCODE_LEVEL_H264_2 = 20,
      NVMEDIA_ENCODE_LEVEL_H264_21 = 21,
      NVMEDIA_ENCODE_LEVEL_H264_22 = 22,
      NVMEDIA_ENCODE_LEVEL_H264_3 = 30,
      NVMEDIA_ENCODE_LEVEL_H264_31 = 31,
      NVMEDIA_ENCODE_LEVEL_H264_32 = 32,
      NVMEDIA_ENCODE_LEVEL_H264_4 = 40,
      NVMEDIA_ENCODE_LEVEL_H264_41 = 41,
      NVMEDIA_ENCODE_LEVEL_H264_42 = 42,
      NVMEDIA_ENCODE_LEVEL_H264_5 = 50,
      NVMEDIA_ENCODE_LEVEL_H264_51 = 51,
      NVMEDIA_ENCODE_LEVEL_H264_52 = 52,
      NVMEDIA_ENCODE_LEVEL_H264_END = 255
    }
     Defines encoding levels for H264 encoder. More...
     
    enum  NvMediaEncodeH265Profile {
      NVMEDIA_ENCODE_H265_PROFILE_AUTOSELECT = 0,
      NVMEDIA_ENCODE_H265_PROFILE_MAIN = 1,
      NVMEDIA_ENCODE_H265_PROFILE_MAIN10 = 2,
      NVMEDIA_ENCODE_H265_PROFILE_MAIN_STILLPICTURE = 3,
      NVMEDIA_ENCODE_H265_PROFILES_FORMAT_RANGE_EXTENSIONS = 4,
      NVMEDIA_ENCODE_H265_PROFILES_HIGH_THROUGHPUT = 5,
      NVMEDIA_ENCODE_H265_PROFILES_SCREEN_CONTENT_CODING_EXTENSIONS = 9,
      NVMEDIA_ENCODE_H265_PROFILES_HIGH_THROUGHPUT_SCREEN_CONTENT_CODING_EXTENSIONS = 11
    }
     Defines H265encoding profiles. More...
     
    enum  NvMediaEncodeLevelH265 {
      NVMEDIA_ENCODE_LEVEL_H265_AUTOSELECT = 0,
      NVMEDIA_ENCODE_LEVEL_H265_1 = 30,
      NVMEDIA_ENCODE_LEVEL_H265_2 = 60,
      NVMEDIA_ENCODE_LEVEL_H265_21 = 63,
      NVMEDIA_ENCODE_LEVEL_H265_3 = 90,
      NVMEDIA_ENCODE_LEVEL_H265_31 = 93,
      NVMEDIA_ENCODE_LEVEL_H265_4 = 120,
      NVMEDIA_ENCODE_LEVEL_H265_41 = 123,
      NVMEDIA_ENCODE_LEVEL_H265_5 = 150,
      NVMEDIA_ENCODE_LEVEL_H265_51 = 153,
      NVMEDIA_ENCODE_LEVEL_H265_52 = 156,
      NVMEDIA_ENCODE_LEVEL_H265_6 = 180,
      NVMEDIA_ENCODE_LEVEL_H265_61 = 183,
      NVMEDIA_ENCODE_LEVEL_H265_62 = 186,
      NVMEDIA_ENCODE_LEVEL_H265_END = 255
    }
     Defines encoding levels for H265 encoder. More...
     
    enum  NvMediaEncodePicFlags {
      NVMEDIA_ENCODE_PIC_FLAG_OUTPUT_SPSPPS = (1 << 0),
      NVMEDIA_ENCODE_PIC_FLAG_RATECONTROL_CHANGE = (1 << 1),
      NVMEDIA_ENCODE_PIC_FLAG_CONSTRAINED_FRAME = (1 << 2)
    }
     Defines encoding Picture encode flags. More...
     
    enum  NvMediaEncPreset {
      NVMEDIA_ENC_PRESET_HQ = 0x0,
      NVMEDIA_ENC_PRESET_HP = 0x10,
      NVMEDIA_ENC_PRESET_UHP = 0x20,
      NVMEDIA_ENC_PRESET_DEFAULT = 0x7FFFFFFF
    }
     Defines encode preset level settings. More...
     
    enum  NvMediaEncodeH264EntropyCodingMode {
      NVMEDIA_ENCODE_H264_ENTROPY_CODING_MODE_CAVLC = 0,
      NVMEDIA_ENCODE_H264_ENTROPY_CODING_MODE_CABAC = 1
    }
     Defines H.264 entropy coding modes. More...
     
    enum  NvMediaEncodeH264BDirectMode {
      NVMEDIA_ENCODE_H264_BDIRECT_MODE_SPATIAL = 0,
      NVMEDIA_ENCODE_H264_BDIRECT_MODE_DISABLE = 1,
      NVMEDIA_ENCODE_H264_BDIRECT_MODE_TEMPORAL = 2
    }
     Defines H.264 specific Bdirect modes. More...
     
    enum  NvMediaEncodeH264AdaptiveTransformMode {
      NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_AUTOSELECT = 0,
      NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_DISABLE = 1,
      NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_ENABLE = 2
    }
     Defines H.264 specific Adaptive Transform modes. More...
     
    enum  NvMediaEncodeH264MotionPredictionExclusionFlags {
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_PREDICTION = (1 << 0),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_PREDICTION = (1 << 1),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DC_PREDICTION = (1 << 2),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DIAGONAL_DOWN_LEFT_PREDICTION = (1 << 3),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DIAGONAL_DOWN_RIGHT_PREDICTION = (1 << 4),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_RIGHT_PREDICTION = (1 << 5),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_DOWN_PREDICTION = (1 << 6),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_LEFT_PREDICTION = (1 << 7),
      NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_UP_PREDICTION = (1 << 8),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_PREDICTION = (1 << 9),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_PREDICTION = (1 << 10),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DC_PREDICTION = (1 << 11),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DIAGONAL_DOWN_LEFT_PREDICTION = (1 << 12),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DIAGONAL_DOWN_RIGHT_PREDICTION = (1 << 13),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_RIGHT_PREDICTION = (1 << 14),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_DOWN_PREDICTION = (1 << 15),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_LEFT_PREDICTION = (1 << 16),
      NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_UP_PREDICTION = (1 << 17),
      NVMEDIA_ENCODE_DISABLE_INTRA_16x16_VERTICAL_PREDICTION = (1 << 18),
      NVMEDIA_ENCODE_DISABLE_INTRA_16x16_HORIZONTAL_PREDICTION = (1 << 19),
      NVMEDIA_ENCODE_DISABLE_INTRA_16x16_DC_PREDICTION = (1 << 20),
      NVMEDIA_ENCODE_DISABLE_INTRA_16x16_PLANE_PREDICTION = (1 << 21),
      NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_VERTICAL_PREDICTION = (1 << 22),
      NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_HORIZONTAL_PREDICTION = (1 << 23),
      NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_DC_PREDICTION = (1 << 24),
      NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_PLANE_PREDICTION = (1 << 25),
      NVMEDIA_ENCODE_DISABLE_INTER_L0_16x16_PREDICTION = (1 << 26),
      NVMEDIA_ENCODE_DISABLE_INTER_L0_16x8_PREDICTION = (1 << 27),
      NVMEDIA_ENCODE_DISABLE_INTER_L0_8x16_PREDICTION = (1 << 28),
      NVMEDIA_ENCODE_DISABLE_INTER_L0_8x8_PREDICTION = (1 << 29)
    }
     Defines motion prediction exclusion flags for H.264. More...
     
    enum  NvMediaEncodeH264MotionSearchControlFlags {
      NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_4x4 = (1 << 0),
      NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_8x8 = (1 << 1),
      NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_16x16 = (1 << 2),
      NVMEDIA_ENCODE_ENABLE_SELF_TEMPORAL_REFINE = (1 << 3),
      NVMEDIA_ENCODE_ENABLE_SELF_SPATIAL_REFINE = (1 << 4),
      NVMEDIA_ENCODE_ENABLE_COLOC_REFINE = (1 << 5),
      NVMEDIA_ENCODE_ENABLE_EXTERNAL_REFINE = (1 << 6),
      NVMEDIA_ENCODE_ENABLE_CONST_MV_REFINE = (1 << 7),
      NVMEDIA_ENCODE_MOTION_SEARCH_CONTROL_FLAG_VALID = (1 << 31)
    }
     Defines motion search mode control flags for H.264. More...
     
    enum  NvMediaEncodeH264SPSPPSRepeatMode {
      NVMEDIA_ENCODE_SPSPPS_REPEAT_DISABLED = 0,
      NVMEDIA_ENCODE_SPSPPS_REPEAT_INTRA_FRAMES = 1,
      NVMEDIA_ENCODE_SPSPPS_REPEAT_IDR_FRAMES = 2
    }
     Specifies the frequency of the writing of Sequence and Picture parameters for H.264. More...
     
    enum  NvMediaEncAttrType {
      NvMediaEncAttr_GetSPS = 1,
      NvMediaEncAttr_GetPPS,
      NvMediaEncAttr_GetVPS
    }
     Specifies the encoder get attribute type. More...
     
    enum  NvMediaEncodeH264POCType {
      NVMEDIA_ENCODE_H264_POC_TYPE_AUTOSELECT = 0,
      NVMEDIA_ENCODE_H264_POC_TYPE_0 = 1,
      NVMEDIA_ENCODE_H264_POC_TYPE_2 = 2
    }
     Define H.264 pic_order_cnt_type. More...
     
    enum  NvMediaEncodeH264Features {
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_OUTPUT_AUD = (1 << 0),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_INTRA_REFRESH = (1 << 1),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_DYNAMIC_SLICE_MODE = (1 << 2),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_CONSTRANED_ENCODING = (1 << 3),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_LOSSLESS_COMPRESSION = (1 << 4),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_SLICE_LEVEL_OUTPUT = (1 << 5),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_RTP_MODE_OUTPUT = (1 << 6),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_EXT_PIC_RC_HINT = (1 << 7),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_DYNAMIC_RPS = (1 << 8),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP = (1 << 9),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_PROFILING = (1 << 10),
      NVMEDIA_ENCODE_CONFIG_H264_INIT_QP = (1 << 11),
      NVMEDIA_ENCODE_CONFIG_H264_QP_MAX = (1 << 12),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_FOUR_BYTE_START_CODE = (1 << 13),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_ULTRA_FAST_ENCODE = (1 << 14),
      NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP_V2 = (1 << 15)
    }
     Defines H264 encoder configuration features. More...
     
    #define NVMEDIA_ENCODE_TIMEOUT_INFINITE
     Infinite time-out for NvMediaIEPBitsAvailable. More...
     
    #define NVMEDIA_ENCODE_INFINITE_GOPLENGTH
     Infinite GOP length so that keyframes are not inserted automatically. More...
     
    #define MAX_NON_SLICE_DATA_SIZE
     Maximum encoded header info size. More...
     

    Macro Definition Documentation

    ◆ MAX_NON_SLICE_DATA_SIZE

    #define MAX_NON_SLICE_DATA_SIZE

    Maximum encoded header info size.

    Definition at line 642 of file nvmedia_common_encode.h.

    ◆ NVMEDIA_ENCODE_INFINITE_GOPLENGTH

    #define NVMEDIA_ENCODE_INFINITE_GOPLENGTH

    Infinite GOP length so that keyframes are not inserted automatically.

    Definition at line 50 of file nvmedia_common_encode.h.

    ◆ NVMEDIA_ENCODE_TIMEOUT_INFINITE

    #define NVMEDIA_ENCODE_TIMEOUT_INFINITE

    Infinite time-out for NvMediaIEPBitsAvailable.

    6

    Definition at line 44 of file nvmedia_common_encode.h.

    ◆ NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES

    #define NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES   (16U)

    Specifies the maximum number of times NvMediaIEPInsertPreNvSciSyncFence() can be called before each call to NvMediaIEPFeedFrame().

    Definition at line 55 of file nvmedia_iep.h.

    ◆ NVMEDIA_IEP_VERSION_MAJOR

    #define NVMEDIA_IEP_VERSION_MAJOR   1

    Major Version number.

    Definition at line 45 of file nvmedia_iep.h.

    ◆ NVMEDIA_IEP_VERSION_MINOR

    #define NVMEDIA_IEP_VERSION_MINOR   0

    Minor Version number.

    Definition at line 47 of file nvmedia_iep.h.

    ◆ NVMEDIA_IEP_VERSION_PATCH

    #define NVMEDIA_IEP_VERSION_PATCH   2

    Patch Version number.

    Definition at line 49 of file nvmedia_iep.h.

    Typedef Documentation

    ◆ NvMediaIEP

    typedef struct NvMediaIEP NvMediaIEP

    Opaque NvMediaIEP object created by NvMediaIEPCreate.

    Definition at line 75 of file nvmedia_iep.h.

    Enumeration Type Documentation

    ◆ NvMediaBlockingType

    Blocking type.

    Enumerator
    NVMEDIA_ENCODE_BLOCKING_TYPE_NEVER 

    Never blocks.

    NVMEDIA_ENCODE_BLOCKING_TYPE_IF_PENDING 

    Block only when operation is pending.

    Definition at line 201 of file nvmedia_common_encode.h.

    ◆ NvMediaEncAttrType

    Specifies the encoder get attribute type.

    This can be extended to get other encoding parameter information.

    Enumerator
    NvMediaEncAttr_GetSPS 

    This attribute is used to get SPS data for current encoding session.

    NvMediaEncAttr_GetPPS 

    This attribute is used to get PPS data for current encoding session.

    NvMediaEncAttr_GetVPS 

    This attribute is used to get VPS data for current h265 encoding session.

    Definition at line 615 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeExtProfile

    Defines extended encoding profiles.

    Enumerator
    NVMEDIA_ENCODE_EXT_PROFILE_AUTOSELECT 

    Automatic profile selection.

    NVMEDIA_ENCODE_EXT_PROFILE_BASELINE 

    Baseline profile.

    NVMEDIA_ENCODE_EXT_PROFILE_CONSTRAINED_BASELINE 

    Constrained Baseline profile.

    NVMEDIA_ENCODE_EXT_PROFILE_MAIN 

    Main profile.

    NVMEDIA_ENCODE_EXT_PROFILE_EXTENDED 

    Extended profile.

    This value is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH 

    High profile.

    NVMEDIA_ENCODE_EXT_PROFILE_PROGRESSIVE_HIGH 

    Progressive High profile.

    NVMEDIA_ENCODE_EXT_PROFILE_CONSTRAINED_HIGH 

    Constrained High profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH10 

    High10 profile.

    NVMEDIA_ENCODE_EXT_PROFILE_PROGRESSIVE_HIGH10 

    Progressive High10 profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH422 

    High422 profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH444_PREDICTIVE 

    High444 predictive profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH10_INTRA 

    High10_intra predictive profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH422_INTRA 

    High422_intra predictive profile.

    NVMEDIA_ENCODE_EXT_PROFILE_HIGH444_INTRA 

    High444_intra predictive profile.

    NVMEDIA_ENCODE_EXT_PROFILE_CAVLC444_INTRA 

    Cavlc444_intra predictive profile.

    Definition at line 270 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264AdaptiveTransformMode

    Defines H.264 specific Adaptive Transform modes.

    Enumerator
    NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_AUTOSELECT 

    Specifies that Adaptive Transform 8x8 mode is auto selected by the encoder driver.

    NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_DISABLE 

    Specifies that Adaptive Transform 8x8 mode is disabled.

    NVMEDIA_ENCODE_H264_ADAPTIVE_TRANSFORM_ENABLE 

    Specifies that Adaptive Transform 8x8 mode must be used.

    Definition at line 488 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264BDirectMode

    Defines H.264 specific Bdirect modes.

    Enumerator
    NVMEDIA_ENCODE_H264_BDIRECT_MODE_SPATIAL 

    Spatial BDirect mode.

    This value is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_H264_BDIRECT_MODE_DISABLE 

    Disable BDirect mode.

    NVMEDIA_ENCODE_H264_BDIRECT_MODE_TEMPORAL 

    Temporal BDirect mode.

    This value is not supported in the QNX Safety build.

    Definition at line 473 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264EntropyCodingMode

    Defines H.264 entropy coding modes.

    Enumerator
    NVMEDIA_ENCODE_H264_ENTROPY_CODING_MODE_CAVLC 

    Entropy coding mode is CAVLC.

    NVMEDIA_ENCODE_H264_ENTROPY_CODING_MODE_CABAC 

    Entropy coding mode is CABAC.

    Definition at line 462 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264Features

    Defines H264 encoder configuration features.

    Enumerator
    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_OUTPUT_AUD 

    Enable to write access unit delimiter syntax in bitstream.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_INTRA_REFRESH 

    Enable gradual decoder refresh or intra refresh.

    If the GOP structure uses B frames this will be ignored

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_DYNAMIC_SLICE_MODE 

    Enable dynamic slice mode.

    Client must specify max slice size using the NvMediaEncodeConfigH264::maxSliceSizeInBytes field. This setting is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_CONSTRANED_ENCODING 

    Enable constrainedFrame encoding where each slice in the constrained picture is independent of other slices.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_LOSSLESS_COMPRESSION 

    Enable lossless compression.

    Note
    This feature is not supported.
    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_SLICE_LEVEL_OUTPUT 

    Enable slice level output encoding.

    This enables delivery encoded data slice by slice to client to reduce encode latency. This setting is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_RTP_MODE_OUTPUT 

    Enable RTP mode output.

    NAL unit start code will be replaced with NAL size for the NAL units.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_EXT_PIC_RC_HINT 

    Enable support for external picture RC hint.

    Note
    This feature is not supported.
    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_DYNAMIC_RPS 

    Enable support for dynamic reference picture set RPS/DPB control support.

    After receiving an input buffer and result of previous frame encoding, based on real time information, Some client software determines properties for the new input buffer (long term/short term/non-referenced, frame number/poc/LT index). This setting is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP 

    Enable support for motion vector buffer dump.

    This will enable motion vector dump. Motion vector buffer will be appended at the end of encoded bitstream data. This setting is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_PROFILING 

    Enable encoder profiling.

    Profiling information would be added as part of output extradata. This setting is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_CONFIG_H264_INIT_QP 

    Enable support to use client provided Initial QP for all frame types.

    NVMEDIA_ENCODE_CONFIG_H264_QP_MAX 

    Enable support to use client provided QP max for all frame types.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_FOUR_BYTE_START_CODE 

    Enable support to use 4 byte start code in all the slices in a picture.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_ULTRA_FAST_ENCODE 

    Enable ultra fast encoding.

    It overrides some of the quality settings to achieve ultra fast encoding. This is equivalent to setting NVMEDIA_ENCODE_QUALITY_L0 as the NvMediaEncodeQuality.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP_V2 

    Enable support for motion vector buffer dump in a simplified (V2) format.

    Motion vector buffer will be appended to the end of encoded bitstream data retrieved using NvMediaIEPGetBits. Refer NvMediaEncodeOutputExtradata for more information regarding the format of the dumped MV output. Either NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP_V2 or NVMEDIA_ENCODE_CONFIG_H264_ENABLE_MV_BUFFER_DUMP should be enabled at a given time. If both are enabled, V2 format will be used.

    It should be ensured that size of NvMediaBitstreamBuffer passed to NvMediaIEPGetBits has sufficient space to store the MV buffer dump. The numBytesAvailable returned by NvMediaIEPBitsAvailable or numBytes returned by NvMediaIEPGetBits does not take MV buffer dump size into account - represents only the size of the encoded bits that are available. While allocating bitstream buffers, the additional amount of space required in bitstream to accommodate MV buffer data needs to be added. This can be calculated as follows:

    mvBufferSize = sizeof(NvMediaEncodeMVBufferHeader) +
    ALIGN_256(numMacroBlocks * sizeof(NvMediaEncodeMVData))
    where,
    NumMacroBlocks =
    (ALIGN_16(InputWidth)/16) * (ALIGN_16(InputHeight)/16)
    bitstreamSize = ALIGN_8(bitsAvailable) + mvBufferSize

    ALIGN_N refers to an operation which returns a multiple of N, greater than or equal to a number, closest to the number.

    Note
    This setting is not supported in the QNX Safety build.

    Definition at line 749 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264MotionPredictionExclusionFlags

    Defines motion prediction exclusion flags for H.264.

    Deprecated:
    This feature will be deprecated in a future release.
    Enumerator
    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_PREDICTION 

    Disable Intra 4x4 vertical prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_PREDICTION 

    Disable Intra 4x4 horizontal prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DC_PREDICTION 

    Disable Intra 4x4 DC prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DIAGONAL_DOWN_LEFT_PREDICTION 

    Disable Intra 4x4 diagonal down left prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_DIAGONAL_DOWN_RIGHT_PREDICTION 

    Disable Intra 4x4 diagonal down right prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_RIGHT_PREDICTION 

    Disable Intra 4x4 vertical right prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_DOWN_PREDICTION 

    Disable Intra 4x4 horizontal down prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_VERTICAL_LEFT_PREDICTION 

    Disable Intra 4x4 vertical left prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_4x4_HORIZONTAL_UP_PREDICTION 

    Disable Intra 4x4 horizontal up prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_PREDICTION 

    Disable Intra 8x8 vertical prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_PREDICTION 

    Disable Intra 8x8 horizontal prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DC_PREDICTION 

    Disable Intra 8x8 DC prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DIAGONAL_DOWN_LEFT_PREDICTION 

    Disable Intra 8x8 diagonal down left prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_DIAGONAL_DOWN_RIGHT_PREDICTION 

    Disable Intra 8x8 diagonal down right prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_RIGHT_PREDICTION 

    Disable Intra 8x8 vertical right prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_DOWN_PREDICTION 

    Disable Intra 8x8 horizontal down prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_VERTICAL_LEFT_PREDICTION 

    Disable Intra 8x8 vertical left prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_8x8_HORIZONTAL_UP_PREDICTION 

    Disable Intra 8x8 horizontal up prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_16x16_VERTICAL_PREDICTION 

    Disable Intra 16x16 vertical prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_16x16_HORIZONTAL_PREDICTION 

    Disable Intra 16x16 horizontal prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_16x16_DC_PREDICTION 

    Disable Intra 16x16 DC prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_16x16_PLANE_PREDICTION 

    Disable Intra 16x16 plane prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_VERTICAL_PREDICTION 

    Disable Intra chroma vertical prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_HORIZONTAL_PREDICTION 

    Disable Intra chroma horizontal prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_DC_PREDICTION 

    Disable Intra chroma DC prediction.

    NVMEDIA_ENCODE_DISABLE_INTRA_CHROMA_PLANE_PREDICTION 

    Disable Intra chroma plane prediction.

    NVMEDIA_ENCODE_DISABLE_INTER_L0_16x16_PREDICTION 

    Disable Inter L0 partition 16x16 prediction.

    NVMEDIA_ENCODE_DISABLE_INTER_L0_16x8_PREDICTION 

    Disable Inter L0 partition 16x8 prediction.

    NVMEDIA_ENCODE_DISABLE_INTER_L0_8x16_PREDICTION 

    Disable Inter L0 partition 8x16 prediction.

    NVMEDIA_ENCODE_DISABLE_INTER_L0_8x8_PREDICTION 

    Disable Inter L0 partition 8x8 prediction.

    Definition at line 503 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264MotionSearchControlFlags

    Defines motion search mode control flags for H.264.

    Deprecated:
    This feature will be deprecated in a future release.
    Enumerator
    NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_4x4 

    IP Search mode bit Intra 4x4.

    NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_8x8 

    IP Search mode bit Intra 8x8.

    NVMEDIA_ENCODE_ENABLE_IP_SEARCH_INTRA_16x16 

    IP Search mode bit Intra 16x16.

    NVMEDIA_ENCODE_ENABLE_SELF_TEMPORAL_REFINE 

    Enable self_temporal_refine.

    NVMEDIA_ENCODE_ENABLE_SELF_SPATIAL_REFINE 

    Enable self_spatial_refine.

    NVMEDIA_ENCODE_ENABLE_COLOC_REFINE 

    Enable coloc_refine.

    NVMEDIA_ENCODE_ENABLE_EXTERNAL_REFINE 

    Enable external_refine.

    NVMEDIA_ENCODE_ENABLE_CONST_MV_REFINE 

    Enable const_mv_refine.

    NVMEDIA_ENCODE_MOTION_SEARCH_CONTROL_FLAG_VALID 

    Enable the flag set.

    Definition at line 575 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264POCType

    Define H.264 pic_order_cnt_type.

    Enumerator
    NVMEDIA_ENCODE_H264_POC_TYPE_AUTOSELECT 

    Automatic level selection.

    NVMEDIA_ENCODE_H264_POC_TYPE_0 

    Pic_order_cnt_type 0.

    NVMEDIA_ENCODE_H264_POC_TYPE_2 

    Pic_order_cnt_type 2.

    Definition at line 629 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH264SPSPPSRepeatMode

    Specifies the frequency of the writing of Sequence and Picture parameters for H.264.

    Enumerator
    NVMEDIA_ENCODE_SPSPPS_REPEAT_DISABLED 

    Repeating of SPS/PPS is disabled.

    NVMEDIA_ENCODE_SPSPPS_REPEAT_INTRA_FRAMES 

    SPS/PPS is repeated for every intra frame.

    NVMEDIA_ENCODE_SPSPPS_REPEAT_IDR_FRAMES 

    SPS/PPS is repeated for every IDR frame.

    Definition at line 601 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeH265Profile

    Defines H265encoding profiles.

    Enumerator
    NVMEDIA_ENCODE_H265_PROFILE_AUTOSELECT 

    Automatic profile selection.

    NVMEDIA_ENCODE_H265_PROFILE_MAIN 

    Main profile.

    NVMEDIA_ENCODE_H265_PROFILE_MAIN10 

    Main10.

    NVMEDIA_ENCODE_H265_PROFILE_MAIN_STILLPICTURE 

    Main still profile.

    NVMEDIA_ENCODE_H265_PROFILES_FORMAT_RANGE_EXTENSIONS 

    Format range exetnsions profiles.

    NVMEDIA_ENCODE_H265_PROFILES_HIGH_THROUGHPUT 

    High throughput profiles.

    NVMEDIA_ENCODE_H265_PROFILES_SCREEN_CONTENT_CODING_EXTENSIONS 

    Screen content coding extensions profiles.

    NVMEDIA_ENCODE_H265_PROFILES_HIGH_THROUGHPUT_SCREEN_CONTENT_CODING_EXTENSIONS 

    High throughput screen content coding extensions profiles.

    Definition at line 356 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeLevel

    Defines encoding levels for H264 encoder.

    Enumerator
    NVMEDIA_ENCODE_LEVEL_AUTOSELECT 

    Automatic level selection.

    NVMEDIA_ENCODE_LEVEL_H264_1 

    H.264 Level 1.

    NVMEDIA_ENCODE_LEVEL_H264_1b 

    H.264 Level 1b.

    NVMEDIA_ENCODE_LEVEL_H264_11 

    H.264 Level 1.1.

    NVMEDIA_ENCODE_LEVEL_H264_12 

    H.264 Level 1.2.

    NVMEDIA_ENCODE_LEVEL_H264_13 

    H.264 Level 1.3.

    NVMEDIA_ENCODE_LEVEL_H264_2 

    H.264 Level 2.

    NVMEDIA_ENCODE_LEVEL_H264_21 

    H.264 Level 2.1.

    NVMEDIA_ENCODE_LEVEL_H264_22 

    H.264 Level 2.2.

    NVMEDIA_ENCODE_LEVEL_H264_3 

    H.264 Level 3.

    NVMEDIA_ENCODE_LEVEL_H264_31 

    H.264 Level 3.1.

    NVMEDIA_ENCODE_LEVEL_H264_32 

    H.264 Level 3.2.

    NVMEDIA_ENCODE_LEVEL_H264_4 

    H.264 Level 4.

    NVMEDIA_ENCODE_LEVEL_H264_41 

    H.264 Level 4.1.

    NVMEDIA_ENCODE_LEVEL_H264_42 

    H.264 Level 4.2.

    NVMEDIA_ENCODE_LEVEL_H264_5 

    H.264 Level 5.0.

    NVMEDIA_ENCODE_LEVEL_H264_51 

    H.264 Level 5.1.

    NVMEDIA_ENCODE_LEVEL_H264_52 

    H.264 Level 5.2.

    NVMEDIA_ENCODE_LEVEL_H264_END 
    Note
    This value is for internal use only.

    Definition at line 311 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeLevelH265

    Defines encoding levels for H265 encoder.

    Enumerator
    NVMEDIA_ENCODE_LEVEL_H265_AUTOSELECT 

    Automatic level selection.

    NVMEDIA_ENCODE_LEVEL_H265_1 

    H.265 Level 1.0.

    NVMEDIA_ENCODE_LEVEL_H265_2 

    H.265 Level 2.0.

    NVMEDIA_ENCODE_LEVEL_H265_21 

    H.265 Level 2.1.

    NVMEDIA_ENCODE_LEVEL_H265_3 

    H.265 Level 3.0.

    NVMEDIA_ENCODE_LEVEL_H265_31 

    H.265 Level 3.1.

    NVMEDIA_ENCODE_LEVEL_H265_4 

    H.265 Level 4.0.

    NVMEDIA_ENCODE_LEVEL_H265_41 

    H.265 Level 4.1.

    NVMEDIA_ENCODE_LEVEL_H265_5 

    H.265 Level 5.0.

    NVMEDIA_ENCODE_LEVEL_H265_51 

    H.265 Level 5.1.

    NVMEDIA_ENCODE_LEVEL_H265_52 

    H.265 Level 5.2.

    NVMEDIA_ENCODE_LEVEL_H265_6 

    H.265 Level 6.0.

    NVMEDIA_ENCODE_LEVEL_H265_61 

    H.265 Level 6.1.

    NVMEDIA_ENCODE_LEVEL_H265_62 

    H.265 Level 6.2.

    NVMEDIA_ENCODE_LEVEL_H265_END 
    Note
    This value is for internal use only.

    Definition at line 380 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeParamsRCMode

    Rate Control Modes.

    Enumerator
    NVMEDIA_ENCODE_PARAMS_RC_CBR 

    Constant bitrate mode.

    NVMEDIA_ENCODE_PARAMS_RC_CONSTQP 

    Constant QP mode.

    NVMEDIA_ENCODE_PARAMS_RC_VBR 

    Variable bitrate mode.

    NVMEDIA_ENCODE_PARAMS_RC_VBR_MINQP 

    Variable bitrate mode with MinQP.

    This value is not supported in the QNX Safety build.

    Deprecated:
    This feature will be deprecated in a future release.
    NVMEDIA_ENCODE_PARAMS_RC_CBR_MINQP 

    Constant bitrate mode with MinQP.

    This value is not supported in the QNX Safety build.

    Deprecated:
    This feature will be deprecated in a future release.

    Definition at line 85 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodePicFlags

    Defines encoding Picture encode flags.

    Enumerator
    NVMEDIA_ENCODE_PIC_FLAG_OUTPUT_SPSPPS 

    Writes the sequence and picture header in encoded bitstream of the current picture.

    NVMEDIA_ENCODE_PIC_FLAG_RATECONTROL_CHANGE 

    Indicates change in rate control parameters from the current picture onwards.

    NVMEDIA_ENCODE_PIC_FLAG_CONSTRAINED_FRAME 

    Indicates that this frame is encoded with each slice completely independent of other slices in the frame.

    NVMEDIA_ENCODE_CONFIG_H264_ENABLE_CONSTRANED_ENCODING must be set to support this encode mode

    Definition at line 419 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodePicType

    Input picture type.

    Enumerator
    NVMEDIA_ENCODE_PIC_TYPE_AUTOSELECT 

    Auto selected picture type.

    NVMEDIA_ENCODE_PIC_TYPE_P 

    Forward predicted.

    NVMEDIA_ENCODE_PIC_TYPE_B 

    Bi-directionally predicted picture.

    NVMEDIA_ENCODE_PIC_TYPE_I 

    Intra predicted picture.

    NVMEDIA_ENCODE_PIC_TYPE_IDR 

    IDR picture.

    NVMEDIA_ENCODE_PIC_TYPE_P_INTRA_REFRESH 

    Starts a new intra refresh cycle if intra refresh support is enabled otherwise it indicates a P frame.

    Definition at line 219 of file nvmedia_common_encode.h.

    ◆ NvMediaEncodeProfile

    Defines encoding profiles.

    Enumerator
    NVMEDIA_ENCODE_PROFILE_AUTOSELECT 

    Automatic profile selection.

    NVMEDIA_ENCODE_PROFILE_BASELINE 

    Baseline profile.

    NVMEDIA_ENCODE_PROFILE_MAIN 

    Main profile.

    NVMEDIA_ENCODE_PROFILE_EXTENDED 

    Extended profile.

    This value is not supported in the QNX Safety build.

    NVMEDIA_ENCODE_PROFILE_HIGH 

    High profile.

    NVMEDIA_ENCODE_PROFILE_HIGH10 

    High10 profile.

    NVMEDIA_ENCODE_PROFILE_HIGH422 

    High422 profile.

    NVMEDIA_ENCODE_PROFILE_HIGH444 

    High 444 profile.

    H.264 High444 profile support lossless encode (trans-quant bypass) for YUV444 and YUV420 input. Lossy encode is not supported with High444 profile.

    NVMEDIA_ENCODE_PROFILE_CAVLC444_INTRA 

    Cavlc444_intra predictive profile.

    Definition at line 239 of file nvmedia_common_encode.h.

    ◆ NvMediaEncoderInstanceId

    Specifies the encoder instance ID.

    Enumerator
    NVMEDIA_ENCODER_INSTANCE_0 

    Specifies the encoder instance ID 0.

    NVMEDIA_ENCODER_INSTANCE_1 

    Specifies the encoder instance ID 1.

    NVMEDIA_ENCODER_INSTANCE_AUTO 

    Specifies that the encoder instance ID can be set dynamically during encode.

    Definition at line 56 of file nvmedia_common_encode.h.

    ◆ NvMediaEncPreset

    Defines encode preset level settings.

    Enumerator
    NVMEDIA_ENC_PRESET_HQ 

    Encoder Quality Preset HQ
    Relative comparison with respect to other presets:

    • Performance: Low
    • Quality: High
    NVMEDIA_ENC_PRESET_HP 

    Encoder Quality Preset HP
    Relative comparison with respect to other presets:

    • Performance: Medium
    • Quality: Medium
    NVMEDIA_ENC_PRESET_UHP 

    Encoder Quality Preset UHP
    Relative comparison with respect to other presets:

    • Performance: High
    • Quality: Low
    NVMEDIA_ENC_PRESET_DEFAULT 

    Encoder Quality Preset Default.

    Default Encoder settings applied

    Definition at line 436 of file nvmedia_common_encode.h.

    ◆ NvMediaIEPType

    Image encode type.

    Enumerator
    NVMEDIA_IMAGE_ENCODE_H264 

    H.264 encode.

    NVMEDIA_IMAGE_ENCODE_HEVC 

    HEVC codec.

    NVMEDIA_IMAGE_ENCODE_VP9 

    VP9 codec.

    NVMEDIA_IMAGE_ENCODE_AV1 

    AV1 codec.

    NVMEDIA_IMAGE_ENCODE_END 

    Definition at line 60 of file nvmedia_iep.h.

    Function Documentation

    ◆ NvMediaIEPBitsAvailable()

    NvMediaStatus NvMediaIEPBitsAvailable ( const NvMediaIEP encoder,
    uint32_t *  numBytesAvailable,
    NvMediaBlockingType  blockingType,
    uint32_t  millisecondTimeout 
    )

    Returns the status of an encoding task submitted using NvMediaIEPFeedFrame, whose encoded output is to be retrieved next.

    The number of bytes of encoded output that is available (if ready), is also retrieved along with the status. The specific behavior depends on the specified NvMediaBlockingType.

    It is safe to call the API to submit a task (NvMediaIEPFeedFrame) and this function from two different threads.

    Precondition
    NvMediaIEPFeedFrame()
    Postcondition
    Status of the submitted encoding task is retrieved.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [out]numBytesAvailableThe number of bytes of encoded output that is available. This output corresponds to the next encoding task in the queue for which the output is yet to be retrieved. The value is valid only when the return value from this API is NVMEDIA_STATUS_OK.
    [in]blockingTypeBlocking type.
    Input range: The following are supported blocking types:
    [in]millisecondTimeoutTimeout in milliseconds or NVMEDIA_VIDEO_ENCODER_TIMEOUT_INFINITE if a timeout is not desired.
    Returns
    NvMediaStatus The completion status of the operation. Possible values are:

    ◆ NvMediaIEPCreate()

    NvMediaIEP* NvMediaIEPCreate ( NvMediaIEPType  encodeType,
    const void *  initParams,
    NvSciBufAttrList  bufAttrList,
    uint8_t  maxInOutBuffering,
    NvMediaEncoderInstanceId  instanceId 
    )

    Create an NvMediaIEP object instance.

    Precondition
    NvMediaIEPGetVersion()
    NvMediaIEPFillNvSciBufAttrList()
    Postcondition
    NvMediaIEP object is created


    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

    Creates an NvMediaIEP object capable of turning a stream of YUV surfaces characterized by NvSciBufAttrList into a compressed bitstream of the specified NvMediaIEPType codec type. Surfaces are fed to the encoder with NvMediaIEPFeedFrame and generated bitstream buffers are retrieved with NvMediaIEPGetBits.

    Parameters
    [in]encodeTypeThe video compression standard to be used for encoding
    Input range: Entries in NvMediaIEPType enumeration
    [in]initParamsThe encoder initialization parameters
    Input range: Pointer to a populated encode parameter structures:
    QNX Safety build:
    [in]bufAttrListPointer to a list of reconciled attributes that characterizes the input surface that needs to be encoded.
    Supported surface format attributes (common to all codecs):
    Buffer Type: NvSciBufType_Image
    Layout: NvSciBufImage_BlockLinearType
    Scan Type: NvSciBufScan_ProgressiveType
    Plane base address alignment: 256
    Supported surface format attributes (codec specific):
    QNX Safety build:
    H.264:
    Sub-sampling type: YUV420 (semi-planar), YUV444 (semi-planar)
    Bit Depth: 8
    Non-safety build:
    H.264:
    Sub-sampling type: YUV420 (semi-planar), YUV444 (semi-planar)
    Bit Depth: 8
    H.265/HEVC:
    Sub-sampling type: YUV420 (semi-planar), YUV444 (semi-planar)
    Bit Depth: 8, 10
    VP9:
    Sub-sampling type: YUV420 (semi-planar)
    Bit Depth: 8, 12
    AV1:
    Sub-sampling type: YUV420 (semi-planar)
    Bit Depth: 8, 10

    Input range: Non-NULL - valid pointer address obtained by a call to NvSciBufObjGetAttrList called with a valid NvSciBufObj that will contain the input content.
    [in]maxBufferingMaximum number of frames outstanding at any given point in time that NvMediaIEP can hold before its output must be retrieved using NvMediaIEPGetBits. If maxBuffering frames worth of encoded bitstream is yet to be retrived, NvMediaIEPFeedFrame returns NVMEDIA_STATUS_INSUFFICIENT_BUFFERING. In this case, encoded output of one or more frames must be retrived with NvMediaIEPGetBits before feeding more frames using NvMediaIEPFeedFrame
    Input range: The values between 4 and 16, in increments of 1
    [in]instanceIdThe ID of the NvENC HW engine instance
    Input range: The following instances are supported:
    Returns
    The created NvMediaIEP handle or NULL if unsuccessful.

    ◆ NvMediaIEPCreateCtx()

    NvMediaIEP* NvMediaIEPCreateCtx ( void  )

    Create an NvMediaIEP object instance.

    Note
    Supported only in non-safety build
    Precondition
    NvMediaIEPGetVersion()
    Postcondition
    NvMediaIEP object is created


    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
    Returns
    NvMediaIEP The new image encoder's handle or NULL if unsuccessful.

    ◆ NvMediaIEPCreateEx()

    NvMediaIEP* NvMediaIEPCreateEx ( NvMediaIEPType  encodeType,
    const void *  initParams,
    const NvSciBufSurfSampleType  subsampleType,
    const NvSciBufSurfBPC  bitdepth,
    uint8_t  maxInOutBuffering,
    NvMediaEncoderInstanceId  instanceId 
    )

    Create an NvMediaIEP object instance.

    Precondition
    NvMediaIEPGetVersion()
    NvMediaIEPFillNvSciBufAttrList()
    Postcondition
    NvMediaIEP object is created


    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

    Creates an NvMediaIEP object capable of turning a stream of YUV surfaces characterized by NvSciBufAttrList into a compressed bitstream of the specified NvMediaIEPType codec type. Surfaces are fed to the encoder with NvMediaIEPFeedFrame and generated bitstream buffers are retrieved with NvMediaIEPGetBits.

    Parameters
    [in]encodeTypeThe video compression standard to be used for encoding
    Input range: Entries in NvMediaIEPType enumeration
    [in]initParamsThe encoder initialization parameters
    Input range: Pointer to a populated encode parameter structures:
    QNX Safety build:
    [in]subsampleTypeSubsampling type of the input YUV surface Supported and valid surface format attributes listed below (codec specific):
    QNX Safety build:
    H.264:
    Sub-sampling type: NvSciSurfSampleType_420 (semi-planar), NvSciSurfSampleType_444 (semi-planar)
    Non-safety build:
    H.264:
    Sub-sampling type: NvSciSurfSampleType_420 (semi-planar), NvSciSurfSampleType_444 (semi-planar)
    H.265/HEVC:
    Sub-sampling type: NvSciSurfSampleType_420 (semi-planar), NvSciSurfSampleType_444 (semi-planar)
    VP9:
    Sub-sampling type: NvSciSurfSampleType_420 (semi-planar)
    AV1:
    Sub-sampling type: NvSciSurfSampleType_420 (semi-planar)
    [in]bitdepthBitdepth for the input YUV surface Supported and valid surface format attributes listed below (codec specific):
    QNX Safety build:
    H.264:
    Bit Depth: NvSciSurfBPC_8
    Non-safety build:
    H.264:
    Bit Depth: NvSciSurfBPC_8
    H.265/HEVC:
    Bit Depth: NvSciSurfBPC_8, NvSciSurfBPC_10
    VP9:
    Bit Depth: NvSciSurfBPC_8, NvSciSurfBPC_12
    AV1:
    Bit Depth: NvSciSurfBPC_8, NvSciSurfBPC_10
    [in]maxBufferingMaximum number of frames outstanding at any given point in time that NvMediaIEP can hold before its output must be retrieved using NvMediaIEPGetBits. If maxBuffering frames worth of encoded bitstream is yet to be retrived, NvMediaIEPFeedFrame returns NVMEDIA_STATUS_INSUFFICIENT_BUFFERING. In this case, encoded output of one or more frames must be retrived with NvMediaIEPGetBits before feeding more frames using NvMediaIEPFeedFrame
    Input range: The values between 4 and 16, in increments of 1
    [in]instanceIdThe ID of the NvENC HW engine instance
    Input range: The following instances are supported:
    Returns
    The created NvMediaIEP handle or NULL if unsuccessful.

    ◆ NvMediaIEPDestroy()

    void NvMediaIEPDestroy ( NvMediaIEP encoder)

    Destroys an NvMediaIEP object instance.

    Precondition
    NvMediaIEPUnregisterNvSciBufObj()
    NvMediaIEPUnregisterNvSciSyncObj()
    Postcondition
    NvMediaIEP object is destroyed


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes
    Parameters
    [in]encoderThe NvMediaIEP object to destroy.
    Input range: Non-NULL - valid pointer address

    ◆ NvMediaIEPFeedFrame()

    NvMediaStatus NvMediaIEPFeedFrame ( NvMediaIEP encoder,
    const NvSciBufObj  frame,
    const void *  picParams,
    NvMediaEncoderInstanceId  instanceId 
    )

    Submits the specified frame for encoding.

    The encoding process is asynchronous, as a result, the encoded output may not be available when the API returns. Refer NvMediaIEPBitsAvailable and NvMediaIEPGetBits for more details regarding how to retrieve the encoded output.

    Precondition
    NvMediaIEPRegisterNvSciBufObj()
    NvMediaIEPRegisterNvSciSyncObj()
    NvMediaIEPSetConfiguration() must be called at least once to configure NvMediaIEP
    NvMediaIEPSetNvSciSyncObjforEOF()
    NvMediaIEPInsertPreNvSciSyncFence()
    Postcondition
    Image encoding task is submitted


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]bufObjInput bufObj that contains the input content that needs to be encoded, allocated with a call to NvSciBufObjAlloc. The characteristics of the allocated NvSciBufObj should be equivalent to the bufAttrList passed in NvMediaIEPCreate. The size of the YUV surfaces contained in the NvSciBufObj need to be at least as large as the encoding width and height configured in the initialization parameters of NvMediaIEPCreate.
    Input range: A valid NvSciBufObj
    [in]picParamsPicture parameters used for the frame.
    Input range: Supported picture parameter structures:
    [in]instanceIdThe specific ID of the encoder engine instance where the encoding task needs to be submitted.
    Input range: The following instances are supported:
    Returns
    NvMediaStatus The completion status of the operation. Possible values are:

    ◆ NvMediaIEPFillNvSciBufAttrList()

    NvMediaStatus NvMediaIEPFillNvSciBufAttrList ( NvMediaEncoderInstanceId  instanceId,
    NvSciBufAttrList  attrlist 
    )

    Fills the NvMediaIEP specific NvSciBuf attributes which than then be used to allocate an NvSciBufObj that NvMediaIEP can consume.

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

    • NvSciBufHwEngName: NvSciBufHwEngName_MSENC
    • NvSciBufPlatformName: The platform this API is used on

    This function assumes that attrlist is a valid NvSciBufAttrList created by the caller by a call to NvSciBufAttrListCreate.

    Precondition
    NvMediaIEPGetVersion()
    Postcondition
    NvSciBufAttrList populated with NvMediaIEP specific NvSciBuf attributes. The caller can then set attributes specific to the type of surface, reconcile attribute lists and allocate an NvSciBufObj.


    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
    Parameters
    [in]instanceIdThe ID of the NvENC HW engine instance
    Input range: The following instances are supported:
    [out]attrlistA pointer to an NvSciBufAttrList structure where NvMediaIEP places the NvSciBuf attributes.
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPFillNvSciSyncAttrList()

    NvMediaStatus NvMediaIEPFillNvSciSyncAttrList ( const NvMediaIEP encoder,
    NvSciSyncAttrList  attrlist,
    NvMediaNvSciSyncClientType  clienttype 
    )

    Fills the NvMediaIEP specific NvSciSync attributes.

    This function assumes that attrlist is a valid NvSciSyncAttrList.

    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 in the NvSciSyncAttrList passed as an input to this function.

    Precondition
    NvMediaIEPCreate()
    Postcondition
    NvSciSyncAttrList populated with NvMediaIEP specific NvSciSync attributes


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [out]attrlistA pointer to an NvSciSyncAttrList structure where NvMedia places NvSciSync attributes.
    [in]clienttypeIndicates whether the NvSciSyncAttrList requested for an NvMediaIEP signaler or an NvMediaIEP waiter.
    Input range: Entries in NvMediaNvSciSyncClientType enumeration
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPGetAttribute()

    NvMediaStatus NvMediaIEPGetAttribute ( const NvMediaIEP encoder,
    NvMediaEncAttrType  attrType,
    uint32_t  attrSize,
    void *  AttributeData 
    )

    Gets the encoder attribute for the current encoding session.

    This function can be called after passing the first frame for encoding. It can be used to get header information (SPS/PPS/VPS) for the current encoding session. Additionally, it can be extended for further requirements, by implementing proper data structures.

    Before calling this function, you must pass the first frame for encoding.

    Precondition
    NvMediaIEPFeedFrame() called at least once
    Postcondition
    Value of the required attribute is retrieved.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]attrTypeAttribute type as defined in NvMediaEncAttrType.
    Input range: Supported values from NvMediaEncAttrType enumeration
    [in]attrSizeSize of the data structure associated with attribute.
    Input range: sizeof(NvMediaNalData)
    [out]AttributeDataA pointer to data structure associated with the attribute.
    Returns
    NvMediaStatus The completion status of the operation. Possible values are:

    ◆ NvMediaIEPGetBits()

    NvMediaStatus NvMediaIEPGetBits ( const NvMediaIEP encoder,
    uint32_t *  numBytes,
    uint32_t  numBitstreamBuffers,
    const NvMediaBitstreamBuffer bitstreams,
    void *  extradata 
    )

    Returns the bitstream for a slice or a frame.

    It is safe to call the API to submit a task (NvMediaIEPFeedFrame) and this function from two different threads.

    The return value and behavior of NvMediaIEPGetBits is the same as that of NvMediaIEPBitsAvailable when called with NVMEDIA_ENCODE_BLOCKING_TYPE_NEVER, except that when NVMEDIA_STATUS_OK is returned, bitstreams is filled in addition to numBytes.

    Precondition
    NvMediaIEPFeedFrame()
    Postcondition
    Encoded bitstream corresponding to the submitted task is retrieved.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Note
    This API writes encoded data corresponding to 1 input frame to bitstreams buffer passed by the application. In cases where there are multiple encoder threads writing output to disk concurrently, the size of the encoded bitstream data is large, or in general frequency of data write is large, writing of the bitstream data to disk should be implemented/designed such that the encoder submission thread does not get blocked. One way to do this is to have two separate threads - one for input frame submission and the other to check/wait on the output. Additionally, in some cases for reaching maximum pipeline efficiency the application might need to reduce the number of write calls to disk occurring, as 1 disk write occurs every frame per encoder instance. One method to achieve this would be to have N successive NvMediaIEPGetBitsEx() calls corresponding to one encoder instance to write to a large contiguous buffer at defined offsets, post which the data corresponding to 'N' frames can be written through 1 write call to disk. This reduces the number of write calls to disk by a factor of N per encoder instance.
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [out]numBytesSize of the filled bitstream.
    Note
    When extradata and MV_BUFFER_DUMP is enabled, the MV buffer data will be a part of the bitstream. But the numBytes will only reflect the size of the actual encoded output, and not that of the MV buffer dump.
    Parameters
    [in]numBitstreamBuffersThe length of the bitstreams array
    Input range: 1 to 64 in steps of 1
    [in,out]bitstreamsA pointer to an array of type NvMediaBitstreamBuffer, the length of the array being passed in numBitstreamBuffers. Encoded bitstream data will be filled in the entries of the array, starting from index 0 to (numBitstreamBuffers - 1), as and when each entry in the array gets filled up. The minimum combined bitstream size needs to be at least equal to the numBytesAvailable returned by NvMediaIEPBitsAvailable call.
    Members of each NvMediaBitstreamBuffer are to be set as follows:
    [in,out]extradataExport encoding statistics. Pass a pointer to NvMediaEncodeOutputExtradata in order to populate encoding statistics. Refer NvMediaEncodeOutputExtradata documentation for more information on supported codecs, stats, etc. Pass NULL to disable this feature.
    Note
    This feature is not supported on QNX Safety.
    Input range: Non-NULL - valid pointer address
    Returns
    NvMediaStatus The completion status of the operation. Possible values are:

    ◆ NvMediaIEPGetEOFNvSciSyncFence()

    NvMediaStatus NvMediaIEPGetEOFNvSciSyncFence ( const NvMediaIEP encoder,
    NvSciSyncObj  eofnvscisyncobj,
    NvSciSyncFence eofnvscisyncfence 
    )

    Gets EOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation.

    The EOF NvSciSyncFence associated with an NvMediaIEPFeedFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIEPFeedFrame() operation has finished.

    This function returns the EOF NvSciSyncFence associated with the last NvMediaIEPFeedFrame() call. NvMediaIEPGetEOFNvSciSyncFence() must be called after an NvMediaIEPFeedFrame() call.

    For example, in this sequence of code:

    nvmstatus = NvMediaIEPFeedFrame(handle, srcsurf, srcrect, picparams, instanceid);
    nvmstatus = NvMediaIEPGetEOFNvSciSyncFence(handle, nvscisyncEOF, eofnvscisyncfence);

    expiry of eofnvscisyncfence indicates that the preceding NvMediaIEPFeedFrame() operation has finished.

    Precondition
    NvMediaIEPSetNvSciSyncObjforEOF()
    NvMediaIEPFeedFrame()
    Postcondition
    EOF NvSciSync fence for a submitted task is obtained


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]eofnvscisyncobjAn EOF NvSciSyncObj associated with the NvSciSyncFence which is being requested.
    Input range: A valid NvSciSyncObj
    [out]eofnvscisyncfenceA pointer to the EOF NvSciSyncFence.
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPGetVersion()

    NvMediaStatus NvMediaIEPGetVersion ( NvMediaVersion version)

    Retrieves the version information for the NvMedia IEP library.

    Precondition
    None
    Postcondition
    None


    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: Yes
      • De-Init: Yes
    Parameters
    [in]versionA pointer to a NvMediaVersion structure of the client.
    Returns
    NvMediaStatus The status of the operation. Possible values are: -NVMEDIA_STATUS_OK Indicates a successful operation. -NVMEDIA_STATUS_BAD_PARAMETER Indicates an invalid or NULL argument.

    ◆ NvMediaIEPInit()

    NvMediaStatus NvMediaIEPInit ( const NvMediaIEP encoder,
    NvMediaIEPType  encodeType,
    const void *  initParams,
    NvSciBufAttrList  bufAttrList,
    uint8_t  maxBuffering,
    NvMediaEncoderInstanceId  instanceId 
    )

    Initialize an NvMediaIEP object instance.

    Note
    Supported only in non-safety build
    Precondition
    NvMediaIEPCreateCtx()
    Postcondition
    NvMediaIEP object is initialized.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes

    Initializes an NvMediaIEP object capable of turning a stream of YUV surfaces characterized by NvSciBufAttrList into a compressed bitstream of the specified NvMediaIEPType codec type. Surfaces are fed to the encoder with NvMediaIEPFeedFrame and generated bitstream buffers are retrieved with NvMediaIEPGetBits.

    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]encodeTypeThe video compression standard to be used for encoding
    Input range: Supported values from NvMediaIEPType enumeration
    [in]initParamsThe encoder initialization parameters
    Input range: Pointer to a populated encode parameter structures:
    [in]bufAttrListPointer to a list of reconciled attributes that characterizes the input surface that needs to be encoded
    Input range: Non-NULL - valid pointer address obtained by a call to NvSciBufObjGetAttrList called with a valid NvSciBufObj that will contain the input content
    Input range: A valid NvSciBufAttrList
    [in]maxBufferingMaximum number of frames outstanding at any given point in time that NvMediaIEP can hold before its output must be retrieved using NvMediaIEPGetBits. If maxBuffering frames worth of encoded bitstream is yet to be retrived, NvMediaIEPFeedFrame returns NVMEDIA_STATUS_INSUFFICIENT_BUFFERING. In this case, encoded output of one or more frames must be retrived with NvMediaIEPGetBits before feeding more frames using NvMediaIEPFeedFrame
    Input range: The values between 4 and 16, in increments of 1
    [in]instanceIdThe ID of the NvENC HW engine instance
    Input range: The following instances are supported:
    Returns
    NVMEDIA_STATUS_OK

    ◆ NvMediaIEPInsertPreNvSciSyncFence()

    NvMediaStatus NvMediaIEPInsertPreNvSciSyncFence ( const NvMediaIEP encoder,
    const NvSciSyncFence prenvscisyncfence 
    )

    Sets an NvSciSyncFence as a prefence for an NvMediaIEPFeedFrame() NvSciSyncFence operation.

    You must call NvMediaIEPInsertPreNvSciSyncFence() before you call NvMediaIEPFeedFrame(). The NvMediaIEPFeedFrame() operation is started only after the expiry of the prenvscisyncfence.

    For example, in this sequence of code:

    nvmstatus = NvMediaIEPInsertPreNvSciSyncFence(handle, prenvscisyncfence);
    nvmstatus = NvMediaIEPFeedFrame(handle, srcsurf, srcrect, picparams, instanceid);

    the NvMediaIEPFeedFrame() operation is assured to start only after the expiry of prenvscisyncfence.

    You can set a maximum of NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaIEPInsertPreNvSciSyncFence() before NvMediaIEPFeedFrame(). After the call to NvMediaIEPFeedFrame(), all NvSciSyncFences previously inserted by NvMediaIEPInsertPreNvSciSyncFence() are removed, and they are not reused for the subsequent NvMediaIEPFeedFrame() calls.

    Precondition
    Pre-NvSciSync fence obtained from previous engine in the pipeline
    Postcondition
    Pre-NvSciSync fence is set


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]prenvscisyncfenceA pointer to NvSciSyncFence.
    Input range: Non-NULL - valid pointer address
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPRegisterNvSciBufObj()

    NvMediaStatus NvMediaIEPRegisterNvSciBufObj ( NvMediaIEP encoder,
    const NvSciBufObj  bufObj 
    )

    Registers NvSciBufObj for use with a NvMediaIEP handle.

    NvMediaIEP handle maintains a record of all the objects registered using this API and only the registered NvSciBufObj handles are accepted when submitted for encoding via NvMediaIEPFeedFrame. Even duplicated NvSciBufObj objects need to be registered using this API prior.

    This is a mandatory API on QNX Safety Build to ensure deterministic execution time of NvMediaIEPFeedFrame. Although optional on other platform configurations, it is highly recommended to use this API.

    Registration of the bufObj (input) is always with read-only permission.

    To ensure deterministic execution time of NvMediaIEPFeedFrame API:

    Maximum of 32 NvSciBufObj handles can be registered.

    Precondition
    NvMediaIEPCreate()
    NvMediaIEPRegisterNvSciSyncObj()
    Postcondition
    NvSciBufObj is registered with NvMediaIEP object


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]bufObjNvSciBufObj object
    Input range: A valid NvSciBufObj
    Returns
    NvMediaStatus, the completion status of operation:

    ◆ NvMediaIEPRegisterNvSciSyncObj()

    NvMediaStatus NvMediaIEPRegisterNvSciSyncObj ( const NvMediaIEP encoder,
    NvMediaNvSciSyncObjType  syncobjtype,
    NvSciSyncObj  syncObj 
    )

    Registers an NvSciSyncObj with NvMediaIEP.

    Every NvSciSyncObj (even duplicate objects) used by NvMediaIEP must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj can be passed to NvMediaIEPSetNvSciSyncObjforEOF(), NvMediaIEPGetEOFNvSciSyncFence(), or NvMediaIEPUnregisterNvSciSyncObj().

    For a given NvMediaIEP handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType, a maximum of 16 NvSciSyncObjs can be registered.

    Precondition
    NvMediaIEPFillNvSciSyncAttrList()
    Postcondition
    NvSciSyncObj registered with NvMediaIEP


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]syncobjtypeDetermines how nvscisync is used by encoder.
    Input range: Entries in NvMediaNvSciSyncObjType enumeration
    [in]nvscisyncThe NvSciSyncObj to be registered with encoder.
    Input range: A valid NvSciSyncObj
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPSetConfiguration()

    NvMediaStatus NvMediaIEPSetConfiguration ( NvMediaIEP encoder,
    const void *  configuration 
    )

    Sets the encoder configuration.

    The values in the configuration take effect only at the start of the next GOP.

    Precondition
    NvMediaIEPCreate()
    Postcondition
    NvMediaIEP object is configured


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]configurationConfiguration data.
    Input range: Supported configuration structures:
    Returns
    NvMediaStatus The completion status of the operation. Possible values are:

    ◆ NvMediaIEPSetNvSciSyncObjforEOF()

    NvMediaStatus NvMediaIEPSetNvSciSyncObjforEOF ( const NvMediaIEP encoder,
    NvSciSyncObj  nvscisyncEOF 
    )

    Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence.

    To use NvMediaIEPGetEOFNvSciSyncFence(), the application must call NvMediaIEPSetNvSciSyncObjforEOF() before it calls NvMediaIEPFeedFrame().

    NvMediaIEPSetNvSciSyncObjforEOF() currently may be called only once before each call to NvMediaIEPFeedFrame(). The application may choose to call this function only once before the first call to NvMediaIEPFeedFrame().

    Precondition
    NvMediaIEPRegisterNvSciSyncObj()
    Postcondition
    NvSciSyncObj to be used as EOF NvSciSyncFence is set


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]nvscisyncEOFA registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence.
    Input range: A valid NvSciSyncObj
    Returns
    NvMediaStatus The status of the operation. Possible values are:

    ◆ NvMediaIEPUnregisterNvSciBufObj()

    NvMediaStatus NvMediaIEPUnregisterNvSciBufObj ( const NvMediaIEP encoder,
    const NvSciBufObj  bufObj 
    )

    Un-registers NvSciBufObj which was previously registered with NvMediaIEP using NvMediaIEPRegisterNvSciBufObj().

    For all NvSciBufObj handles registered with NvMediaIEP using NvMediaIEPRegisterNvSciBufObj API, NvMediaIEPUnregisterNvSciBufObj must be called before calling NvMediaIEPDestroy API. For unregistration to succeed, it should be ensured that none of the submitted tasks on the bufObj are pending prior to calling NvMediaIEPUnregisterNvSciBufObj. In order to ensure this, NvMediaIEPGetBits API needs to be called prior to unregistration, until the output of all the submitted tasks are retrieved, following which NvMediaIEPUnregisterNvSciSyncObj should be called on all registered NvSciSyncObj.

    This is a mandatory API on QNX Safety Build to ensure deterministic execution time of NvMediaIEPFeedFrame. Although optional on other platform configurations, it is highly recommended to use this API.

    To ensure deterministic execution time of NvMediaIEPFeedFrame API:

    Precondition
    NvMediaIEPGetBits()
    NvMediaIEPUnregisterNvSciSyncObj() [verify that processing is complete]
    Postcondition
    NvSciBufObj is un-registered from NvMediaIEP object


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]bufObjNvSciBufObj object
    Input range: A valid NvSciBufObj
    Returns
    NvMediaStatus, the completion status of operation:

    ◆ NvMediaIEPUnregisterNvSciSyncObj()

    NvMediaStatus NvMediaIEPUnregisterNvSciSyncObj ( const NvMediaIEP encoder,
    NvSciSyncObj  syncObj 
    )

    Unregisters an NvSciSyncObj with NvMediaIEP.

    Every NvSciSyncObj registered with NvMediaIEP by NvMediaIEPRegisterNvSciSyncObj() must be unregistered before calling NvMediaIEPUnregisterNvSciBufObj() to unregister the NvSciBufObjs.

    Before the application calls this function, it must ensure that any NvMediaIEPFeedFrame() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMediaIEPFeedFrame() operation, the API returns NVMEDIA_STATUS_PENDING to indicate the same. NvSciSyncFenceWait() API can be called on the EOF NvSciSyncFence obtained post the last call to NvMediaIEPFeedFrame() to wait for the associated tasks to complete. The EOF NvSciSyncFence would have been previously obtained via a call to NvMediaIEPGetEOFNvSciSyncFence(). The other option would be to call NvMediaIEPGetBits() till there is no more output to retrieve.

    Precondition
    NvMediaIEPFeedFrame()
    NvMediaIEPGetBits() or NvSciSyncFenceWait() [verify that processing is complete]
    Postcondition
    NvSciSyncObj un-registered with NvMediaIEP


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions
        • Every thread should be invoked with relevant NvMediaIEP object.
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes
    Note
    This API is mandatory when multiple engines are pipelined in order to achieve synchronization between the engines
    Parameters
    [in]encoderA pointer to the NvMediaIEP object.
    Input range: Non-NULL - valid pointer address
    [in]nvscisyncAn NvSciSyncObj to be unregistered with encoder.
    Input range: A valid NvSciSyncObj
    Returns
    NvMediaStatus The status of the operation. Possible values are:
    NvMediaIEPGetEOFNvSciSyncFence
    NvMediaStatus NvMediaIEPGetEOFNvSciSyncFence(const NvMediaIEP *encoder, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
    Gets EOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation.
    NvMediaIEPInsertPreNvSciSyncFence
    NvMediaStatus NvMediaIEPInsertPreNvSciSyncFence(const NvMediaIEP *encoder, const NvSciSyncFence *prenvscisyncfence)
    Sets an NvSciSyncFence as a prefence for an NvMediaIEPFeedFrame() NvSciSyncFence operation.
    NvMediaIEPFeedFrame
    NvMediaStatus NvMediaIEPFeedFrame(NvMediaIEP *encoder, const NvSciBufObj frame, const void *picParams, NvMediaEncoderInstanceId instanceId)
    Submits the specified frame for encoding.
    人人超碰97caoporen国产