Jetson Linux API Reference

32.7.4 Release
V4L2 Video Encoder

Detailed Description

NVIDIA V4L2 Video Encoder Description and Extensions.

The video encoder device node is "/dev/nvhost-msenc".

Supported Pixelformats

OUTPUT PLANE CAPTURE PLANE
V4L2_PIX_FMT_YUV420M V4L2_PIX_FMT_H264
- V4L2_PIX_FMT_H265

Supported Memory Types

MEMORY OUTPUT PLANE CAPTURE PLANE
V4L2_MEMORY_MMAP Y Y
V4L2_MEMORY_DMABUF Y N
V4L2_MEMORY_USERPTR N N
Attention
For the video encoder, it is necessary that the capture plane format be set before the output plane format and only then request buffers on any of the planes.

Supported Controls

The following sections describe the supported controls.

Controls From the Open Source V4L2-Controls Header

Control ID Purpose Runtime Configurable
V4L2_CID_MPEG_VIDEO_BITRATE Bitrate Y
V4L2_CID_MPEG_VIDEO_H264_PROFILE H.264 Encode Profile N
V4L2_CID_MPEG_VIDEO_BITRATE_MODE Rate Control Mode N
V4L2_CID_MPEG_VIDEO_GOP_SIZE I-frame Interval N
V4L2_CID_MPEG_VIDEO_H264_LEVEL Encode Level N
V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE Force I-frame on one of queued output plane buffer Y

All non-runtime configurable options must be set after setting formats on both the planes and before requesting buffers on either plane.

The runtime configurable parameters can be called anytime after setting formats on both the planes.

NVIDIA-Specific Controls

Setting Framerate

The encoder framerate can be set with VIDIOC_S_PARM IOCTL by setting the numerator and denominator in v4l2_streamparm.parm.output.timeperframe.

Supported Encoder Profiles

H.264

H.265

Encoder Output Metadata

The encoder supports reporting frame related metadata, including motion vectors for that frame. See V4L2_CID_MPEG_VIDEOENC_METADATA, V4L2_CID_MPEG_VIDEOENC_METADATA_MV and V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV for more information.

EOS Handling

The following sequence must be followed for sending EOS and recieving EOS from the encoder.

  1. Send EOS to encoder by queueing on the output plane a buffer with bytesused = 0 for the 0th plane (v4l2_buffer.m.planes[0].bytesused = 0).
  2. Dequeues buffers on the capture plane until it gets a buffer with bytesused = 0 for the 0th plane.
Note
Currently, V4L2 plugins do not support odd resolution.

Data Structures

struct  v4l2_enc_hw_preset_type_param_
 Holds encoder HW Preset type parameters to be used with V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM IOCTL. More...
 
struct  v4l2_enc_slice_length_param_
 Holds encoder slice length parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM IOCTL. More...
 
struct  v4l2_enc_virtual_buffer_size_
 Holds encoder virtual buffer size parameters, to be used with V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE IOCTL. More...
 
struct  v4l2_enc_num_ref_frames_
 Holds encoder number of reference frame parameters, to be used with V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES IOCTL. More...
 
struct  v4l2_enc_slice_intrarefresh_param_
 Holds encoder slice intrareferesh parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM IOCTL. More...
 
struct  v4l2_enc_ROI_param_
 Holds the encoder quality parameters for a single ROI region. More...
 
struct  v4l2_enc_frame_ROI_params_
 Holds the encoder frame ROI parameters to be used with V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS IOCTL. More...
 
struct  MVInfo_
 Holds the motion vector parameters for a single block. More...
 
struct  v4l2_ctrl_videoenc_outputbuf_metadata_MV_
 Holds the motion vector parameters for one complete frame. More...
 
struct  v4l2_enc_frame_full_prop_
 Holds the RPS List parameters of encoded frame. More...
 
struct  v4l2_ctrl_videoenc_outputbuf_metadata_
 Holds the encoder output metadata for a frame, to be used with V4L2_CID_MPEG_VIDEOENC_METADATA IOCTL. More...
 
struct  v4l2_ctrl_video_metadata_
 Holds the metadata parameters for video encoder and decoder. More...
 
struct  v4l2_enc_gdr_params_
 Holds the encoder GDR parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL. More...
 
struct  v4l2_enc_enable_ext_rps_ctrl_
 Holds the params to configure encoder for external rps control to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL IOCTL. More...
 
struct  _v4l2_enc_frame_prop
 Holds the encoder frame property. More...
 
struct  v4l2_enc_frame_ext_rps_ctrl_params_
 Holds the encoder frame external rps control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL. More...
 
struct  v4l2_enc_enable_ext_rate_ctrl_
 Holds the params to configure encoder for external rate control mode to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL IOCTL. More...
 
struct  v4l2_enc_frame_ext_rate_ctrl_params_
 Holds the encoder frame external rate control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA ioctl. More...
 
struct  v4l2_enc_enable_roi_param_
 Holds the params to configure encoder for ROI parameters encoding. More...
 
struct  v4l2_enc_enable_reconcrc_param_
 Holds the params to configure encoder for Reconstructed CRC encoding. More...
 
struct  v4l2_enc_frame_ReconCRC_params_
 Holds the encoder frame Reconstructed CRC parameters. More...
 
struct  v4l2_ctrl_videoenc_input_metadata_
 Holds the encoder frame input metadata parameters. More...
 
struct  _v4l2_ctrl_video_qp_range
 Holds the encoder frame min/max QP parameters. More...
 
struct  _v4l2_ctrl_video_init_qp
 Holds the encoder init QP parameters. More...
 
