Skip to main content

MTEncode API Reference

Functions

Function MTEncCreateEncoder

MTENCSTATUS MTENCAPI MTEncCreateEncoder(MT_ENC_CREATE_ENCODER_PARAMS *createEncoderParams, void **encoder)

Creates an encoder.

Creates an encoder and returns a pointer to the encoder interface in the encoder parameter. The client should start the encoding process by calling this function first. The client must pass a pointer to the device in the *device parameter. If the creation of encoder fails, the client must call MTEncReleaseEncoder() before exiting.

Parameters:

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_UNSUPPORTED_DEVICE
MT_ENC_ERR_GENERIC

Function MTEncGetPresetConfig

MTENCSTATUS MTENCAPI MTEncGetPresetConfig(void *encoder, MT_ENC_CODEC_ID encodeID, MT_ENC_PRESET_ID presetID, MT_ENC_PRESET_CONFIG *presetConfig)

Returns a preset configuration structure supported for a given preset ID.

The preset configuration structure can be modified by the client depending on its use case and then used to initialize the encoder using MTEncInitEncoder().

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • encodeID: The encode ID, corresponding to which the supported presets are to be retrieved.
  • presetID: The preset ID, corresponding to which the encoding configurations are to be retrieved.
  • presetConfig: The requested preset encoder attribute set. For more information, see _MT_ENC_CONFIG.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_GENERIC

Function MTEncInitEncoder

MTENCSTATUS MTENCAPI MTEncInitEncoder(void *encoder, MT_ENC_INIT_PARAMS *initParams)

Initializes the encoder.

This function must be used to initialize the encoder. The initialization parameters are passed using *initParams. The client must send the following fields of the _MT_ENC_INIT_PARAMS structure with a valid value.

The client can pass a preset ID directly to the MTEncodeAPI interface using MT_ENC_INIT_PARAMS::presetID. If the client does not pass MT_ENC_INIT_PARAMS::encodeConfig, the codec-specific parameters will be selected based on the preset ID. If the client passes a custom _MT_ENC_CONFIG structure through MT_ENC_INIT_PARAMS::encodeConfig, it will override the codec-specific parameters based on the preset ID. It is recommended that even if the client passes a custom configuration, it should also send a preset ID. In this case, the preset ID passed by the client will not override any of the custom configuration parameters programmed by the client, it is only used as a hint by the MTEncodeAPI interface to determine certain encoder parameters which are not exposed to the client.

The encoder supports the following operation modes:

  • The asynchronous mode

  • The synchronous mode

The client can select asynchronous or synchronous mode by setting enableEncodeAsync in _MT_ENC_INIT_PARAMS to 1 or 0 respectively. Asynchronous mode of operation:

The asynchronous mode can be enabled by setting MT_ENC_INIT_PARAMS::enableEncodeAsync to 1. The client operating in the asynchronous mode must allocate a completion event object for each output buffer and pass the completion event object in the MTEncEncodeFrame() function. The client can create another thread and wait on the event object to be signalled by the MTEncodeAPI interface on completion of the encoding process for the output frame. This should unblock the main thread from submitting work to the encoder. When the event is signalled, the client can call MTEncodeAPI interfaces to copy the bitstream data using the MTEncLockOutputBuffer() function. This is the preferred mode of operation.

NOTE: Asynchronous mode is not supported on Linux.

Synchronous mode of operation:

The client can select the synchronous mode by setting MT_ENC_INIT_PARAMS::enableEncodeAsync to 0. The client working in the synchronous mode can work in a single-threaded or multithreaded mode. The client does not need to allocate any event objects. The client can only lock the bitstream data after the MTEncodeAPI interface has returned MT_ENC_SUCCESS from encoding pictures. MTEncodeAPI can return the MT_ENC_ERR_NEED_MORE_INPUT error code from MTEncEncodeFrame(). The client must not lock the output buffer in such a case but should send the next frame for encoding. The client must keep on calling MTEncEncodeFrame() until it returns MT_ENC_SUCCESS.
The client must always lock the bitstream data in the order in which it has been submitted.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • initParams: For more information, see _MT_ENC_INIT_PARAMS.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_GENERIC

Function MTEncReconfigureEncoder

MTENCSTATUS MTENCAPI MTEncReconfigureEncoder(void *encoder, MT_ENC_RECONFIGURE_PARAMS *reInitEncodeParams)

Reconfigure an existing encoding session.

Reconfigure an existing encoding session. The client should call this API to change/reconfigure the parameter passed during MTEncInitializeEncoder API call. Currently Reconfiguration of following are supported. Change in bitrate. Change in fps.

Parameters:

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_GENERIC

Function MTEncCreateOutputBuffer

MTENCSTATUS MTENCAPI MTEncCreateOutputBuffer(void *encoder, MT_ENC_CREATE_OUTPUT_BUFFER *createOutputBufferParams)

Allocates an output bitstream buffer.

This function is used to allocate an output bitstream buffer and returns a MT_ENC_OUTPUT_PTR to bitstream buffer to the client in MT_ENC_CREATE_OUTPUT_BUFFER::outputBuffer. The client can only call this function after the encoder has been initialized using MTEncInitEncoder(). The minimum number of output buffers allocated by the client must be at least (2 * _MT_ENC_CONFIG::frameIntervalP + 1). The client can only access the output bitsteam data by locking outputBuffer using MTEncLockOutputBuffer().

Parameters:

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncReleaseOutputBuffer

MTENCSTATUS MTENCAPI MTEncReleaseOutputBuffer(void *encoder, MT_ENC_OUTPUT_PTR outputBuffer)

Releases an output buffer.

This function is used to release the output bitstream buffer allocated using MTEncCreateOutputBuffer(). The client must release the output bitstream buffer using this function before destroying the encoder.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • outputBuffer: A pointer to the bitstream buffer being released.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncEncodeFrame

MTENCSTATUS MTENCAPI MTEncEncodeFrame(void *encoder, MT_ENC_PIC_PARAMS *encodePicParams)

Submits an input picture for encoding.

This function is used to submit an input picture buffer for encoding. The encoding parameters are passed using *encodePicParams which is a pointer to _MT_ENC_PIC_PARAMS.

The MTEncodeAPI interface might return the MT_ENC_ERR_NEED_MORE_INPUT error code but the client must not treat it as a fatal error. The MTEncodeAPI interface might not be able to submit an input picture buffer for encoding immediately due to re-ordering for B-frames. The MTEncodeAPI interface cannot submit the input picture which is decided to be encoded as a B-frame as it waits for backward reference from temporally subsequent frames. This input picture is buffered internally and waits for more input pictures to arrive. The client must not call MTEncLockOutputBuffer() on the output buffers whose MTEncEncodeFrame() returns MT_ENC_ERR_NEED_MORE_INPUT. The client must wait for the MTEncodeAPI interface to return MT_ENC_SUCCESS before locking the output buffer to read the encoded bitstream data.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • encodePicParams: A pointer to the _MT_ENC_PIC_PARAMS structure.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_BUSY
MT_ENC_ERR_NEED_MORE_INPUT
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncEncodeDesktop

MTENCSTATUS MTENCAPI MTEncEncodeDesktop(void *encoder, MT_ENC_DESKTOP_PARAMS *encodeDesktopParams)

Submits a request for encoding current desktop.

This function is used to submit a request for encoding current desktop. The encoding parameters are passed using *encodePicParams which is a pointer to _MT_ENC_PIC_PARAMS.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • encodeDesktopParams: A pointer to the MT_ENC_DESKTOP_PARAMS structure.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_BUSY
MT_ENC_ERR_NEED_MORE_INPUT
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncBeginDesktopCapture

MTENCSTATUS MTENCAPI MTEncBeginDesktopCapture(void *encoder, MT_ENC_CAPTURE_DESKTOP_PARAMS *captureDesktopParams)

Initializes desktop capture session.

This function is used to initialize a desktop capture session. This function is paired with MTEncEndDesktopCapture.

Parameters:

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_INVALID_DESKTOP_ID
MT_ENC_ERR_TIMEOUT
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncEndDesktopCapture

MTENCSTATUS MTENCAPI MTEncEndDesktopCapture(void *encoder, MT_ENC_INPUT_PTR capturedBuffer)

Releases desktop capture session.

This function is used to release the desktop capture session initialized with MTEncBeginDesktopCapture. This function must be called after completing the desktop capture and encoding process. This function is paired with MTEncBeginDesktopCapture.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • capturedBuffer: MT_ENC_INPUT_PTR

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncLockOutputBuffer

MTENCSTATUS MTENCAPI MTEncLockOutputBuffer(void *encoder, MT_ENC_LOCK_BUFFER *lockOutputBufferParams)

Locks output buffer.

This function is used to lock the buffer to read the encoded data. The client can only access the encoded data by calling this function. A pointer to client accessible encoded data is returned in the MT_ENC_LOCK_BUFFER::outputBufferPtr field. The size of the encoded data in the output buffer is returned in MT_ENC_LOCK_BUFFER::outputBufferSizeInBytes. The MTEncodeAPI interface also returns the output picture type of the encoded frame in MT_ENC_LOCK_BUFFER::pictureType.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • lockOutputBufferParams: A pointer to the _MT_ENC_LOCK_BUFFER structure.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncUnlockOutputBuffer

MTENCSTATUS MTENCAPI MTEncUnlockOutputBuffer(void *encoder, MT_ENC_OUTPUT_PTR outputBuffer)

Unlocks the output buffer.

This function is used to unlock the output buffer after the client has read the encoded data from the output buffer. The client must call this function to unlock the output buffer which it has previously locked using MTEncLockOutputBuffer() . Using a locked buffer in MTEncEncodeFrame() will cause the function to fail.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • outputBuffer: The bitstream buffer pointer that is being unlocked.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_GENERIC

Function MTEncMapResource

MTENCSTATUS MTENCAPI MTEncMapResource(void *encoder, MT_ENC_MAP_RESOURCE *mapInputResParams)

Maps an externally created input resource pointer for encoding.

Maps an externally allocated input resource using and returns an MT_ENC_INPUT_PTR which can be used for encoding in MTEncEncodeFrame(). The mapped resource is returned in MT_ENC_MAP_RESOURCE::mappedResource. This function provides synchronization guarantee that any graphics or compute work submitted on the input buffer is completed before the buffer is used for encoding. The client should not access any input buffer while they are being mapped by the encoder.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • mapInputResParams: A pointer to _MT_ENC_MAP_RESOURCE.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_MAP_FAILED
MT_ENC_ERR_GENERIC

Function MTEncUnmapResource

MTENCSTATUS MTENCAPI MTEncUnmapResource(void *encoder, MT_ENC_INPUT_PTR mappedInputBuffer)

Unmaps an MT_ENC_INPUT_PTR which was mapped for encoding.

Unmaps an input buffer that was previously mapped using MTEncMapResource(). The mapping created using MTEncMapResource() should be invalidated using this function before the external resource is destroyed by the client. The client must unmap the buffer after MTEncLockOutputBuffer() returns successfully for encode work submitted using the mapped input buffer.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.
  • mappedInputBuffer: A pointer to MT_ENC_INPUT_PTR.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_INVALID_VERSION
MT_ENC_ERR_ENCODER_NOT_INITIALIZED
MT_ENC_ERR_RESOURCE_NOT_MAPPED
MT_ENC_ERR_GENERIC

Function MTEncReleaseEncoder

MTENCSTATUS MTENCAPI MTEncReleaseEncoder(void *encoder)

Releases an encoder.

Releases the encoder previously created using MTEncCreateEncoder(). The client must flush the encoder before freeing any resources. To flush the encoder, the client must pass a NULL encode picture packet and either wait for MTEncEncodeFrame() to return in the synchronous mode. The client must free all the input and output resources created using MTEncodeAPI before releasing the encoder.

Parameters:

  • encoder: A pointer to the MTEncodeAPI interface.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_NO_ENCODE_DEVICE
MT_ENC_ERR_OUT_OF_MEMORY
MT_ENC_ERR_GENERIC

Function MTEncGetCaps

MTENCSTATUS MTENCAPI MTEncGetCaps(void *encoder, MT_ENC_CODEC_ID encodeID, MT_ENC_CAPS_PARAM *capsParam, int *capsVal)

Retrieves the capability value for a specified encoder attribute.

The function returns the capability value for a given encoder attribute. The encoder attributes being queried are enumerated in MT_ENC_CAPS_PARAM fields.

Parameters:

  • encoder: Pointer to the MTEncodeAPI interface.
  • encodeID: Encode ID, corresponding to which the capability attribute is to be retrieved.
  • capsParam: Used to specify attribute being queried. Refer MT_ENC_CAPS_PARAM for more details.
  • capsVal: The value corresponding to the capability attribute being queried.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_GENERIC

Function MTEncGetSequenceParams

MTENCSTATUS MTENCAPI MTEncGetSequenceParams(void *encoder, MT_ENC_SEQUENCE_PARAM_PAYLOAD *seqPayload)

Get encoded sequence and picture header.

This function can be used to retrieve the sequence and picture header out of band. The client must call this function only after the encoder has been initialized using MTEncInitEncoder() function. The client must allocate the memory where the MtEncodeAPI interface can copy the bitstream header and pass the pointer to the memory in MT_ENC_SEQUENCE_PARAM_PAYLOAD::spsppsBuffer. The size of buffer is passed in the field MT_ENC_SEQUENCE_PARAM_PAYLOAD::inBufferSize. The MtEncodeAPI interface will copy the bitstream header payload and returns the actual size of the bitstream header in the field MT_ENC_SEQUENCE_PARAM_PAYLOAD::outSPSPPSPayloadSize.

Parameters:

  • encoder: Pointer to the MtEncodeAPI interface.
  • seqPayload: MT_ENC_SEQUENCE_PARAM_PAYLOAD *

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM
MT_ENC_ERR_GENERIC

Function MTEncodeAPIGetMaxSupportedVersion

MTENCSTATUS MTENCAPI MTEncodeAPIGetMaxSupportedVersion(uint32_t *version)

Gets the latest MTEncodeAPI version supported by the driver.

This function can be used by clients to determine if the driver supports the MTEncodeAPI header that the application was compiled with.

Parameters:

  • version: A pointer to the requested value. The 4 least significant bits in the returned value indicate the minor version and the rest of the bits indicate the major version of the latest supported version.

Returns:

MT_ENC_SUCCESS
MT_ENC_ERR_INVALID_PARAM

Function MTEncodeAPICreateInstance

MTENCSTATUS MTENCAPI MTEncodeAPICreateInstance(MT_ENCODE_API_FUNCTION_LIST *functionList)

The entry point to the MTEncodeAPI interface.

Creates an instance of the MTEncodeAPI interface, and populates the functionList with function pointers to the API routines implemented by MTEncodeAPI.

Parameters:

  • functionList: A pointer to MT_ENCODE_API_FUNCTION_LIST.

Returns:

  • MT_ENC_SUCCESS
  • MT_ENC_ERR_INVALID_PARAM
  • MT_ENC_ERR_INVALID_VERSION

MTEncodeAPI data structures

Enumeration types

Enumeration type _MT_ENC_CODEC_ID

Definition: mtEncodeAPI.h (line 120)

enum _MT_ENC_CODEC_ID {
MT_ENC_CODEC_ID_H264 = 0x1,
MT_ENC_CODEC_ID_HEVC = 0x2,
MT_ENC_CODEC_ID_AV1 = 0x3
}

Codec IDs supported by the MTEncodeAPI interface.

Enumerator MT_ENC_CODEC_ID_H264

The H.264 codec ID.

Enumerator MT_ENC_CODEC_ID_HEVC

The HEVC codec ID.

Enumerator MT_ENC_CODEC_ID_AV1

The AV1 codec ID. Need libva >= 2.16 on Linux

Enumeration type _MT_ENC_CODEC_PROFILE_ID

Definition: mtEncodeAPI.h (line 130)

