# include/v4l2_nv_extensions.h File Reference

NVIDIA V4L2 API Extensions More...

Go to the source code of this file.

## Classes

struct | v4l2_ctrl_videodec_statusmetadata_
| Holds the decoder error status metadata for the frame. More...
struct | v4l2_ctrl_videodec_refframe_metadata_
| Holds the the frame specific metadata for a reference frame. More...
struct | v4l2_ctrl_videodec_currentframe_metadata_
| Holds the the frame specific metadata for the current frame. More...
struct | v4l2_ctrl_videodec_dpbinfometadata_
| Holds the decoder DPB info metadata. More...
struct | v4l2_ctrl_h264dec_bufmetadata_
| Holds H.264 specific decoder metadata for the frame. More...
struct | v4l2_ctrl_hevcdec_bufmetadata_
| Holds H.265 specific decoder metadata for the frame. More...
struct | v4l2_ctrl_videodec_outputbuf_metadata_
| Holds the video decoder output metadata for a frame. More...
struct | v4l2_enc_slice_length_param_
| Holds encoder slice length parameters. More...
struct | v4l2_enc_virtual_buffer_size_
| Holds encoder virtual buffer size parameters. More...
struct | v4l2_enc_num_ref_frames_
| Holds encoder number of reference frame parameters. More...
struct | v4l2_enc_slice_intrarefresh_param_
| Holds encoder slice intrareferesh parameters. 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. More...
struct | MVInfo_
| Holds the motion vector parameters for a single macro block. More...
struct | v4l2_ctrl_videoenc_outputbuf_metadata_MV_
| Holds the motion vector parameters for one complete frame. More...
struct | v4l2_ctrl_videoenc_outputbuf_metadata_
| Holds the encoder output metadata for a frame. More...
struct | _v4l2_ctrl_video_metadata
| Holds the metadata parameters for video encoder and decoder. More...
struct | _v4l2_ctrl_video_qp_range
| Holds the encoder frame min/max QP parameters. More...

## Defines

#define | V4L2_PIX_FMT_H265 v4l2_fourcc('H', '2', '6', '5')
| V4L2 pixel format for H265.
#define | V4L2_EVENT_RESOLUTION_CHANGE 5
| V4L2 event type for decoder resolution event change.
#define | V4L2_CID_MPEG_VIDEO_H265_PROFILE (V4L2_CID_MPEG_BASE+513)
| Control ID to set the H.265 encoder profile.
#define | V4L2_CID_MPEG_VIDEO_IDR_INTERVAL (V4L2_CID_MPEG_BASE+514)
| Control ID to set the encoder IDR frame interval.
#define | V4L2_CID_MPEG_VIDEO_DISABLE_COMPLETE_FRAME_INPUT (V4L2_CID_MPEG_BASE+515)
| Control ID to indicate to the decoder that the input buffers will not contain complete buffers.
#define | V4L2_CID_MPEG_VIDEO_DISABLE_DPB (V4L2_CID_MPEG_BASE+516)
| Control ID to disable decoder DPB management.
#define | V4L2_CID_MPEG_VIDEO_ERROR_REPORTING (V4L2_CID_MPEG_BASE+517)
| Control ID to enable decoder error and metadata reporting.
#define | V4L2_CID_MPEG_VIDEO_SKIP_FRAMES (V4L2_CID_MPEG_BASE+518)
| Control ID to set the skip frames property of the decoder.
#define | V4L2_CID_MPEG_VIDEODEC_METADATA (V4L2_CID_MPEG_BASE+519)
| Control ID to get the decoder output metadata.
#define | V4L2_CID_VIDEO_CONVERT_OUTPUT_PLANE_LAYOUT (V4L2_CID_MPEG_BASE+520)
| Control ID to set converter output plane buffer layout.
#define | V4L2_CID_VIDEO_CONVERT_CAPTURE_PLANE_LAYOUT (V4L2_CID_MPEG_BASE+521)
| Control ID to set converter capture plane buffer layout.
#define | V4L2_CID_VIDEO_CONVERT_FLIP_METHOD (V4L2_CID_MPEG_BASE+522)
| Control ID to set the converter flip/rotation method.
#define | V4L2_CID_VIDEO_CONVERT_INTERPOLATION_METHOD (V4L2_CID_MPEG_BASE+523)
| Control ID to set the converter interpolation method.
#define | V4L2_CID_VIDEO_CONVERT_TNR_ALGORITHM (V4L2_CID_MPEG_BASE+524)
| Control ID to set the converter Temporal Noise Reduction (TNR) Algorithm.
#define | V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL (V4L2_CID_MPEG_BASE+525)
| Control ID to configure encoder to drop frames while encoding.
#define | V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM (V4L2_CID_MPEG_BASE+526)
| Control ID to configure encoder slice length either in terms of MBs or bits.
#define | V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS (V4L2_CID_MPEG_BASE+527)
| Control ID to configure encoder to encode particular region of frame in high quality.
#define | V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE (V4L2_CID_MPEG_BASE+528)
| Control ID to specify virtual buffer size in bits for encoder.
#define | V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES (V4L2_CID_MPEG_BASE+529)
| Control ID to specify maximum number of reference frames that can be used.
#define | V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM (V4L2_CID_MPEG_BASE+530)
| Control ID to specify the encoder slice intra refresh interval.
#define | V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES (V4L2_CID_MPEG_BASE+531)
| Control ID to set number of B frames to be encoded between two P frames.
#define | V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR (V4L2_CID_MPEG_BASE+532)
| Control ID to enable/disable inserting SPS and PPS explicitly at IDR interval.
#define | V4L2_CID_MPEG_VIDEOENC_METADATA (V4L2_CID_MPEG_BASE+533)
| Control ID to get encoder output metadata.
#define | V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV (V4L2_CID_MPEG_BASE+534)
| Control ID to enable/disable encoder Motion Vector reporting.
#define | V4L2_CID_MPEG_VIDEOENC_METADATA_MV (V4L2_CID_MPEG_BASE+535)
| Control ID to get encoder output motion vector metadata.
#define | V4L2_CID_MPEG_VIDEOENC_QP_RANGE (V4L2_CID_MPEG_BASE+536)
| Control ID to set QP range for I/P/B frames.
#define | V4L2_MAX_ROI_REGIONS 8
| Maximum number of ROI regions supported by the encoder.
#define | QP_RETAIN_VAL -1
| Setting Qp values in v4l2_ctrl_video_qp_range to QP_RETAIN_VAL will retain default or previously set QP values.