struct  v4l2_enc_av1_tile_config_
 Holds the params to configure tiles for AV1 encoding. More...
 

Macros

#define V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL   (V4L2_CID_MPEG_BASE+528)
 Defines the Control ID to configure encoder to drop frames while encoding. More...
 
#define V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM   (V4L2_CID_MPEG_BASE+529)
 Defines the Control ID to configure encoder slice length either in terms of MBs or bits. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS   (V4L2_CID_MPEG_BASE+530)
 Defines the Control ID to configure encoder to encode particular region of frame in high quality. More...
 
#define V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE   (V4L2_CID_MPEG_BASE+531)
 Defines the Control ID to specify virtual buffer size in bits for encoder. More...
 
#define V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES   (V4L2_CID_MPEG_BASE+532)
 Defines the Control ID to specify maximum number of reference frames that can be used. More...
 
#define V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM   (V4L2_CID_MPEG_BASE+533)
 Defines the Control ID to specify the encoder slice intra refresh interval. More...
 
#define V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES   (V4L2_CID_MPEG_BASE+534)
 Defines the Control ID to set number of B frames to be encoded between two P frames. More...
 
#define V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR   (V4L2_CID_MPEG_BASE+535)
 Defines the Control ID to enable/disable inserting SPS and PPS explicitly at IDR interval. More...
 
#define V4L2_CID_MPEG_VIDEOENC_METADATA   (V4L2_CID_MPEG_BASE+536)
 Defines the Control ID to get encoder output metadata. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV   (V4L2_CID_MPEG_BASE+537)
 Defines the Control ID to enable/disable encoder motion vector reporting. More...
 
#define V4L2_CID_MPEG_VIDEOENC_METADATA_MV   (V4L2_CID_MPEG_BASE+538)
 Defines the Control ID to get encoder output motion vector metadata. More...
 
#define V4L2_CID_MPEG_VIDEOENC_QP_RANGE   (V4L2_CID_MPEG_BASE+539)
 Defines the Control ID to set QP range for I/P/B frames. More...
 
#define V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM   (V4L2_CID_MPEG_BASE+540)
 Defines the Control ID to set encoder HW Preset type. More...
 
#define V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA   (V4L2_CID_MPEG_BASE+541)
 Defines the Control ID to provide input metadata for encoder buffer. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL   (V4L2_CID_MPEG_BASE+542)
 Defines the Control ID to configure encoder for external RPS control. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL   (V4L2_CID_MPEG_BASE+543)
 Defines the Control ID to configure encoder for external rate control. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM   (V4L2_CID_MPEG_BASE+544)
 Defines the Control ID to configure ROI encoding for a session. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM   (V4L2_CID_MPEG_BASE+545)
 Defines the Control ID to configure Reconstructed CRC for a session. More...
 
#define V4L2_CID_MPEG_VIDEOENC_INSERT_VUI   (V4L2_CID_MPEG_BASE+546)
 Control ID to enable/disable inserting VUI in SPS. More...
 
#define V4L2_CID_MPEG_VIDEOENC_INSERT_AUD   (V4L2_CID_MPEG_BASE+547)
 Control ID to enable/disable inserting AUD(Access Unit Delimiter). More...
 
#define V4L2_CID_MPEG_VIDEOENC_EXTEDED_COLORFORMAT   (V4L2_CID_MPEG_BASE+548)
 Control ID to enable/disable setting extended color format. More...
 
#define V4L2_CID_MPEG_VIDEO_DECODE_INSTANCE   (V4L2_CID_MPEG_BASE+549)
 Control ID to select which NVDEC IP to decode. More...
 
#define V4L2_CID_MPEG_VIDEO_DEVICE_POLL   (V4L2_CID_MPEG_BASE+550)
 Control ID to issue a pseudo POLL call on the fd opened in non blocking mode. More...
 
#define V4L2_CID_MPEG_SET_POLL_INTERRUPT   (V4L2_CID_MPEG_BASE+551)
 Control ID to set/clear the polling interrupt mode. More...
 
#define V4L2_CID_MPEG_VIDEOENC_TWO_PASS_CBR   (V4L2_CID_MPEG_BASE+552)
 Control ID to enable/disable setting rate control two pass CBR. More...
 
#define V4L2_CID_VIDEO_CONVERT_YUV_RESCALE_METHOD   (V4L2_CID_MPEG_BASE+553)
 Defines the Control ID to set the converter YUV Rescale method. More...
 
#define V4L2_CID_MPEG_VIDEO_MAX_PERFORMANCE   (V4L2_CID_MPEG_BASE+554)
 Control ID to enable maximum Performance. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_ALLIFRAME_ENCODE   (V4L2_CID_MPEG_BASE+555)
 Control ID to enable/disable setting for all i-Frame encoding. More...
 
#define V4L2_CID_MPEG_VIDEO_BUF_API_TYPE   (V4L2_CID_MPEG_BASE+556)
 Defines the Control ID to set buf api to be used by decoder/encoder. More...
 
#define V4L2_CID_MPEG_VIDEO_CUDA_MEM_TYPE   (V4L2_CID_MPEG_BASE+557)
 Defines the Control ID to set cuda memory type to be used by decoder/encoder. More...
 
#define V4L2_CID_MPEG_VIDEO_CUDA_GPU_ID   (V4L2_CID_MPEG_BASE+558)
 Defines the Control ID to set GPU ID to be used by decoder/encoder. More...
 
#define V4L2_CID_MPEG_VIDEODEC_DROP_FRAME_INTERVAL   (V4L2_CID_MPEG_BASE+559)
 Defines the Control ID to set drop frames interval for decoder. More...
 