enum _MT_ENC_CODEC_PROFILE_ID {
MT_ENC_CODEC_PROFILE_ID_AUTOSELECT = 0x1,
MT_ENC_CODEC_PROFILE_ID_BASELINE_H264 = 0x2,
MT_ENC_CODEC_PROFILE_ID_MAIN_H264 = 0x3,
MT_ENC_CODEC_PROFILE_ID_HIGH_H264 = 0x4,
MT_ENC_CODEC_PROFILE_ID_HIGH10_H264 = 0x5,
MT_ENC_CODEC_PROFILE_ID_MAIN_HEVC = 0x10,
MT_ENC_CODEC_PROFILE_ID_MAIN_10_HEVC = 0x11,
MT_ENC_CODEC_PROFILE_ID_MAIN_AV1 = 0x20
}

Profile IDs supported by the MTEncodeAPI interface.

Enumerator MT_ENC_CODEC_PROFILE_ID_AUTOSELECT
Enumerator MT_ENC_CODEC_PROFILE_ID_BASELINE_H264
Enumerator MT_ENC_CODEC_PROFILE_ID_MAIN_H264
Enumerator MT_ENC_CODEC_PROFILE_ID_HIGH_H264
Enumerator MT_ENC_CODEC_PROFILE_ID_HIGH10_H264
Enumerator MT_ENC_CODEC_PROFILE_ID_MAIN_HEVC
Enumerator MT_ENC_CODEC_PROFILE_ID_MAIN_10_HEVC
Enumerator MT_ENC_CODEC_PROFILE_ID_MAIN_AV1

Enumeration type _MT_ENC_PRESET_ID

Definition: mtEncodeAPI.h (line 148)

enum _MT_ENC_PRESET_ID {
MT_ENC_PRESET_ID_DEFAULT = 0x1
}

Preset IDs supported by the MTEncodeAPI interface.

Enumerator MT_ENC_PRESET_ID_DEFAULT

The default preset ID.

Enumeration type _MT_ENC_PARAMS_RC_MODE

Definition: mtEncodeAPI.h (line 156)

enum _MT_ENC_PARAMS_RC_MODE {
MT_ENC_PARAMS_RC_CONSTQP = 0x0,
MT_ENC_PARAMS_RC_CBR = 0x1,
MT_ENC_PARAMS_RC_VBR = 0x2
}

Rate control (RC) modes.

Enumerator MT_ENC_PARAMS_RC_CONSTQP

The constant QP mode.

Enumerator MT_ENC_PARAMS_RC_CBR

The constant bit rate (CBR) mode.

Enumerator MT_ENC_PARAMS_RC_VBR

The variable bit rate (VBR) mode.

Enumeration type _MT_ENC_PIC_TYPE

Definition: mtEncodeAPI.h (line 166)

enum _MT_ENC_PIC_TYPE {
MT_ENC_PIC_TYPE_I = 0x0,
MT_ENC_PIC_TYPE_P = 0x1,
MT_ENC_PIC_TYPE_B = 0x2,
MT_ENC_PIC_TYPE_IDR = 0x3,
MT_ENC_PIC_TYPE_UNKNOWN = 0xFF
}

Input picture types.

Enumerator MT_ENC_PIC_TYPE_I

An intra-predicted picture.

Enumerator MT_ENC_PIC_TYPE_P

A forward-predicted picture.

Enumerator MT_ENC_PIC_TYPE_B

A bi-directionally predicted picture.

Enumerator MT_ENC_PIC_TYPE_IDR

An instantaneous decoding refresh (IDR) picture.

Enumerator MT_ENC_PIC_TYPE_UNKNOWN

An unknown type.

Enumeration type _MT_ENC_BUFFER_FORMAT

Definition: mtEncodeAPI.h (line 178)

enum _MT_ENC_BUFFER_FORMAT {
MT_ENC_BUFFER_FORMAT_UNDEFINED = 0x00000000,
MT_ENC_BUFFER_FORMAT_NV12 = 0x00000001,
MT_ENC_BUFFER_FORMAT_BGRA = 0x10000000,
MT_ENC_BUFFER_FORMAT_RGBA = 0x01000000,
MT_ENC_BUFFER_FORMAT_P010_LE = 0x00010000,
MT_ENC_BUFFER_FORMAT_RGBAF16_LE = 0x00001000
}

Input buffer formats.

Enumerator MT_ENC_BUFFER_FORMAT_UNDEFINED

The undefined buffer format.

Enumerator MT_ENC_BUFFER_FORMAT_NV12

Semi-planar YUV. The Y plane is followed by the interleaved UV plane.

Enumerator MT_ENC_BUFFER_FORMAT_BGRA

8-bit packed pixel format in byte order: B, G, R, A (one byte per channel).

Enumerator MT_ENC_BUFFER_FORMAT_RGBA

8-bit packed pixel format in byte order: R, G, B, A (one byte per channel).

Enumerator MT_ENC_BUFFER_FORMAT_P010_LE

Like NV12, with 10 bits per pixel (bpp) per component, data in the high bits, zeros in the low bits, little-endian.

Enumerator MT_ENC_BUFFER_FORMAT_RGBAF16_LE

IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp. A four-component, 64-bit floating-point format that supports 16 bits per channel including alpha. Can only be used with Windows now.

Enumeration type _MT_ENC_BUFFER_TYPE

Definition: mtEncodeAPI.h (line 191)

enum _MT_ENC_BUFFER_TYPE {
MT_ENC_BUFFER_TYPE_SYSTEM_MEMORY = 0x0,
MT_ENC_BUFFER_TYPE_FD = 0x1
}

Input buffer types. Used only on Linux.

Enumerator MT_ENC_BUFFER_TYPE_SYSTEM_MEMORY

The buffer is system memory.

Enumerator MT_ENC_BUFFER_TYPE_FD

The buffer is fd handle.

Enumeration type _MT_ENC_LEVEL

Definition: mtEncodeAPI.h (line 200)

enum _MT_ENC_LEVEL {
MT_ENC_LEVEL_AUTOSELECT = 0x0,
MT_ENC_LEVEL_H264_1 = 10,
MT_ENC_LEVEL_H264_11 = 11,
MT_ENC_LEVEL_H264_12 = 12,
MT_ENC_LEVEL_H264_13 = 13,
MT_ENC_LEVEL_H264_2 = 20,
MT_ENC_LEVEL_H264_21 = 21,
MT_ENC_LEVEL_H264_22 = 22,
MT_ENC_LEVEL_H264_3 = 30,
MT_ENC_LEVEL_H264_31 = 31,
MT_ENC_LEVEL_H264_32 = 32,
MT_ENC_LEVEL_H264_4 = 40,
MT_ENC_LEVEL_H264_41 = 41,
MT_ENC_LEVEL_H264_42 = 42,
MT_ENC_LEVEL_H264_5 = 50,
MT_ENC_LEVEL_H264_51 = 51,
MT_ENC_LEVEL_H264_52 = 52,
MT_ENC_LEVEL_HEVC_1 = 30,
MT_ENC_LEVEL_HEVC_2 = 60,
MT_ENC_LEVEL_HEVC_21 = 63,
MT_ENC_LEVEL_HEVC_3 = 90,
MT_ENC_LEVEL_HEVC_31 = 93,
MT_ENC_LEVEL_HEVC_4 = 120,
MT_ENC_LEVEL_HEVC_41 = 123,
MT_ENC_LEVEL_HEVC_5 = 150,
MT_ENC_LEVEL_HEVC_51 = 153,
MT_ENC_LEVEL_HEVC_52 = 156,
MT_ENC_LEVEL_HEVC_6 = 180,
MT_ENC_LEVEL_HEVC_61 = 183,
MT_ENC_LEVEL_HEVC_62 = 186,
MT_ENC_TIER_HEVC_MAIN = 0,
MT_ENC_TIER_HEVC_HIGH = 1,
MT_ENC_LEVEL_AV1_2 = 0,
MT_ENC_LEVEL_AV1_21 = 1,
MT_ENC_LEVEL_AV1_22 = 2,
MT_ENC_LEVEL_AV1_23 = 3,
MT_ENC_LEVEL_AV1_3 = 4,
MT_ENC_LEVEL_AV1_31 = 5,
MT_ENC_LEVEL_AV1_32 = 6,
MT_ENC_LEVEL_AV1_33 = 7,
MT_ENC_LEVEL_AV1_4 = 8,
MT_ENC_LEVEL_AV1_41 = 9,
MT_ENC_LEVEL_AV1_42 = 10,
MT_ENC_LEVEL_AV1_43 = 11,
MT_ENC_LEVEL_AV1_5 = 12,
MT_ENC_LEVEL_AV1_51 = 13,
MT_ENC_LEVEL_AV1_52 = 14,
MT_ENC_LEVEL_AV1_53 = 15,
MT_ENC_LEVEL_AV1_6 = 16,
MT_ENC_LEVEL_AV1_61 = 17,
MT_ENC_LEVEL_AV1_62 = 18,
MT_ENC_LEVEL_AV1_63 = 19,
MT_ENC_LEVEL_AV1_7 = 20,
MT_ENC_LEVEL_AV1_71 = 21,
MT_ENC_LEVEL_AV1_72 = 22,
MT_ENC_LEVEL_AV1_73 = 23,
MT_ENC_LEVEL_AV1_AUTOSELECT,
MT_ENC_TIER_AV1_0 = 0,
MT_ENC_TIER_AV1_1 = 1
}

Encoding levels.

Enumerator MT_ENC_LEVEL_AUTOSELECT
Enumerator MT_ENC_LEVEL_H264_1
Enumerator MT_ENC_LEVEL_H264_11
Enumerator MT_ENC_LEVEL_H264_12
Enumerator MT_ENC_LEVEL_H264_13
Enumerator MT_ENC_LEVEL_H264_2
Enumerator MT_ENC_LEVEL_H264_21
Enumerator MT_ENC_LEVEL_H264_22
Enumerator MT_ENC_LEVEL_H264_3
Enumerator MT_ENC_LEVEL_H264_31
Enumerator MT_ENC_LEVEL_H264_32
Enumerator MT_ENC_LEVEL_H264_4
Enumerator MT_ENC_LEVEL_H264_41
Enumerator MT_ENC_LEVEL_H264_42
Enumerator MT_ENC_LEVEL_H264_5
Enumerator MT_ENC_LEVEL_H264_51
Enumerator MT_ENC_LEVEL_H264_52
Enumerator MT_ENC_LEVEL_HEVC_1
Enumerator MT_ENC_LEVEL_HEVC_2
Enumerator MT_ENC_LEVEL_HEVC_21
Enumerator MT_ENC_LEVEL_HEVC_3
Enumerator MT_ENC_LEVEL_HEVC_31
Enumerator MT_ENC_LEVEL_HEVC_4
Enumerator MT_ENC_LEVEL_HEVC_41
Enumerator MT_ENC_LEVEL_HEVC_5
Enumerator MT_ENC_LEVEL_HEVC_51
Enumerator MT_ENC_LEVEL_HEVC_52
Enumerator MT_ENC_LEVEL_HEVC_6
Enumerator MT_ENC_LEVEL_HEVC_61
Enumerator MT_ENC_LEVEL_HEVC_62
Enumerator MT_ENC_TIER_HEVC_MAIN
Enumerator MT_ENC_TIER_HEVC_HIGH
Enumerator MT_ENC_LEVEL_AV1_2
Enumerator MT_ENC_LEVEL_AV1_21
Enumerator MT_ENC_LEVEL_AV1_22
Enumerator MT_ENC_LEVEL_AV1_23
Enumerator MT_ENC_LEVEL_AV1_3
Enumerator MT_ENC_LEVEL_AV1_31
Enumerator MT_ENC_LEVEL_AV1_32
Enumerator MT_ENC_LEVEL_AV1_33
Enumerator MT_ENC_LEVEL_AV1_4
Enumerator MT_ENC_LEVEL_AV1_41
Enumerator MT_ENC_LEVEL_AV1_42
Enumerator MT_ENC_LEVEL_AV1_43
Enumerator MT_ENC_LEVEL_AV1_5
Enumerator MT_ENC_LEVEL_AV1_51
Enumerator MT_ENC_LEVEL_AV1_52
Enumerator MT_ENC_LEVEL_AV1_53
Enumerator MT_ENC_LEVEL_AV1_6
Enumerator MT_ENC_LEVEL_AV1_61
Enumerator MT_ENC_LEVEL_AV1_62
Enumerator MT_ENC_LEVEL_AV1_63
Enumerator MT_ENC_LEVEL_AV1_7
Enumerator MT_ENC_LEVEL_AV1_71
Enumerator MT_ENC_LEVEL_AV1_72
Enumerator MT_ENC_LEVEL_AV1_73
Enumerator MT_ENC_LEVEL_AV1_AUTOSELECT
Enumerator MT_ENC_TIER_AV1_0
Enumerator MT_ENC_TIER_AV1_1

Enumeration type _MT_ENC_VUI_VIDEO_FORMAT

Definition: mtEncodeAPI.h (line 272)

enum _MT_ENC_VUI_VIDEO_FORMAT {
MT_ENC_VUI_VIDEO_FORMAT_COMPONENT = 0,
MT_ENC_VUI_VIDEO_FORMAT_PAL = 1,
MT_ENC_VUI_VIDEO_FORMAT_NTSC = 2,
MT_ENC_VUI_VIDEO_FORMAT_SECAM = 3,
MT_ENC_VUI_VIDEO_FORMAT_MAC = 4,
MT_ENC_VUI_VIDEO_FORMAT_UNSPECIFIED = 5
}

Enums related to fields in VUI parameters.

Enumerator MT_ENC_VUI_VIDEO_FORMAT_COMPONENT
Enumerator MT_ENC_VUI_VIDEO_FORMAT_PAL
Enumerator MT_ENC_VUI_VIDEO_FORMAT_NTSC
Enumerator MT_ENC_VUI_VIDEO_FORMAT_SECAM
Enumerator MT_ENC_VUI_VIDEO_FORMAT_MAC
Enumerator MT_ENC_VUI_VIDEO_FORMAT_UNSPECIFIED

Enumeration type _MT_ENC_VUI_COLOR_PRIMARIES

Definition: mtEncodeAPI.h (line 282)

enum _MT_ENC_VUI_COLOR_PRIMARIES {
MT_ENC_VUI_COLOR_PRIMARIES_UNDEFINED = 0,
MT_ENC_VUI_COLOR_PRIMARIES_BT709 = 1,
MT_ENC_VUI_COLOR_PRIMARIES_UNSPECIFIED = 2,
MT_ENC_VUI_COLOR_PRIMARIES_RESERVED = 3,
MT_ENC_VUI_COLOR_PRIMARIES_BT470M = 4,
MT_ENC_VUI_COLOR_PRIMARIES_BT470BG = 5,
MT_ENC_VUI_COLOR_PRIMARIES_SMPTE170M = 6,
MT_ENC_VUI_COLOR_PRIMARIES_SMPTE240M = 7,
MT_ENC_VUI_COLOR_PRIMARIES_FILM = 8,
MT_ENC_VUI_COLOR_PRIMARIES_BT2020 = 9,
MT_ENC_VUI_COLOR_PRIMARIES_SMPTE428 = 10,
MT_ENC_VUI_COLOR_PRIMARIES_SMPTE431 = 11,
MT_ENC_VUI_COLOR_PRIMARIES_SMPTE432 = 12,
MT_ENC_VUI_COLOR_PRIMARIES_JEDEC_P22 = 22
}
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_UNDEFINED
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_BT709
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_UNSPECIFIED
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_RESERVED
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_BT470M
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_BT470BG
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_SMPTE170M
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_SMPTE240M
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_FILM
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_BT2020
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_SMPTE428
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_SMPTE431
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_SMPTE432
Enumerator MT_ENC_VUI_COLOR_PRIMARIES_JEDEC_P22

Enumeration type _MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Definition: mtEncodeAPI.h (line 300)