## Typedefs

typedef struct v4l2_ctrl_videodec_statusmetadata_ | v4l2_ctrl_videodec_statusmetadata
| Holds the decoder error status metadata for the frame.
typedef struct v4l2_ctrl_videodec_refframe_metadata_ | v4l2_ctrl_videodec_refframe_metadata
| Holds the the frame specific metadata for a reference frame.
typedef struct v4l2_ctrl_videodec_currentframe_metadata_ | v4l2_ctrl_videodec_currentframe_metadata
| Holds the the frame specific metadata for the current frame.
typedef struct v4l2_ctrl_videodec_dpbinfometadata_ | v4l2_ctrl_videodec_dpbinfometadata
| Holds the decoder DPB info metadata.
typedef struct v4l2_ctrl_h264dec_bufmetadata_ | v4l2_ctrl_h264dec_bufmetadata
| Holds H.264 specific decoder metadata for the frame.
typedef struct v4l2_ctrl_hevcdec_bufmetadata_ | v4l2_ctrl_hevcdec_bufmetadata
| Holds H.265 specific decoder metadata for the frame.
typedef struct v4l2_ctrl_videodec_outputbuf_metadata_ | v4l2_ctrl_videodec_outputbuf_metadata
| Holds the video decoder output metadata for a frame.
typedef struct v4l2_enc_slice_length_param_ | v4l2_enc_slice_length_param
| Holds encoder slice length parameters.
typedef struct v4l2_enc_virtual_buffer_size_ | v4l2_enc_virtual_buffer_size
| Holds encoder virtual buffer size parameters.
typedef struct v4l2_enc_num_ref_frames_ | v4l2_enc_num_ref_frames
| Holds encoder number of reference frame parameters.
typedef struct v4l2_enc_slice_intrarefresh_param_ | v4l2_enc_slice_intrarefresh_param
| Holds encoder slice intrareferesh parameters.
typedef struct v4l2_enc_ROI_param_ | v4l2_enc_ROI_param
| Holds the encoder quality parameters for a single ROI region.
typedef struct v4l2_enc_frame_ROI_params_ | v4l2_enc_frame_ROI_params
| Holds the encoder frame ROI parameters.
typedef struct MVInfo_ | MVInfo
| Holds the motion vector parameters for a single macro block.
typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_MV_ | v4l2_ctrl_videoenc_outputbuf_metadata_MV
| Holds the motion vector parameters for one complete frame.
typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_ | v4l2_ctrl_videoenc_outputbuf_metadata
| Holds the encoder output metadata for a frame.
typedef struct _v4l2_ctrl_video_metadata | v4l2_ctrl_video_metadata
| Holds the metadata parameters for video encoder and decoder.
typedef struct _v4l2_ctrl_video_qp_range | v4l2_ctrl_video_qp_range
| Holds the encoder frame min/max QP parameters.