#define V4L2_CID_MPEG_VIDEOENC_VPX_HEADERS_WITH_FRAME   (V4L2_CID_MPEG_BASE+560)
 Control ID to enable/disable setting for attaching VP8/9 headers. More...
 
#define V4L2_CID_MPEG_VIDEOENC_H265_LEVEL   (V4L2_CID_MPEG_BASE+561)
 Defines the control ID to set the H.265 encoder level. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_SLICE_LEVEL_ENCODE   (V4L2_CID_MPEG_BASE+562)
 Control ID to enable/disable slice level encode output. More...
 
#define V4L2_CID_MPEG_VIDEOENC_POC_TYPE   (V4L2_CID_MPEG_BASE+563)
 Defines the Control ID to set Picture Order Count property in frames. More...
 
#define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_WIDTH   (V4L2_CID_MPEG_BASE+564)
 Defines the Control ID to set Sample Aspect Ratio width for H265 VUI encoding. More...
 
#define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_HEIGHT   (V4L2_CID_MPEG_BASE+565)
 Defines the Control ID to set Sample Aspect Ratio height for H265 VUI encoding. More...
 
#define V4L2_CID_MPEG_VIDEOENC_FORCE_INTRA_FRAME   (V4L2_CID_MPEG_BASE+566)
 Defines the Control ID to force INTRA frame. More...
 
#define V4L2_CID_MPEG_VIDEOENC_FORCE_IDR_FRAME   (V4L2_CID_MPEG_BASE+567)
 Defines the Control ID to force IDR frame. More...
 
#define V4L2_CID_MPEG_VIDEO_CUDA_LOW_LATENCY   (V4L2_CID_MPEG_BASE+568)
 Defines the Control ID to set low latency to be used by decoder. More...
 
#define V4L2_CID_MPEG_VIDEOENC_AV1_HEADERS_WITH_FRAME   (V4L2_CID_MPEG_BASE+569)
 Control ID to enable/disable setting for attaching IVF headers. More...
 
#define V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION   (V4L2_CID_MPEG_BASE+570)
 Defines the Control ID to configure AV1 tile for a session. More...
 
#define V4L2_CID_MPEG_VIDEOENC_AV1_ENABLE_SSIMRDO   (V4L2_CID_MPEG_BASE+571)
 Defines the Control ID to enable variance based SSIM RDO for AV1. More...
 
#define V4L2_CID_MPEG_VIDEOENC_AV1_DISABLE_CDF_UPDATE   (V4L2_CID_MPEG_BASE+572)
 Defines the Control ID to enable CDF update for AV1. More...
 
#define V4L2_CID_MPEG_VIDEOENC_FRAMES_TO_ENCODE   (V4L2_CID_MPEG_BASE+573)
 Defines the Control ID to set total frames to encode. More...
 
#define V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP   (V4L2_CID_MPEG_BASE+574)
 Defines the Control ID to configure initial QP parameters for a encoder session. More...
 
#define V4L2_CID_MPEG_VIDEOENC_ENABLE_LOSSLESS   (V4L2_CID_MPEG_BASE+575)
 Defines the Control ID to enable lossless H.264/H.265 encoding. More...
 
#define V4L2_CID_MPEG_VIDEOENC_H265_CHROMA_FACTOR_IDC   (V4L2_CID_MPEG_BASE+576)
 Defines the Control ID to set chroma_factor_idc for H.265 encoding. More...
 
#define V4L2_MAX_ROI_REGIONS   8
 Defines the maximum number of ROI regions supported by the encoder. More...
 
#define V4L2_MAX_REF_FRAMES   8
 Maximum number of reference frames supported by the encoder. More...
 
#define QP_RETAIN_VAL   -1
 Setting Qp values in v4l2_ctrl_video_qp_range to QP_RETAIN_VAL retains default or previously set QP values. More...
 

Typedefs

typedef struct v4l2_enc_hw_preset_type_param_ v4l2_enc_hw_preset_type_param
 Holds encoder HW Preset type parameters to be used with V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM IOCTL. More...
 
typedef struct v4l2_enc_slice_length_param_ v4l2_enc_slice_length_param
 Holds encoder slice length parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM IOCTL. More...
 
typedef struct v4l2_enc_virtual_buffer_size_ v4l2_enc_virtual_buffer_size
 Holds encoder virtual buffer size parameters, to be used with V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE IOCTL. More...
 
typedef struct v4l2_enc_num_ref_frames_ v4l2_enc_num_ref_frames
 Holds encoder number of reference frame parameters, to be used with V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES IOCTL. More...
 
typedef struct v4l2_enc_slice_intrarefresh_param_ v4l2_enc_slice_intrarefresh_param
 Holds encoder slice intrareferesh parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM IOCTL. More...
 
typedef struct v4l2_enc_ROI_param_ v4l2_enc_ROI_param
 Holds the encoder quality parameters for a single ROI region. More...
 
typedef struct v4l2_enc_frame_ROI_params_ v4l2_enc_frame_ROI_params
 Holds the encoder frame ROI parameters to be used with V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS IOCTL. More...
 
typedef struct MVInfo_ MVInfo
 Holds the motion vector parameters for a single block. More...
 
typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_MV_ v4l2_ctrl_videoenc_outputbuf_metadata_MV
 Holds the motion vector parameters for one complete frame. More...
 
typedef struct v4l2_enc_frame_full_prop_ v4l2_enc_frame_full_prop
 Holds the RPS List parameters of encoded frame. More...
 
typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_ v4l2_ctrl_videoenc_outputbuf_metadata
 Holds the encoder output metadata for a frame, to be used with V4L2_CID_MPEG_VIDEOENC_METADATA IOCTL. More...
 
typedef struct v4l2_ctrl_video_metadata_ v4l2_ctrl_video_metadata
 Holds the metadata parameters for video encoder and decoder. More...
 
typedef struct v4l2_enc_gdr_params_ v4l2_enc_gdr_params
 Holds the encoder GDR parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL. More...
 
typedef struct v4l2_enc_enable_ext_rps_ctrl_ v4l2_enc_enable_ext_rps_ctr
 Holds the params to configure encoder for external rps control to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL IOCTL. More...
 
typedef struct _v4l2_enc_frame_prop v4l2_enc_frame_prop
 Holds the encoder frame property. More...
 
typedef struct v4l2_enc_frame_ext_rps_ctrl_params_ v4l2_enc_frame_ext_rps_ctrl_params
 Holds the encoder frame external rps control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL. More...
 
typedef struct v4l2_enc_enable_ext_rate_ctrl_ v4l2_enc_enable_ext_rate_ctr
 Holds the params to configure encoder for external rate control mode to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL IOCTL. More...
 
typedef struct v4l2_enc_frame_ext_rate_ctrl_params_ v4l2_enc_frame_ext_rate_ctrl_params
 Holds the encoder frame external rate control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA ioctl. More...
 
typedef struct v4l2_enc_enable_roi_param_ v4l2_enc_enable_roi_param
 Holds the params to configure encoder for ROI parameters encoding. More...
 
typedef struct v4l2_enc_enable_reconcrc_param_ v4l2_enc_enable_reconcrc_param
 Holds the params to configure encoder for Reconstructed CRC encoding. More...
 
typedef struct v4l2_enc_frame_ReconCRC_params_ v4l2_enc_frame_ReconCRC_params
 Holds the encoder frame Reconstructed CRC parameters. More...
 
typedef struct v4l2_ctrl_videoenc_input_metadata_ v4l2_ctrl_videoenc_input_metadata
 Holds the encoder frame input metadata parameters. More...
 
typedef struct _v4l2_ctrl_video_qp_range v4l2_ctrl_video_qp_range
 Holds the encoder frame min/max QP parameters. More...
 
typedef struct _v4l2_ctrl_video_init_qp v4l2_ctrl_video_init_qp
 Holds the encoder init QP parameters. More...
 
typedef struct v4l2_enc_av1_tile_config_ v4l2_enc_av1_tile_config
 Holds the params to configure tiles for AV1 encoding. More...
 

Enumerations

enum  v4l2_enc_temporal_tradeoff_level_type {
  V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROPNONE = 0,
  V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN5,
  V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN3,
  V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN2,
  V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP2IN3
}
 Specifies the types of encoder temporal tradeoff levels. More...
 
enum  v4l2_enc_hw_preset_type {
  V4L2_ENC_HW_PRESET_DISABLE = 0,
  V4L2_ENC_HW_PRESET_ULTRAFAST = 1,
  V4L2_ENC_HW_PRESET_FAST,
  V4L2_ENC_HW_PRESET_MEDIUM,
  V4L2_ENC_HW_PRESET_SLOW
}
 Specifies the encoder HW Preset type. More...
 
enum  v4l2_enc_slice_length_type {
  V4L2_ENC_SLICE_LENGTH_TYPE_BITS = 0,
  V4L2_ENC_SLICE_LENGTH_TYPE_MBLK
}
 Enum specifying the type of slice length. More...
 
enum  v4l2_enc_input_metadata_param {
  V4L2_ENC_INPUT_ROI_PARAM_FLAG = 1,
  V4L2_ENC_INPUT_GDR_PARAM_FLAG = 1 << 1,
  V4L2_ENC_INPUT_RPS_PARAM_FLAG = 1 << 2,
  V4L2_ENC_INPUT_RC_PARAM_FLAG = 1 << 3,
  V4L2_ENC_INPUT_RECONCRC_PARAM_FLAG = 1 << 4
}
 Specifies the input buffer metadata flag. More...
 
enum  v4l2_mpeg_video_h265_level {
  V4L2_MPEG_VIDEO_H265_LEVEL_1_0_MAIN_TIER = 0,
  V4L2_MPEG_VIDEO_H265_LEVEL_1_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_2_0_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_2_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_2_1_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_2_1_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_3_0_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_3_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_3_1_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_3_1_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_4_0_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_4_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_4_1_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_4_1_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_0_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_1_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_1_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_2_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_5_2_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_0_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_0_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_1_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_1_HIGH_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_2_MAIN_TIER,
  V4L2_MPEG_VIDEO_H265_LEVEL_6_2_HIGH_TIER
}
 Defines the possible levels for H.265 encoder. More...
 

Macro Definition Documentation

◆ QP_RETAIN_VAL

#define QP_RETAIN_VAL   -1

Setting Qp values in v4l2_ctrl_video_qp_range to QP_RETAIN_VAL retains default or previously set QP values.

Definition at line 2224 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_SET_POLL_INTERRUPT

#define V4L2_CID_MPEG_SET_POLL_INTERRUPT   (V4L2_CID_MPEG_BASE+551)

Control ID to set/clear the polling interrupt mode.

Useful when a POLL issued from the application but wants the wait to be interrupted.

A boolean value must be supplied with this control, True indicates polling interrupt shall be enabled and it shall stay enabled (i.e calls to POLL will return immediately) until a call to same control ID is made by passing a boolean 0 value.

Attention
This should only be called when the Decoder or Encoder is opened with O_NONBLOCK flag.