enum _MT_ENC_VUI_TRANSFER_CHARACTERISTIC {
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_UNDEFINED = 0,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT709 = 1,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_UNSPECIFIED = 2,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_RESERVED = 3,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470M = 4,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470BG = 5,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE170M = 6,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE240M = 7,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LINEAR = 8,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG = 9,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG_SQRT = 10,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_IEC61966_2_4 = 11,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT1361_ECG = 12,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SRGB = 13,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_10 = 14,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_12 = 15,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE2084 = 16,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE428 = 17,
MT_ENC_VUI_TRANSFER_CHARACTERISTIC_ARIB_STD_B67 = 18
}
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_UNDEFINED
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT709
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_UNSPECIFIED
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_RESERVED
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470M
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470BG
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE170M
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE240M
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LINEAR
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG_SQRT
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_IEC61966_2_4
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT1361_ECG
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SRGB
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_10
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_12
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE2084
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE428
Enumerator MT_ENC_VUI_TRANSFER_CHARACTERISTIC_ARIB_STD_B67

Enumeration type _MT_ENC_VUI_MATRIX_COEFFS

Definition: mtEncodeAPI.h (line 323)

enum _MT_ENC_VUI_MATRIX_COEFFS {
MT_ENC_VUI_MATRIX_COEFFS_RGB = 0,
MT_ENC_VUI_MATRIX_COEFFS_BT709 = 1,
MT_ENC_VUI_MATRIX_COEFFS_UNSPECIFIED = 2,
MT_ENC_VUI_MATRIX_COEFFS_RESERVED = 3,
MT_ENC_VUI_MATRIX_COEFFS_FCC = 4,
MT_ENC_VUI_MATRIX_COEFFS_BT470BG = 5,
MT_ENC_VUI_MATRIX_COEFFS_SMPTE170M = 6,
MT_ENC_VUI_MATRIX_COEFFS_SMPTE240M = 7,
MT_ENC_VUI_MATRIX_COEFFS_YCGCO = 8,
MT_ENC_VUI_MATRIX_COEFFS_BT2020_NCL = 9,
MT_ENC_VUI_MATRIX_COEFFS_BT2020_CL = 10,
MT_ENC_VUI_MATRIX_COEFFS_SMPTE2085 = 11
}
Enumerator MT_ENC_VUI_MATRIX_COEFFS_RGB
Enumerator MT_ENC_VUI_MATRIX_COEFFS_BT709
Enumerator MT_ENC_VUI_MATRIX_COEFFS_UNSPECIFIED
Enumerator MT_ENC_VUI_MATRIX_COEFFS_RESERVED
Enumerator MT_ENC_VUI_MATRIX_COEFFS_FCC
Enumerator MT_ENC_VUI_MATRIX_COEFFS_BT470BG
Enumerator MT_ENC_VUI_MATRIX_COEFFS_SMPTE170M
Enumerator MT_ENC_VUI_MATRIX_COEFFS_SMPTE240M
Enumerator MT_ENC_VUI_MATRIX_COEFFS_YCGCO
Enumerator MT_ENC_VUI_MATRIX_COEFFS_BT2020_NCL
Enumerator MT_ENC_VUI_MATRIX_COEFFS_BT2020_CL
Enumerator MT_ENC_VUI_MATRIX_COEFFS_SMPTE2085

Enumeration type _MTENCSTATUS

Definition: mtEncodeAPI.h (line 342)

enum _MTENCSTATUS {
MT_ENC_SUCCESS,
MT_ENC_ERR_NO_ENCODE_DEVICE,
MT_ENC_ERR_UNSUPPORTED_DEVICE,
MT_ENC_ERR_INVALID_PARAM,
MT_ENC_ERR_OUT_OF_MEMORY,
MT_ENC_ERR_ENCODER_NOT_INITIALIZED,
MT_ENC_ERR_INVALID_VERSION,
MT_ENC_ERR_MAP_FAILED,
MT_ENC_ERR_RESOURCE_NOT_MAPPED,
MT_ENC_ERR_NEED_MORE_INPUT,
MT_ENC_ERR_ENCODER_BUSY,
MT_ENC_ERR_GENERIC,
MT_ENC_ERR_RESOLUTION_MISMATCHED,
MT_ENC_ERR_PIXELFORMAT_MISMATCHED,
MT_ENC_ERR_INVALID_DESKTOP_ID,
MT_ENC_ERR_TIMEOUT,
MT_ENC_ERR_HDRSTATUS_MISMATCHED
}

Error codes.

Enumerator MT_ENC_SUCCESS

This indicates that the API call returned with no errors.

Enumerator MT_ENC_ERR_NO_ENCODE_DEVICE

Devices capable of encoding are not detected or invalid.

Enumerator MT_ENC_ERR_UNSUPPORTED_DEVICE

The devices are not supported.

Enumerator MT_ENC_ERR_INVALID_PARAM

At least one parameter value that is passed to the API is invalid.

Enumerator MT_ENC_ERR_OUT_OF_MEMORY

Out of memory.

Enumerator MT_ENC_ERR_ENCODER_NOT_INITIALIZED

The encoder has not been initialized with MTEncInitEncoder() or initialization failed. The client cannot allocate input or output buffers or do any encoding-related operation until it successfully initializes the encoder.

Enumerator MT_ENC_ERR_INVALID_VERSION

The client uses an invalid version.

Enumerator MT_ENC_ERR_MAP_FAILED

MTEncMapResource() failed to map the input resource that the client provides.

Enumerator MT_ENC_ERR_RESOURCE_NOT_MAPPED

The client is attempting to unmap a resource that has not been successfully mapped.

Enumerator MT_ENC_ERR_NEED_MORE_INPUT

The encoder requires more input buffers to produce an output buffer. If this error is returned from MTEncEncodeFrame(), this is not a fatal error. If the client is encoding using B-frames, MTEncEncodeFrame() might be buffering the input frames for re-ordering. A client that operates in the synchronous mode cannot call MTEncLockOutputBuffer() on the output bitstream buffers if MTEncEncodeFrame() returns the MT_ENC_ERR_NEED_MORE_INPUT error code. The client must keep providing input frames until the encoder returns MT_ENC_SUCCESS. After receiving MT_ENC_SUCCESS, the client can call MTEncLockOutputBuffer() on the output buffers in the same order in which it has called MTEncEncodeFrame().

Enumerator MT_ENC_ERR_ENCODER_BUSY

The hardware encoder is busy encoding and cannot encode the input. The client should call MTEncEncodeFrame() again after a few milliseconds.

Enumerator MT_ENC_ERR_GENERIC

An unknown internal error has occurred.

Enumerator MT_ENC_ERR_RESOLUTION_MISMATCHED

Resolution mismatched,should reinit encoder.

Enumerator MT_ENC_ERR_PIXELFORMAT_MISMATCHED

Pixelformat mismatched,should reinit encoder

Enumerator MT_ENC_ERR_INVALID_DESKTOP_ID

Invalid desktop ID

Enumerator MT_ENC_ERR_TIMEOUT

Timeout while encode

Enumerator MT_ENC_ERR_HDRSTATUS_MISMATCHED

HDR status mismatched,should reinit encoder

Enumeration type _MT_ENC_PIC_FLAGS

Definition: mtEncodeAPI.h (line 450)

enum _MT_ENC_PIC_FLAGS {
MT_ENC_PIC_FLAG_FORCEIDR = 0x2,
MT_ENC_PIC_FLAG_EOS = 0x8
}

Picture encoding flags.

Enumerator MT_ENC_PIC_FLAG_FORCEIDR

Encodes the current picture as an IDR picture. This flag is only valid when the picture type decision is taken by the encoder.

Enumerator MT_ENC_PIC_FLAG_EOS

Indicates the end of the input stream.

Enumeration type _MT_ENC_INPUT_RESOURCE_TYPE

Definition: mtEncodeAPI.h (line 460)

enum _MT_ENC_INPUT_RESOURCE_TYPE {
MT_ENC_INPUT_RESOURCE_TYPE_DIRECTX = 0x0,
MT_ENC_INPUT_RESOURCE_TYPE_MTCAPTURE = 0x1,
MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_OPTIMAL = 0x2,
MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_LINEAR = 0x3,
MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 0x4,
MT_ENC_INPUT_RESOURCE_TYPE_MUSADEVICEPTR = 0x5,
MT_ENC_INPUT_RESOURCE_TYPE_SYSTEM_MEMORY = 0x6,
MT_ENC_INPUT_RESOURCE_TYPE_OPENGL_TEXTURE = 0x7
}

Input resource types.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_DIRECTX

The input resource type is a DirectX surface.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_MTCAPTURE

The input resource type from mtcapture sdk.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_OPTIMAL

The input resource type is a Vulkan image with tiling set as optimal.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_LINEAR

The input resource type is a Vulkan image with tiling set as linear.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_VULKAN_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

The input resource type is a Vulkan image with tiling set as DRM format modifier.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_MUSADEVICEPTR

The input resource type is musa device memory.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_SYSTEM_MEMORY

The input resource type is system memory.

Enumerator MT_ENC_INPUT_RESOURCE_TYPE_OPENGL_TEXTURE

The input resource type is an OpenGL texture.

Enumeration type _MT_ENC_DEVICE_TYPE

Definition: mtEncodeAPI.h (line 475)

enum _MT_ENC_DEVICE_TYPE {
MT_ENC_DEVICE_TYPE_DIRECTX = 0x0,
MT_ENC_DEVICE_TYPE_OPENGL = 0x1,
MT_ENC_DEVICE_TYPE_VULKAN = 0x2,
MT_ENC_DEVICE_TYPE_MUSA = 0x3
}

Encoder device types.

Enumerator MT_ENC_DEVICE_TYPE_DIRECTX

The encoder device type is a DirectX device. This device type can only be used with Windows.

Enumerator MT_ENC_DEVICE_TYPE_OPENGL

The encoder device type is an OpenGL device. This device type can only be used with Linux.

Enumerator MT_ENC_DEVICE_TYPE_VULKAN

The encoder device type is an Vulkan device.

Enumerator MT_ENC_DEVICE_TYPE_MUSA

The encoder device type is an musa device.

Enumeration type _MT_ENC_CAPS

Definition: mtEncodeAPI.h (line 488)

enum _MT_ENC_CAPS {
MT_ENC_CAPS_WIDTH_MAX,
MT_ENC_CAPS_HEIGHT_MAX,
MT_ENC_CAPS_WIDTH_MIN,
MT_ENC_CAPS_HEIGHT_MIN,
MT_ENC_CAPS_BLOCK_SIZE,
MT_ENC_CAPS_DESKTOP_CAPTURE,
MT_ENC_CAPS_METADATA
}

Encoder capabilities enumeration.

Enumerator MT_ENC_CAPS_WIDTH_MAX

Maximum output width supported.

Enumerator MT_ENC_CAPS_HEIGHT_MAX

Maximum output height supported.

Enumerator MT_ENC_CAPS_WIDTH_MIN

Minimum input width supported.

Enumerator MT_ENC_CAPS_HEIGHT_MIN

Minimum input height supported.

Enumerator MT_ENC_CAPS_BLOCK_SIZE

qp delta map block size supported.

Enumerator MT_ENC_CAPS_DESKTOP_CAPTURE

mtEncBeginDesktopCapture and mtEncEndDesktopCapture is supported.

Enumerator MT_ENC_CAPS_METADATA

encode metadata supported.

Enumeration type _MT_ENC_DISPLAY_PIC_STRUCT

Definition: mtEncodeAPI.h (line 609)

enum _MT_ENC_DISPLAY_PIC_STRUCT {
MT_ENC_PIC_STRUCT_DISPLAY_FRAME = 0x00,
MT_ENC_PIC_STRUCT_DISPLAY_FIELD_TOP_BOTTOM = 0x01,
MT_ENC_PIC_STRUCT_DISPLAY_FIELD_BOTTOM_TOP = 0x02,
MT_ENC_PIC_STRUCT_DISPLAY_FRAME_DOUBLING = 0x07,
MT_ENC_PIC_STRUCT_DISPLAY_FRAME_TRIPLING = 0x08
}

Display picture structure Currently, this enum is only used for deciding the number of clock timestamp sets in Picture Timing SEI / Time Code SEI Otherwise, this has no impact on encoder behavior

Enumerator MT_ENC_PIC_STRUCT_DISPLAY_FRAME

Field encoding top field first

Enumerator MT_ENC_PIC_STRUCT_DISPLAY_FIELD_TOP_BOTTOM

Field encoding top field first

Enumerator MT_ENC_PIC_STRUCT_DISPLAY_FIELD_BOTTOM_TOP

Field encoding bottom field first

Enumerator MT_ENC_PIC_STRUCT_DISPLAY_FRAME_DOUBLING

Frame doubling

Enumerator MT_ENC_PIC_STRUCT_DISPLAY_FRAME_TRIPLING

Field tripling

Enumeration type _MT_INTRA_REFRESH_MODE

Definition: mtEncodeAPI.h (line 742)

enum _MT_INTRA_REFRESH_MODE {
MT_INTRA_REFRESH_MODE_NONE,
MT_INTRA_REFRESH_MODE_ROW,
MT_INTRA_REFRESH_MODE_COLUMN
}
Enumerator MT_INTRA_REFRESH_MODE_NONE
Enumerator MT_INTRA_REFRESH_MODE_ROW
Enumerator MT_INTRA_REFRESH_MODE_COLUMN

Typedefs

Typedef MT_ENC_INPUT_PTR

Definition: mtEncodeAPI.h (line 53)

typedef void* MT_ENC_INPUT_PTR

The MTEncodeAPI input buffer.

Return type: void *

Typedef MT_ENC_OUTPUT_PTR

Definition: mtEncodeAPI.h (line 54)

typedef void* MT_ENC_OUTPUT_PTR

The MTEncodeAPI output buffer.

Return type: void *

Typedef MT_ENC_CODEC_ID

Definition: mtEncodeAPI.h (line 125)

typedef enum _MT_ENC_CODEC_ID MT_ENC_CODEC_ID

Codec IDs supported by the MTEncodeAPI interface.

Return type: enum _MT_ENC_CODEC_ID

Typedef MT_ENC_CODEC_PROFILE_ID

Definition: mtEncodeAPI.h (line 143)

typedef enum _MT_ENC_CODEC_PROFILE_ID MT_ENC_CODEC_PROFILE_ID

Profile IDs supported by the MTEncodeAPI interface.

Return type: enum _MT_ENC_CODEC_PROFILE_ID

Typedef MT_ENC_PRESET_ID

Definition: mtEncodeAPI.h (line 151)

typedef enum _MT_ENC_PRESET_ID MT_ENC_PRESET_ID

Preset IDs supported by the MTEncodeAPI interface.

Return type: enum _MT_ENC_PRESET_ID

Typedef MT_ENC_PARAMS_RC_MODE

Definition: mtEncodeAPI.h (line 161)

typedef enum _MT_ENC_PARAMS_RC_MODE MT_ENC_PARAMS_RC_MODE

Rate control (RC) modes.

Return type: enum _MT_ENC_PARAMS_RC_MODE

Typedef MT_ENC_PIC_TYPE

Definition: mtEncodeAPI.h (line 173)

typedef enum _MT_ENC_PIC_TYPE MT_ENC_PIC_TYPE

Input picture types.

Return type: enum _MT_ENC_PIC_TYPE

Typedef MT_ENC_BUFFER_FORMAT

Definition: mtEncodeAPI.h (line 186)

typedef enum _MT_ENC_BUFFER_FORMAT MT_ENC_BUFFER_FORMAT

Input buffer formats.

Return type: enum _MT_ENC_BUFFER_FORMAT

Typedef MT_ENC_BUFFER_TYPE

Definition: mtEncodeAPI.h (line 195)

typedef enum _MT_ENC_BUFFER_TYPE MT_ENC_BUFFER_TYPE

