libxcoder 5.6.0
Loading...
Searching...
No Matches
ni_device_api_priv.h File Reference

Private definitions used by ni_device_api.c for video processing tasks. More...

#include "ni_defs.h"
#include "ni_rsrc_api.h"

Go to the source code of this file.

Data Structures

struct  _ni_session_config_rw
 
struct  _ni_instance_mgr_general_status
 
struct  _ni_log_fl_fw_versions
 
struct  _ni_instance_mgr_stream_info
 
struct  _ni_session_stats
 
struct  _ni_global_session_stats
 
struct  _ni_instance_mgr_allocation_info
 
struct  _ni_instance_mgr_stream_complete
 
struct  _ni_instance_upload_ret_hwdesc
 
struct  _ni_instance_buf_info
 
struct  _ni_encoder_frame_params
 
struct  _ni_metadata_common
 
struct  _ni_metadata_dec_frame
 
struct  _ni_metadata_enc_frame
 
struct  _ni_metadata_enc_bstream_rev61
 
struct  _ni_metadata_enc_bstream
 
struct  _ni_t408_config_t
 
struct  _ni_encoder_config_t
 
struct  ni_encoder_mv
 
struct  ni_encoder_cu_info
 
struct  _ni_uploader_config_t
 
struct  _ni_resolution
 
struct  ni_decode_cropping_rectangle
 
struct  ni_decoder_output_picture_size
 
struct  ni_decoder_output_config_t
 
struct  _ni_decoder_config_t
 
struct  _ni_ai_config_t
 
struct  _ni_segment
 
struct  _ni_network_buffer_info
 
struct  _ni_scaler_config
 
struct  _ni_ddr_priority_config
 
struct  log_entry_header_t
 Log entry header structure. More...
 
struct  log_entry_trailer_t
 Log entry trailer structure. More...
 
struct  log_entry_info_t
 Log entry information structure. More...
 

Macros

#define NI_VERSION_CHARACTER_COUNT   8
 
#define TUNE_BFRAME_VISUAL_MEDIUM   1
 
#define TUNE_BFRAME_VISUAL_HIGH   2
 
#define CU_INFO_OUTPUT_SIZE_V1   26
 
#define CU_INFO_OUTPUT_SIZE_V2   16
 
#define CU_INFO_OUTPUT_SIZE_V3   19
 
#define CU_LOCATION_HOR_BIT_OFFSET   (0)
 
#define CU_LOCATION_HOR_BYTE_OFFSET   (CU_LOCATION_HOR_BIT_OFFSET / 8)
 
#define CU_LOCATION_HOR_BIT_POSITION   (CU_LOCATION_HOR_BIT_OFFSET % 8)
 
#define CU_LOCATION_HOR_BITS   (3)
 
#define CU_LOCATION_VER_BIT_OFFSET   (3)
 
#define CU_LOCATION_VER_BYTE_OFFSET   (CU_LOCATION_VER_BIT_OFFSET / 8)
 
#define CU_LOCATION_VER_BIT_POSITION   (CU_LOCATION_VER_BIT_OFFSET % 8)
 
#define CU_LOCATION_VER_BITS   (3)
 
#define CU_SIZE_BIT_OFFSET   (6)
 
#define CU_SIZE_BYTE_OFFSET   (CU_SIZE_BIT_OFFSET / 8)
 
#define CU_SIZE_BIT_POSITION   (CU_SIZE_BIT_OFFSET % 8)
 
#define CU_SIZE_BITS   (2)
 
#define CU_MODE_BIT_OFFSET   (8)
 
#define CU_MODE_BYTE_OFFSET   (CU_MODE_BIT_OFFSET / 8)
 
#define CU_MODE_BIT_POSITION   (CU_MODE_BIT_OFFSET % 8)
 
#define CU_MODE_BITS   (1)
 
#define RDCOST_BIT_OFFSET   (9)
 
#define RDCOST_BYTE_OFFSET   (RDCOST_BIT_OFFSET / 8)
 
#define RDCOST_BIT_POSITION   (RDCOST_BIT_OFFSET % 8)
 
#define RDCOST_BITS   (25)
 
#define INTER_PRED_IDC_BIT_OFFSET   (34)
 
#define INTER_PRED_IDC_BYTE_OFFSET   (INTER_PRED_IDC_BIT_OFFSET / 8)
 
#define INTER_PRED_IDC_BIT_POSITION   (INTER_PRED_IDC_BIT_OFFSET % 8)
 
#define INTER_PRED_IDC_BITS   (2)
 
#define MV0_REFIDX_BIT_OFFSET   (36)
 
#define MV0_REFIDX_BYTE_OFFSET   (MV0_REFIDX_BIT_OFFSET / 8)
 
#define MV0_REFIDX_BIT_POSITION   (MV0_REFIDX_BIT_OFFSET % 8)
 
#define MV0_REFIDX_BITS   (2)
 
#define MV0_MVX_BIT_OFFSET   (38)
 
#define MV0_MVX_BYTE_OFFSET   (MV0_MVX_BIT_OFFSET / 8)
 
#define MV0_MVX_BIT_POSITION   (MV0_MVX_BIT_OFFSET % 8)
 
#define MV0_MVX_BITS   (14)
 
#define MV0_MVY_BIT_OFFSET   (52)
 
#define MV0_MVY_BYTE_OFFSET   (MV0_MVY_BIT_OFFSET / 8)
 
#define MV0_MVY_BIT_POSITION   (MV0_MVY_BIT_OFFSET % 8)
 
#define MV0_MVY_BITS   (14)
 
#define MV1_REFIDX_BIT_OFFSET   (66)
 
#define MV1_REFIDX_BYTE_OFFSET   (MV1_REFIDX_BIT_OFFSET / 8)
 
#define MV1_REFIDX_BIT_POSITION   (MV1_REFIDX_BIT_OFFSET % 8)
 
#define MV1_REFIDX_BITS   (2)
 
#define MV1_MVX_BIT_OFFSET   (68)
 
#define MV1_MVX_BYTE_OFFSET   (MV1_MVX_BIT_OFFSET / 8)
 
#define MV1_MVX_BIT_POSITION   (MV1_MVX_BIT_OFFSET % 8)
 
#define MV1_MVX_BITS   (14)
 
#define MV1_MVY_BIT_OFFSET   (82)
 
#define MV1_MVY_BYTE_OFFSET   (MV1_MVY_BIT_OFFSET / 8)
 
#define MV1_MVY_BIT_POSITION   (MV1_MVY_BIT_OFFSET % 8)
 
#define MV1_MVY_BITS   (14)
 
#define INTRA_PART_MODE_BIT_OFFSET   (34)
 
#define INTRA_PART_MODE_BYTE_OFFSET   (INTRA_PART_MODE_BIT_OFFSET / 8)
 
#define INTRA_PART_MODE_BIT_POSITION   (INTRA_PART_MODE_BIT_OFFSET % 8)
 
#define INTRA_PART_MODE_BITS   (1)
 
#define INTRA_PRED_MODE0_BIT_OFFSET   (35)
 
#define INTRA_PRED_MODE0_BYTE_OFFSET   (INTRA_PRED_MODE0_BIT_OFFSET / 8)
 
#define INTRA_PRED_MODE0_BIT_POSITION   (INTRA_PRED_MODE0_BIT_OFFSET % 8)
 
#define INTRA_PRED_MODE0_BITS   (6)
 
#define INTRA_PRED_MODE1_BIT_OFFSET   (41)
 
#define INTRA_PRED_MODE1_BYTE_OFFSET   (INTRA_PRED_MODE1_BIT_OFFSET / 8)
 
#define INTRA_PRED_MODE1_BIT_POSITION   (INTRA_PRED_MODE1_BIT_OFFSET % 8)
 
#define INTRA_PRED_MODE1_BITS   (6)
 
#define INTRA_PRED_MODE2_BIT_OFFSET   (47)
 
#define INTRA_PRED_MODE2_BYTE_OFFSET   (INTRA_PRED_MODE2_BIT_OFFSET / 8)
 
#define INTRA_PRED_MODE2_BIT_POSITION   (INTRA_PRED_MODE2_BIT_OFFSET % 8)
 
#define INTRA_PRED_MODE2_BITS   (6)
 
#define INTRA_PRED_MODE3_BIT_OFFSET   (53)
 
#define INTRA_PRED_MODE3_BYTE_OFFSET   (INTRA_PRED_MODE3_BIT_OFFSET / 8)
 
#define INTRA_PRED_MODE3_BIT_POSITION   (INTRA_PRED_MODE3_BIT_OFFSET % 8)
 
#define INTRA_PRED_MODE3_BITS   (6)
 
#define MEAN_BIT_OFFSET   (96)
 
#define MEAN_BYTE_OFFSET   (MEAN_BIT_OFFSET / 8)
 
#define MEAN_BIT_POSITION   (MEAN_BIT_OFFSET % 8)
 
#define MEAN_BITS   (10)
 
#define VARIANCE_BIT_OFFSET   (106)
 
#define VARIANCE_BYTE_OFFSET   (VARIANCE_BIT_OFFSET / 8)
 
#define VARIANCE_BIT_POSITION   (VARIANCE_BIT_OFFSET % 8)
 
#define VARIANCE_BITS   (18)
 
#define QP_BIT_OFFSET   (124)
 
#define QP_BYTE_OFFSET   (QP_BIT_OFFSET / 8)
 
#define QP_BIT_POSITION   (QP_BIT_OFFSET % 8)
 
#define QP_BITS   (6)
 
#define RDCOST_OTHER_BIT_OFFSET   (130)
 
#define RDCOST_OTHER_BYTE_OFFSET   (RDCOST_OTHER_BIT_OFFSET / 8)
 
#define RDCOST_OTHER_BIT_POSITION   (RDCOST_OTHER_BIT_OFFSET % 8)
 
#define RDCOST_OTHER_BITS   (25)
 
#define INTRACOST_BIT_OFFSET   (155)
 
#define INTRACOST_BYTE_OFFSET   (INTRACOST_BIT_OFFSET / 8)
 
#define INTRACOST_BIT_POSITION   (INTRACOST_BIT_OFFSET % 8)
 
#define INTRACOST_BITS   (25)
 
#define INTERCOST_BIT_OFFSET   (180)
 
#define INTERCOST_BYTE_OFFSET   (INTERCOST_BIT_OFFSET / 8)
 
#define INTERCOST_BIT_POSITION   (INTERCOST_BIT_OFFSET % 8)
 
#define INTERCOST_BITS   (25)
 
#define DUMMY_BIT_OFFSET   (205)
 
#define DUMMY_BYTE_OFFSET   (DUMMY_BIT_OFFSET / 8)
 
#define DUMMY_BIT_POSITION   (DUMMY_BIT_OFFSET % 8)
 
#define DUMMY_BITS   (3)
 
#define AVC_MB_MODE_BIT_OFFSET   (0)
 
#define AVC_MB_MODE_BYTE_OFFSET   (AVC_MB_MODE_BIT_OFFSET / 8)
 
#define AVC_MB_MODE_BIT_POSITION   (AVC_MB_MODE_BIT_OFFSET % 8)
 
#define AVC_MB_MODE_BITS   (1)
 
#define AVC_RDCOST_BIT_OFFSET   (1)
 
#define AVC_RDCOST_BYTE_OFFSET   (AVC_RDCOST_BIT_OFFSET / 8)
 
#define AVC_RDCOST_BIT_POSITION   (AVC_RDCOST_BIT_OFFSET % 8)
 
#define AVC_RDCOST_BITS   (25)
 
#define AVC_INTER_PRED_IDC_BIT_OFFSET   (26)
 
#define AVC_INTER_PRED_IDC_BYTE_OFFSET   (AVC_INTER_PRED_IDC_BIT_OFFSET / 8)
 
#define AVC_INTER_PRED_IDC_BIT_POSITION   (AVC_INTER_PRED_IDC_BIT_OFFSET % 8)
 
#define AVC_INTER_PRED_IDC_BITS   (2)
 
#define AVC_MV0_REFIDX_BIT_OFFSET   (28)
 
#define AVC_MV0_REFIDX_BYTE_OFFSET   (AVC_MV0_REFIDX_BIT_OFFSET / 8)
 
#define AVC_MV0_REFIDX_BIT_POSITION   (AVC_MV0_REFIDX_BIT_OFFSET % 8)
 
#define AVC_MV0_REFIDX_BITS   (2)
 
#define AVC_MV0_MVX_BIT_OFFSET   (30)
 
#define AVC_MV0_MVX_BYTE_OFFSET   (AVC_MV0_MVX_BIT_OFFSET / 8)
 
#define AVC_MV0_MVX_BIT_POSITION   (AVC_MV0_MVX_BIT_OFFSET % 8)
 
#define AVC_MV0_MVX_BITS   (14)
 
#define AVC_MV0_MVY_BIT_OFFSET   (44)
 
#define AVC_MV0_MVY_BYTE_OFFSET   (AVC_MV0_MVY_BIT_OFFSET / 8)
 
#define AVC_MV0_MVY_BIT_POSITION   (AVC_MV0_MVY_BIT_OFFSET % 8)
 
#define AVC_MV0_MVY_BITS   (14)
 
#define AVC_MV1_REFIDX_BIT_OFFSET   (58)
 