Definition at line 1103 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_BUF_API_TYPE

#define V4L2_CID_MPEG_VIDEO_BUF_API_TYPE   (V4L2_CID_MPEG_BASE+556)

Defines the Control ID to set buf api to be used by decoder/encoder.

A boolean value should be supplied with this control, default is 0 This has to be called before any other ioctls are used and cannot be changed.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane. This is internal ioctl due to be removed later.

Definition at line 1154 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_CUDA_GPU_ID

#define V4L2_CID_MPEG_VIDEO_CUDA_GPU_ID   (V4L2_CID_MPEG_BASE+558)

Defines the Control ID to set GPU ID to be used by decoder/encoder.

An integer value should be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1175 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_CUDA_LOW_LATENCY

#define V4L2_CID_MPEG_VIDEO_CUDA_LOW_LATENCY   (V4L2_CID_MPEG_BASE+568)

Defines the Control ID to set low latency to be used by decoder.

This control can be used by decoder to set low latency for streams having I and IPPP frames.

Attention
This control must be set before requesting buffers on either plane.

Definition at line 1281 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_CUDA_MEM_TYPE

#define V4L2_CID_MPEG_VIDEO_CUDA_MEM_TYPE   (V4L2_CID_MPEG_BASE+557)

Defines the Control ID to set cuda memory type to be used by decoder/encoder.

This control can be used by the decoder to set the memory type for surfaces. A value of v4l2_cuda_mem_type needs to be set with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1165 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_DECODE_INSTANCE

#define V4L2_CID_MPEG_VIDEO_DECODE_INSTANCE   (V4L2_CID_MPEG_BASE+549)

Control ID to select which NVDEC IP to decode.

Note
This functionality is currently being deprecated and no longer functional.

A v4l2_decode_instance_type should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1081 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_DEVICE_POLL

#define V4L2_CID_MPEG_VIDEO_DEVICE_POLL   (V4L2_CID_MPEG_BASE+550)

Control ID to issue a pseudo POLL call on the fd opened in non blocking mode.

A pointer to a valid v4l2_ctrl_video_device_poll must be supplied with this control.

Attention
This should only be called when the Decoder or Encoder is opened with O_NONBLOCK flag.

Definition at line 1090 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEO_MAX_PERFORMANCE

#define V4L2_CID_MPEG_VIDEO_MAX_PERFORMANCE   (V4L2_CID_MPEG_BASE+554)

Control ID to enable maximum Performance.

An integer value must be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1132 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEODEC_DROP_FRAME_INTERVAL

#define V4L2_CID_MPEG_VIDEODEC_DROP_FRAME_INTERVAL   (V4L2_CID_MPEG_BASE+559)

Defines the Control ID to set drop frames interval for decoder.

An integer value should be supplied with this control. A value of "x" indicates every "x"th frame should be given out from the decoder, rest shall dropped after decoding.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1187 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_AV1_DISABLE_CDF_UPDATE

#define V4L2_CID_MPEG_VIDEOENC_AV1_DISABLE_CDF_UPDATE   (V4L2_CID_MPEG_BASE+572)

Defines the Control ID to enable CDF update for AV1.

A boolean value should be supplied with this control. If value is true the CDF update in the symbol decoding process is disabled.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1326 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_AV1_ENABLE_SSIMRDO

#define V4L2_CID_MPEG_VIDEOENC_AV1_ENABLE_SSIMRDO   (V4L2_CID_MPEG_BASE+571)

Defines the Control ID to enable variance based SSIM RDO for AV1.

A boolean value should be supplied with this control. If value is false SSIM RDO is disabled else true when enabled.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1315 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_AV1_HEADERS_WITH_FRAME

#define V4L2_CID_MPEG_VIDEOENC_AV1_HEADERS_WITH_FRAME   (V4L2_CID_MPEG_BASE+569)

Control ID to enable/disable setting for attaching IVF headers.

Only to be used for AV1 codec.

A boolean value should be supplied with this control. If value is false headers will be disabled and true will enable the headers.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1293 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION

#define V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION   (V4L2_CID_MPEG_BASE+570)

Defines the Control ID to configure AV1 tile for a session.

A pointer to a valid v4l2_enc_av1_tile_config structure must be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1304 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_ALLIFRAME_ENCODE

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_ALLIFRAME_ENCODE   (V4L2_CID_MPEG_BASE+555)

Control ID to enable/disable setting for all i-Frame encoding.

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1142 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL   (V4L2_CID_MPEG_BASE+543)

Defines the Control ID to configure encoder for external rate control.

A pointer to a valid v4l2_enc_enable_ext_rate_ctr structure must be supplied with this control.

Attention
This control must be set after requesting buffers on both the planes.

Definition at line 1015 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL   (V4L2_CID_MPEG_BASE+542)

Defines the Control ID to configure encoder for external RPS control.

A pointer to a valid v4l2_enc_enable_ext_rps_ctr structure must be supplied with this control.

Attention
This control must be set after requesting buffers on both the planes. The value for V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES, if being entered, must be set after this control.

Definition at line 1004 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_LOSSLESS

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_LOSSLESS   (V4L2_CID_MPEG_BASE+575)

Defines the Control ID to enable lossless H.264/H.265 encoding.

An boolean value must be supplied with this control. Default is 0. Lossless encoding is supported only for YUV444 8/10-bit format.

Note
This control must be set in case of H.264 YUV444 encoding as it does not support lossy encoding.
Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1359 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV   (V4L2_CID_MPEG_BASE+537)

Defines the Control ID to enable/disable encoder motion vector reporting.