Input buffer types. Used only on Linux.

Return type: enum _MT_ENC_BUFFER_TYPE

Typedef MT_ENC_LEVEL

Definition: mtEncodeAPI.h (line 267)

typedef enum _MT_ENC_LEVEL MT_ENC_LEVEL

Encoding levels.

Return type: enum _MT_ENC_LEVEL

Typedef MT_ENC_VUI_VIDEO_FORMAT

Definition: mtEncodeAPI.h (line 280)

typedef enum _MT_ENC_VUI_VIDEO_FORMAT MT_ENC_VUI_VIDEO_FORMAT

Enums related to fields in VUI parameters.

Return type: enum _MT_ENC_VUI_VIDEO_FORMAT

Typedef MT_ENC_VUI_COLOR_PRIMARIES

Definition: mtEncodeAPI.h (line 298)

typedef enum _MT_ENC_VUI_COLOR_PRIMARIES MT_ENC_VUI_COLOR_PRIMARIES

Return type: enum _MT_ENC_VUI_COLOR_PRIMARIES

Typedef MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Definition: mtEncodeAPI.h (line 321)

typedef enum _MT_ENC_VUI_TRANSFER_CHARACTERISTIC MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Return type: enum _MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Typedef MT_ENC_VUI_MATRIX_COEFFS

Definition: mtEncodeAPI.h (line 337)

typedef enum _MT_ENC_VUI_MATRIX_COEFFS MT_ENC_VUI_MATRIX_COEFFS

Return type: enum _MT_ENC_VUI_MATRIX_COEFFS

Typedef MTENCSTATUS

Definition: mtEncodeAPI.h (line 445)

typedef enum _MTENCSTATUS MTENCSTATUS

Error codes.

Return type: enum _MTENCSTATUS

Typedef MT_ENC_PIC_FLAGS

Definition: mtEncodeAPI.h (line 455)

typedef enum _MT_ENC_PIC_FLAGS MT_ENC_PIC_FLAGS

Picture encoding flags.

Return type: enum _MT_ENC_PIC_FLAGS

Typedef MT_ENC_INPUT_RESOURCE_TYPE

Definition: mtEncodeAPI.h (line 470)

typedef enum _MT_ENC_INPUT_RESOURCE_TYPE MT_ENC_INPUT_RESOURCE_TYPE

Input resource types.

Return type: enum _MT_ENC_INPUT_RESOURCE_TYPE

Typedef MT_ENC_DEVICE_TYPE

Definition: mtEncodeAPI.h (line 483)

typedef enum _MT_ENC_DEVICE_TYPE MT_ENC_DEVICE_TYPE

Encoder device types.

Return type: enum _MT_ENC_DEVICE_TYPE

Typedef MT_ENC_CAPS

Definition: mtEncodeAPI.h (line 524)

typedef enum _MT_ENC_CAPS MT_ENC_CAPS

Encoder capabilities enumeration.

Return type: enum _MT_ENC_CAPS

Typedef MT_ENC_CREATE_OUTPUT_BUFFER

Definition: mtEncodeAPI.h (line 536)

typedef struct _MT_ENC_CREATE_OUTPUT_BUFFER MT_ENC_CREATE_OUTPUT_BUFFER

Creation parameters for output bitstream buffers.

Return type: struct _MT_ENC_CREATE_OUTPUT_BUFFER

Typedef MT_ENC_QP

Definition: mtEncodeAPI.h (line 546)

typedef struct _MT_ENC_QP MT_ENC_QP

QP values for frames.

Return type: struct _MT_ENC_QP

Typedef MT_ENC_RC_PARAMS

Definition: mtEncodeAPI.h (line 570)

typedef struct _MT_ENC_RC_PARAMS MT_ENC_RC_PARAMS

Rate control configuration parameters.

Return type: struct _MT_ENC_RC_PARAMS

Typedef MT_ENC_SEI_PAYLOAD

Definition: mtEncodeAPI.h (line 580)

typedef struct _MT_ENC_SEI_PAYLOAD MT_ENC_SEI_PAYLOAD

User SEI message

Return type: struct _MT_ENC_SEI_PAYLOAD

Typedef MT_ENC_CLOCK_TIMESTAMP_SET

Definition: mtEncodeAPI.h (line 602)

typedef struct _MT_ENC_CLOCK_TIMESTAMP_SET MT_ENC_CLOCK_TIMESTAMP_SET

Clock Timestamp set parameters For H264, this structure is used to populate Picture Timing SEI when MT_ENC_CONFIG_H264::enableTimeCode is set to 1. For HEVC, this structure is used to populate Time Code SEI when MT_ENC_CONFIG_HEVC::enableTimeCodeSEI is set to 1. For more details, refer to Annex D of ITU-T Specification.

Return type: struct _MT_ENC_CLOCK_TIMESTAMP_SET

Typedef MT_ENC_DISPLAY_PIC_STRUCT

Definition: mtEncodeAPI.h (line 616)

typedef enum _MT_ENC_DISPLAY_PIC_STRUCT MT_ENC_DISPLAY_PIC_STRUCT

Display picture structure Currently, this enum is only used for deciding the number of clock timestamp sets in Picture Timing SEI / Time Code SEI Otherwise, this has no impact on encoder behavior

Return type: enum _MT_ENC_DISPLAY_PIC_STRUCT

Typedef MT_ENC_TIME_CODE

Definition: mtEncodeAPI.h (line 622)

typedef struct _MT_ENC_TIME_CODE MT_ENC_TIME_CODE

Return type: struct _MT_ENC_TIME_CODE

Typedef MT_ENC_CONFIG_H264_VUI_PARAMETERS

Definition: mtEncodeAPI.h (line 643)

typedef struct _MT_ENC_CONFIG_H264_VUI_PARAMETERS MT_ENC_CONFIG_H264_VUI_PARAMETERS

H264 Video Usability Info parameters

Return type: struct _MT_ENC_CONFIG_H264_VUI_PARAMETERS

Typedef MT_ENC_CONFIG_HEVC_VUI_PARAMETERS

Definition: mtEncodeAPI.h (line 645)

typedef MT_ENC_CONFIG_H264_VUI_PARAMETERS MT_ENC_CONFIG_HEVC_VUI_PARAMETERS

Return type: MT_ENC_CONFIG_H264_VUI_PARAMETERS

Typedef MT_ENC_CONFIG_H264

Definition: mtEncodeAPI.h (line 674)

typedef struct _MT_ENC_CONFIG_H264 MT_ENC_CONFIG_H264

H.264 encoder configuration parameters.

Return type: struct _MT_ENC_CONFIG_H264

Typedef MT_ENC_CONFIG_HEVC

Definition: mtEncodeAPI.h (line 701)

typedef struct _MT_ENC_CONFIG_HEVC MT_ENC_CONFIG_HEVC

HEVC encoder configuration parameters.

Return type: struct _MT_ENC_CONFIG_HEVC

Typedef MT_ENC_CONFIG_AV1

Definition: mtEncodeAPI.h (line 728)

typedef struct _MT_ENC_CONFIG_AV1 MT_ENC_CONFIG_AV1

Return type: struct _MT_ENC_CONFIG_AV1

Typedef MT_ENC_CODEC_CONFIG

Definition: mtEncodeAPI.h (line 740)

typedef struct _MT_ENC_CODEC_CONFIG MT_ENC_CODEC_CONFIG

Codec-specific encoder configuration parameters to be set during initialization.

Return type: struct _MT_ENC_CODEC_CONFIG

Typedef MT_INTRA_REFRESH_MODE

Definition: mtEncodeAPI.h (line 747)

typedef enum _MT_INTRA_REFRESH_MODE MT_INTRA_REFRESH_MODE

Return type: enum _MT_INTRA_REFRESH_MODE

Typedef MT_ENC_CONFIG

Definition: mtEncodeAPI.h (line 767)

typedef struct _MT_ENC_CONFIG MT_ENC_CONFIG

Encoder configuration parameters to be set during initialization.

Return type: struct _MT_ENC_CONFIG

Typedef MT_ENC_INIT_PARAMS

Definition: mtEncodeAPI.h (line 796)

typedef struct _MT_ENC_INIT_PARAMS MT_ENC_INIT_PARAMS

Encoder initialization parameters.

Return type: struct _MT_ENC_INIT_PARAMS

Typedef MT_ENC_RECONFIGURE_PARAMS

Definition: mtEncodeAPI.h (line 806)

typedef struct _MT_ENC_RECONFIGURE_PARAMS MT_ENC_RECONFIGURE_PARAMS

Encode session reconfiguration parameters.

Return type: struct _MT_ENC_RECONFIGURE_PARAMS

Typedef MT_ENC_PRESET_CONFIG

Definition: mtEncodeAPI.h (line 818)

typedef struct _MT_ENC_PRESET_CONFIG MT_ENC_PRESET_CONFIG

The encoder preset configuration structure.

Return type: struct _MT_ENC_PRESET_CONFIG

Typedef MT_RECTANGLE

Definition: mtEncodeAPI.h (line 829)

typedef struct _MT_RECTANGLE MT_RECTANGLE

A rectangle.

Return type: struct _MT_RECTANGLE

Typedef MT_ENCODER_ROI

Definition: mtEncodeAPI.h (line 854)

typedef struct _MT_ENCODER_ROI MT_ENCODER_ROI

Encoding region-of-interest (ROI).
The ROI set through this structure is applicable only to the current frame or field, so it must be sent for every frame or field to be applied. The encoder will use the ROI information to adjust the QP values of the MBs that fall within the ROIs.

Return type: struct _MT_ENCODER_ROI

Typedef MT_ENC_PIC_PARAMS

Definition: mtEncodeAPI.h (line 890)

typedef struct _MT_ENC_PIC_PARAMS MT_ENC_PIC_PARAMS

Picture encoding parameters, sent on a frame-by-frame basis.

Return type: struct _MT_ENC_PIC_PARAMS

Typedef MT_ENC_DESKTOP_PARAMS

Definition: mtEncodeAPI.h (line 915)

typedef struct _MT_ENC_DESKTOP_PARAMS MT_ENC_DESKTOP_PARAMS

Picture encoding parameters, sent on a frame-by-frame basis.

Return type: struct _MT_ENC_DESKTOP_PARAMS

Typedef MT_ENC_CAPTURE_DESKTOP_PARAMS

Definition: mtEncodeAPI.h (line 933)

typedef struct _MT_ENC_CAPTURE_DESKTOP_PARAMS MT_ENC_CAPTURE_DESKTOP_PARAMS

Input struct for MTEncBeginDesktopCapture function

Return type: struct _MT_ENC_CAPTURE_DESKTOP_PARAMS

Typedef MT_ENC_LOCK_BUFFER

Definition: mtEncodeAPI.h (line 956)

typedef struct _MT_ENC_LOCK_BUFFER MT_ENC_LOCK_BUFFER

Bitstream buffer lock parameters.

Return type: struct _MT_ENC_LOCK_BUFFER

Typedef MT_ENC_MAP_RESOURCE

Definition: mtEncodeAPI.h (line 969)

typedef struct _MT_ENC_MAP_RESOURCE MT_ENC_MAP_RESOURCE

Maps an input resource to the MT encoder input buffer.

Return type: struct _MT_ENC_MAP_RESOURCE

Typedef MT_ENC_INPUT_RESOURCE_OPENGL_TEX

Definition: mtEncodeAPI.h (line 978)

typedef struct _MT_ENC_INPUT_RESOURCE_OPENGL_TEX MT_ENC_INPUT_RESOURCE_OPENGL_TEX

Return type: struct _MT_ENC_INPUT_RESOURCE_OPENGL_TEX

Typedef MT_ENC_CREATE_ENCODER_PARAMS

Definition: mtEncodeAPI.h (line 990)

typedef struct _MT_ENC_CREATE_ENCODER_PARAMS MT_ENC_CREATE_ENCODER_PARAMS

Encoder creation parameters.

Return type: struct _MT_ENC_CREATE_ENCODER_PARAMS

Typedef MT_ENC_CAPS_PARAM

Definition: mtEncodeAPI.h (line 1001)

typedef struct _MT_ENC_CAPS_PARAM MT_ENC_CAPS_PARAM

Input struct for querying Encoding capabilities.

Return type: struct _MT_ENC_CAPS_PARAM

Typedef MT_ENC_SEQUENCE_PARAM_PAYLOAD

Definition: mtEncodeAPI.h (line 1016)

typedef struct _MT_ENC_SEQUENCE_PARAM_PAYLOAD MT_ENC_SEQUENCE_PARAM_PAYLOAD

Return type: struct _MT_ENC_SEQUENCE_PARAM_PAYLOAD

Typedef MT_ENCODE_API_FUNCTION_LIST

Definition: mtEncodeAPI.h (line 1591)

typedef struct _MT_ENCODE_API_FUNCTION_LIST MT_ENCODE_API_FUNCTION_LIST

A list of pointers to the MTEncodeAPI functions.

Return type: struct _MT_ENCODE_API_FUNCTION_LIST

Macros

Macro MTENCAPI_VERSION

#define MTENCAPI_VERSION ((MTENCAPI_MAJOR_VERSION << 24) | (MTENCAPI_MINOR_VERSION << 16) | MTENCAPI_PATCH_VERSION)

The MTEncodeAPI version.

Macro MTENC_INFINITE_GOPLENGTH

#define MTENC_INFINITE_GOPLENGTH 0xFFFFFFFF

An infinite GOP length.

Macro MAX_NUM_CLOCK_TS

#define MAX_NUM_CLOCK_TS 3

Structures


Index of Structures

_


Structure _MT_ENC_CAPS_PARAM

Definition: mtEncodeAPI.h (line 996)

Input struct for querying Encoding capabilities.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 998)

uint32_t _MT_ENC_CAPS_PARAM::version

[in]: The struct version. Must be set to ::MT_ENC_CAPS_PARAM_VER.

Type: uint32_t

Variable capsToQuery

Definition: mtEncodeAPI.h (line 999)

MT_ENC_CAPS _MT_ENC_CAPS_PARAM::capsToQuery

[in]: Specifies the encode capability to query. Client should pass a member of the MT_ENC_CAPS enum.

Type: MT_ENC_CAPS

Variable reserved

Definition: mtEncodeAPI.h (line 1000)

uint32_t _MT_ENC_CAPS_PARAM::reserved[62][62]

[in]: Reserved and must be set to 0.

Type: uint32_t


Structure _MT_ENC_CAPTURE_DESKTOP_PARAMS

Definition: mtEncodeAPI.h (line 921)

Input struct for MTEncBeginDesktopCapture function

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 923)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable desktopIndex

Definition: mtEncodeAPI.h (line 924)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::desktopIndex

[in]: Specifies the desktop index to be captured.

Type: uint32_t

Variable timeoutInMilliseconds

Definition: mtEncodeAPI.h (line 925)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::timeoutInMilliseconds

[in]: Specifies timeout while capture desktop in milliseconds.

Type: uint32_t

Variable capturedBuffer

Definition: mtEncodeAPI.h (line 926)

MT_ENC_INPUT_PTR _MT_ENC_CAPTURE_DESKTOP_PARAMS::capturedBuffer

[out]: A pointer to the captured desktop buffer.

Type: MT_ENC_INPUT_PTR

Variable bufferFmt

Definition: mtEncodeAPI.h (line 927)

MT_ENC_BUFFER_FORMAT _MT_ENC_CAPTURE_DESKTOP_PARAMS::bufferFmt

[out]: Specifies the desktop format.

Type: MT_ENC_BUFFER_FORMAT

Variable desktopWidth

Definition: mtEncodeAPI.h (line 928)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::desktopWidth

[out]: Specifies the width of captured desktop.

Type: uint32_t

Variable desktopHeight

Definition: mtEncodeAPI.h (line 929)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::desktopHeight

[out]: Specifies the height of captured desktop.

Type: uint32_t

Variable hdrEnabled

Definition: mtEncodeAPI.h (line 930)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::hdrEnabled