#define AVC_MV1_REFIDX_BYTE_OFFSET   (AVC_MV1_REFIDX_BIT_OFFSET / 8)
 
#define AVC_MV1_REFIDX_BIT_POSITION   (AVC_MV1_REFIDX_BIT_OFFSET % 8)
 
#define AVC_MV1_REFIDX_BITS   (2)
 
#define AVC_MV1_MVX_BIT_OFFSET   (60)
 
#define AVC_MV1_MVX_BYTE_OFFSET   (AVC_MV1_MVX_BIT_OFFSET / 8)
 
#define AVC_MV1_MVX_BIT_POSITION   (AVC_MV1_MVX_BIT_OFFSET % 8)
 
#define AVC_MV1_MVX_BITS   (14)
 
#define AVC_MV1_MVY_BIT_OFFSET   (74)
 
#define AVC_MV1_MVY_BYTE_OFFSET   (AVC_MV1_MVY_BIT_OFFSET / 8)
 
#define AVC_MV1_MVY_BIT_POSITION   (AVC_MV1_MVY_BIT_OFFSET % 8)
 
#define AVC_MV1_MVY_BITS   (14)
 
#define AVC_INTRA_PART_MODE_BIT_OFFSET   (26)
 
#define AVC_INTRA_PART_MODE_BYTE_OFFSET   (AVC_INTRA_PART_MODE_BIT_OFFSET / 8)
 
#define AVC_INTRA_PART_MODE_BIT_POSITION   (AVC_INTRA_PART_MODE_BIT_OFFSET % 8)
 
#define AVC_INTRA_PART_MODE_BITS   (2)
 
#define NI_MINIMUM_CROPPED_LENGTH   48
 
#define NI_MAX_SEGMENT_NUM   4
 
#define FRAME_CHUNK_INDEX_SIZE   4096
 
#define NI_SESSION_CLOSE_RETRY_MAX   10
 
#define NI_SESSION_CLOSE_RETRY_INTERVAL_US   500000
 
#define NI_HWDESC_UNIFIED_MEMBIN_SIZE   0x187000
 
#define NI_QUADRA_MEMORY_CONFIG_DR   0
 
#define NI_QUADRA_MEMORY_CONFIG_SR   1
 
#define NI_QUADRA_MEMORY_CONFIG_SR2_REMOVE_P2P   2
 
#define NI_QUADRA_MEMORY_CONFIG_SR_4G   3
 
#define NI_P2P_RECV   0
 
#define NI_P2P_SEND   1
 
#define NI_MAX_P2P_SGL_ENTRIES   128
 
#define NI_MAX_AI_NETWORK_BINARY_BUFFER_QUERY_RETRIES   300000
 
#define NI_MAX_DEC_SESSION_READ_QUERY_EOS_RETRIES   15000
 
#define NI_RETRY_INTERVAL_200US   200
 
#define NI_RETRY_INTERVAL_100US   100
 
#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE   32
 
#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_o   48
 
#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_rc   88
 
#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_sM   112
 
#define FW_LOG_START_DELIMITER_0   0x5A
 
#define FW_LOG_START_DELIMITER_1   0xA5
 
#define FW_LOG_END_DELIMITER_0   0xA5
 
#define FW_LOG_END_DELIMITER_1   0x5A
 
#define NI_AI_HW_ALIGN_SIZE   64
 

Typedefs

typedef enum _ni_xcoder_mgr_retcode ni_xcoder_mgr_retcode_t
 
typedef struct _ni_session_config_rw ni_session_config_rw_t
 
typedef struct _ni_instance_mgr_general_status ni_instance_mgr_general_status_t
 
typedef struct _ni_log_fl_fw_versions ni_log_fl_fw_versions_t
 
typedef struct _ni_instance_mgr_stream_info ni_instance_mgr_stream_info_t
 
typedef struct _ni_session_stats ni_session_stats_t
 
typedef struct _ni_global_session_stats ni_global_session_stats_t
 
typedef struct _ni_instance_mgr_allocation_info ni_instance_mgr_allocation_info_t
 
typedef struct _ni_instance_mgr_stream_complete ni_instance_mgr_stream_complete_t
 
typedef struct _ni_instance_upload_ret_hwdesc ni_instance_upload_ret_hwdesc_t
 
typedef struct _ni_instance_buf_info ni_instance_buf_info_t
 
typedef struct _ni_encoder_frame_params ni_encoder_frame_params_t
 
typedef struct _ni_metadata_common ni_metadata_common_t
 
typedef struct _ni_metadata_dec_frame ni_metadata_dec_frame_t
 
typedef struct _ni_metadata_enc_frame ni_metadata_enc_frame_t
 
typedef struct _ni_metadata_enc_bstream_rev61 ni_metadata_enc_bstream_rev61_t
 
typedef struct _ni_metadata_enc_bstream ni_metadata_enc_bstream_t
 
typedef enum _ni_gop_preset_idx ni_gop_preset_idx_t
 
typedef struct _ni_t408_config_t ni_t408_config_t
 
typedef struct _ni_encoder_config_t ni_encoder_config_t
 
typedef struct _ni_uploader_config_t ni_uploader_config_t
 
typedef struct _ni_resolution ni_resolution_t
 
typedef struct _ni_decoder_config_t ni_decoder_config_t
 
typedef struct _ni_ai_config_t ni_ai_config_t
 
typedef struct _ni_segment ni_segment_t
 
typedef struct _ni_network_buffer_info ni_network_buffer_info_t
 
typedef struct _ni_scaler_config ni_scaler_config_t
 
typedef struct _ni_ddr_priority_config ni_ddr_priority_config_t
 

Enumerations

enum  ni_session_config_rw_type_t { SESSION_READ_CONFIG = 0 , SESSION_WRITE_CONFIG = 1 }
 
enum  ni_instance_buf_info_rw_type_t {
  INST_BUF_INFO_RW_READ = 0 , INST_BUF_INFO_RW_WRITE = 1 , INST_BUF_INFO_RW_UPLOAD = 2 , INST_BUF_INFO_RW_READ_BUSY = 3 ,
  INST_BUF_INFO_RW_WRITE_BUSY = 4 , INST_BUF_INFO_R_ACQUIRE = 5 , INST_BUF_INFO_RW_WRITE_BY_EP = 6 , INST_BUF_INFO_RW_READ_BY_AI = 7
}
 
enum  _ni_xcoder_mgr_retcode {
  ni_xcoder_request_success = 0 , ni_xcoder_request_pending = 1 , ni_xcoder_resource_recovery = 0xFFFD , ni_xcoder_resource_insufficient = 0xFFFE ,
  ni_xcoder_general_error = 0xFFFF
}
 
enum  _ni_gop_preset_idx {
  GOP_PRESET_IDX_NONE = -2 , GOP_PRESET_IDX_DEFAULT , GOP_PRESET_IDX_CUSTOM = 0 , GOP_PRESET_IDX_ALL_I = 1 ,
  GOP_PRESET_IDX_IPP = 2 , GOP_PRESET_IDX_IBBB = 3 , GOP_PRESET_IDX_IBPBP = 4 , GOP_PRESET_IDX_IBBBP = 5 ,
  GOP_PRESET_IDX_IPPPP = 6 , GOP_PRESET_IDX_IBBBB = 7 , GOP_PRESET_IDX_RA_IB = 8 , GOP_PRESET_IDX_SP = 9 ,
  GOP_PRESET_IDX_HIERARCHICAL_IPPPP = 10
}
 
enum  ni_bitstream_format_t {
  STD_AVC , STD_VC1 , STD_MPEG2 , STD_MPEG4 ,
  STD_H263 , STD_DIV3 , STD_RV , STD_AVS ,
  STD_THO = 9 , STD_VP3 , STD_VP8 , STD_HEVC ,
  STD_VP9 , STD_AVS2 , STD_SVAC , STD_AV1 ,
  STD_JPEG , STD_MAX
}
 
enum  ni_decoder_crop_mode { CROP_DISABLED = 0 , CROP_AUTO , CROP_MANUAL }
 
enum  ni_set_param_option_t { OPT_COMMON = 0 , OPT_CUSTOM_GOP = 1 , OPT_SEI = 2 , OPT_VUI = 3 }
 

Functions

int ni_create_frame (ni_frame_t *p_frame, uint32_t read_length, uint64_t *frame_offset, uint32_t *frame_dropped, bool is_hw_frame)
 Get info from received p_frame.
 
void ni_set_custom_template (ni_session_context_t *p_ctx, ni_encoder_config_t *p_cfg, ni_xcoder_params_t *p_src)
 Setup all xcoder configurations with custom parameters (Rev. B)
 
void ni_set_custom_dec_template (ni_session_context_t *p_ctx, ni_decoder_config_t *p_cfg, ni_xcoder_params_t *p_src, uint32_t max_pkt_size)
 Setup all xcoder configurations with custom parameters (Rev. B)
 
void ni_set_default_template (ni_session_context_t *p_ctx, ni_encoder_config_t *p_config)
 Setup and initialize all xcoder configuration to default (Rev. B)
 
ni_retcode_t ni_validate_custom_template (ni_session_context_t *p_ctx, ni_encoder_config_t *p_cfg, ni_xcoder_params_t *p_src, char *p_param_err, uint32_t max_err_len)
 Perform validation on custom parameters (Rev. B)
 
ni_retcode_t ni_validate_custom_dec_template (ni_xcoder_params_t *p_src, ni_session_context_t *p_ctx, ni_decoder_config_t *p_cfg, char *p_param_err, uint32_t max_err_len)
 Perform validation on custom dec parameters (Rev. B)
 
ni_retcode_t ni_check_common_params (ni_t408_config_t *p_param, ni_xcoder_params_t *p_src, char *param_err, uint32_t max_err_len)
 
ni_retcode_t ni_check_ratecontrol_params (ni_encoder_config_t *p_cfg, char *param_err, uint32_t max_err_len)
 
void ni_params_print (ni_xcoder_params_t *const p_encoder_params)
 Print xcoder user configurations.
 
int32_t ni_get_frame_index (uint32_t *value)
 Get xcoder instance id.
 
void ni_populate_device_capability_struct (ni_device_capability_t *p_cap, void *p_data, ni_device_handle_t device_handle, bool device_in_ctxt)
 Get info from received xcoder capability.
 
int ni_xcoder_session_query (ni_session_context_t *p_ctx, ni_device_type_t device_type)
 Query current xcoder status.
 
int ni_xcoder_session_query_detail (ni_session_context_t *p_ctx, ni_device_type_t device_type, void *detail_data, int ver)
 Query current xcoder status.
 
ni_retcode_t ni_config_instance_set_decoder_params (ni_session_context_t *p_ctx, uint32_t max_pkt_size)
 Send a p_config command to configure decoding parameters.
 
ni_retcode_t ni_decoder_session_open (ni_session_context_t *p_ctx)
 Open a xcoder decoder instance.
 
ni_retcode_t ni_decoder_session_close (ni_session_context_t *p_ctx, int eos_recieved)
 Close a xcoder decoder instance.
 
ni_retcode_t ni_decoder_session_send_eos (ni_session_context_t *p_ctx)
 Send end of stream signal to the decoder.
 
ni_retcode_t ni_decoder_session_flush (ni_session_context_t *p_ctx)
 Flush decoder output.
 
int ni_decoder_session_write (ni_session_context_t *p_ctx, ni_packet_t *p_packet)
 Send a video p_packet to decoder.
 