A boolean value must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 945 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM   (V4L2_CID_MPEG_BASE+545)

Defines the Control ID to configure Reconstructed CRC for a session.

A pointer to a valid v4l2_enc_enable_reconcrc_param structure must be supplied with this control.

Attention
This control must be set after requesting buffers on both the planes.

Definition at line 1037 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM   (V4L2_CID_MPEG_BASE+544)

Defines the Control ID to configure ROI encoding for a session.

A pointer to a valid v4l2_enc_enable_roi_param structure must be supplied with this control.

Attention
This control must be set after requesting buffers on both the planes.

Definition at line 1026 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ENABLE_SLICE_LEVEL_ENCODE

#define V4L2_CID_MPEG_VIDEOENC_ENABLE_SLICE_LEVEL_ENCODE   (V4L2_CID_MPEG_BASE+562)

Control ID to enable/disable slice level encode output.

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1216 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_EXTEDED_COLORFORMAT

#define V4L2_CID_MPEG_VIDEOENC_EXTEDED_COLORFORMAT   (V4L2_CID_MPEG_BASE+548)

Control ID to enable/disable setting extended color format.

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane. Also this control should be enabled/disabled only after V4L2_CID_MPEG_VIDEOENC_INSERT_VUI is set

Definition at line 1068 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_FORCE_IDR_FRAME

#define V4L2_CID_MPEG_VIDEOENC_FORCE_IDR_FRAME   (V4L2_CID_MPEG_BASE+567)

Defines the Control ID to force IDR frame.

This control can be used by encoder to force encoding an idr frame.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1271 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_FORCE_INTRA_FRAME

#define V4L2_CID_MPEG_VIDEOENC_FORCE_INTRA_FRAME   (V4L2_CID_MPEG_BASE+566)

Defines the Control ID to force INTRA frame.

This control can be used by encoder to force encoding an intra frame.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1261 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_FRAMES_TO_ENCODE

#define V4L2_CID_MPEG_VIDEOENC_FRAMES_TO_ENCODE   (V4L2_CID_MPEG_BASE+573)

Defines the Control ID to set total frames to encode.

An integer value should be supplied with this control. A value of "x" indicates the number of frames that are given to encoder for encoding.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1337 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_H265_CHROMA_FACTOR_IDC

#define V4L2_CID_MPEG_VIDEOENC_H265_CHROMA_FACTOR_IDC   (V4L2_CID_MPEG_BASE+576)

Defines the Control ID to set chroma_factor_idc for H.265 encoding.

An integer value must be supplied with this control. Default is 1, and 3 for YUV444 8/10-bit format.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1370 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_H265_LEVEL

#define V4L2_CID_MPEG_VIDEOENC_H265_LEVEL   (V4L2_CID_MPEG_BASE+561)

Defines the control ID to set the H.265 encoder level.

A v4l2_mpeg_video_h265_level must be passed.

Definition at line 1206 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_HEIGHT

#define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_HEIGHT   (V4L2_CID_MPEG_BASE+565)

Defines the Control ID to set Sample Aspect Ratio height for H265 VUI encoding.

An integer value must be supplied with this control. The VUI Sample Aspect Ratio indicator for H265 follows the standard enum defined for v4l2_mpeg_video_h264_vui_sar_idc.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1251 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_WIDTH

#define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_WIDTH   (V4L2_CID_MPEG_BASE+564)

Defines the Control ID to set Sample Aspect Ratio width for H265 VUI encoding.

An integer value must be supplied with this control. The VUI Sample Aspect Ratio indicator for H265 follows the standard enum defined for v4l2_mpeg_video_h264_vui_sar_idc.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1239 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM

#define V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM   (V4L2_CID_MPEG_BASE+540)

Defines the Control ID to set encoder HW Preset type.

A pointer to valid v4l2_enc_hw_preset_type_param structure must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 979 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP

#define V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP   (V4L2_CID_MPEG_BASE+574)

Defines the Control ID to configure initial QP parameters for a encoder session.

A pointer to a valid v4l2_ctrl_video_init_qp structure must be supplied with this control.

Definition at line 1346 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA

#define V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA   (V4L2_CID_MPEG_BASE+541)

Defines the Control ID to provide input metadata for encoder buffer.

A pointer to valid v4l2_ctrl_videoenc_input_metadata structure must be supplied with this control.

Attention
This control must be called before queueing a buffer on the output plane. Use the bitwise OR of v4l2_enc_input_metadata_param in the v4l2_ctrl_videoenc_input_metadata.metadata_flag to provide different input metadata parameters in one s_ctrl call.

Definition at line 992 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_INSERT_AUD

#define V4L2_CID_MPEG_VIDEOENC_INSERT_AUD   (V4L2_CID_MPEG_BASE+547)

Control ID to enable/disable inserting AUD(Access Unit Delimiter).

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1057 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR

#define V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR   (V4L2_CID_MPEG_BASE+535)

Defines the Control ID to enable/disable inserting SPS and PPS explicitly at IDR interval.

A boolean value must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 923 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_INSERT_VUI

#define V4L2_CID_MPEG_VIDEOENC_INSERT_VUI   (V4L2_CID_MPEG_BASE+546)

Control ID to enable/disable inserting VUI in SPS.

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1047 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_METADATA

#define V4L2_CID_MPEG_VIDEOENC_METADATA   (V4L2_CID_MPEG_BASE+536)

Defines the Control ID to get encoder output metadata.

A pointer to valid v4l2_ctrl_video_metadata structure must be supplied with this control.