[out]: Specifies whether HDR is enabled.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 931)

uint32_t _MT_ENC_CAPTURE_DESKTOP_PARAMS::reserved1[243][243]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 932)

void* _MT_ENC_CAPTURE_DESKTOP_PARAMS::reserved2[62][62]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CLOCK_TIMESTAMP_SET

Definition: mtEncodeAPI.h (line 591)

Clock Timestamp set parameters For H264, this structure is used to populate Picture Timing SEI when MT_ENC_CONFIG_H264::enableTimeCode is set to 1. For HEVC, this structure is used to populate Time Code SEI when MT_ENC_CONFIG_HEVC::enableTimeCodeSEI is set to 1. For more details, refer to Annex D of ITU-T Specification.

Members

Public attributes

Variable countingType

Definition: mtEncodeAPI.h (line 593)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::countingType

[in] Specifies the 'counting_type'

Type: uint32_t

Variable discontinuityFlag

Definition: mtEncodeAPI.h (line 594)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::discontinuityFlag

[in] Specifies the 'discontinuity_flag'

Type: uint32_t

Variable cntDroppedFrames

Definition: mtEncodeAPI.h (line 595)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::cntDroppedFrames

[in] Specifies the 'cnt_dropped_flag'

Type: uint32_t

Variable nFrames

Definition: mtEncodeAPI.h (line 596)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::nFrames

[in] Specifies the value of 'n_frames'

Type: uint32_t

Variable secondsValue

Definition: mtEncodeAPI.h (line 597)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::secondsValue

[in] Specifies the 'seconds_value'

Type: uint32_t

Variable minutesValue

Definition: mtEncodeAPI.h (line 598)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::minutesValue

[in] Specifies the 'minutes_value'

Type: uint32_t

Variable hoursValue

Definition: mtEncodeAPI.h (line 599)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::hoursValue

[in] Specifies the 'hours_value'

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 600)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::reserved2

[in] Reserved and must be set to 0

Type: uint32_t

Variable timeOffset

Definition: mtEncodeAPI.h (line 601)

uint32_t _MT_ENC_CLOCK_TIMESTAMP_SET::timeOffset

[in] Specifies the 'time_offset_value'

Type: uint32_t


Structure _MT_ENC_CODEC_CONFIG

Definition: mtEncodeAPI.h (line 733)

Codec-specific encoder configuration parameters to be set during initialization.

Members

Public attributes

Variable h264Config

Definition: mtEncodeAPI.h (line 735)

MT_ENC_CONFIG_H264 _MT_ENC_CODEC_CONFIG::h264Config

[in]: Specifies the H.264-specific encoder configuration.

Type: MT_ENC_CONFIG_H264

Variable hevcConfig

Definition: mtEncodeAPI.h (line 736)

MT_ENC_CONFIG_HEVC _MT_ENC_CODEC_CONFIG::hevcConfig

[in]: Specifies the HEVC-specific encoder configuration.

Type: MT_ENC_CONFIG_HEVC

Variable av1Config

Definition: mtEncodeAPI.h (line 737)

MT_ENC_CONFIG_AV1 _MT_ENC_CODEC_CONFIG::av1Config

[in]: Specifies the AV1-specific encoder configuration.

Type: MT_ENC_CONFIG_AV1

Variable reserved1

Definition: mtEncodeAPI.h (line 738)

uint32_t _MT_ENC_CODEC_CONFIG::reserved1[1024][1024]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 739)

void* _MT_ENC_CODEC_CONFIG::reserved2[256][256]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CONFIG_AV1

Definition: mtEncodeAPI.h (line 707)

AV1 encoder configuration parameters to be set during initialization.

Members

Public attributes

Variable level

Definition: mtEncodeAPI.h (line 709)

uint32_t _MT_ENC_CONFIG_AV1::level

[in]: Specifies the level of the encoded bitstream.

Type: uint32_t

Variable tier

Definition: mtEncodeAPI.h (line 710)

uint32_t _MT_ENC_CONFIG_AV1::tier

[in]: Specifies the level tier of the encoded bitstream.

Type: uint32_t

Variable idrPeriod

Definition: mtEncodeAPI.h (line 711)

uint32_t _MT_ENC_CONFIG_AV1::idrPeriod

[in]: Specifies the IDR/Key frame interval. If not set, this is made equal to MT_ENC_CONFIG::gopLength. A low-latency application client can set the IDR interval to MTENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically.

Type: uint32_t

Variable inputPixelBitDepthMinus8

Definition: mtEncodeAPI.h (line 712)

uint32_t _MT_ENC_CONFIG_AV1::inputPixelBitDepthMinus8

[in]: Specifies pixel bit depth minus 8 of video input. Should be set to 0 for 8 bit input, 2 for 10 bit input.

Type: uint32_t

Variable enableTimingInfo

Definition: mtEncodeAPI.h (line 713)

uint32_t _MT_ENC_CONFIG_AV1::enableTimingInfo

[in]: Set 1 to write Timing Info into sequence/frame headers

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 714)

uint32_t _MT_ENC_CONFIG_AV1::reserved

[in]: Reserved bitfields.

Type: uint32_t

Variable numTileColumns

Definition: mtEncodeAPI.h (line 715)

uint32_t _MT_ENC_CONFIG_AV1::numTileColumns

[in]: Only support uniformed tile mode now. The picture will be uniformly divided into numTileColumns tile columns. If numTileColumns is not a power of 2, it will be rounded down to the next power of 2 value. If numTileColumns == 0, the picture will be coded with the smallest number of vertical tiles as allowed by standard.

Type: uint32_t

Variable numTileRows

Definition: mtEncodeAPI.h (line 717)

uint32_t _MT_ENC_CONFIG_AV1::numTileRows

[in]: Only support uniformed tile mode now. The picture will be uniformly divided into numTileRows tile rows. If numTileRows is not a power of 2, it will be rounded down to the next power of 2 value. If numTileRows == 0, the picture will be coded with the smallest number of horizontal tiles as allowed by standard.

Type: uint32_t

Variable colorPrimaries

Definition: mtEncodeAPI.h (line 719)

MT_ENC_VUI_COLOR_PRIMARIES _MT_ENC_CONFIG_AV1::colorPrimaries

[in]: as defined in section of ISO/IEC 23091-4/ITU-T H.273

Type: MT_ENC_VUI_COLOR_PRIMARIES

Variable transferCharacteristics

Definition: mtEncodeAPI.h (line 720)

MT_ENC_VUI_TRANSFER_CHARACTERISTIC _MT_ENC_CONFIG_AV1::transferCharacteristics

[in]: as defined in section of ISO/IEC 23091-4/ITU-T H.273

Type: MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Variable matrixCoefficients

Definition: mtEncodeAPI.h (line 721)

MT_ENC_VUI_MATRIX_COEFFS _MT_ENC_CONFIG_AV1::matrixCoefficients

[in]: as defined in section of ISO/IEC 23091-4/ITU-T H.273

Type: MT_ENC_VUI_MATRIX_COEFFS

Variable colorRange

Definition: mtEncodeAPI.h (line 722)

uint32_t _MT_ENC_CONFIG_AV1::colorRange

[in]: 0: studio swing representation - 1: full swing representation

Type: uint32_t

Variable chromaSamplePosition

Definition: mtEncodeAPI.h (line 723)

uint32_t _MT_ENC_CONFIG_AV1::chromaSamplePosition

[in]: 0: unknown 1: Horizontally collocated with luma (0,0) sample, between two vertical samples 2: Co-located with luma (0,0) sample

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 726)

uint32_t _MT_ENC_CONFIG_AV1::reserved1[245][245]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 727)

void* _MT_ENC_CONFIG_AV1::reserved2[64][64]

[in]: Reserved and must be set to NULL

Type: void *


Structure _MT_ENC_CONFIG_H264

Definition: mtEncodeAPI.h (line 650)

H.264 encoder configuration parameters.

Members

Public attributes

Variable level

Definition: mtEncodeAPI.h (line 652)

uint32_t _MT_ENC_CONFIG_H264::level

[in]: Specifies the encoding level. The client is recommended to set this to MT_ENC_LEVEL_AUTOSELECT to enable the MTEncodeAPI interface to select the correct level.

Type: uint32_t

Variable idrPeriod

Definition: mtEncodeAPI.h (line 653)

uint32_t _MT_ENC_CONFIG_H264::idrPeriod

[in]: Specifies the IDR interval. If not set, this is made equal to MT_ENC_CONFIG::gopLength. A low-latency application client can set the IDR interval to MTENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically.

Type: uint32_t

Variable h264VUIParameters

Definition: mtEncodeAPI.h (line 654)

MT_ENC_CONFIG_H264_VUI_PARAMETERS _MT_ENC_CONFIG_H264::h264VUIParameters

[in]: Specifies the H.264 video usability info parameters.

Type: MT_ENC_CONFIG_H264_VUI_PARAMETERS

Variable nbTemporalLayers

Definition: mtEncodeAPI.h (line 655)

uint32_t _MT_ENC_CONFIG_H264::nbTemporalLayers

[in]: Specifies the number of temproal layers (1~4).Default is 1

Type: uint32_t

Variable disableSVCPrefixNalu

Definition: mtEncodeAPI.h (line 656)

uint32_t _MT_ENC_CONFIG_H264::disableSVCPrefixNalu

[in]: Set to 1 to disable writing of SVC Prefix NALU preceding each slice in bitstream.Default is 0

Type: uint32_t

Variable sliceMode

Definition: mtEncodeAPI.h (line 657)

uint32_t _MT_ENC_CONFIG_H264::sliceMode

[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divided into slices sliceMode = 0 MB row based slices, sliceMode = 1, numSlices in Picture When forceIntraRefreshWithFrameCnt is set it will have priority over sliceMode setting When sliceMode == 0 and sliceModeData == 0 whole picture will be coded with one slice

Type: uint32_t

Variable sliceModeData

Definition: mtEncodeAPI.h (line 661)

uint32_t _MT_ENC_CONFIG_H264::sliceModeData

[in]: Specifies the parameter needed for sliceMode. For: sliceMode = 0, sliceModeData specifies # of MB rows in each slice (except last slice) sliceMode = 1, sliceModeData specifies number of slices in the picture. Driver will divide picture into slices optimally

Type: uint32_t

Variable outputBufferingPeriodSEI

Definition: mtEncodeAPI.h (line 664)

uint32_t _MT_ENC_CONFIG_H264::outputBufferingPeriodSEI

[in]: Set to 1 to write SEI buffering period syntax in the bitstream

Type: uint32_t

Variable outputPictureTimingSEI

Definition: mtEncodeAPI.h (line 665)

uint32_t _MT_ENC_CONFIG_H264::outputPictureTimingSEI

[in]: Set to 1 to write SEI picture timing syntax in the bitstream.

Type: uint32_t

Variable enableTimeCode

Definition: mtEncodeAPI.h (line 666)

uint32_t _MT_ENC_CONFIG_H264::enableTimeCode

[in]: Set to 1 to enable writing of clock timestamp sets in picture timing SEI.

Type: uint32_t

Variable enableScalabilityInfoSEI

Definition: mtEncodeAPI.h (line 667)

uint32_t _MT_ENC_CONFIG_H264::enableScalabilityInfoSEI

[in]: Set to 1 to enable writing of Scalability Information SEI message preceding each IDR picture in bitstream Applicable only when temporal SVC is enabled (MT_ENC_CONFIG_H264::nbTemporalLayers > 1).

Type: uint32_t

Variable pixelBitDepthMinus8

Definition: mtEncodeAPI.h (line 669)

uint32_t _MT_ENC_CONFIG_H264::pixelBitDepthMinus8

[in]: Specifies the pixel bit depth minus 8. Should be set to 0 for 8-bit input, 2 for 10-bit input.

Type: uint32_t

Variable reservedBitFields

Definition: mtEncodeAPI.h (line 670)

uint32_t _MT_ENC_CONFIG_H264::reservedBitFields

[in]: Reserved bitfields and must be set to 0

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 672)

uint32_t _MT_ENC_CONFIG_H264::reserved1[221][221]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 673)

void* _MT_ENC_CONFIG_H264::reserved2[64][64]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CONFIG_H264_VUI_PARAMETERS

Definition: mtEncodeAPI.h (line 627)

H264 Video Usability Info parameters

Members

Public attributes

Variable overscanInfoPresentFlag

Definition: mtEncodeAPI.h (line 629)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::overscanInfoPresentFlag

[in]: If set to 1, it specifies that the overscan info is present.

Type: uint32_t

Variable overscanInfo

Definition: mtEncodeAPI.h (line 630)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::overscanInfo

[in]: Specifies the overscan info (as defined in Annex E of the ITU-T Specification).

Type: uint32_t

Variable videoSignalTypePresentFlag

Definition: mtEncodeAPI.h (line 631)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::videoSignalTypePresentFlag

[in]: If set to 1, it specifies that the videoFormat, videoFullRangeFlag and colourDescriptionPresentFlag are present.

Type: uint32_t

Variable videoFormat

Definition: mtEncodeAPI.h (line 632)

MT_ENC_VUI_VIDEO_FORMAT _MT_ENC_CONFIG_H264_VUI_PARAMETERS::videoFormat

[in]: Specifies the source video format (as defined in Annex E of the ITU-T Specification).

Type: MT_ENC_VUI_VIDEO_FORMAT

Variable videoFullRangeFlag

Definition: mtEncodeAPI.h (line 633)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::videoFullRangeFlag

[in]: Specifies the output range of the luma and chroma samples (as defined in Annex E of the ITU-T Specification).

Type: uint32_t

Variable colourDescriptionPresentFlag

Definition: mtEncodeAPI.h (line 634)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::colourDescriptionPresentFlag

[in]: If set to 1, it specifies that the colourPrimaries, transferCharacteristics and colourMatrix are present.

Type: uint32_t

Variable colourPrimaries

Definition: mtEncodeAPI.h (line 635)

MT_ENC_VUI_COLOR_PRIMARIES _MT_ENC_CONFIG_H264_VUI_PARAMETERS::colourPrimaries

[in]: Specifies color primaries for converting to RGB (as defined in Annex E of the ITU-T Specification).

Type: MT_ENC_VUI_COLOR_PRIMARIES

Variable transferCharacteristics

Definition: mtEncodeAPI.h (line 636)

MT_ENC_VUI_TRANSFER_CHARACTERISTIC _MT_ENC_CONFIG_H264_VUI_PARAMETERS::transferCharacteristics

[in]: Specifies the opto-electronic transfer characteristics to use (as defined in Annex E of the ITU-T Specification).

Type: MT_ENC_VUI_TRANSFER_CHARACTERISTIC

Variable colourMatrix

Definition: mtEncodeAPI.h (line 637)

MT_ENC_VUI_MATRIX_COEFFS _MT_ENC_CONFIG_H264_VUI_PARAMETERS::colourMatrix

[in]: Specifies the matrix coefficients used in deriving the luma and chroma from the RGB primaries (as defined in Annex E of the ITU-T Specification).

Type: MT_ENC_VUI_MATRIX_COEFFS

Variable timingInfoPresentFlag

Definition: mtEncodeAPI.h (line 638)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::timingInfoPresentFlag

[in]: If set to 1, it specifies that the timingInfo is present and the 'numUnitInTicks' and 'timeScale' fields are specified by the application. If not set, the timingInfo may still be present with timing related fields calculated internally based on the frame rate specified by the application.

Type: uint32_t

Variable numUnitInTicks

Definition: mtEncodeAPI.h (line 640)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::numUnitInTicks

[in]: Specifies the number of time units of the clock (as defined in Annex E of the ITU-T Specification).

Type: uint32_t

Variable timeScale

Definition: mtEncodeAPI.h (line 641)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::timeScale

[in]: Specifies the frequency of the clock (as defined in Annex E of the ITU-T Specification).

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 642)