int ni_decoder_session_read (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 Retrieve a YUV p_frame from decoder.
 
ni_retcode_t ni_encoder_session_open (ni_session_context_t *p_ctx)
 Open a xcoder encoder instance.
 
ni_retcode_t ni_encoder_session_close (ni_session_context_t *p_ctx, int eos_recieved)
 Close a xcoder encoder instance.
 
ni_retcode_t ni_encoder_session_send_eos (ni_session_context_t *p_ctx)
 Flush encoder output.
 
int ni_encoder_session_write (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 Send a YUV p_frame to encoder.
 
int ni_encoder_session_read (ni_session_context_t *p_ctx, ni_packet_t *p_packet)
 
ni_retcode_t ni_encoder_session_sequence_change (ni_session_context_t *p_ctx, ni_resolution_t *p_resoluion)
 Send sequnce change to a xcoder encoder instance.
 
ni_retcode_t ni_query_general_status (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_general_status_t *p_gen_status)
 Query a particular xcoder instance to get GeneralStatus data.
 
ni_retcode_t ni_query_detail_status (ni_session_context_t *p_ctx, ni_device_type_t device_type, void *p_detail_status, int ver)
 Query a particular xcoder instance to get DetailStatus data.
 
ni_retcode_t ni_query_stream_info (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_stream_info_t *p_stream_info)
 Query a particular xcoder instance to get Stream Info data.
 
ni_retcode_t ni_query_eos (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_stream_complete_t *p_stream_complete)
 Query a particular xcoder instance to get End of Output data.
 
ni_retcode_t ni_query_instance_buf_info (ni_session_context_t *p_ctx, ni_instance_buf_info_rw_type_t rw_type, ni_device_type_t device_type, ni_instance_buf_info_t *p_inst_buf_info)
 Query a particular xcoder instance to get buffer/data Info data.
 
ni_retcode_t ni_query_session_stats (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_session_stats_t *p_session_stats, int rc, int opcode)
 Query a particular session to get the stats info.
 
ni_retcode_t ni_query_session_statistic_info (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_session_statistic_t *p_session_statistic)
 Query a particular xcoder session to get session statistics.
 
ni_retcode_t ni_config_session_rw (ni_session_context_t *p_ctx, ni_session_config_rw_type_t rw_type, uint8_t enable, uint8_t hw_action, uint16_t frame_id)
 Configure the read/write pipe for a session to control its behavior.
 
ni_retcode_t ni_config_instance_sos (ni_session_context_t *p_ctx, ni_device_type_t device_type)
 Send a p_config command for Start Of Stream.
 
ni_retcode_t ni_config_instance_eos (ni_session_context_t *p_ctx, ni_device_type_t device_type)
 Send a p_config command for End Of Stream.
 
ni_retcode_t ni_config_instance_flush (ni_session_context_t *p_ctx, ni_device_type_t device_type)
 Send a p_config command to flush the stream.
 
ni_retcode_t ni_config_instance_set_encoder_params (ni_session_context_t *p_ctx)
 Send a p_config command to configure encoding parameters.
 
ni_retcode_t ni_config_instance_update_encoder_params (ni_session_context_t *p_ctx, ni_param_change_flags_t change_flags)
 
ni_retcode_t ni_config_instance_set_encoder_frame_params (ni_session_context_t *p_ctx, ni_encoder_frame_params_t *p_params)
 Send a p_config command to configure encoding p_frame parameters.
 
ni_retcode_t ni_config_instance_set_write_len (ni_session_context_t *p_ctx, ni_device_type_t device_type, uint32_t len)
 Send a p_config command to set the length for the incoming write packet.
 
ni_retcode_t ni_config_instance_set_sequence_change (ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_resolution_t *p_resolution)
 Send a p_config command to inform encoder sequence change.
 
void ni_encoder_set_vui (uint8_t *vui, ni_encoder_config_t *p_cfg)
 
void * ni_session_keep_alive_thread (void *arguments)
 decoder keep alive thread function triggers every 1 second
 
ni_retcode_t ni_send_session_keep_alive (uint32_t session_id, ni_device_handle_t device_handle, ni_event_handle_t event_handle, void *p_data)
 send a keep alive message to firmware
 
void ni_fix_VUI (uint8_t *vui, int pos, int value)
 insert the 32 bits of integer value at bit position pos
 
ni_retcode_t ni_decoder_session_copy_internal (ni_session_context_t *src_p_ctx, ni_session_context_t *dst_p_ctx)
 Copy a xcoder decoder worker thread info and card info.
 
int ni_decoder_session_read_desc (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 Copy a xcoder decoder worker thread info and card info.
 
ni_retcode_t ni_uploader_session_open (ni_session_context_t *p_ctx)
 Open a xcoder uploader instance.
 
ni_retcode_t ni_uploader_session_close (ni_session_context_t *p_ctx)
 Close an xcoder upload instance.
 
ni_retcode_t ni_scaler_session_query_buffer_avail (ni_session_context_t *p_ctx)
 Query and acquire buffer from xcoder scale instance.
 
ni_retcode_t ni_hwupload_session_query_buffer_avail (ni_session_context_t *p_ctx)
 Query and acquire buffer from xcoder upload instance.
 
int ni_hwupload_session_write (ni_session_context_t *p_ctx, ni_frame_t *p_frame, niFrameSurface1_t *hwdesc)
 Send a YUV p_frame to upload session.
 
int ni_hwupload_session_read_hwdesc (ni_session_context_t *p_ctx, niFrameSurface1_t *hwdesc)
 Retrieve a HW descriptor of uploaded frame.
 
int ni_hwdownload_session_read (ni_session_context_t *p_ctx, ni_frame_t *p_frame, niFrameSurface1_t *hwdesc)
 Retrieve a YUV p_frame from decoder.
 
int ni_hwdownload_by_frame_idx (niFrameSurface1_t *hwdesc, ni_frame_t *p_frame, int is_auto_dl)
 Retrieve a YUV p_frame by frame index.
 
ni_retcode_t ni_hwframe_clone (ni_session_context_t *p_ctx, ni_frameclone_desc_t *p_frameclone_desc)
 Copy a src hw frame to a dst hw frame.
 
ni_retcode_t ni_clear_instance_buf (niFrameSurface1_t *surface)
 clear a particular xcoder instance buffer/data
 
ni_retcode_t ni_config_instance_set_scaler_params (ni_session_context_t *p_ctx, ni_scaler_params_t *p_params)
 condif a scaler instance
 
ni_retcode_t ni_scaler_alloc_frame (ni_session_context_t *p_ctx, int width, int height, int format, int options, int rectangle_width, int rectangle_height, int rectangle_x, int rectangle_y, int rgba_color, int frame_index)
 allocate a frame in the scaler
 
ni_retcode_t ni_scaler_config_frame (ni_session_context_t *p_ctx, ni_frame_config_t *p_cfg)
 config frame in the scaler
 
ni_retcode_t ni_scaler_multi_config_frame (ni_session_context_t *p_ctx, ni_frame_config_t p_cfg_in[], int numInCfgs, ni_frame_config_t *p_cfg_out)
 config multi frames in the scaler
 
int ni_scaler_session_open (ni_session_context_t *p_ctx)
 Open a xcoder scaler instance.
 
ni_retcode_t ni_scaler_session_close (ni_session_context_t *p_ctx, int eos_received)
 close a scaler session
 
ni_retcode_t ni_config_instance_set_uploader_params (ni_session_context_t *p_ctx, uint32_t pool_size, uint32_t pool)
 Send a p_config command to configure uploading parameters.
 
ni_retcode_t ni_scaler_session_read_hwdesc (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 read a hardware descriptor from a scaler session
 
int ni_get_bitdepth_factor_from_pixfmt (int pix_fmt)
 Grab bitdepth factor from NI_PIX_FMT.
 
int ni_get_planar_from_pixfmt (int pix_fmt)
 Grab planar info from NI_PIX_FMT.
 
ni_retcode_t ni_get_memory_offset (ni_session_context_t *p_ctx, const niFrameSurface1_t *hwdesc, uint32_t *p_offset)
 Get an address offset from a hw descriptor.
 
ni_retcode_t ni_device_get_ddr_configuration (ni_session_context_t *p_ctx)
 Get DDR configuration of Quadra device.
 
ni_retcode_t ni_device_set_ddr_configuration (ni_session_context_t *p_ctx, uint8_t ddr_priority_mode)
 Set DDR configuration of Quadra device.
 
ni_retcode_t ni_ai_session_open (ni_session_context_t *p_ctx)
 
ni_retcode_t ni_ai_session_close (ni_session_context_t *p_ctx, int eos_received)
 
ni_retcode_t ni_config_instance_network_binary (ni_session_context_t *p_ctx, void *nb_data, uint32_t nb_size)
 
ni_retcode_t ni_config_instance_hvsplus (ni_session_context_t *p_ctx)
 
ni_retcode_t ni_ai_query_network_ready (ni_session_context_t *p_ctx)
 
ni_retcode_t ni_ai_session_write (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 
ni_retcode_t ni_ai_session_read (ni_session_context_t *p_ctx, ni_packet_t *p_packet)
 
ni_retcode_t ni_config_read_inout_layers (ni_session_context_t *p_ctx, ni_network_data_t *p_network)
 
ni_retcode_t ni_ai_alloc_hwframe (ni_session_context_t *p_ctx, int width, int height, int options, int pool_size, int frame_index)
 
ni_retcode_t ni_ai_alloc_dst_frame (ni_session_context_t *p_ctx, niFrameSurface1_t *p_out_surface)
 
ni_retcode_t ni_ai_multi_config_frame (ni_session_context_t *p_ctx, ni_frame_config_t p_cfg_in[], int numInCfgs, ni_frame_config_t *p_cfg_out)
 
ni_retcode_t ni_ai_session_read_hwdesc (ni_session_context_t *p_ctx, ni_frame_t *p_frame)
 read a hardware descriptor from a scaler session
 
ni_retcode_t ni_encoder_metadata_buffer_alloc (ni_frame_t *p_frame, int extra_len)
 Allocate memory for the metadata header and auxillary data for encoder input data.
 
ni_retcode_t ni_encoder_start_buffer_alloc (ni_frame_t *p_frame)
 Allocate memory for the non-4k-aligned part at the start of YUV data for encoder input data.
 
ni_retcode_t ni_ai_session_query_metrics (ni_session_context_t *p_ctx, ni_network_perf_metrics_t *p_metrics)
 
ni_retcode_t ni_device_config_ns_qos (ni_device_handle_t device_handle, uint32_t key, uint32_t value)
 Send namespace num / Opmode and SRIOv index/value to the device with specified logic block address.
 
ni_retcode_t ni_dump_log_single_core (ni_session_context_t *p_ctx, void *p_data, uint32_t core_id, bool gen_log_file)
 
ni_retcode_t ni_dump_log_all_cores (ni_session_context_t *p_ctx, void *p_data, bool gen_log_file)
 
ni_retcode_t ni_send_to_target (ni_session_context_t *p_ctx, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
 
ni_retcode_t ni_recv_from_target (ni_session_context_t *pSession, const ni_p2p_sgl_t *dmaAddrs, ni_frame_t *pDstFrame)
 
int lower_pixel_rate (const ni_load_query_t *pQuery, uint32_t ui32CurrentLowest)
 
ni_retcode_t ni_config_instance_set_decoder_ppu_params (ni_session_context_t *p_ctx, void *p_dec_ppu_config, int buffer_size)
 Send a p_config command to configure decoding parameters.
 
ni_retcode_t ni_set_cpu_affinity (ni_session_context_t *p_ctx)
 set cpu affinity based on numa node
 

Detailed Description

Private definitions used by ni_device_api.c for video processing tasks.


Definition in file ni_device_api_priv.h.

Macro Definition Documentation

◆ AVC_INTER_PRED_IDC_BIT_OFFSET

#define AVC_INTER_PRED_IDC_BIT_OFFSET   (26)

Definition at line 818 of file ni_device_api_priv.h.

◆ AVC_INTER_PRED_IDC_BIT_POSITION

#define AVC_INTER_PRED_IDC_BIT_POSITION   (AVC_INTER_PRED_IDC_BIT_OFFSET % 8)

Definition at line 820 of file ni_device_api_priv.h.

◆ AVC_INTER_PRED_IDC_BITS

#define AVC_INTER_PRED_IDC_BITS   (2)

Definition at line 821 of file ni_device_api_priv.h.

◆ AVC_INTER_PRED_IDC_BYTE_OFFSET

#define AVC_INTER_PRED_IDC_BYTE_OFFSET   (AVC_INTER_PRED_IDC_BIT_OFFSET / 8)

Definition at line 819 of file ni_device_api_priv.h.

◆ AVC_INTRA_PART_MODE_BIT_OFFSET

#define AVC_INTRA_PART_MODE_BIT_OFFSET   (26)

Definition at line 853 of file ni_device_api_priv.h.

◆ AVC_INTRA_PART_MODE_BIT_POSITION

#define AVC_INTRA_PART_MODE_BIT_POSITION   (AVC_INTRA_PART_MODE_BIT_OFFSET % 8)

Definition at line 855 of file ni_device_api_priv.h.

◆ AVC_INTRA_PART_MODE_BITS

#define AVC_INTRA_PART_MODE_BITS   (2)

Definition at line 856 of file ni_device_api_priv.h.

◆ AVC_INTRA_PART_MODE_BYTE_OFFSET

#define AVC_INTRA_PART_MODE_BYTE_OFFSET   (AVC_INTRA_PART_MODE_BIT_OFFSET / 8)

Definition at line 854 of file ni_device_api_priv.h.

◆ AVC_MB_MODE_BIT_OFFSET

#define AVC_MB_MODE_BIT_OFFSET   (0)

Definition at line 808 of file ni_device_api_priv.h.

◆ AVC_MB_MODE_BIT_POSITION

#define AVC_MB_MODE_BIT_POSITION   (AVC_MB_MODE_BIT_OFFSET % 8)

Definition at line 810 of file ni_device_api_priv.h.

◆ AVC_MB_MODE_BITS

#define AVC_MB_MODE_BITS   (1)

Definition at line 811 of file ni_device_api_priv.h.

◆ AVC_MB_MODE_BYTE_OFFSET

#define AVC_MB_MODE_BYTE_OFFSET   (AVC_MB_MODE_BIT_OFFSET / 8)

Definition at line 809 of file ni_device_api_priv.h.

◆ AVC_MV0_MVX_BIT_OFFSET

#define AVC_MV0_MVX_BIT_OFFSET   (30)

Definition at line 828 of file ni_device_api_priv.h.

◆ AVC_MV0_MVX_BIT_POSITION

#define AVC_MV0_MVX_BIT_POSITION   (AVC_MV0_MVX_BIT_OFFSET % 8)

Definition at line 830 of file ni_device_api_priv.h.

◆ AVC_MV0_MVX_BITS

#define AVC_MV0_MVX_BITS   (14)

Definition at line 831 of file ni_device_api_priv.h.

◆ AVC_MV0_MVX_BYTE_OFFSET

#define AVC_MV0_MVX_BYTE_OFFSET   (AVC_MV0_MVX_BIT_OFFSET / 8)

Definition at line 829 of file ni_device_api_priv.h.

◆ AVC_MV0_MVY_BIT_OFFSET

#define AVC_MV0_MVY_BIT_OFFSET   (44)

Definition at line 833 of file ni_device_api_priv.h.

◆ AVC_MV0_MVY_BIT_POSITION

#define AVC_MV0_MVY_BIT_POSITION   (AVC_MV0_MVY_BIT_OFFSET % 8)

Definition at line 835 of file ni_device_api_priv.h.

◆ AVC_MV0_MVY_BITS

#define AVC_MV0_MVY_BITS   (14)

Definition at line 836 of file ni_device_api_priv.h.

◆ AVC_MV0_MVY_BYTE_OFFSET

#define AVC_MV0_MVY_BYTE_OFFSET   (AVC_MV0_MVY_BIT_OFFSET / 8)

Definition at line 834 of file ni_device_api_priv.h.

◆ AVC_MV0_REFIDX_BIT_OFFSET

#define AVC_MV0_REFIDX_BIT_OFFSET   (28)

Definition at line 823 of file ni_device_api_priv.h.

◆ AVC_MV0_REFIDX_BIT_POSITION

#define AVC_MV0_REFIDX_BIT_POSITION   (AVC_MV0_REFIDX_BIT_OFFSET % 8)

Definition at line 825 of file ni_device_api_priv.h.

◆ AVC_MV0_REFIDX_BITS

#define AVC_MV0_REFIDX_BITS   (2)

Definition at line 826 of file ni_device_api_priv.h.

◆ AVC_MV0_REFIDX_BYTE_OFFSET

#define AVC_MV0_REFIDX_BYTE_OFFSET   (AVC_MV0_REFIDX_BIT_OFFSET / 8)

Definition at line 824 of file ni_device_api_priv.h.

◆ AVC_MV1_MVX_BIT_OFFSET

#define AVC_MV1_MVX_BIT_OFFSET   (60)

Definition at line 843 of file ni_device_api_priv.h.

◆ AVC_MV1_MVX_BIT_POSITION

#define AVC_MV1_MVX_BIT_POSITION   (AVC_MV1_MVX_BIT_OFFSET % 8)

Definition at line 845 of file ni_device_api_priv.h.

◆ AVC_MV1_MVX_BITS

#define AVC_MV1_MVX_BITS   (14)

Definition at line 846 of file ni_device_api_priv.h.

◆ AVC_MV1_MVX_BYTE_OFFSET

#define AVC_MV1_MVX_BYTE_OFFSET   (AVC_MV1_MVX_BIT_OFFSET / 8)

Definition at line 844 of file ni_device_api_priv.h.

◆ AVC_MV1_MVY_BIT_OFFSET

#define AVC_MV1_MVY_BIT_OFFSET   (74)

Definition at line 848 of file ni_device_api_priv.h.

◆ AVC_MV1_MVY_BIT_POSITION

#define AVC_MV1_MVY_BIT_POSITION   (AVC_MV1_MVY_BIT_OFFSET % 8)

Definition at line 850 of file ni_device_api_priv.h.

◆ AVC_MV1_MVY_BITS

#define AVC_MV1_MVY_BITS   (14)

Definition at line 851 of file ni_device_api_priv.h.

◆ AVC_MV1_MVY_BYTE_OFFSET

#define AVC_MV1_MVY_BYTE_OFFSET   (AVC_MV1_MVY_BIT_OFFSET / 8)

Definition at line 849 of file ni_device_api_priv.h.

◆ AVC_MV1_REFIDX_BIT_OFFSET

#define AVC_MV1_REFIDX_BIT_OFFSET   (58)

Definition at line 838 of file ni_device_api_priv.h.

◆ AVC_MV1_REFIDX_BIT_POSITION

#define AVC_MV1_REFIDX_BIT_POSITION   (AVC_MV1_REFIDX_BIT_OFFSET % 8)

Definition at line 840 of file ni_device_api_priv.h.

◆ AVC_MV1_REFIDX_BITS

#define AVC_MV1_REFIDX_BITS   (2)

Definition at line 841 of file ni_device_api_priv.h.

◆ AVC_MV1_REFIDX_BYTE_OFFSET

#define AVC_MV1_REFIDX_BYTE_OFFSET   (AVC_MV1_REFIDX_BIT_OFFSET / 8)

Definition at line 839 of file ni_device_api_priv.h.

◆ AVC_RDCOST_BIT_OFFSET

#define AVC_RDCOST_BIT_OFFSET   (1)

Definition at line 813 of file ni_device_api_priv.h.

◆ AVC_RDCOST_BIT_POSITION

#define AVC_RDCOST_BIT_POSITION   (AVC_RDCOST_BIT_OFFSET % 8)

Definition at line 815 of file ni_device_api_priv.h.

◆ AVC_RDCOST_BITS

#define AVC_RDCOST_BITS   (25)

Definition at line 816 of file ni_device_api_priv.h.

◆ AVC_RDCOST_BYTE_OFFSET

#define AVC_RDCOST_BYTE_OFFSET   (AVC_RDCOST_BIT_OFFSET / 8)

Definition at line 814 of file ni_device_api_priv.h.

◆ CU_INFO_OUTPUT_SIZE_V1

#define CU_INFO_OUTPUT_SIZE_V1   26

Definition at line 682 of file ni_device_api_priv.h.

◆ CU_INFO_OUTPUT_SIZE_V2

#define CU_INFO_OUTPUT_SIZE_V2   16

Definition at line 683 of file ni_device_api_priv.h.

◆ CU_INFO_OUTPUT_SIZE_V3

#define CU_INFO_OUTPUT_SIZE_V3   19

Definition at line 684 of file ni_device_api_priv.h.

◆ CU_LOCATION_HOR_BIT_OFFSET

#define CU_LOCATION_HOR_BIT_OFFSET   (0)

Definition at line 687 of file ni_device_api_priv.h.

◆ CU_LOCATION_HOR_BIT_POSITION

#define CU_LOCATION_HOR_BIT_POSITION   (CU_LOCATION_HOR_BIT_OFFSET % 8)

Definition at line 689 of file ni_device_api_priv.h.

◆ CU_LOCATION_HOR_BITS

#define CU_LOCATION_HOR_BITS   (3)

Definition at line 690 of file ni_device_api_priv.h.

◆ CU_LOCATION_HOR_BYTE_OFFSET

#define CU_LOCATION_HOR_BYTE_OFFSET   (CU_LOCATION_HOR_BIT_OFFSET / 8)

Definition at line 688 of file ni_device_api_priv.h.

◆ CU_LOCATION_VER_BIT_OFFSET

#define CU_LOCATION_VER_BIT_OFFSET   (3)

Definition at line 692 of file ni_device_api_priv.h.

◆ CU_LOCATION_VER_BIT_POSITION

#define CU_LOCATION_VER_BIT_POSITION   (CU_LOCATION_VER_BIT_OFFSET % 8)

Definition at line 694 of file ni_device_api_priv.h.

◆ CU_LOCATION_VER_BITS

#define CU_LOCATION_VER_BITS   (3)

Definition at line 695 of file ni_device_api_priv.h.

◆ CU_LOCATION_VER_BYTE_OFFSET

#define CU_LOCATION_VER_BYTE_OFFSET   (CU_LOCATION_VER_BIT_OFFSET / 8)

Definition at line 693 of file ni_device_api_priv.h.

◆ CU_MODE_BIT_OFFSET

#define CU_MODE_BIT_OFFSET   (8)

Definition at line 702 of file ni_device_api_priv.h.

◆ CU_MODE_BIT_POSITION

#define CU_MODE_BIT_POSITION   (CU_MODE_BIT_OFFSET % 8)

Definition at line 704 of file ni_device_api_priv.h.

◆ CU_MODE_BITS

#define CU_MODE_BITS   (1)

Definition at line 705 of file ni_device_api_priv.h.

◆ CU_MODE_BYTE_OFFSET

#define CU_MODE_BYTE_OFFSET   (CU_MODE_BIT_OFFSET / 8)

Definition at line 703 of file ni_device_api_priv.h.

◆ CU_SIZE_BIT_OFFSET

#define CU_SIZE_BIT_OFFSET   (6)

Definition at line 697 of file ni_device_api_priv.h.

◆ CU_SIZE_BIT_POSITION

#define CU_SIZE_BIT_POSITION   (CU_SIZE_BIT_OFFSET % 8)

Definition at line 699 of file ni_device_api_priv.h.

◆ CU_SIZE_BITS

#define CU_SIZE_BITS   (2)

Definition at line 700 of file ni_device_api_priv.h.

◆ CU_SIZE_BYTE_OFFSET

#define CU_SIZE_BYTE_OFFSET   (CU_SIZE_BIT_OFFSET / 8)

Definition at line 698 of file ni_device_api_priv.h.

◆ DUMMY_BIT_OFFSET

#define DUMMY_BIT_OFFSET   (205)

Definition at line 802 of file ni_device_api_priv.h.

◆ DUMMY_BIT_POSITION

#define DUMMY_BIT_POSITION   (DUMMY_BIT_OFFSET % 8)

Definition at line 804 of file ni_device_api_priv.h.

◆ DUMMY_BITS

#define DUMMY_BITS   (3)

Definition at line 805 of file ni_device_api_priv.h.

◆ DUMMY_BYTE_OFFSET

#define DUMMY_BYTE_OFFSET   (DUMMY_BIT_OFFSET / 8)

Definition at line 803 of file ni_device_api_priv.h.

◆ FRAME_CHUNK_INDEX_SIZE

#define FRAME_CHUNK_INDEX_SIZE   4096

Definition at line 1044 of file ni_device_api_priv.h.

◆ FW_LOG_END_DELIMITER_0

#define FW_LOG_END_DELIMITER_0   0xA5

Definition at line 1077 of file ni_device_api_priv.h.

◆ FW_LOG_END_DELIMITER_1

#define FW_LOG_END_DELIMITER_1   0x5A

Definition at line 1078 of file ni_device_api_priv.h.

◆ FW_LOG_START_DELIMITER_0

#define FW_LOG_START_DELIMITER_0   0x5A

Definition at line 1075 of file ni_device_api_priv.h.

◆ FW_LOG_START_DELIMITER_1

#define FW_LOG_START_DELIMITER_1   0xA5

Definition at line 1076 of file ni_device_api_priv.h.

◆ INTER_PRED_IDC_BIT_OFFSET

#define INTER_PRED_IDC_BIT_OFFSET   (34)

Definition at line 712 of file ni_device_api_priv.h.

◆ INTER_PRED_IDC_BIT_POSITION

#define INTER_PRED_IDC_BIT_POSITION   (INTER_PRED_IDC_BIT_OFFSET % 8)

Definition at line 714 of file ni_device_api_priv.h.

◆ INTER_PRED_IDC_BITS

#define INTER_PRED_IDC_BITS   (2)

Definition at line 715 of file ni_device_api_priv.h.

◆ INTER_PRED_IDC_BYTE_OFFSET

#define INTER_PRED_IDC_BYTE_OFFSET   (INTER_PRED_IDC_BIT_OFFSET / 8)

Definition at line 713 of file ni_device_api_priv.h.

◆ INTERCOST_BIT_OFFSET

#define INTERCOST_BIT_OFFSET   (180)

Definition at line 797 of file ni_device_api_priv.h.

◆ INTERCOST_BIT_POSITION

#define INTERCOST_BIT_POSITION   (INTERCOST_BIT_OFFSET % 8)

Definition at line 799 of file ni_device_api_priv.h.

◆ INTERCOST_BITS

#define INTERCOST_BITS   (25)

Definition at line 800 of file ni_device_api_priv.h.

◆ INTERCOST_BYTE_OFFSET

#define INTERCOST_BYTE_OFFSET   (INTERCOST_BIT_OFFSET / 8)

Definition at line 798 of file ni_device_api_priv.h.

◆ INTRA_PART_MODE_BIT_OFFSET

#define INTRA_PART_MODE_BIT_OFFSET   (34)

Definition at line 747 of file ni_device_api_priv.h.

◆ INTRA_PART_MODE_BIT_POSITION

#define INTRA_PART_MODE_BIT_POSITION   (INTRA_PART_MODE_BIT_OFFSET % 8)

Definition at line 749 of file ni_device_api_priv.h.

◆ INTRA_PART_MODE_BITS

#define INTRA_PART_MODE_BITS   (1)

Definition at line 750 of file ni_device_api_priv.h.

◆ INTRA_PART_MODE_BYTE_OFFSET

#define INTRA_PART_MODE_BYTE_OFFSET   (INTRA_PART_MODE_BIT_OFFSET / 8)

Definition at line 748 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE0_BIT_OFFSET

#define INTRA_PRED_MODE0_BIT_OFFSET   (35)

Definition at line 752 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE0_BIT_POSITION

#define INTRA_PRED_MODE0_BIT_POSITION   (INTRA_PRED_MODE0_BIT_OFFSET % 8)

Definition at line 754 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE0_BITS

#define INTRA_PRED_MODE0_BITS   (6)

Definition at line 755 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE0_BYTE_OFFSET

#define INTRA_PRED_MODE0_BYTE_OFFSET   (INTRA_PRED_MODE0_BIT_OFFSET / 8)

Definition at line 753 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE1_BIT_OFFSET

#define INTRA_PRED_MODE1_BIT_OFFSET   (41)

Definition at line 757 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE1_BIT_POSITION

#define INTRA_PRED_MODE1_BIT_POSITION   (INTRA_PRED_MODE1_BIT_OFFSET % 8)

Definition at line 759 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE1_BITS

#define INTRA_PRED_MODE1_BITS   (6)

Definition at line 760 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE1_BYTE_OFFSET

#define INTRA_PRED_MODE1_BYTE_OFFSET   (INTRA_PRED_MODE1_BIT_OFFSET / 8)

Definition at line 758 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE2_BIT_OFFSET

#define INTRA_PRED_MODE2_BIT_OFFSET   (47)

Definition at line 762 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE2_BIT_POSITION

#define INTRA_PRED_MODE2_BIT_POSITION   (INTRA_PRED_MODE2_BIT_OFFSET % 8)

Definition at line 764 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE2_BITS

#define INTRA_PRED_MODE2_BITS   (6)

Definition at line 765 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE2_BYTE_OFFSET

#define INTRA_PRED_MODE2_BYTE_OFFSET   (INTRA_PRED_MODE2_BIT_OFFSET / 8)

Definition at line 763 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE3_BIT_OFFSET

#define INTRA_PRED_MODE3_BIT_OFFSET   (53)

Definition at line 767 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE3_BIT_POSITION

#define INTRA_PRED_MODE3_BIT_POSITION   (INTRA_PRED_MODE3_BIT_OFFSET % 8)

Definition at line 769 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE3_BITS

#define INTRA_PRED_MODE3_BITS   (6)

Definition at line 770 of file ni_device_api_priv.h.

◆ INTRA_PRED_MODE3_BYTE_OFFSET

#define INTRA_PRED_MODE3_BYTE_OFFSET   (INTRA_PRED_MODE3_BIT_OFFSET / 8)

Definition at line 768 of file ni_device_api_priv.h.

◆ INTRACOST_BIT_OFFSET

#define INTRACOST_BIT_OFFSET   (155)

Definition at line 792 of file ni_device_api_priv.h.

◆ INTRACOST_BIT_POSITION

#define INTRACOST_BIT_POSITION   (INTRACOST_BIT_OFFSET % 8)

Definition at line 794 of file ni_device_api_priv.h.

◆ INTRACOST_BITS

#define INTRACOST_BITS   (25)

Definition at line 795 of file ni_device_api_priv.h.

◆ INTRACOST_BYTE_OFFSET

#define INTRACOST_BYTE_OFFSET   (INTRACOST_BIT_OFFSET / 8)

Definition at line 793 of file ni_device_api_priv.h.

◆ MEAN_BIT_OFFSET

#define MEAN_BIT_OFFSET   (96)

Definition at line 772 of file ni_device_api_priv.h.

◆ MEAN_BIT_POSITION

#define MEAN_BIT_POSITION   (MEAN_BIT_OFFSET % 8)

Definition at line 774 of file ni_device_api_priv.h.

◆ MEAN_BITS

#define MEAN_BITS   (10)

Definition at line 775 of file ni_device_api_priv.h.

◆ MEAN_BYTE_OFFSET

#define MEAN_BYTE_OFFSET   (MEAN_BIT_OFFSET / 8)

Definition at line 773 of file ni_device_api_priv.h.

◆ MV0_MVX_BIT_OFFSET

#define MV0_MVX_BIT_OFFSET   (38)

Definition at line 722 of file ni_device_api_priv.h.

◆ MV0_MVX_BIT_POSITION

#define MV0_MVX_BIT_POSITION   (MV0_MVX_BIT_OFFSET % 8)

Definition at line 724 of file ni_device_api_priv.h.

◆ MV0_MVX_BITS

#define MV0_MVX_BITS   (14)

Definition at line 725 of file ni_device_api_priv.h.

◆ MV0_MVX_BYTE_OFFSET

#define MV0_MVX_BYTE_OFFSET   (MV0_MVX_BIT_OFFSET / 8)

Definition at line 723 of file ni_device_api_priv.h.

◆ MV0_MVY_BIT_OFFSET

#define MV0_MVY_BIT_OFFSET   (52)

Definition at line 727 of file ni_device_api_priv.h.

◆ MV0_MVY_BIT_POSITION

#define MV0_MVY_BIT_POSITION   (MV0_MVY_BIT_OFFSET % 8)

Definition at line 729 of file ni_device_api_priv.h.

◆ MV0_MVY_BITS

#define MV0_MVY_BITS   (14)

Definition at line 730 of file ni_device_api_priv.h.

◆ MV0_MVY_BYTE_OFFSET

#define MV0_MVY_BYTE_OFFSET   (MV0_MVY_BIT_OFFSET / 8)

Definition at line 728 of file ni_device_api_priv.h.

◆ MV0_REFIDX_BIT_OFFSET

#define MV0_REFIDX_BIT_OFFSET   (36)

Definition at line 717 of file ni_device_api_priv.h.

◆ MV0_REFIDX_BIT_POSITION

#define MV0_REFIDX_BIT_POSITION   (MV0_REFIDX_BIT_OFFSET % 8)

Definition at line 719 of file ni_device_api_priv.h.

◆ MV0_REFIDX_BITS

#define MV0_REFIDX_BITS   (2)

Definition at line 720 of file ni_device_api_priv.h.

◆ MV0_REFIDX_BYTE_OFFSET

#define MV0_REFIDX_BYTE_OFFSET   (MV0_REFIDX_BIT_OFFSET / 8)

Definition at line 718 of file ni_device_api_priv.h.

◆ MV1_MVX_BIT_OFFSET

#define MV1_MVX_BIT_OFFSET   (68)

Definition at line 737 of file ni_device_api_priv.h.

◆ MV1_MVX_BIT_POSITION

#define MV1_MVX_BIT_POSITION   (MV1_MVX_BIT_OFFSET % 8)

Definition at line 739 of file ni_device_api_priv.h.

◆ MV1_MVX_BITS

#define MV1_MVX_BITS   (14)

Definition at line 740 of file ni_device_api_priv.h.

◆ MV1_MVX_BYTE_OFFSET

#define MV1_MVX_BYTE_OFFSET   (MV1_MVX_BIT_OFFSET / 8)

Definition at line 738 of file ni_device_api_priv.h.

◆ MV1_MVY_BIT_OFFSET

#define MV1_MVY_BIT_OFFSET   (82)

Definition at line 742 of file ni_device_api_priv.h.

◆ MV1_MVY_BIT_POSITION

#define MV1_MVY_BIT_POSITION   (MV1_MVY_BIT_OFFSET % 8)

Definition at line 744 of file ni_device_api_priv.h.

◆ MV1_MVY_BITS

#define MV1_MVY_BITS   (14)

Definition at line 745 of file ni_device_api_priv.h.

◆ MV1_MVY_BYTE_OFFSET

#define MV1_MVY_BYTE_OFFSET   (MV1_MVY_BIT_OFFSET / 8)

Definition at line 743 of file ni_device_api_priv.h.

◆ MV1_REFIDX_BIT_OFFSET

#define MV1_REFIDX_BIT_OFFSET   (66)

Definition at line 732 of file ni_device_api_priv.h.

◆ MV1_REFIDX_BIT_POSITION

#define MV1_REFIDX_BIT_POSITION   (MV1_REFIDX_BIT_OFFSET % 8)

Definition at line 734 of file ni_device_api_priv.h.

◆ MV1_REFIDX_BITS

#define MV1_REFIDX_BITS   (2)

Definition at line 735 of file ni_device_api_priv.h.

◆ MV1_REFIDX_BYTE_OFFSET

#define MV1_REFIDX_BYTE_OFFSET   (MV1_REFIDX_BIT_OFFSET / 8)

Definition at line 733 of file ni_device_api_priv.h.

◆ NI_AI_HW_ALIGN_SIZE

#define NI_AI_HW_ALIGN_SIZE   64

Definition at line 1518 of file ni_device_api_priv.h.

◆ NI_FW_ENC_BITSTREAM_META_DATA_SIZE

#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE   32

Definition at line 1066 of file ni_device_api_priv.h.

◆ NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_o

#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_o   48

Definition at line 1068 of file ni_device_api_priv.h.

◆ NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_rc

#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_rc   88

Definition at line 1070 of file ni_device_api_priv.h.

◆ NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_sM

#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_sM   112

Definition at line 1072 of file ni_device_api_priv.h.

◆ NI_HWDESC_UNIFIED_MEMBIN_SIZE

#define NI_HWDESC_UNIFIED_MEMBIN_SIZE   0x187000

Definition at line 1049 of file ni_device_api_priv.h.

◆ NI_MAX_AI_NETWORK_BINARY_BUFFER_QUERY_RETRIES

#define NI_MAX_AI_NETWORK_BINARY_BUFFER_QUERY_RETRIES   300000

Definition at line 1060 of file ni_device_api_priv.h.

◆ NI_MAX_DEC_SESSION_READ_QUERY_EOS_RETRIES

#define NI_MAX_DEC_SESSION_READ_QUERY_EOS_RETRIES   15000

Definition at line 1061 of file ni_device_api_priv.h.

◆ NI_MAX_P2P_SGL_ENTRIES

#define NI_MAX_P2P_SGL_ENTRIES   128

Definition at line 1058 of file ni_device_api_priv.h.

◆ NI_MAX_SEGMENT_NUM

#define NI_MAX_SEGMENT_NUM   4

Definition at line 1003 of file ni_device_api_priv.h.

◆ NI_MINIMUM_CROPPED_LENGTH

#define NI_MINIMUM_CROPPED_LENGTH   48

Definition at line 920 of file ni_device_api_priv.h.

◆ NI_P2P_RECV

#define NI_P2P_RECV   0

Definition at line 1056 of file ni_device_api_priv.h.

◆ NI_P2P_SEND

#define NI_P2P_SEND   1

Definition at line 1057 of file ni_device_api_priv.h.

◆ NI_QUADRA_MEMORY_CONFIG_DR

#define NI_QUADRA_MEMORY_CONFIG_DR   0

Definition at line 1051 of file ni_device_api_priv.h.

◆ NI_QUADRA_MEMORY_CONFIG_SR

#define NI_QUADRA_MEMORY_CONFIG_SR   1

Definition at line 1052 of file ni_device_api_priv.h.

◆ NI_QUADRA_MEMORY_CONFIG_SR2_REMOVE_P2P

#define NI_QUADRA_MEMORY_CONFIG_SR2_REMOVE_P2P   2

Definition at line 1053 of file ni_device_api_priv.h.

◆ NI_QUADRA_MEMORY_CONFIG_SR_4G

#define NI_QUADRA_MEMORY_CONFIG_SR_4G   3

Definition at line 1054 of file ni_device_api_priv.h.

◆ NI_RETRY_INTERVAL_100US

#define NI_RETRY_INTERVAL_100US   100

Definition at line 1063 of file ni_device_api_priv.h.

◆ NI_RETRY_INTERVAL_200US

#define NI_RETRY_INTERVAL_200US   200

Definition at line 1062 of file ni_device_api_priv.h.

◆ NI_SESSION_CLOSE_RETRY_INTERVAL_US

#define NI_SESSION_CLOSE_RETRY_INTERVAL_US   500000

Definition at line 1046 of file ni_device_api_priv.h.

◆ NI_SESSION_CLOSE_RETRY_MAX

#define NI_SESSION_CLOSE_RETRY_MAX   10

Definition at line 1045 of file ni_device_api_priv.h.

◆ NI_VERSION_CHARACTER_COUNT

#define NI_VERSION_CHARACTER_COUNT   8

Definition at line 112 of file ni_device_api_priv.h.

◆ QP_BIT_OFFSET

#define QP_BIT_OFFSET   (124)

Definition at line 782 of file ni_device_api_priv.h.

◆ QP_BIT_POSITION

#define QP_BIT_POSITION   (QP_BIT_OFFSET % 8)

Definition at line 784 of file ni_device_api_priv.h.

◆ QP_BITS

#define QP_BITS   (6)

Definition at line 785 of file ni_device_api_priv.h.

◆ QP_BYTE_OFFSET

#define QP_BYTE_OFFSET   (QP_BIT_OFFSET / 8)

Definition at line 783 of file ni_device_api_priv.h.

◆ RDCOST_BIT_OFFSET

#define RDCOST_BIT_OFFSET   (9)

Definition at line 707 of file ni_device_api_priv.h.

◆ RDCOST_BIT_POSITION

#define RDCOST_BIT_POSITION   (RDCOST_BIT_OFFSET % 8)

Definition at line 709 of file ni_device_api_priv.h.

◆ RDCOST_BITS

#define RDCOST_BITS   (25)

Definition at line 710 of file ni_device_api_priv.h.

◆ RDCOST_BYTE_OFFSET

#define RDCOST_BYTE_OFFSET   (RDCOST_BIT_OFFSET / 8)

Definition at line 708 of file ni_device_api_priv.h.

◆ RDCOST_OTHER_BIT_OFFSET

#define RDCOST_OTHER_BIT_OFFSET   (130)

Definition at line 787 of file ni_device_api_priv.h.

◆ RDCOST_OTHER_BIT_POSITION

#define RDCOST_OTHER_BIT_POSITION   (RDCOST_OTHER_BIT_OFFSET % 8)

Definition at line 789 of file ni_device_api_priv.h.

◆ RDCOST_OTHER_BITS

#define RDCOST_OTHER_BITS   (25)

Definition at line 790 of file ni_device_api_priv.h.

◆ RDCOST_OTHER_BYTE_OFFSET

#define RDCOST_OTHER_BYTE_OFFSET   (RDCOST_OTHER_BIT_OFFSET / 8)

Definition at line 788 of file ni_device_api_priv.h.

◆ TUNE_BFRAME_VISUAL_HIGH

#define TUNE_BFRAME_VISUAL_HIGH   2

Definition at line 322 of file ni_device_api_priv.h.

◆ TUNE_BFRAME_VISUAL_MEDIUM

#define TUNE_BFRAME_VISUAL_MEDIUM   1

****** encoder paramters

Definition at line 321 of file ni_device_api_priv.h.

◆ VARIANCE_BIT_OFFSET

#define VARIANCE_BIT_OFFSET   (106)

Definition at line 777 of file ni_device_api_priv.h.

◆ VARIANCE_BIT_POSITION

#define VARIANCE_BIT_POSITION   (VARIANCE_BIT_OFFSET % 8)

Definition at line 779 of file ni_device_api_priv.h.

◆ VARIANCE_BITS

#define VARIANCE_BITS   (18)

Definition at line 780 of file ni_device_api_priv.h.

◆ VARIANCE_BYTE_OFFSET

#define VARIANCE_BYTE_OFFSET   (VARIANCE_BIT_OFFSET / 8)

Definition at line 778 of file ni_device_api_priv.h.

Typedef Documentation

◆ ni_ai_config_t

◆ ni_ddr_priority_config_t

◆ ni_decoder_config_t

◆ ni_encoder_config_t

◆ ni_encoder_frame_params_t

◆ ni_global_session_stats_t

◆ ni_gop_preset_idx_t

◆ ni_instance_buf_info_t

◆ ni_instance_mgr_allocation_info_t

◆ ni_instance_mgr_general_status_t

◆ ni_instance_mgr_stream_complete_t

◆ ni_instance_mgr_stream_info_t

◆ ni_instance_upload_ret_hwdesc_t

◆ ni_log_fl_fw_versions_t

◆ ni_metadata_common_t

◆ ni_metadata_dec_frame_t

◆ ni_metadata_enc_bstream_rev61_t

◆ ni_metadata_enc_bstream_t

◆ ni_metadata_enc_frame_t

◆ ni_network_buffer_info_t

◆ ni_resolution_t

◆ ni_scaler_config_t

◆ ni_segment_t

typedef struct _ni_segment ni_segment_t

◆ ni_session_config_rw_t

◆ ni_session_stats_t

◆ ni_t408_config_t

◆ ni_uploader_config_t

◆ ni_xcoder_mgr_retcode_t

Enumeration Type Documentation

◆ _ni_gop_preset_idx

Enumerator
GOP_PRESET_IDX_NONE 
GOP_PRESET_IDX_DEFAULT 
GOP_PRESET_IDX_CUSTOM 

*< Default, gop decided by gopSize. E.g gopSize=0 is Adpative gop, gopsize adjusted dynamically

GOP_PRESET_IDX_ALL_I 
GOP_PRESET_IDX_IPP 

*< All Intra, gopsize = 1

GOP_PRESET_IDX_IBBB 

*< Consecutive P, cyclic gopsize = 1

GOP_PRESET_IDX_IBPBP 

*< Consecutive B, cyclic gopsize = 1

GOP_PRESET_IDX_IBBBP 

*< gopsize = 2

GOP_PRESET_IDX_IPPPP 

*< gopsize = 4

GOP_PRESET_IDX_IBBBB 

*< Consecutive P, cyclic gopsize = 4

GOP_PRESET_IDX_RA_IB 

*< Consecutive B, cyclic gopsize = 4

GOP_PRESET_IDX_SP 

*< Random Access, cyclic gopsize = 8

GOP_PRESET_IDX_HIERARCHICAL_IPPPP 

*< Consecutive P, gopsize=1, similar to 2 but

Definition at line 324 of file ni_device_api_priv.h.

◆ _ni_xcoder_mgr_retcode

Enumerator
ni_xcoder_request_success 
ni_xcoder_request_pending 
ni_xcoder_resource_recovery 
ni_xcoder_resource_insufficient 
ni_xcoder_general_error 

Definition at line 59 of file ni_device_api_priv.h.

◆ ni_bitstream_format_t

  • This is an enumeration for declaring codec standard type variables. Currently,
    VPU supports many different video standards such as H.265/HEVC, MPEG4 SP/ASP, H.263 Profile 3, H.264/AVC
    BP/MP/HP, VC1 SP/MP/AP, Divx3, MPEG1, MPEG2, RealVideo 8/9/10, AVS Jizhun/Guangdian profile, AVS2,
     Theora, VP3, VP8/VP9 and SVAC.
    
    NOTE: MPEG-1 decoder operation is handled as a special case of MPEG2 decoder.
    STD_THO must be always 9.
    
Enumerator
STD_AVC 
STD_VC1 
STD_MPEG2 
STD_MPEG4 
STD_H263 
STD_DIV3 
STD_RV 
STD_AVS 
STD_THO 
STD_VP3 
STD_VP8 
STD_HEVC 
STD_VP9 
STD_AVS2 
STD_SVAC 
STD_AV1 
STD_JPEG 
STD_MAX 

Definition at line 355 of file ni_device_api_priv.h.

◆ ni_decoder_crop_mode

Enumerator
CROP_DISABLED 
CROP_AUTO 
CROP_MANUAL 

Definition at line 921 of file ni_device_api_priv.h.

◆ ni_instance_buf_info_rw_type_t

Enumerator
INST_BUF_INFO_RW_READ 
INST_BUF_INFO_RW_WRITE 
INST_BUF_INFO_RW_UPLOAD 
INST_BUF_INFO_RW_READ_BUSY 
INST_BUF_INFO_RW_WRITE_BUSY 
INST_BUF_INFO_R_ACQUIRE 
INST_BUF_INFO_RW_WRITE_BY_EP 
INST_BUF_INFO_RW_READ_BY_AI 

Definition at line 46 of file ni_device_api_priv.h.

◆ ni_session_config_rw_type_t

Enumerator
SESSION_READ_CONFIG 
SESSION_WRITE_CONFIG 

Definition at line 40 of file ni_device_api_priv.h.

◆ ni_set_param_option_t

  • This is an enumeration for declaring SET_PARAM command options. (_T400_ENC encoder only)
    Depending on this, SET_PARAM command parameter registers from 0x15C have different meanings.
Enumerator
OPT_COMMON 
OPT_CUSTOM_GOP 
OPT_SEI 
OPT_VUI 

Definition at line 1036 of file ni_device_api_priv.h.

Function Documentation

◆ lower_pixel_rate()

int lower_pixel_rate ( const ni_load_query_t pQuery,
uint32_t  ui32CurrentLowest 
)

Definition at line 19284 of file ni_device_api_priv.c.

◆ ni_ai_alloc_dst_frame()

ni_retcode_t ni_ai_alloc_dst_frame ( ni_session_context_t p_ctx,
niFrameSurface1_t p_out_surface 
)

Definition at line 18198 of file ni_device_api_priv.c.

◆ ni_ai_alloc_hwframe()

ni_retcode_t ni_ai_alloc_hwframe ( ni_session_context_t p_ctx,
int  width,
int  height,
int  options,
int  pool_size,
int  frame_index 
)

Definition at line 18304 of file ni_device_api_priv.c.

◆ ni_ai_multi_config_frame()

ni_retcode_t ni_ai_multi_config_frame ( ni_session_context_t p_ctx,
ni_frame_config_t  p_cfg_in[],
int  numInCfgs,
ni_frame_config_t p_cfg_out 
)

Definition at line 18073 of file ni_device_api_priv.c.

◆ ni_ai_query_network_ready()

ni_retcode_t ni_ai_query_network_ready ( ni_session_context_t p_ctx)

Definition at line 16976 of file ni_device_api_priv.c.

◆ ni_ai_session_close()

ni_retcode_t ni_ai_session_close ( ni_session_context_t p_ctx,
int  eos_received 
)

Definition at line 17955 of file ni_device_api_priv.c.

◆ ni_ai_session_open()

ni_retcode_t ni_ai_session_open ( ni_session_context_t p_ctx)

Definition at line 17764 of file ni_device_api_priv.c.

◆ ni_ai_session_query_metrics()

ni_retcode_t ni_ai_session_query_metrics ( ni_session_context_t p_ctx,
ni_network_perf_metrics_t p_metrics 
)

Definition at line 18878 of file ni_device_api_priv.c.

◆ ni_ai_session_read()

ni_retcode_t ni_ai_session_read ( ni_session_context_t p_ctx,
ni_packet_t p_packet 
)

Definition at line 17355 of file ni_device_api_priv.c.

◆ ni_ai_session_read_hwdesc()

ni_retcode_t ni_ai_session_read_hwdesc ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

read a hardware descriptor from a scaler session


Parameters
[in]p_ctxpointer to session context
[out]p_framepointer to frame to write hw descriptor
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_FAILURE

Definition at line 18498 of file ni_device_api_priv.c.

◆ ni_ai_session_write()

ni_retcode_t ni_ai_session_write ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

Definition at line 17031 of file ni_device_api_priv.c.

◆ ni_check_common_params()

ni_retcode_t ni_check_common_params ( ni_t408_config_t p_param,
ni_xcoder_params_t p_src,
char *  param_err,
uint32_t  max_err_len 
)

Definition at line 13168 of file ni_device_api_priv.c.

◆ ni_check_ratecontrol_params()

ni_retcode_t ni_check_ratecontrol_params ( ni_encoder_config_t p_cfg,
char *  param_err,
uint32_t  max_err_len 
)

Definition at line 13453 of file ni_device_api_priv.c.

◆ ni_clear_instance_buf()

ni_retcode_t ni_clear_instance_buf ( niFrameSurface1_t surface)

clear a particular xcoder instance buffer/data


Parameters
niFrameSurface1_t*surface - target hardware descriptor
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Parameters
ni_session_context_tp_ctx - xcoder Context
ni_instance_buf_info_rw_type_trw_type
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_instance_buf_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 14729 of file ni_device_api_priv.c.

◆ ni_config_instance_eos()

ni_retcode_t ni_config_instance_eos ( ni_session_context_t p_ctx,
ni_device_type_t  device_type 
)

Send a p_config command for End Of Stream.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7224 of file ni_device_api_priv.c.

◆ ni_config_instance_flush()

ni_retcode_t ni_config_instance_flush ( ni_session_context_t p_ctx,
ni_device_type_t  device_type 
)

Send a p_config command to flush the stream.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7279 of file ni_device_api_priv.c.

◆ ni_config_instance_hvsplus()

ni_retcode_t ni_config_instance_hvsplus ( ni_session_context_t p_ctx)

Definition at line 16883 of file ni_device_api_priv.c.

◆ ni_config_instance_network_binary()

ni_retcode_t ni_config_instance_network_binary ( ni_session_context_t p_ctx,
void *  nb_data,
uint32_t  nb_size 
)

Definition at line 16611 of file ni_device_api_priv.c.

◆ ni_config_instance_set_decoder_params()

ni_retcode_t ni_config_instance_set_decoder_params ( ni_session_context_t p_ctx,
uint32_t  max_pkt_size 
)

Send a p_config command to configure decoding parameters.


Parameters
ni_session_context_tp_ctx - xcoder Context
uint32_tmax_pkt_size - overwrite maximum packet size if nonzero
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 16188 of file ni_device_api_priv.c.

◆ ni_config_instance_set_decoder_ppu_params()

ni_retcode_t ni_config_instance_set_decoder_ppu_params ( ni_session_context_t p_ctx,
void *  p_dec_ppu_config,
int  buffer_size 
)

Send a p_config command to configure decoding parameters.


Parameters
ni_session_context_tp_ctx - xcoder Context
uint32_tmax_pkt_size - overwrite maximum packet size if nonzero
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 16311 of file ni_device_api_priv.c.

◆ ni_config_instance_set_encoder_frame_params()

ni_retcode_t ni_config_instance_set_encoder_frame_params ( ni_session_context_t p_ctx,
ni_encoder_frame_params_t p_params 
)

Send a p_config command to configure encoding p_frame parameters.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_encoder_frame_params_t* params - pointer to the encoder ni_encoder_frame_params_t struct
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7646 of file ni_device_api_priv.c.

◆ ni_config_instance_set_encoder_params()

ni_retcode_t ni_config_instance_set_encoder_params ( ni_session_context_t p_ctx)

Send a p_config command to configure encoding parameters.


Parameters
ni_session_context_tp_ctx - xcoder Context
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7477 of file ni_device_api_priv.c.

◆ ni_config_instance_set_scaler_params()

ni_retcode_t ni_config_instance_set_scaler_params ( ni_session_context_t p_ctx,
ni_scaler_params_t p_params 
)

condif a scaler instance


Parameters
[in]p_ctxpointer to session context
[in]p_paramspointer to scaler parameters
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

condif a scaler instance


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_scaler_params_t* params - pointer to the scaler ni_scaler_params_t struct
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 5593 of file ni_device_api_priv.c.

◆ ni_config_instance_set_sequence_change()

ni_retcode_t ni_config_instance_set_sequence_change ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_resolution_t p_resolution 
)

Send a p_config command to inform encoder sequence change.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_resolution_tp_resolution - sequence change resolution
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7411 of file ni_device_api_priv.c.

◆ ni_config_instance_set_uploader_params()

ni_retcode_t ni_config_instance_set_uploader_params ( ni_session_context_t p_ctx,
uint32_t  pool_size,
uint32_t  pool 
)

Send a p_config command to configure uploading parameters.


Parameters
ni_session_context_tp_ctx - xcoder Context
[in]pool_sizepool size to create
[in]pool0 = normal pool, 1 = P2P pool
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Parameters
ni_session_context_tp_ctx - xcoder Context
[in]pool_sizepool size to create
[in]pool0 = normal pool, 1 = P2P pool
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 16085 of file ni_device_api_priv.c.

◆ ni_config_instance_set_write_len()

ni_retcode_t ni_config_instance_set_write_len ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
uint32_t  len 
)

Send a p_config command to set the length for the incoming write packet.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder

return - NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7341 of file ni_device_api_priv.c.

◆ ni_config_instance_sos()

ni_retcode_t ni_config_instance_sos ( ni_session_context_t p_ctx,
ni_device_type_t  device_type 
)

Send a p_config command for Start Of Stream.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION. NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7170 of file ni_device_api_priv.c.

◆ ni_config_instance_update_encoder_params()

ni_retcode_t ni_config_instance_update_encoder_params ( ni_session_context_t p_ctx,
ni_param_change_flags_t  change_flags 
)

◆ ni_config_read_inout_layers()

ni_retcode_t ni_config_read_inout_layers ( ni_session_context_t p_ctx,
ni_network_data_t p_network 
)

Definition at line 17491 of file ni_device_api_priv.c.

◆ ni_config_session_rw()

ni_retcode_t ni_config_session_rw ( ni_session_context_t p_ctx,
ni_session_config_rw_type_t  rw_type,
uint8_t  enable,
uint8_t  hw_action,
uint16_t  frame_id 
)

Configure the read/write pipe for a session to control its behavior.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_session_config_rw_trw_type
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
uint8_tenable
uint8_thw_action
uint16_tframe_id
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7077 of file ni_device_api_priv.c.

◆ ni_create_frame()

int ni_create_frame ( ni_frame_t p_frame,
uint32_t  read_length,
uint64_t *  p_frame_offset,
uint32_t *  p_frame_dropped,
bool  is_hw_frame 
)

Get info from received p_frame.


Parameters

return

Definition at line 7715 of file ni_device_api_priv.c.

◆ ni_decoder_session_close()

ni_retcode_t ni_decoder_session_close ( ni_session_context_t p_ctx,
int  eos_recieved 
)

Close a xcoder decoder instance.


Parameters

return

Definition at line 1719 of file ni_device_api_priv.c.

◆ ni_decoder_session_copy_internal()

ni_retcode_t ni_decoder_session_copy_internal ( ni_session_context_t src_p_ctx,
ni_session_context_t dst_p_ctx 
)

Copy a xcoder decoder worker thread info and card info.


Parameters

return

Copy a xcoder decoder worker thread info and card info.


Parameters

return

Definition at line 14048 of file ni_device_api_priv.c.

◆ ni_decoder_session_flush()

ni_retcode_t ni_decoder_session_flush ( ni_session_context_t p_ctx)

Flush decoder output.


Parameters

return

Definition at line 1674 of file ni_device_api_priv.c.

◆ ni_decoder_session_open()

ni_retcode_t ni_decoder_session_open ( ni_session_context_t p_ctx)

Open a xcoder decoder instance.


Parameters

return

Definition at line 1265 of file ni_device_api_priv.c.

◆ ni_decoder_session_read()

int ni_decoder_session_read ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

Retrieve a YUV p_frame from decoder.


Parameters

return

Definition at line 2402 of file ni_device_api_priv.c.

◆ ni_decoder_session_read_desc()

int ni_decoder_session_read_desc ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

Copy a xcoder decoder worker thread info and card info.


Parameters

return

Copy a xcoder decoder worker thread info and card info.


Parameters

return

Definition at line 14781 of file ni_device_api_priv.c.

◆ ni_decoder_session_send_eos()

ni_retcode_t ni_decoder_session_send_eos ( ni_session_context_t p_ctx)

Send end of stream signal to the decoder.


Parameters

return

Definition at line 1629 of file ni_device_api_priv.c.

◆ ni_decoder_session_write()

int ni_decoder_session_write ( ni_session_context_t p_ctx,
ni_packet_t p_packet 
)

Send a video p_packet to decoder.


Parameters

return

Definition at line 1902 of file ni_device_api_priv.c.

◆ ni_device_config_ns_qos()

ni_retcode_t ni_device_config_ns_qos ( ni_device_handle_t  device_handle,
uint32_t  key,
uint32_t  value 
)

Send namespace num / Opmode and SRIOv index/value to the device with specified logic block address.


Parameters
[in]device_handleDevice handle obtained by calling ni_device_open
[in]KeyRepresents either namespace num or opmode
[in]ValueRepresents either SRIOv index or opmode value
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Parameters
[in]device_handleDevice handle obtained by calling ni_device_open
[in]KeyRepresents either namespace num or opmode
[in]ValueRepresents either SRIOv index or opmode value
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Definition at line 18952 of file ni_device_api_priv.c.

◆ ni_device_get_ddr_configuration()

ni_retcode_t ni_device_get_ddr_configuration ( ni_session_context_t p_ctx)

Get DDR configuration of Quadra device.


Parameters
[in/out]p_ctx pointer to a session context with valid file handle
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Parameters
[in/out]p_ctx pointer to a session context with valid file handle
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Definition at line 18590 of file ni_device_api_priv.c.

◆ ni_device_set_ddr_configuration()

ni_retcode_t ni_device_set_ddr_configuration ( ni_session_context_t p_ctx,
uint8_t  ddr_priority_mode 
)

Set DDR configuration of Quadra device.


Parameters
[in]p_ctxpointer to a session context with valid file handle
[in]ddr_priority_modeddr priority mode
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Parameters
[in]p_ctxpointer to a session context with valid file handle
[in]ddr_priority_modeddr priority mode
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED

Definition at line 18675 of file ni_device_api_priv.c.

◆ ni_dump_log_all_cores()

ni_retcode_t ni_dump_log_all_cores ( ni_session_context_t p_ctx,
void *  p_data,
bool  gen_log_file 
)

Definition at line 19142 of file ni_device_api_priv.c.

◆ ni_dump_log_single_core()

ni_retcode_t ni_dump_log_single_core ( ni_session_context_t p_ctx,
void *  p_data,
uint32_t  core_id,
bool  gen_log_file 
)

Definition at line 19025 of file ni_device_api_priv.c.

◆ ni_encoder_metadata_buffer_alloc()

ni_retcode_t ni_encoder_metadata_buffer_alloc ( ni_frame_t p_frame,
int  extra_len 
)

Allocate memory for the metadata header and auxillary data for encoder input data.


Parameters
[in]p_framePointer to a caller allocated ni_frame_t struct
[in]extra_lenLength header and auxillary data
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC

Parameters
[in]p_framePointer to a caller allocated ni_frame_t struct
[in]extra_lenLength header and auxillary data
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC

Definition at line 18738 of file ni_device_api_priv.c.

◆ ni_encoder_session_close()

ni_retcode_t ni_encoder_session_close ( ni_session_context_t p_ctx,
int  eos_recieved 
)

Close a xcoder encoder instance.


Parameters

return

Definition at line 3962 of file ni_device_api_priv.c.

◆ ni_encoder_session_open()

ni_retcode_t ni_encoder_session_open ( ni_session_context_t p_ctx)

Open a xcoder encoder instance.


Parameters

return

Definition at line 3379 of file ni_device_api_priv.c.

◆ ni_encoder_session_read()

int ni_encoder_session_read ( ni_session_context_t p_ctx,
ni_packet_t p_packet 
)

Definition at line 4756 of file ni_device_api_priv.c.

◆ ni_encoder_session_send_eos()

ni_retcode_t ni_encoder_session_send_eos ( ni_session_context_t p_ctx)

Flush encoder output.


Parameters

return

Definition at line 3917 of file ni_device_api_priv.c.

◆ ni_encoder_session_sequence_change()

ni_retcode_t ni_encoder_session_sequence_change ( ni_session_context_t p_ctx,
ni_resolution_t p_resolution 
)

Send sequnce change to a xcoder encoder instance.


Parameters

return

Definition at line 5242 of file ni_device_api_priv.c.

◆ ni_encoder_session_write()

int ni_encoder_session_write ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

Send a YUV p_frame to encoder.


Parameters

return

************ Sequence Change related stuff

************ Sequence Change related stuff end

Definition at line 4235 of file ni_device_api_priv.c.

◆ ni_encoder_set_vui()

void ni_encoder_set_vui ( uint8_t *  vui,
ni_encoder_config_t p_cfg 
)

◆ ni_encoder_start_buffer_alloc()

ni_retcode_t ni_encoder_start_buffer_alloc ( ni_frame_t p_frame)

Allocate memory for the non-4k-aligned part at the start of YUV data for encoder input data.


Parameters
[in]p_framePointer to a caller allocated ni_frame_t struct
[in]start_lenLength of non-4k-aligned part at the start of YUV data
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC

Definition at line 18825 of file ni_device_api_priv.c.

◆ ni_fix_VUI()

void ni_fix_VUI ( uint8_t *  vui,
int  pos,
int  value 
)

insert the 32 bits of integer value at bit position pos


Parameters
intpos, int value
Returns
void

Definition at line 8483 of file ni_device_api_priv.c.

◆ ni_get_bitdepth_factor_from_pixfmt()

int ni_get_bitdepth_factor_from_pixfmt ( int  pix_fmt)

Grab bitdepth factor from NI_PIX_FMT.


Parameters
[in]pix_fmtni_pix_fmt_t
Returns
1 or 2

Parameters
[in]pix_fmtni_pix_fmt_t
Returns
1 or 2 for success, -1 for error

Definition at line 16518 of file ni_device_api_priv.c.

◆ ni_get_frame_index()

int32_t ni_get_frame_index ( uint32_t *  value)

Get xcoder instance id.


Parameters

return

Definition at line 1643 of file ni_util.c.

◆ ni_get_memory_offset()

ni_retcode_t ni_get_memory_offset ( ni_session_context_t p_ctx,
const niFrameSurface1_t hwdesc,
uint32_t *  p_offset 
)

Get an address offset from a hw descriptor.


Parameters
[in]p_ctxni_session_context_t to be referenced
[in]hwdescPointer to caller allocated niFrameSurface1_t
[out]p_offsetValue of offset
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM

Parameters
[in]p_ctxni_session_context_t to be referenced
[in]hwdescPointer to caller allocated niFrameSurface1_t
[out]p_offsetValue of offset
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM

Definition at line 16584 of file ni_device_api_priv.c.

◆ ni_get_planar_from_pixfmt()

int ni_get_planar_from_pixfmt ( int  pix_fmt)

Grab planar info from NI_PIX_FMT.


Parameters
[in]pix_fmtni_pix_fmt_t
Returns
0 or 1 for success, -1 for error

Parameters
[in]pix_fmtni_pix_fmt_t
Returns
0 or 1 for success, -1 for error

Definition at line 16547 of file ni_device_api_priv.c.

◆ ni_hwdownload_by_frame_idx()

int ni_hwdownload_by_frame_idx ( niFrameSurface1_t hwdesc,
ni_frame_t p_frame,
int  is_auto_dl 
)

Retrieve a YUV p_frame by frame index.


Parameters

return

Definition at line 15876 of file ni_device_api_priv.c.

◆ ni_hwdownload_session_read()

int ni_hwdownload_session_read ( ni_session_context_t p_ctx,
ni_frame_t p_frame,
niFrameSurface1_t hwdesc 
)

Retrieve a YUV p_frame from decoder.


Parameters

return


Parameters

return

Definition at line 15684 of file ni_device_api_priv.c.

◆ ni_hwframe_clone()

ni_retcode_t ni_hwframe_clone ( ni_session_context_t p_ctx,
ni_frameclone_desc_t p_frameclone_desc 
)

Copy a src hw frame to a dst hw frame.


Parameters

return

Definition at line 15994 of file ni_device_api_priv.c.

◆ ni_hwupload_session_query_buffer_avail()

ni_retcode_t ni_hwupload_session_query_buffer_avail ( ni_session_context_t p_ctx)

Query and acquire buffer from xcoder upload instance.


Parameters
p_ctxpointer to uploader session context
Returns
On success NI_RETCODE_SUCCESS On error NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC

Parameters
p_ctxpointer to uploader session context
Returns
NI_RETCODE_SUCCESS NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC

Definition at line 14181 of file ni_device_api_priv.c.

◆ ni_hwupload_session_read_hwdesc()

int ni_hwupload_session_read_hwdesc ( ni_session_context_t p_ctx,
niFrameSurface1_t hwdesc 
)

Retrieve a HW descriptor of uploaded frame.


Parameters
p_ctxpointer to uploader session context hwdesc pointer to hw descriptor
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_FAILURE

Parameters
p_ctxpointer to uploader session context hwdesc pointer to hw descriptor
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_FAILURE

Definition at line 14643 of file ni_device_api_priv.c.

◆ ni_hwupload_session_write()

int ni_hwupload_session_write ( ni_session_context_t p_ctx,
ni_frame_t p_frame,
niFrameSurface1_t hwdesc 
)

Send a YUV p_frame to upload session.


Parameters

return


Parameters

return

Definition at line 14286 of file ni_device_api_priv.c.

◆ ni_params_print()

void ni_params_print ( ni_xcoder_params_t *const  p_encoder_params)

Print xcoder user configurations.


Parameters

return

Definition at line 13507 of file ni_device_api_priv.c.

◆ ni_populate_device_capability_struct()

void ni_populate_device_capability_struct ( ni_device_capability_t p_cap,
void *  p_data,
ni_device_handle_t  device_handle,
bool  device_in_ctxt 
)

Get info from received xcoder capability.


Parameters

return

Definition at line 8170 of file ni_device_api_priv.c.

◆ ni_query_detail_status()

ni_retcode_t ni_query_detail_status ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
void *  p_detail_status,
int  ver 
)

Query a particular xcoder instance to get DetailStatus data.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_instance_mgr_detail_status_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6334 of file ni_device_api_priv.c.

◆ ni_query_eos()

ni_retcode_t ni_query_eos ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_instance_mgr_stream_complete_t p_stream_complete 
)

Query a particular xcoder instance to get End of Output data.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
InstMgrStreamComp*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6675 of file ni_device_api_priv.c.

◆ ni_query_general_status()

ni_retcode_t ni_query_general_status ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_instance_mgr_general_status_t p_gen_status 
)

Query a particular xcoder instance to get GeneralStatus data.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_instance_mgr_general_status_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6266 of file ni_device_api_priv.c.

◆ ni_query_instance_buf_info()

ni_retcode_t ni_query_instance_buf_info ( ni_session_context_t p_ctx,
ni_instance_buf_info_rw_type_t  rw_type,
ni_device_type_t  device_type,
ni_instance_buf_info_t p_inst_buf_info 
)

Query a particular xcoder instance to get buffer/data Info data.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_instance_buf_info_rw_type_trw_type
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_instance_buf_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6946 of file ni_device_api_priv.c.

◆ ni_query_session_statistic_info()

ni_retcode_t ni_query_session_statistic_info ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_session_statistic_t p_session_statistic 
)