## Enumerations

enum | v4l2_mpeg_video_h265_profile { V4L2_MPEG_VIDEO_H265_PROFILE_MAIN = 0, V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10 = 1, V4L2_MPEG_VIDEO_H265_PROFILE_MAINSTILLPICTURE = 2 }
| Enum containing the possible profiles for H.265 encoder. More...
enum | v4l2_skip_frames_type { V4L2_SKIP_FRAMES_TYPE_NONE = 0, V4L2_SKIP_FRAMES_TYPE_NONREF = 1, V4L2_SKIP_FRAMES_TYPE_DECODE_IDR_ONLY = 2 }
| Enum v4l2_skip_frames_type, possible methods for decoder skip frames. More...
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 }
| Enum specifying the types of encoder temporal tradeoff levels. 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_nv_buffer_layout { V4L2_NV_BUFFER_LAYOUT_PITCH = 0, V4L2_NV_BUFFER_LAYOUT_BLOCKLINEAR = 1 }
| Enum specifying types of buffer layouts. More...
enum | v4l2_flip_method { V4L2_FLIP_METHOD_IDENTITY = 0, V4L2_FLIP_METHOD_90L = 1, V4L2_FLIP_METHOD_180 = 2, V4L2_FLIP_METHOD_90R = 3, V4L2_FLIP_METHOD_HORIZ = 4, V4L2_FLIP_METHOD_INVTRANS = 5, V4L2_FLIP_METHOD_VERT = 6, V4L2_FLIP_METHOD_TRANS = 7 }
| Enum specifying types of rotation/flip algorithms. More...
enum | v4l2_interpolation_method { V4L2_INTERPOLATION_NEAREST = 1, V4L2_INTERPOLATION_LINEAR = 2, V4L2_INTERPOLATION_SMART = 3, V4L2_INTERPOLATION_BILINEAR = 4 }
| Enum specifying types of interpolation methods. More...
enum | v4l2_tnr_algorithm { V4L2_TNR_ALGO_ORIGINAL = 0, V4L2_TNR_ALGO_OUTDOOR_LOW_LIGHT = 1, V4L2_TNR_ALGO_OUTDOOR_MEDIUM_LIGHT = 2, V4L2_TNR_ALGO_OUTDOOR_HIGH_LIGHT = 3, V4L2_TNR_ALGO_INDOOR_LOW_LIGHT = 4, V4L2_TNR_ALGO_INDOOR_MEDIUM_LIGHT = 5, V4L2_TNR_ALGO_INDOOR_HIGH_LIGHT = 6 }
| Enum specifying types of TNR algorithms. More...

## Detailed Description

NVIDIA V4L2 API Extensions

Description: This file declares the NVIDIA V4L2 Extensions, controls and structures.

Definition in file v4l2_nv_extensions.h.

## Define Documentation

#define V4L2_CID_MPEG_VIDEO_H265_PROFILE (V4L2_CID_MPEG_BASE+513)

Control ID to set the H.265 encoder profile.

One of v4l2_mpeg_video_h265_profile should be passed.

Definition at line 87 of file v4l2_nv_extensions.h.

#define V4L2_CID_MPEG_VIDEO_IDR_INTERVAL (V4L2_CID_MPEG_BASE+514)

Control ID to set the encoder IDR frame interval.

Should be used with VIDIOC_S_EXT_CTRLS ioctl.

Definition at line 105 of file v4l2_nv_extensions.h.

#define V4L2_EVENT_RESOLUTION_CHANGE 5

V4L2 event type for decoder resolution event change.

Definition at line 66 of file v4l2_nv_extensions.h.

#define V4L2_PIX_FMT_H265 v4l2_fourcc('H', '2', '6', '5')

V4L2 pixel format for H265.

Definition at line 48 of file v4l2_nv_extensions.h.

## Enumeration Type Documentation

enum v4l2_mpeg_video_h265_profile

Enum containing the possible profiles for H.265 encoder.

Enumerator:

  V4L2_MPEG_VIDEO_H265_PROFILE_MAIN | H.265 Main profile.
  V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10 | H.265 Main10 profile.
  V4L2_MPEG_VIDEO_H265_PROFILE_MAINSTILLPICTURE | H.265 MainStillPicture profile.

Definition at line 92 of file v4l2_nv_extensions.h.