uint32_t _MT_ENC_CONFIG_H264_VUI_PARAMETERS::reserved[16][16]

[in]: Reserved and must be set to 0.

Type: uint32_t


Structure _MT_ENC_CONFIG_HEVC

Definition: mtEncodeAPI.h (line 679)

HEVC encoder configuration parameters.

Members

Public attributes

Variable level

Definition: mtEncodeAPI.h (line 681)

uint32_t _MT_ENC_CONFIG_HEVC::level

[in]: Specifies the encoding level. The client is recommended to set this to MT_ENC_LEVEL_AUTOSELECT to enable the MTEncodeAPI interface to select the correct level.

Type: uint32_t

Variable tier

Definition: mtEncodeAPI.h (line 682)

uint32_t _MT_ENC_CONFIG_HEVC::tier

[in]: Specifies the level tier of the encoded bitstream.

Type: uint32_t

Variable idrPeriod

Definition: mtEncodeAPI.h (line 683)

uint32_t _MT_ENC_CONFIG_HEVC::idrPeriod

[in]: Specifies the IDR interval. If not set, this is made equal to MT_ENC_CONFIG::gopLength. A low-latency application client can set the IDR interval to MTENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically.

Type: uint32_t

Variable reservedP1

Definition: mtEncodeAPI.h (line 684)

uint32_t _MT_ENC_CONFIG_HEVC::reservedP1

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable pixelBitDepthMinus8

Definition: mtEncodeAPI.h (line 685)

uint32_t _MT_ENC_CONFIG_HEVC::pixelBitDepthMinus8

[in]: Specifies the pixel bit depth minus 8. Should be set to 0 for 8-bit input, 2 for 10-bit input.

Type: uint32_t

Variable reservedP2

Definition: mtEncodeAPI.h (line 686)

uint32_t _MT_ENC_CONFIG_HEVC::reservedP2

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable hevcVUIParameters

Definition: mtEncodeAPI.h (line 687)

MT_ENC_CONFIG_HEVC_VUI_PARAMETERS _MT_ENC_CONFIG_HEVC::hevcVUIParameters

[in]: Specifies the HEVC video usability info parameters.

Type: MT_ENC_CONFIG_HEVC_VUI_PARAMETERS

Variable sliceMode

Definition: mtEncodeAPI.h (line 688)

uint32_t _MT_ENC_CONFIG_HEVC::sliceMode

[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divided into slices sliceMode = 0 CTU row based slices, sliceMode = 1, numSlices in Picture When forceIntraRefreshWithFrameCnt is set it will have priority over sliceMode setting When sliceMode == 0 and sliceModeData == 0 whole picture will be coded with one slice

Type: uint32_t

Variable sliceModeData

Definition: mtEncodeAPI.h (line 692)

uint32_t _MT_ENC_CONFIG_HEVC::sliceModeData

[in]: Specifies the parameter needed for sliceMode. For: sliceMode = 0, sliceModeData specifies # of CTU rows in each slice (except last slice) sliceMode = 1, sliceModeData specifies number of slices in the picture. Driver will divide picture into slices optimally

Type: uint32_t

Variable outputBufferingPeriodSEI

Definition: mtEncodeAPI.h (line 695)

uint32_t _MT_ENC_CONFIG_HEVC::outputBufferingPeriodSEI

[in]: Set to 1 to write SEI buffering period syntax in the bitstream

Type: uint32_t

Variable outputPictureTimingSEI

Definition: mtEncodeAPI.h (line 696)

uint32_t _MT_ENC_CONFIG_HEVC::outputPictureTimingSEI

[in]: Set to 1 to write SEI picture timing syntax in the bitstream.

Type: uint32_t

Variable outputTimeCodeSEI

Definition: mtEncodeAPI.h (line 697)

uint32_t _MT_ENC_CONFIG_HEVC::outputTimeCodeSEI

[in]: Set 1 to write SEI time code syntax in the bitstream.

Type: uint32_t

Variable reservedBitFields

Definition: mtEncodeAPI.h (line 698)

uint32_t _MT_ENC_CONFIG_HEVC::reservedBitFields

[in]: Reserved bitfields and must be set to 0

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 699)

uint32_t _MT_ENC_CONFIG_HEVC::reserved1[221][221]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 700)

void* _MT_ENC_CONFIG_HEVC::reserved2[64][64]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CONFIG

Definition: mtEncodeAPI.h (line 752)

Encoder configuration parameters to be set during initialization.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 754)

uint32_t _MT_ENC_CONFIG::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable profileID

Definition: mtEncodeAPI.h (line 755)

MT_ENC_CODEC_PROFILE_ID _MT_ENC_CONFIG::profileID

[in]: Specifies the codec profile ID. If the client specifies MT_ENC_CODEC_PROFILE_ID_AUTOSELECT, the MTEncodeAPI interface will select the appropriate codec profile.

Type: MT_ENC_CODEC_PROFILE_ID

Variable gopLength

Definition: mtEncodeAPI.h (line 756)

uint32_t _MT_ENC_CONFIG::gopLength

[in]: Specifies the number of pictures in one GOP. A low-latency application client can set gopLength to MTENC_INFINITE_GOPLENGTH so that keyframes are not inserted automatically.

Type: uint32_t

Variable frameIntervalP

Definition: mtEncodeAPI.h (line 757)

int32_t _MT_ENC_CONFIG::frameIntervalP

[in]: Specifies the GOP pattern as follows: frameIntervalP == 0: I, 1: IPP, 2: IBP, 3: IBBP. If gopLength is set to MTENC_INFINITE_GOPLENGTH, frameIntervalP should be set to 1.

Type: int32_t

Variable rcParams

Definition: mtEncodeAPI.h (line 758)

MT_ENC_RC_PARAMS _MT_ENC_CONFIG::rcParams

[in]: Specifies the rate control parameters for the current encoder.

Type: MT_ENC_RC_PARAMS

Variable encodeCodecConfig

Definition: mtEncodeAPI.h (line 759)

MT_ENC_CODEC_CONFIG _MT_ENC_CONFIG::encodeCodecConfig

[in]: Specifies the codec-specific configuration parameters by using this union.

Type: MT_ENC_CODEC_CONFIG

Variable bDepth

Definition: mtEncodeAPI.h (line 760)

uint32_t _MT_ENC_CONFIG::bDepth

[in]: Specifies the maximum depth of hierarchical B-frames, which ranges from 1 to 3. The default value is 1. When bDepth is greater than 1, the number of successive B-frames should be 3 to 7.

Type: uint32_t

Variable refs

Definition: mtEncodeAPI.h (line 761)

uint32_t _MT_ENC_CONFIG::refs

[in]: Specifies the reference number of the P-frame, which ranges from 1 to 2. The default value is 1.

Type: uint32_t

Variable intraRefreshMode

Definition: mtEncodeAPI.h (line 762)

MT_INTRA_REFRESH_MODE _MT_ENC_CONFIG::intraRefreshMode

[in]: Specifies gradual intra refresh mode.0:No intra refresh mode 1:Row refresh 2:Column refresh.

Type: MT_INTRA_REFRESH_MODE

Variable intraRefreshArg

Definition: mtEncodeAPI.h (line 763)

uint32_t _MT_ENC_CONFIG::intraRefreshArg

[in]: Specifies the number (1~511) of consecutive intra CTU/MB rows/columns. Valid when intraRefreshMode is 1 or 2.

Type: uint32_t

Variable repeatHeaders

Definition: mtEncodeAPI.h (line 764)

uint32_t _MT_ENC_CONFIG::repeatHeaders

[in]: Set to 1 to enable writing SPS and PPS (and VPS for HEVC) headers with every keyframe.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 765)

uint32_t _MT_ENC_CONFIG::reserved1[247][247]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 766)

void* _MT_ENC_CONFIG::reserved2[64][64]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CREATE_ENCODER_PARAMS

Definition: mtEncodeAPI.h (line 983)

Encoder creation parameters.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 985)

uint32_t _MT_ENC_CREATE_ENCODER_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable deviceType

Definition: mtEncodeAPI.h (line 986)

MT_ENC_DEVICE_TYPE _MT_ENC_CREATE_ENCODER_PARAMS::deviceType

[in]: The device type.

Type: MT_ENC_DEVICE_TYPE

Variable device

Definition: mtEncodeAPI.h (line 987)

void* _MT_ENC_CREATE_ENCODER_PARAMS::device

[in]: A pointer to the client device.

Type: void *

Variable reserved1

Definition: mtEncodeAPI.h (line 988)

uint32_t _MT_ENC_CREATE_ENCODER_PARAMS::reserved1[254][254]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 989)

void* _MT_ENC_CREATE_ENCODER_PARAMS::reserved2[63][63]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_CREATE_OUTPUT_BUFFER

Definition: mtEncodeAPI.h (line 529)

Creation parameters for output bitstream buffers.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 531)

uint32_t _MT_ENC_CREATE_OUTPUT_BUFFER::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 532)

uint32_t _MT_ENC_CREATE_OUTPUT_BUFFER::reserved

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable outputBuffer

Definition: mtEncodeAPI.h (line 533)

MT_ENC_OUTPUT_PTR _MT_ENC_CREATE_OUTPUT_BUFFER::outputBuffer

[out]: A pointer to the output buffer.

Type: MT_ENC_OUTPUT_PTR

Variable reserved1

Definition: mtEncodeAPI.h (line 534)

uint32_t _MT_ENC_CREATE_OUTPUT_BUFFER::reserved1[62][62]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 535)

void* _MT_ENC_CREATE_OUTPUT_BUFFER::reserved2[63][63]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_DESKTOP_PARAMS

Definition: mtEncodeAPI.h (line 896)

Picture encoding parameters, sent on a frame-by-frame basis.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 898)

uint32_t _MT_ENC_DESKTOP_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable encodePicFlags

Definition: mtEncodeAPI.h (line 899)

uint32_t _MT_ENC_DESKTOP_PARAMS::encodePicFlags

[in]: Specifies bitwise-ORed encode picture flags. See MT_ENC_PIC_FLAGS.

Type: uint32_t

Variable desktopIndex

Definition: mtEncodeAPI.h (line 900)

uint32_t _MT_ENC_DESKTOP_PARAMS::desktopIndex

[in]: Specifies the desktop index to be encoded.

Type: uint32_t

Variable bufferFmt

Definition: mtEncodeAPI.h (line 901)

MT_ENC_BUFFER_FORMAT _MT_ENC_DESKTOP_PARAMS::bufferFmt

[in]: Specifies the desktop format.Must be set to MT_ENC_BUFFER_FORMAT_NV12 or MT_ENC_BUFFER_FORMAT_P010_LE.

Type: MT_ENC_BUFFER_FORMAT

Variable inputTimeStamp

Definition: mtEncodeAPI.h (line 902)

uint64_t _MT_ENC_DESKTOP_PARAMS::inputTimeStamp

[in]: Specifies presentation timestamp associated with the input picture.

Type: uint64_t

Variable inputDuration

Definition: mtEncodeAPI.h (line 903)

uint64_t _MT_ENC_DESKTOP_PARAMS::inputDuration

[in]: Specifies duration of the input picture

Type: uint64_t

Variable outputBuffer

Definition: mtEncodeAPI.h (line 904)

MT_ENC_OUTPUT_PTR _MT_ENC_DESKTOP_PARAMS::outputBuffer

[in]: Specifies a pointer to the output buffer. The client should use the pointer obtained from MTEncCreateOutputBuffer().

Type: MT_ENC_OUTPUT_PTR

Variable completionEvent

Definition: mtEncodeAPI.h (line 905)

void* _MT_ENC_DESKTOP_PARAMS::completionEvent

[in]: Specifies an event to be signaled on the completion of encoding this frame when operating in the asynchronous mode. Each output buffer should be associated with a distinct event pointer.

Type: void *

Variable timeoutInMilliseconds

Definition: mtEncodeAPI.h (line 908)

uint32_t _MT_ENC_DESKTOP_PARAMS::timeoutInMilliseconds

[in]: Specifies timeout while capture and encode desktop in milliseconds.

Type: uint32_t

Variable desktopWidth

Definition: mtEncodeAPI.h (line 909)

uint32_t _MT_ENC_DESKTOP_PARAMS::desktopWidth

[out]: Specifies the width of desktop while the resolution changed.

Type: uint32_t

Variable desktopHeight

Definition: mtEncodeAPI.h (line 910)

uint32_t _MT_ENC_DESKTOP_PARAMS::desktopHeight

[out]: Specifies the height of desktop while the resolution changed.

Type: uint32_t

Variable desktopBufferFmt

Definition: mtEncodeAPI.h (line 911)

MT_ENC_BUFFER_FORMAT _MT_ENC_DESKTOP_PARAMS::desktopBufferFmt

[out]: Specifies the format of desktop.

Type: MT_ENC_BUFFER_FORMAT

Variable hdrEnabled

Definition: mtEncodeAPI.h (line 912)

uint32_t _MT_ENC_DESKTOP_PARAMS::hdrEnabled

[out]: Specifies whether HDR is enabled.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 913)

uint32_t _MT_ENC_DESKTOP_PARAMS::reserved1[243][243]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 914)

void* _MT_ENC_DESKTOP_PARAMS::reserved2[62][62]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_INIT_PARAMS

Definition: mtEncodeAPI.h (line 772)

Encoder initialization parameters.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 774)

uint32_t _MT_ENC_INIT_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable encodeID

Definition: mtEncodeAPI.h (line 775)

MT_ENC_CODEC_ID _MT_ENC_INIT_PARAMS::encodeID

[in]: Specifies the encode ID for which the encoder is being created. MTEncInitEncoder() fails if this is not set or set to an unsupported value.

Type: MT_ENC_CODEC_ID

Variable presetID

Definition: mtEncodeAPI.h (line 776)

MT_ENC_PRESET_ID _MT_ENC_INIT_PARAMS::presetID

[in]: Specifies the preset ID for encoding. If the preset ID is set, the preset configuration is applied before any other parameters.

Type: MT_ENC_PRESET_ID

Variable encodeWidth

Definition: mtEncodeAPI.h (line 777)

uint32_t _MT_ENC_INIT_PARAMS::encodeWidth

[in]: Specifies the encode width. If not set, MTEncInitEncoder() fails.

Type: uint32_t

Variable encodeHeight

Definition: mtEncodeAPI.h (line 778)

uint32_t _MT_ENC_INIT_PARAMS::encodeHeight

[in]: Specifies the encode height. If not set, MTEncInitEncoder() fails.

Type: uint32_t

Variable frameRateNum

Definition: mtEncodeAPI.h (line 779)

uint32_t _MT_ENC_INIT_PARAMS::frameRateNum

[in]: Specifies the numerator for the frame rate used for encoding in frames per second (FPS). Frame rate = frameRateNum / frameRateDen.

Type: uint32_t

Variable frameRateDen

Definition: mtEncodeAPI.h (line 780)

uint32_t _MT_ENC_INIT_PARAMS::frameRateDen

[in]: Specifies the denominator for the frame rate used for encoding in frames per second. Frame rate = frameRateNum / frameRateDen.

Type: uint32_t

Variable enableEncodeAsync

Definition: mtEncodeAPI.h (line 781)

uint32_t _MT_ENC_INIT_PARAMS::enableEncodeAsync

[in]: Set this to 1 to enable asynchronous mode and is expected to use events to get picture completion notification.

Type: uint32_t

Variable encodeConfig

Definition: mtEncodeAPI.h (line 782)

MT_ENC_CONFIG* _MT_ENC_INIT_PARAMS::encodeConfig