Query a particular xcoder session to get session statistics.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_session_statistic_t*out- Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6843 of file ni_device_api_priv.c.

◆ ni_query_session_stats()

ni_retcode_t ni_query_session_stats ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_session_stats_t p_session_stats,
int  rc,
int  opcode 
)

Query a particular session to get the stats info.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_session_stats_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6499 of file ni_device_api_priv.c.

◆ ni_query_stream_info()

ni_retcode_t ni_query_stream_info ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
ni_instance_mgr_stream_info_t p_stream_info 
)

Query a particular xcoder instance to get Stream Info data.


Parameters
ni_session_context_tp_ctx - xcoder Context
ni_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_instance_mgr_stream_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_RETCODE_SUCCESS on success, NI_RETCODE_ERROR_INVALID_SESSION, NI_RETCODE_ERROR_MEM_ALOC or NI_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 6416 of file ni_device_api_priv.c.

◆ ni_recv_from_target()

ni_retcode_t ni_recv_from_target ( ni_session_context_t pSession,
const ni_p2p_sgl_t dmaAddrs,
ni_frame_t pDstFrame 
)

Definition at line 19212 of file ni_device_api_priv.c.

◆ ni_scaler_alloc_frame()

ni_retcode_t ni_scaler_alloc_frame ( ni_session_context_t p_ctx,
int  width,
int  height,
int  format,
int  options,
int  rectangle_width,
int  rectangle_height,
int  rectangle_x,
int  rectangle_y,
int  rgba_color,
int  frame_index 
)