Attention
This control must be read after dequeueing a buffer successfully from the capture plane. The values in the structure are valid until the buffer is queued again.

Definition at line 935 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_METADATA_MV

#define V4L2_CID_MPEG_VIDEOENC_METADATA_MV   (V4L2_CID_MPEG_BASE+538)

Defines the Control ID to get encoder output motion vector metadata.

A pointer to valid v4l2_ctrl_videoenc_outputbuf_metadata_MV structure must be supplied with this control.

Attention
This control must be read after dequeueing a buffer successfully from the capture plane. The values in the structure are valid until the buffer is queued again.

Definition at line 957 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES

#define V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES   (V4L2_CID_MPEG_BASE+534)

Defines the Control ID to set number of B frames to be encoded between two P frames.

This works with H.264 encoder. This also works with H.265 encoder for Jetson Xavier and Jetson Xavier NX platforms. An integer value must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 913 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES

#define V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES   (V4L2_CID_MPEG_BASE+532)

Defines the Control ID to specify maximum number of reference frames that can be used.

An integer value must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 891 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_POC_TYPE

#define V4L2_CID_MPEG_VIDEOENC_POC_TYPE   (V4L2_CID_MPEG_BASE+563)

Defines the Control ID to set Picture Order Count property in frames.

This works only with H.264 encoder. An integer value must be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1227 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_QP_RANGE

#define V4L2_CID_MPEG_VIDEOENC_QP_RANGE   (V4L2_CID_MPEG_BASE+539)

Defines the Control ID to set QP range for I/P/B frames.

A pointer to a valid v4l2_ctrl_video_qp_range structure must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 968 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS

#define V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS   (V4L2_CID_MPEG_BASE+530)

Defines the Control ID to configure encoder to encode particular region of frame in high quality.

A pointer to a valid v4l2_enc_frame_ROI_params structure must be supplied with this control.

Attention
This control must be set after requesting buffers on both the planes.

Definition at line 870 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM

#define V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM   (V4L2_CID_MPEG_BASE+533)

Defines the Control ID to specify the encoder slice intra refresh interval.

A pointer to a valid v4l2_enc_slice_intrarefresh_param structure must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 902 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM

#define V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM   (V4L2_CID_MPEG_BASE+529)

Defines the Control ID to configure encoder slice length either in terms of MBs or bits.

A pointer to a valid v4l2_enc_slice_length_param structure must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 858 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL

#define V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL   (V4L2_CID_MPEG_BASE+528)

Defines the Control ID to configure encoder to drop frames while encoding.

A value of type v4l2_enc_temporal_tradeoff_level_type must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 847 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_TWO_PASS_CBR

#define V4L2_CID_MPEG_VIDEOENC_TWO_PASS_CBR   (V4L2_CID_MPEG_BASE+552)

Control ID to enable/disable setting rate control two pass CBR.

A boolean value should be supplied with this control.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1113 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE

#define V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE   (V4L2_CID_MPEG_BASE+531)

Defines the Control ID to specify virtual buffer size in bits for encoder.

A pointer to a valid v4l2_enc_virtual_buffer_size structure must be supplied with this control.

Attention
This control must be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 881 of file v4l2_nv_extensions.h.

◆ V4L2_CID_MPEG_VIDEOENC_VPX_HEADERS_WITH_FRAME

#define V4L2_CID_MPEG_VIDEOENC_VPX_HEADERS_WITH_FRAME   (V4L2_CID_MPEG_BASE+560)

Control ID to enable/disable setting for attaching VP8/9 headers.

Only to be used for VP8/9 pixel format not for H264/5.

A boolean value should be supplied with this control. If value is false headers will be disabled and true will enable the headers.

Attention
This control should be set after setting formats on both the planes and before requesting buffers on either plane.

Definition at line 1199 of file v4l2_nv_extensions.h.

◆ V4L2_CID_VIDEO_CONVERT_YUV_RESCALE_METHOD

#define V4L2_CID_VIDEO_CONVERT_YUV_RESCALE_METHOD   (V4L2_CID_MPEG_BASE+553)

Defines the Control ID to set the converter YUV Rescale method.

A value of type v4l2_yuv_rescale_method must be supplied with this control.

Attention
This control must be set before requesting buffers on either plane.

Definition at line 1122 of file v4l2_nv_extensions.h.

◆ V4L2_MAX_REF_FRAMES

#define V4L2_MAX_REF_FRAMES   8

Maximum number of reference frames supported by the encoder.

Definition at line 1979 of file v4l2_nv_extensions.h.

◆ V4L2_MAX_ROI_REGIONS

#define V4L2_MAX_ROI_REGIONS   8

Defines the maximum number of ROI regions supported by the encoder.

Definition at line 1923 of file v4l2_nv_extensions.h.

Typedef Documentation

◆ MVInfo

typedef struct MVInfo_ MVInfo

Holds the motion vector parameters for a single block.

For H.264, nvenc provides one motion vector per 16x16 block(Macroblock). For H.265, nvenc provides one motion vector per 32x32 block(Coded Tree Block).

◆ v4l2_ctrl_video_init_qp

Holds the encoder init QP parameters.

Must be used with V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP IOCTL.

◆ v4l2_ctrl_video_metadata

Holds the metadata parameters for video encoder and decoder.

The metadata is valid for the buffer with index buffer_index after the buffer is dequeued until it is queued again.

◆ v4l2_ctrl_video_qp_range

Holds the encoder frame min/max QP parameters.

Must be used with V4L2_CID_MPEG_VIDEOENC_QP_RANGE IOCTL.

◆ v4l2_ctrl_videoenc_input_metadata