[in]: Specifies the advanced codec-specific structure.
If the client sends a valid codec configuration structure, it overrides the parameters set by MT_ENC_INIT_PARAMS::presetID. If set to NULL, the MTEncodeAPI interface uses the MT_ENC_INIT_PARAMS::presetID to set the codec-specific parameters.
The client can also optionally query the MTEncodeAPI interface to get codec-specific parameters for a preset ID using MTEncGetPresetConfig(). It can then modify (if required) some of the codec configuration parameters and send down a custom configuration structure as part of _MT_ENC_INIT_PARAMS.
Even in this case the client is recommended to pass the same preset ID it has used in MTEncGetPresetConfig() to query the configuration structure as MT_ENC_INIT_PARAMS::presetID. This does not override the custom configuration structure but is used to determine other encoder HW-specific parameters not exposed in the API.

Type: MT_ENC_CONFIG *

Variable maxEncodeWidth

Definition: mtEncodeAPI.h (line 786)

uint32_t _MT_ENC_INIT_PARAMS::maxEncodeWidth

[in]: The maximum encode width to be allowed for the current encoder. The client should allocate output buffers according to this dimension for dynamic resolution changes. If set to 0, the encoder does not allow dynamic resolution changes.

Type: uint32_t

Variable maxEncodeHeight

Definition: mtEncodeAPI.h (line 788)

uint32_t _MT_ENC_INIT_PARAMS::maxEncodeHeight

[in]: The maximum encode height to be allowed for current encoder. The client should allocate output buffers according to this dimension for dynamic resolution changes. If set to 0, the encoder does not allow dynamic resolution changes.

Type: uint32_t

Variable deviceName

Definition: mtEncodeAPI.h (line 790)

const char* _MT_ENC_INIT_PARAMS::deviceName

[in]: The device name to encode (for example: /dev/dri/renderD128. SDK uses /dev/dri/renderD128 if set to NULL). Used only on Linux.

Type: const char *

Variable reportSliceOffsets

Definition: mtEncodeAPI.h (line 791)

uint32_t _MT_ENC_INIT_PARAMS::reportSliceOffsets

[in]: Set this to 1 to enable reporting slice offsets in _MT_ENC_LOCK_BUFFER.

Type: uint32_t

Variable reportQP

Definition: mtEncodeAPI.h (line 792)

uint32_t _MT_ENC_INIT_PARAMS::reportQP

[in]: Set this to 1 to enable reporting frame average qp in _MT_ENC_LOCK_BUFFER.

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 793)

uint32_t _MT_ENC_INIT_PARAMS::reserved

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 794)

uint32_t _MT_ENC_INIT_PARAMS::reserved1[245][245]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 795)

void* _MT_ENC_INIT_PARAMS::reserved2[62][62]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_INPUT_RESOURCE_OPENGL_TEX

Definition: mtEncodeAPI.h (line 974)

Members

Public attributes

Variable texture

Definition: mtEncodeAPI.h (line 976)

uint32_t _MT_ENC_INPUT_RESOURCE_OPENGL_TEX::texture

[in]: The name of the texture to be used.

Type: uint32_t

Variable target

Definition: mtEncodeAPI.h (line 977)

uint32_t _MT_ENC_INPUT_RESOURCE_OPENGL_TEX::target

[in]: Accepted values are GL_TEXTURE_RECTANGLE and GL_TEXTURE_2D.

Type: uint32_t


Structure _MT_ENC_LOCK_BUFFER

Definition: mtEncodeAPI.h (line 938)

Bitstream buffer lock parameters.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 940)

uint32_t _MT_ENC_LOCK_BUFFER::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable frameIdx

Definition: mtEncodeAPI.h (line 941)

uint32_t _MT_ENC_LOCK_BUFFER::frameIdx

[out]: The frame index for which the buffer is being retrieved.

Type: uint32_t

Variable pictureType

Definition: mtEncodeAPI.h (line 942)

MT_ENC_PIC_TYPE _MT_ENC_LOCK_BUFFER::pictureType

[out]: The picture type of the encoded picture.

Type: MT_ENC_PIC_TYPE

Variable outputBufferSizeInBytes

Definition: mtEncodeAPI.h (line 943)

uint32_t _MT_ENC_LOCK_BUFFER::outputBufferSizeInBytes

[out]: The actual number of bytes generated and copied to the memory pointed by outputBufferPtr.

Type: uint32_t

Variable outputBufferPtr

Definition: mtEncodeAPI.h (line 944)

void* _MT_ENC_LOCK_BUFFER::outputBufferPtr

[out]: A pointer to the generated output buffer.

Type: void *

Variable lockedOutputBuffer

Definition: mtEncodeAPI.h (line 945)

void* _MT_ENC_LOCK_BUFFER::lockedOutputBuffer

[out]: A pointer to the output buffer being locked.

Type: void *

Variable timeoutInMilliseconds

Definition: mtEncodeAPI.h (line 946)

uint32_t _MT_ENC_LOCK_BUFFER::timeoutInMilliseconds

[in]: Maximum waiting time while locking the buffer.

Type: uint32_t

Variable frameIdxDisplay

Definition: mtEncodeAPI.h (line 947)

uint32_t _MT_ENC_LOCK_BUFFER::frameIdxDisplay

[out]: Frame index in display order

Type: uint32_t

Variable outputTimeStamp

Definition: mtEncodeAPI.h (line 948)

uint64_t _MT_ENC_LOCK_BUFFER::outputTimeStamp

[out]: Presentation timestamp associated with the encoded output.

Type: uint64_t

Variable outputDuration

Definition: mtEncodeAPI.h (line 949)

uint64_t _MT_ENC_LOCK_BUFFER::outputDuration

[out]: Presentation duration associated with the encoded output.

Type: uint64_t

Variable decodeTimeStamp

Definition: mtEncodeAPI.h (line 950)

int64_t _MT_ENC_LOCK_BUFFER::decodeTimeStamp

[out]: Decoding timestamp associated with the encoded output.

Type: int64_t

Variable sliceOffsets

Definition: mtEncodeAPI.h (line 951)

uint32_t* _MT_ENC_LOCK_BUFFER::sliceOffsets

[in, out]: Array which receives the slice (H264/HEVC) or tile (AV1) offsets.

Type: uint32_t *

Variable numSlices

Definition: mtEncodeAPI.h (line 952)

uint32_t _MT_ENC_LOCK_BUFFER::numSlices

[out]: Number of slices (H264/HEVC) or tiles (AV1) in the encoded picture.

Type: uint32_t

Variable frameAvgQP

Definition: mtEncodeAPI.h (line 953)

uint32_t _MT_ENC_LOCK_BUFFER::frameAvgQP

[out]: Average QP of the frame.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 954)

uint32_t _MT_ENC_LOCK_BUFFER::reserved1[242][242]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 955)

void* _MT_ENC_LOCK_BUFFER::reserved2[61][61]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_MAP_RESOURCE

Definition: mtEncodeAPI.h (line 961)

Maps an input resource to the MT encoder input buffer.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 963)

uint32_t _MT_ENC_MAP_RESOURCE::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable resourceType

Definition: mtEncodeAPI.h (line 964)

MT_ENC_INPUT_RESOURCE_TYPE _MT_ENC_MAP_RESOURCE::resourceType

[in]: The type of the resource to be mapped.

Type: MT_ENC_INPUT_RESOURCE_TYPE

Variable resourceToMap

Definition: mtEncodeAPI.h (line 965)

MT_ENC_INPUT_PTR _MT_ENC_MAP_RESOURCE::resourceToMap

[in]: Handle to the resource that is being mapped.

Type: MT_ENC_INPUT_PTR

Variable mappedResource

Definition: mtEncodeAPI.h (line 966)

MT_ENC_INPUT_PTR _MT_ENC_MAP_RESOURCE::mappedResource

[out]: Mapped pointer corresponding to resourceToMap. This pointer must be used in MT_ENC_PIC_PARAMS::inputBuffer in MTEncEncodeFrame().

Type: MT_ENC_INPUT_PTR

Variable reserved1

Definition: mtEncodeAPI.h (line 967)

uint32_t _MT_ENC_MAP_RESOURCE::reserved1[254][254]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 968)

void* _MT_ENC_MAP_RESOURCE::reserved2[62][62]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENCODE_API_FUNCTION_LIST

Definition: mtEncodeAPI.h (line 1569)

A list of pointers to the MTEncodeAPI functions.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 1571)

uint32_t _MT_ENCODE_API_FUNCTION_LIST::version

[in]: The client should pass MTENCAPI_VERSION.

Type: uint32_t

Variable sdkVersion

Definition: mtEncodeAPI.h (line 1572)

uint32_t _MT_ENCODE_API_FUNCTION_LIST::sdkVersion

[out]: The SDK version.

Type: uint32_t

Variable mtEncCreateEncoder

Definition: mtEncodeAPI.h (line 1573)

PMTENCCREATEENCODER _MT_ENCODE_API_FUNCTION_LIST::mtEncCreateEncoder

[out]: The client should access MTEncCreateEncoder() by using this pointer.

Type: PMTENCCREATEENCODER

Variable mtEncGetPresetConfig

Definition: mtEncodeAPI.h (line 1574)

PMTENCGETPRESETCONFIG _MT_ENCODE_API_FUNCTION_LIST::mtEncGetPresetConfig

[out]: The client should access MTEncGetPresetConfig() by using this pointer.

Type: PMTENCGETPRESETCONFIG

Variable mtEncInitEncoder

Definition: mtEncodeAPI.h (line 1575)

PMTENCINITENCODER _MT_ENCODE_API_FUNCTION_LIST::mtEncInitEncoder

[out]: The client should access MTEncInitEncoder() by using this pointer.

Type: PMTENCINITENCODER

Variable mtEncCreateOutputBuffer

Definition: mtEncodeAPI.h (line 1576)

PMTENCCREATEOUTPUTBUFFER _MT_ENCODE_API_FUNCTION_LIST::mtEncCreateOutputBuffer

[out]: The client should access MTEncCreateOutputBuffer() by using this pointer.

Type: PMTENCCREATEOUTPUTBUFFER

Variable mtEncReleaseOutputBuffer

Definition: mtEncodeAPI.h (line 1577)

PMTENCRELEASEOUTPUTBUFFER _MT_ENCODE_API_FUNCTION_LIST::mtEncReleaseOutputBuffer

[out]: The client should access MTEncReleaseOutputBuffer() by using this pointer.

Type: PMTENCRELEASEOUTPUTBUFFER

Variable mtEncEncodeFrame

Definition: mtEncodeAPI.h (line 1578)

PMTENCENCODEFRAME _MT_ENCODE_API_FUNCTION_LIST::mtEncEncodeFrame

[out]: The client should access MTEncEncodeFrame() by using this pointer.

Type: PMTENCENCODEFRAME

Variable mtEncLockOutputBuffer

Definition: mtEncodeAPI.h (line 1579)

PMTENCLOCKOUTPUTBUFFER _MT_ENCODE_API_FUNCTION_LIST::mtEncLockOutputBuffer

[out]: The client should access MTEncLockOutputBuffer() by using this pointer.

Type: PMTENCLOCKOUTPUTBUFFER

Variable mtEncUnlockOutputBuffer

Definition: mtEncodeAPI.h (line 1580)

PMTENCUNLOCKOUTPUTBUFFER _MT_ENCODE_API_FUNCTION_LIST::mtEncUnlockOutputBuffer

[out]: The client should access MTEncUnlockOutputBuffer() by using this pointer.

Type: PMTENCUNLOCKOUTPUTBUFFER

Variable mtEncMapResource

Definition: mtEncodeAPI.h (line 1581)

PMTENCMAPRESOURCE _MT_ENCODE_API_FUNCTION_LIST::mtEncMapResource

[out]: The client should access MTEncMapResource() by using this pointer.

Type: PMTENCMAPRESOURCE

Variable mtEncUnmapResource

Definition: mtEncodeAPI.h (line 1582)

PMTENCUNMAPRESOURCE _MT_ENCODE_API_FUNCTION_LIST::mtEncUnmapResource

[out]: The client should access MTEncUnmapResource() by using this pointer.

Type: PMTENCUNMAPRESOURCE

Variable mtEncReleaseEncoder

Definition: mtEncodeAPI.h (line 1583)

PMTENCRELEASEENCODER _MT_ENCODE_API_FUNCTION_LIST::mtEncReleaseEncoder

[out]: The client should access MTEncReleaseEncoder() by using this pointer.

Type: PMTENCRELEASEENCODER

Variable mtEncReconfigureEncoder

Definition: mtEncodeAPI.h (line 1584)

PMTENCRECONFIGUREENCODER _MT_ENCODE_API_FUNCTION_LIST::mtEncReconfigureEncoder

[out]: The client should access MTEncReconfigureEncoder() through this pointer.

Type: PMTENCRECONFIGUREENCODER

Variable mtEncGetCaps

Definition: mtEncodeAPI.h (line 1585)

PMTENCGETCAPS _MT_ENCODE_API_FUNCTION_LIST::mtEncGetCaps

[out]: The Client should access MTEncGetCaps() through this pointer.

Type: PMTENCGETCAPS

Variable mtEncGetSequenceParams

Definition: mtEncodeAPI.h (line 1586)

PMTENCGETSEQUENCEPARAMS _MT_ENCODE_API_FUNCTION_LIST::mtEncGetSequenceParams

[out]: The Client should access MTEncGetSequenceParams() through this pointer.

Type: PMTENCGETSEQUENCEPARAMS

Variable mtEncEncodeDesktop

Definition: mtEncodeAPI.h (line 1587)

PMTENCENCODEDESKTOP _MT_ENCODE_API_FUNCTION_LIST::mtEncEncodeDesktop

[out]: The client should access MTEncEncodeDesktop() by using this pointer.

Type: PMTENCENCODEDESKTOP

Variable mtEncBeginDesktopCapture

Definition: mtEncodeAPI.h (line 1588)

PMTEncBeginDesktopCapture _MT_ENCODE_API_FUNCTION_LIST::mtEncBeginDesktopCapture

[out]: The client should access MTEncBeginDesktopCapture() by using this pointer.

Type: PMTEncBeginDesktopCapture

Variable mtEncEndDesktopCapture

Definition: mtEncodeAPI.h (line 1589)

PMTEncEndDesktopCapture _MT_ENCODE_API_FUNCTION_LIST::mtEncEndDesktopCapture

[out]: The client should access MTEncEndDesktopCapture() by using this pointer.

Type: PMTEncEndDesktopCapture

Variable reserved1

Definition: mtEncodeAPI.h (line 1590)

void* _MT_ENCODE_API_FUNCTION_LIST::reserved1[239][239]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENCODER_ROI

Definition: mtEncodeAPI.h (line 838)

Encoding region-of-interest (ROI).
The ROI set through this structure is applicable only to the current frame or field, so it must be sent for every frame or field to be applied. The encoder will use the ROI information to adjust the QP values of the MBs that fall within the ROIs.

Members

Public attributes

Variable roi_rectangle

Definition: mtEncodeAPI.h (line 847)

MT_RECTANGLE _MT_ENCODER_ROI::roi_rectangle

Defines the ROI boundary in pixels.

The driver will map it to appropriate codec coding units. It is relative to frame coordinates for the frame case and to field coordinates for the field case.

Type: MT_RECTANGLE

Variable roi_value

Definition: mtEncodeAPI.h (line 852)

int8_t _MT_ENCODER_ROI::roi_value

The ROI value. roi_value always specifies the ROI QP when _MT_ENC_RC_PARAMS::rateControlMode != MT_ENC_PARAMS_RC_CONSTQP.

Type: int8_t

Variable reserved

Definition: mtEncodeAPI.h (line 853)

int8_t _MT_ENCODER_ROI::reserved

Type: int8_t


Structure _MT_ENC_PIC_PARAMS

Definition: mtEncodeAPI.h (line 860)

Picture encoding parameters, sent on a frame-by-frame basis.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 862)

uint32_t _MT_ENC_PIC_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable inputWidth

Definition: mtEncodeAPI.h (line 863)

uint32_t _MT_ENC_PIC_PARAMS::inputWidth

[in]: Specifies the input buffer width.

Type: uint32_t

Variable inputHeight

Definition: mtEncodeAPI.h (line 864)