allocate a frame in the scaler


Parameters
[in]p_ctxpointer to session context
[in]widthwidth in pixels
[in]heightheight in pixels
[in]formatpixel format
[in]optionsoption flags
[in]rectangle_widthclipping rectangle width in pixels
[in]rectangle_heightclipping rectangle height in pixels
[in]rectangle_xclipping rectangle x position
[in]rectangle_yclipping rectangle y position
[in]rgba_colorbackground colour (only used by pad filter)
[in]frame_indexframe index (only for hardware frames)
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

Parameters
[in]p_ctxpointer to session context
[in]widthwidth in pixels
[in]heightheight in pixels
[in]formatpixel format
[in]optionsoption flags
[in]rectangle_widthclipping rectangle width in pixels
[in]rectangle_heightclipping rectangle height in pixels
[in]rectangle_xclipping rectangle x position
[in]rectangle_yclipping rectangle y position
[in]rgba_colorbackground colour (only used by pad filter)
[in]frame_indexframe index (only for hardware frames)
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

Definition at line 5777 of file ni_device_api_priv.c.

◆ ni_scaler_config_frame()

ni_retcode_t ni_scaler_config_frame ( ni_session_context_t p_ctx,
ni_frame_config_t p_cfg 
)

config frame in the scaler


Parameters
[in]p_ctxpointer to session context
[in]p_cfgpointer to frame config
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