Holds the encoder frame input metadata parameters.

Must be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.

◆ v4l2_ctrl_videoenc_outputbuf_metadata

Holds the encoder output metadata for a frame, to be used with V4L2_CID_MPEG_VIDEOENC_METADATA IOCTL.

◆ v4l2_ctrl_videoenc_outputbuf_metadata_MV

Holds the motion vector parameters for one complete frame.

◆ v4l2_enc_av1_tile_config

Holds the params to configure tiles for AV1 encoding.

Must be used with V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION IOCTL.

◆ v4l2_enc_enable_ext_rate_ctr

Holds the params to configure encoder for external rate control mode to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL IOCTL.

◆ v4l2_enc_enable_ext_rps_ctr

Holds the params to configure encoder for external rps control to be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL IOCTL.

◆ v4l2_enc_enable_reconcrc_param

Holds the params to configure encoder for Reconstructed CRC encoding.

Must be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM IOCTL.

◆ v4l2_enc_enable_roi_param

Holds the params to configure encoder for ROI parameters encoding.

Must be used with V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM IOCTL.

◆ v4l2_enc_frame_ext_rate_ctrl_params

Holds the encoder frame external rate control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA ioctl.

◆ v4l2_enc_frame_ext_rps_ctrl_params

Holds the encoder frame external rps control parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.

◆ v4l2_enc_frame_full_prop

Holds the RPS List parameters of encoded frame.

◆ v4l2_enc_frame_prop

Holds the encoder frame property.

◆ v4l2_enc_frame_ReconCRC_params

Holds the encoder frame Reconstructed CRC parameters.

Must be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.

◆ v4l2_enc_frame_ROI_params

Holds the encoder frame ROI parameters to be used with V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS IOCTL.

◆ v4l2_enc_gdr_params

Holds the encoder GDR parameters to be used with V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.

◆ v4l2_enc_hw_preset_type_param

Holds encoder HW Preset type parameters to be used with V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM IOCTL.

◆ v4l2_enc_num_ref_frames

Holds encoder number of reference frame parameters, to be used with V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES IOCTL.

This is not supported for H.265.

◆ v4l2_enc_ROI_param

Holds the encoder quality parameters for a single ROI region.

◆ v4l2_enc_slice_intrarefresh_param

Holds encoder slice intrareferesh parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM IOCTL.

◆ v4l2_enc_slice_length_param

Holds encoder slice length parameters, to be used with V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM IOCTL.

◆ v4l2_enc_virtual_buffer_size

Holds encoder virtual buffer size parameters, to be used with V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE IOCTL.

Enumeration Type Documentation

◆ v4l2_enc_hw_preset_type

Specifies the encoder HW Preset type.

Enumerator
V4L2_ENC_HW_PRESET_DISABLE 

Encoder HWPreset DISABLED.

V4L2_ENC_HW_PRESET_ULTRAFAST 

Encoder HWPreset with per frame encode time UltraFast.

V4L2_ENC_HW_PRESET_FAST 

Encoder HWPreset with per frame encode time Fast.

V4L2_ENC_HW_PRESET_MEDIUM 

Encoder HWPreset with per frame encode time Medium.

V4L2_ENC_HW_PRESET_SLOW 

Encoder HWPreset with per frame encode time Slow.

Definition at line 1792 of file v4l2_nv_extensions.h.

◆ v4l2_enc_input_metadata_param

Specifies the input buffer metadata flag.

Enumerator
V4L2_ENC_INPUT_ROI_PARAM_FLAG 

Input metadata structure contains ROI parameters.


V4L2_ENC_INPUT_GDR_PARAM_FLAG 

Input metadata structure contains GDR parameters.


V4L2_ENC_INPUT_RPS_PARAM_FLAG 

Input metadata structure contains External RPS parameters.


V4L2_ENC_INPUT_RC_PARAM_FLAG 

Input metadata structure contains External RC parameters.


V4L2_ENC_INPUT_RECONCRC_PARAM_FLAG 

Input metadata structure contains ReconCRC parameters.


Definition at line 1830 of file v4l2_nv_extensions.h.

◆ v4l2_enc_slice_length_type

Enum specifying the type of slice length.

Enumerator
V4L2_ENC_SLICE_LENGTH_TYPE_BITS 

Slice size is specified in terms of number of bytes.

V4L2_ENC_SLICE_LENGTH_TYPE_MBLK 

Slice size is specified in terms of number of macroblocks.

Definition at line 1820 of file v4l2_nv_extensions.h.

◆ v4l2_enc_temporal_tradeoff_level_type

Specifies the types of encoder temporal tradeoff levels.

Enumerator
V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROPNONE 

Do not drop any buffers.

V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN5 

Drop 1 in every 5 buffers.

V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN3 

Drop 1 in every 3 buffers.

V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN2 

Drop 1 in every 2 buffers.

V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP2IN3 

Drop 2 in every 3 buffers.

Definition at line 1776 of file v4l2_nv_extensions.h.

◆ v4l2_mpeg_video_h265_level

Defines the possible levels for H.265 encoder.

Enumerator
V4L2_MPEG_VIDEO_H265_LEVEL_1_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_1_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_2_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_2_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_2_1_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_2_1_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_3_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_3_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_3_1_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_3_1_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_4_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_4_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_4_1_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_4_1_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_1_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_1_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_2_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_5_2_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_0_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_0_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_1_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_1_HIGH_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_2_MAIN_TIER 
V4L2_MPEG_VIDEO_H265_LEVEL_6_2_HIGH_TIER 

Definition at line 1846 of file v4l2_nv_extensions.h.