uint32_t _MT_ENC_PIC_PARAMS::inputHeight

[in]: Specifies the input buffer height.

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 865)

uint32_t _MT_ENC_PIC_PARAMS::reserved

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable encodePicFlags

Definition: mtEncodeAPI.h (line 866)

uint32_t _MT_ENC_PIC_PARAMS::encodePicFlags

[in]: Specifies bitwise-ORed encode picture flags. See MT_ENC_PIC_FLAGS.

Type: uint32_t

Variable bufferFmt

Definition: mtEncodeAPI.h (line 867)

MT_ENC_BUFFER_FORMAT _MT_ENC_PIC_PARAMS::bufferFmt

[in]: Specifies the input buffer format.

Type: MT_ENC_BUFFER_FORMAT

Variable inputBuffer

Definition: mtEncodeAPI.h (line 868)

MT_ENC_INPUT_PTR _MT_ENC_PIC_PARAMS::inputBuffer

[in]: Specifies an input buffer pointer. The client must use the pointer obtained from MTEncMapResource().

Type: MT_ENC_INPUT_PTR

Variable outputBuffer

Definition: mtEncodeAPI.h (line 869)

MT_ENC_OUTPUT_PTR _MT_ENC_PIC_PARAMS::outputBuffer

[in]: Specifies a pointer to the output buffer. The client should use the pointer obtained from MTEncCreateOutputBuffer().

Type: MT_ENC_OUTPUT_PTR

Variable completionEvent

Definition: mtEncodeAPI.h (line 870)

void* _MT_ENC_PIC_PARAMS::completionEvent

[in]: Specifies an event to be signaled on the completion of encoding this frame when operating in the asynchronous mode. Each output buffer should be associated with a distinct event pointer.

Type: void *

Variable inputBufferType

Definition: mtEncodeAPI.h (line 873)

uint32_t _MT_ENC_PIC_PARAMS::inputBufferType

[in]: Specifies the input buffer type. See MT_ENC_BUFFER_TYPE. Used only on Linux.

Type: uint32_t

Variable reservedBitFields

Definition: mtEncodeAPI.h (line 874)

uint32_t _MT_ENC_PIC_PARAMS::reservedBitFields

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable roiNumber

Definition: mtEncodeAPI.h (line 875)

uint32_t _MT_ENC_PIC_PARAMS::roiNumber

[in]: Specifies the input ROI array number.

Type: uint32_t

Variable roi

Definition: mtEncodeAPI.h (line 876)

MT_ENCODER_ROI* _MT_ENC_PIC_PARAMS::roi

[in]: Specifies the input ROI array.

Type: MT_ENCODER_ROI *

Variable inputTimeStamp

Definition: mtEncodeAPI.h (line 877)

uint64_t _MT_ENC_PIC_PARAMS::inputTimeStamp

[in]: Specifies presentation timestamp associated with the input picture.

Type: uint64_t

Variable inputDuration

Definition: mtEncodeAPI.h (line 878)

uint64_t _MT_ENC_PIC_PARAMS::inputDuration

[in]: Specifies duration of the input picture

Type: uint64_t

Variable qpDeltaMap

Definition: mtEncodeAPI.h (line 879)

int8_t* _MT_ENC_PIC_PARAMS::qpDeltaMap

[in]: Specifies the pointer to signed byte array containing value per MB for H264, per CTB for HEVC in raster scan order for the current picture. qpDeltaMap specifies QP modifier per MB for H264, per CTB for HEVC. This QP modifier will be applied on top of the QP chosen by rate control. Need libva >= 2.18 on Linux

Type: int8_t *

Variable qpDeltaMapSize

Definition: mtEncodeAPI.h (line 882)

uint32_t _MT_ENC_PIC_PARAMS::qpDeltaMapSize

[in]: Specifies the size in bytes of qpDeltaMap surface allocated by client and pointed to by MT_ENC_PIC_PARAMS::qpDeltaMap. Surface (array) should be picWidthInMbs picHeightInMbs for H264, picWidthInCtbs picHeightInCtbs for HEVC

Type: uint32_t

Variable seiPayloadArrayCnt

Definition: mtEncodeAPI.h (line 883)

uint32_t _MT_ENC_PIC_PARAMS::seiPayloadArrayCnt

[in]: Specifies the number of elements allocated in seiPayloadArray array.

Type: uint32_t

Variable seiPayloadArray

Definition: mtEncodeAPI.h (line 884)

MT_ENC_SEI_PAYLOAD* _MT_ENC_PIC_PARAMS::seiPayloadArray

[in]: Array of SEI payloads which will be inserted for this frame.

Type: MT_ENC_SEI_PAYLOAD *

Variable timeCode

Definition: mtEncodeAPI.h (line 885)

MT_ENC_TIME_CODE _MT_ENC_PIC_PARAMS::timeCode

[in]: Specifies the clock timestamp sets used in picture timing SEI. Applicable only when MT_ENC_CONFIG_H264::enableTimeCode or MT_ENC_CONFIG_HEVC::enableTimeCodeSEI is set to 1.

Type: MT_ENC_TIME_CODE

Variable inputPitch

Definition: mtEncodeAPI.h (line 886)

uint32_t _MT_ENC_PIC_PARAMS::inputPitch

[in]: Specifies the input buffer width pitch. If the pitch value is unknown, set this to 0.

Type: uint32_t

Variable inputHeightPitch

Definition: mtEncodeAPI.h (line 887)

uint32_t _MT_ENC_PIC_PARAMS::inputHeightPitch

[in]: Specifies the input buffer height pitch. If the pitch value is unknown, set this to 0.

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 888)

uint32_t _MT_ENC_PIC_PARAMS::reserved1[233][233]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 889)

void* _MT_ENC_PIC_PARAMS::reserved2[58][58]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_PRESET_CONFIG

Definition: mtEncodeAPI.h (line 811)

The encoder preset configuration structure.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 813)

uint32_t _MT_ENC_PRESET_CONFIG::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 814)

uint32_t _MT_ENC_PRESET_CONFIG::reserved

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable presetCfg

Definition: mtEncodeAPI.h (line 815)

MT_ENC_CONFIG _MT_ENC_PRESET_CONFIG::presetCfg

[out]: A preset configuration structure returned by the MTEncodeAPI interface.

Type: MT_ENC_CONFIG

Variable reserved1

Definition: mtEncodeAPI.h (line 816)

uint32_t _MT_ENC_PRESET_CONFIG::reserved1[254][254]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 817)

void* _MT_ENC_PRESET_CONFIG::reserved2[64][64]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_QP

Definition: mtEncodeAPI.h (line 541)

QP values for frames.

Members

Public attributes

Variable qpInterP

Definition: mtEncodeAPI.h (line 543)

uint32_t _MT_ENC_QP::qpInterP

[in]: The quantization parameter (QP) value for P-frame encoding.

Type: uint32_t

Variable qpInterB

Definition: mtEncodeAPI.h (line 544)

uint32_t _MT_ENC_QP::qpInterB

[in]: The QP value for B-frame encoding.

Type: uint32_t

Variable qpIntra

Definition: mtEncodeAPI.h (line 545)

uint32_t _MT_ENC_QP::qpIntra

[in]: The QP value for I-frame encoding.

Type: uint32_t


Structure _MT_ENC_RC_PARAMS

Definition: mtEncodeAPI.h (line 551)

Rate control configuration parameters.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 553)

uint32_t _MT_ENC_RC_PARAMS::version

Type: uint32_t

Variable rateControlMode

Definition: mtEncodeAPI.h (line 554)

MT_ENC_PARAMS_RC_MODE _MT_ENC_RC_PARAMS::rateControlMode

[in]: Specifies the rate control mode. Check support for various rate control modes using MT_ENC_PARAMS_RC_MODE caps.

Type: MT_ENC_PARAMS_RC_MODE

Variable constQP

Definition: mtEncodeAPI.h (line 555)

MT_ENC_QP _MT_ENC_RC_PARAMS::constQP

[in]: Specifies the initial QP to be used for encoding. The values are used for all frames if in the constant QP mode. MT_ENC_QP::qpIntra is used for all frames so far.

Type: MT_ENC_QP

Variable averageBitRate

Definition: mtEncodeAPI.h (line 556)

uint32_t _MT_ENC_RC_PARAMS::averageBitRate

[in]: Specifies the average bit rate in bits per second (bps) used for encoding.

Type: uint32_t

Variable maxBitRate

Definition: mtEncodeAPI.h (line 557)

uint32_t _MT_ENC_RC_PARAMS::maxBitRate

[in]: Specifies the maximum bitrate for the encoded output. This is used for VBR and ignored for CBR.

Type: uint32_t

Variable enableMinQP

Definition: mtEncodeAPI.h (line 558)

uint32_t _MT_ENC_RC_PARAMS::enableMinQP

[in]: Set this to 1 if minimum QP used for rate control.

Type: uint32_t

Variable enableMaxQP

Definition: mtEncodeAPI.h (line 559)

uint32_t _MT_ENC_RC_PARAMS::enableMaxQP

[in]: Set this to 1 if maximum QP used for rate control.

Type: uint32_t

Variable enableInitialRCQP

Definition: mtEncodeAPI.h (line 560)

uint32_t _MT_ENC_RC_PARAMS::enableInitialRCQP

[in]: Set this to 1 if user supplied initial QP is used for rate control.

Type: uint32_t

Variable reservedBitFields

Definition: mtEncodeAPI.h (line 561)

uint32_t _MT_ENC_RC_PARAMS::reservedBitFields

[in]: Reserved bitfields and must be set to 0

Type: uint32_t

Variable minQP

Definition: mtEncodeAPI.h (line 562)

MT_ENC_QP _MT_ENC_RC_PARAMS::minQP

[in]: Specifies the minimum QP used for rate control. Client must set enableMinQP to 1. MT_ENC_QP::qpIntra is used for all frames so far.

Type: MT_ENC_QP

Variable maxQP

Definition: mtEncodeAPI.h (line 563)

MT_ENC_QP _MT_ENC_RC_PARAMS::maxQP

[in]: Specifies the maximum QP used for rate control. Client must set enableMaxQP to 1. MT_ENC_QP::qpIntra is used for all frames so far.

Type: MT_ENC_QP

Variable initialRCQP

Definition: mtEncodeAPI.h (line 564)

MT_ENC_QP _MT_ENC_RC_PARAMS::initialRCQP

[in]: Specifies the initial QP hint used for rate control. The parameter is just used as hint to influence the QP difference between I,P and B frames. Client must set enableInitialRCQP to 1. MT_ENC_QP::qpIntra is used for all frames so far.

Type: MT_ENC_QP

Variable vbvBufferSize

Definition: mtEncodeAPI.h (line 566)

uint32_t _MT_ENC_RC_PARAMS::vbvBufferSize

Type: uint32_t

Variable vbvBufferInitialOccupancy

Definition: mtEncodeAPI.h (line 567)

uint32_t _MT_ENC_RC_PARAMS::vbvBufferInitialOccupancy

Type: uint32_t

Variable reserved1

Definition: mtEncodeAPI.h (line 568)

uint32_t _MT_ENC_RC_PARAMS::reserved1[45][45]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 569)

void* _MT_ENC_RC_PARAMS::reserved2[64][64]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_ENC_RECONFIGURE_PARAMS

Definition: mtEncodeAPI.h (line 801)

Encode session reconfiguration parameters.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 803)

uint32_t _MT_ENC_RECONFIGURE_PARAMS::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable reserved

Definition: mtEncodeAPI.h (line 804)

uint32_t _MT_ENC_RECONFIGURE_PARAMS::reserved

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reInitParams

Definition: mtEncodeAPI.h (line 805)

MT_ENC_INIT_PARAMS _MT_ENC_RECONFIGURE_PARAMS::reInitParams

[in]: Encoder session re-initialization parameters.

Type: MT_ENC_INIT_PARAMS


Structure _MT_ENC_SEI_PAYLOAD

Definition: mtEncodeAPI.h (line 575)

User SEI message

Members

Public attributes

Variable payloadSize

Definition: mtEncodeAPI.h (line 577)

uint32_t _MT_ENC_SEI_PAYLOAD::payloadSize

[in] SEI payload size in bytes. SEI payload must be byte aligned, as described in Annex D

Type: uint32_t

Variable payloadType

Definition: mtEncodeAPI.h (line 578)

uint32_t _MT_ENC_SEI_PAYLOAD::payloadType

[in] SEI payload types and syntax can be found in Annex D of the H.264 Specification.

Type: uint32_t

Variable payload

Definition: mtEncodeAPI.h (line 579)

uint8_t* _MT_ENC_SEI_PAYLOAD::payload

[in] pointer to user data

Type: uint8_t *


Structure _MT_ENC_SEQUENCE_PARAM_PAYLOAD

Definition: mtEncodeAPI.h (line 1007)

Sequence and picture paramaters payload.

Members

Public attributes

Variable version

Definition: mtEncodeAPI.h (line 1009)

uint32_t _MT_ENC_SEQUENCE_PARAM_PAYLOAD::version

[in]: The struct version. Must be set to MTENCAPI_VERSION.

Type: uint32_t

Variable inBufferSize

Definition: mtEncodeAPI.h (line 1010)

uint32_t _MT_ENC_SEQUENCE_PARAM_PAYLOAD::inBufferSize

[in]: Specifies the size of the spsppsBuffer provided by the client

Type: uint32_t

Variable spsppsBuffer

Definition: mtEncodeAPI.h (line 1011)

void* _MT_ENC_SEQUENCE_PARAM_PAYLOAD::spsppsBuffer

[in]: Specifies bitstream header pointer of size MT_ENC_SEQUENCE_PARAM_PAYLOAD::inBufferSize. It is the client's responsibility to manage this memory.

Type: void *

Variable outSPSPPSPayloadSize

Definition: mtEncodeAPI.h (line 1013)

uint32_t* _MT_ENC_SEQUENCE_PARAM_PAYLOAD::outSPSPPSPayloadSize

[out]: Size of the sequence and picture header in bytes.

Type: uint32_t *

Variable reserved

Definition: mtEncodeAPI.h (line 1014)

uint32_t _MT_ENC_SEQUENCE_PARAM_PAYLOAD::reserved[254][254]

[in]: Reserved and must be set to 0

Type: uint32_t

Variable reserved2

Definition: mtEncodeAPI.h (line 1015)

void* _MT_ENC_SEQUENCE_PARAM_PAYLOAD::reserved2[62][62]

[in]: Reserved and must be set to NULL

Type: void *


Structure _MT_ENC_TIME_CODE

Definition: mtEncodeAPI.h (line 618)

Members

Public attributes

Variable displayPicStruct

Definition: mtEncodeAPI.h (line 620)

MT_ENC_DISPLAY_PIC_STRUCT _MT_ENC_TIME_CODE::displayPicStruct

[in] Display picStruct

Type: MT_ENC_DISPLAY_PIC_STRUCT

Variable clockTimestamp

Definition: mtEncodeAPI.h (line 621)

MT_ENC_CLOCK_TIMESTAMP_SET _MT_ENC_TIME_CODE::clockTimestamp[MAX_NUM_CLOCK_TS][MAX_NUM_CLOCK_TS]

[in] Clock Timestamp set

Type: MT_ENC_CLOCK_TIMESTAMP_SET


Structure _MT_RECTANGLE

Definition: mtEncodeAPI.h (line 823)

A rectangle.

Members

Public attributes

Variable x

Definition: mtEncodeAPI.h (line 825)

int16_t _MT_RECTANGLE::x

Type: int16_t

Variable y

Definition: mtEncodeAPI.h (line 826)

int16_t _MT_RECTANGLE::y

Type: int16_t

Variable width

Definition: mtEncodeAPI.h (line 827)

uint16_t _MT_RECTANGLE::width

Type: uint16_t

Variable height

Definition: mtEncodeAPI.h (line 828)

uint16_t _MT_RECTANGLE::height

Type: uint16_t