config frame in the scaler


Parameters
[in]p_ctxpointer to session context
[in]p_cfgpointer to frame config
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

Definition at line 6014 of file ni_device_api_priv.c.

◆ ni_scaler_multi_config_frame()

ni_retcode_t ni_scaler_multi_config_frame ( ni_session_context_t p_ctx,
ni_frame_config_t  p_cfg_in[],
int  numInCfgs,
ni_frame_config_t p_cfg_out 
)

config multi frames in the scaler


Parameters
[in]p_ctxpointer to session context
[in]p_cfg_inpointer to input frame config array
[in]numInCfgsnumber of input frame configs in p_cfg_in array
[in]p_cfg_outpointer to output frame config
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

config multi frames in the scaler


Parameters
[in]p_ctxpointer to session context
[in]p_cfg_inpointer to input frame config array
[in]numInCfgsnumber of input frame configs in the p_cfg array
[in]p_cfg_outpointer to output frame config
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_MEM_ALOC

Definition at line 6136 of file ni_device_api_priv.c.

◆ ni_scaler_session_close()

ni_retcode_t ni_scaler_session_close ( ni_session_context_t p_ctx,
int  eos_received 
)

close a scaler session


Parameters
[in]p_ctxpointer to session context
[in]eos_received(not used)
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED

Parameters
[in]p_ctxpointer to session context
[in]eos_received(not used)
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_NVME_CMD_FAILED

Definition at line 5505 of file ni_device_api_priv.c.

◆ ni_scaler_session_open()

int ni_scaler_session_open ( ni_session_context_t p_ctx)

Open a xcoder scaler instance.


Parameters
[in]p_ctxpointer to session context
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC

Parameters
[in]p_ctxpointer to session context
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC

Definition at line 5285 of file ni_device_api_priv.c.

◆ ni_scaler_session_query_buffer_avail()

ni_retcode_t ni_scaler_session_query_buffer_avail ( ni_session_context_t p_ctx)

Query and acquire buffer from xcoder scale instance.


Parameters
p_ctxpointer to scaler session context
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_FAILURE

Query and acquire buffer from xcoder scale instance.


Parameters
[in]p_ctxpointer to scaler session context
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_FAILURE

Definition at line 14089 of file ni_device_api_priv.c.

◆ ni_scaler_session_read_hwdesc()

ni_retcode_t ni_scaler_session_read_hwdesc ( ni_session_context_t p_ctx,
ni_frame_t p_frame 
)

read a hardware descriptor from a scaler session


Parameters
[in]p_ctxpointer to session context
[out]p_framepointer to frame to write hw descriptor
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_FAILURE

Parameters
[in]p_ctxpointer to session context
[out]p_framepointer to frame to write hw descriptor
Returns
NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_NVME_CMD_FAILED NI_RETCODE_FAILURE

Definition at line 16399 of file ni_device_api_priv.c.

◆ ni_send_session_keep_alive()

ni_retcode_t ni_send_session_keep_alive ( uint32_t  session_id,
ni_device_handle_t  device_handle,
ni_event_handle_t  event_handle,
void *  p_data 
)

send a keep alive message to firmware


Parameters

return

Definition at line 1577 of file ni_device_api_priv.c.

◆ ni_send_to_target()

ni_retcode_t ni_send_to_target ( ni_session_context_t p_ctx,
niFrameSurface1_t source,
uint64_t  ui64DestAddr,
uint32_t  ui32FrameSize 
)

Definition at line 19162 of file ni_device_api_priv.c.

◆ ni_session_keep_alive_thread()

void * ni_session_keep_alive_thread ( void *  arguments)

decoder keep alive thread function triggers every 1 second


Parameters
voidthread args
Returns
void

Definition at line 13630 of file ni_device_api_priv.c.

◆ ni_set_cpu_affinity()

ni_retcode_t ni_set_cpu_affinity ( ni_session_context_t p_ctx)

set cpu affinity based on numa node


Parameters
[in]p_ctxpointer to session context
Returns
NI_RETCODE_SUCCESS NI_RETCODE_ERROR_MEM_ALOC

Parameters
[in]p_ctxpointer to session context
Returns
NI_RETCODE_SUCCESS NI_RETCODE_ERROR_MEM_ALOC

Definition at line 19297 of file ni_device_api_priv.c.

◆ ni_set_custom_dec_template()

void ni_set_custom_dec_template ( ni_session_context_t p_ctx,
ni_decoder_config_t p_cfg,
ni_xcoder_params_t p_src,
uint32_t  max_pkt_size 
)

Setup all xcoder configurations with custom parameters (Rev. B)


Parameters

return

Definition at line 8514 of file ni_device_api_priv.c.

◆ ni_set_custom_template()

void ni_set_custom_template ( ni_session_context_t p_ctx,
ni_encoder_config_t p_cfg,
ni_xcoder_params_t p_src 
)

Setup all xcoder configurations with custom parameters (Rev. B)


Parameters

return

Definition at line 8772 of file ni_device_api_priv.c.

◆ ni_set_default_template()

void ni_set_default_template ( ni_session_context_t p_ctx,
ni_encoder_config_t p_config 
)

Setup and initialize all xcoder configuration to default (Rev. B)


Parameters

return

Definition at line 10112 of file ni_device_api_priv.c.

◆ ni_uploader_session_close()

ni_retcode_t ni_uploader_session_close ( ni_session_context_t p_ctx)

Close an xcoder upload instance.


Parameters
p_ctxpointer to uploader session context
Returns
NI_RETCODE_SUCCESS

Parameters
p_ctxpointer to uploader session context
Returns
NI_RETCODE_SUCCESS

Definition at line 16058 of file ni_device_api_priv.c.

◆ ni_uploader_session_open()

ni_retcode_t ni_uploader_session_open ( ni_session_context_t p_ctx)

Open a xcoder uploader instance.


Parameters
p_ctx- pointer to caller allocated uploader session context
Returns
On success NI_RETCODE_SUCCESS

On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_FAILURE

Open a xcoder uploader instance.


Parameters
p_ctx- pointer to caller allocated uploader session context
Returns
On success NI_RETCODE_SUCCESS

On failure NI_RETCODE_INVALID_PARAM NI_RETCODE_ERROR_MEM_ALOC NI_RETCODE_ERROR_INVALID_SESSION NI_RETCODE_FAILURE

Definition at line 13847 of file ni_device_api_priv.c.

◆ ni_validate_custom_dec_template()

ni_retcode_t ni_validate_custom_dec_template ( ni_xcoder_params_t p_src,
ni_session_context_t p_ctx,
ni_decoder_config_t p_cfg,
char *  p_param_err,
uint32_t  max_err_len 
)

Perform validation on custom dec parameters (Rev. B)


Parameters

return

Definition at line 10509 of file ni_device_api_priv.c.

◆ ni_validate_custom_template()

ni_retcode_t ni_validate_custom_template ( ni_session_context_t p_ctx,
ni_encoder_config_t p_cfg,
ni_xcoder_params_t p_src,
char *  p_param_err,
uint32_t  max_err_len 
)

Perform validation on custom parameters (Rev. B)


Parameters

return

Definition at line 10818 of file ni_device_api_priv.c.

◆ ni_xcoder_session_query()

int ni_xcoder_session_query ( ni_session_context_t p_ctx,
ni_device_type_t  device_type 
)

Query current xcoder status.


Parameters

return

Definition at line 3254 of file ni_device_api_priv.c.

◆ ni_xcoder_session_query_detail()

int ni_xcoder_session_query_detail ( ni_session_context_t p_ctx,
ni_device_type_t  device_type,
void *  detail_data,
int  ver 
)

Query current xcoder status.


Parameters

return

Definition at line 3346 of file ni_device_api_priv.c.