112#define NI_VERSION_CHARACTER_COUNT 8
321#define TUNE_BFRAME_VISUAL_MEDIUM 1
322#define TUNE_BFRAME_VISUAL_HIGH 2
682#define CU_INFO_OUTPUT_SIZE_V1 26
683#define CU_INFO_OUTPUT_SIZE_V2 16
684#define CU_INFO_OUTPUT_SIZE_V3 19
687#define CU_LOCATION_HOR_BIT_OFFSET (0)
688#define CU_LOCATION_HOR_BYTE_OFFSET (CU_LOCATION_HOR_BIT_OFFSET / 8)
689#define CU_LOCATION_HOR_BIT_POSITION (CU_LOCATION_HOR_BIT_OFFSET % 8)
690#define CU_LOCATION_HOR_BITS (3)
692#define CU_LOCATION_VER_BIT_OFFSET (3)
693#define CU_LOCATION_VER_BYTE_OFFSET (CU_LOCATION_VER_BIT_OFFSET / 8)
694#define CU_LOCATION_VER_BIT_POSITION (CU_LOCATION_VER_BIT_OFFSET % 8)
695#define CU_LOCATION_VER_BITS (3)
697#define CU_SIZE_BIT_OFFSET (6)
698#define CU_SIZE_BYTE_OFFSET (CU_SIZE_BIT_OFFSET / 8)
699#define CU_SIZE_BIT_POSITION (CU_SIZE_BIT_OFFSET % 8)
700#define CU_SIZE_BITS (2)
702#define CU_MODE_BIT_OFFSET (8)
703#define CU_MODE_BYTE_OFFSET (CU_MODE_BIT_OFFSET / 8)
704#define CU_MODE_BIT_POSITION (CU_MODE_BIT_OFFSET % 8)
705#define CU_MODE_BITS (1)
707#define RDCOST_BIT_OFFSET (9)
708#define RDCOST_BYTE_OFFSET (RDCOST_BIT_OFFSET / 8)
709#define RDCOST_BIT_POSITION (RDCOST_BIT_OFFSET % 8)
710#define RDCOST_BITS (25)
712#define INTER_PRED_IDC_BIT_OFFSET (34)
713#define INTER_PRED_IDC_BYTE_OFFSET (INTER_PRED_IDC_BIT_OFFSET / 8)
714#define INTER_PRED_IDC_BIT_POSITION (INTER_PRED_IDC_BIT_OFFSET % 8)
715#define INTER_PRED_IDC_BITS (2)
717#define MV0_REFIDX_BIT_OFFSET (36)
718#define MV0_REFIDX_BYTE_OFFSET (MV0_REFIDX_BIT_OFFSET / 8)
719#define MV0_REFIDX_BIT_POSITION (MV0_REFIDX_BIT_OFFSET % 8)
720#define MV0_REFIDX_BITS (2)
722#define MV0_MVX_BIT_OFFSET (38)
723#define MV0_MVX_BYTE_OFFSET (MV0_MVX_BIT_OFFSET / 8)
724#define MV0_MVX_BIT_POSITION (MV0_MVX_BIT_OFFSET % 8)
725#define MV0_MVX_BITS (14)
727#define MV0_MVY_BIT_OFFSET (52)
728#define MV0_MVY_BYTE_OFFSET (MV0_MVY_BIT_OFFSET / 8)
729#define MV0_MVY_BIT_POSITION (MV0_MVY_BIT_OFFSET % 8)
730#define MV0_MVY_BITS (14)
732#define MV1_REFIDX_BIT_OFFSET (66)
733#define MV1_REFIDX_BYTE_OFFSET (MV1_REFIDX_BIT_OFFSET / 8)
734#define MV1_REFIDX_BIT_POSITION (MV1_REFIDX_BIT_OFFSET % 8)
735#define MV1_REFIDX_BITS (2)
737#define MV1_MVX_BIT_OFFSET (68)
738#define MV1_MVX_BYTE_OFFSET (MV1_MVX_BIT_OFFSET / 8)
739#define MV1_MVX_BIT_POSITION (MV1_MVX_BIT_OFFSET % 8)
740#define MV1_MVX_BITS (14)
742#define MV1_MVY_BIT_OFFSET (82)
743#define MV1_MVY_BYTE_OFFSET (MV1_MVY_BIT_OFFSET / 8)
744#define MV1_MVY_BIT_POSITION (MV1_MVY_BIT_OFFSET % 8)
745#define MV1_MVY_BITS (14)
747#define INTRA_PART_MODE_BIT_OFFSET (34)
748#define INTRA_PART_MODE_BYTE_OFFSET (INTRA_PART_MODE_BIT_OFFSET / 8)
749#define INTRA_PART_MODE_BIT_POSITION (INTRA_PART_MODE_BIT_OFFSET % 8)
750#define INTRA_PART_MODE_BITS (1)
752#define INTRA_PRED_MODE0_BIT_OFFSET (35)
753#define INTRA_PRED_MODE0_BYTE_OFFSET (INTRA_PRED_MODE0_BIT_OFFSET / 8)
754#define INTRA_PRED_MODE0_BIT_POSITION (INTRA_PRED_MODE0_BIT_OFFSET % 8)
755#define INTRA_PRED_MODE0_BITS (6)
757#define INTRA_PRED_MODE1_BIT_OFFSET (41)
758#define INTRA_PRED_MODE1_BYTE_OFFSET (INTRA_PRED_MODE1_BIT_OFFSET / 8)
759#define INTRA_PRED_MODE1_BIT_POSITION (INTRA_PRED_MODE1_BIT_OFFSET % 8)
760#define INTRA_PRED_MODE1_BITS (6)
762#define INTRA_PRED_MODE2_BIT_OFFSET (47)
763#define INTRA_PRED_MODE2_BYTE_OFFSET (INTRA_PRED_MODE2_BIT_OFFSET / 8)
764#define INTRA_PRED_MODE2_BIT_POSITION (INTRA_PRED_MODE2_BIT_OFFSET % 8)
765#define INTRA_PRED_MODE2_BITS (6)
767#define INTRA_PRED_MODE3_BIT_OFFSET (53)
768#define INTRA_PRED_MODE3_BYTE_OFFSET (INTRA_PRED_MODE3_BIT_OFFSET / 8)
769#define INTRA_PRED_MODE3_BIT_POSITION (INTRA_PRED_MODE3_BIT_OFFSET % 8)
770#define INTRA_PRED_MODE3_BITS (6)
772#define MEAN_BIT_OFFSET (96)
773#define MEAN_BYTE_OFFSET (MEAN_BIT_OFFSET / 8)
774#define MEAN_BIT_POSITION (MEAN_BIT_OFFSET % 8)
775#define MEAN_BITS (10)
777#define VARIANCE_BIT_OFFSET (106)
778#define VARIANCE_BYTE_OFFSET (VARIANCE_BIT_OFFSET / 8)
779#define VARIANCE_BIT_POSITION (VARIANCE_BIT_OFFSET % 8)
780#define VARIANCE_BITS (18)
782#define QP_BIT_OFFSET (124)
783#define QP_BYTE_OFFSET (QP_BIT_OFFSET / 8)
784#define QP_BIT_POSITION (QP_BIT_OFFSET % 8)
787#define RDCOST_OTHER_BIT_OFFSET (130)
788#define RDCOST_OTHER_BYTE_OFFSET (RDCOST_OTHER_BIT_OFFSET / 8)
789#define RDCOST_OTHER_BIT_POSITION (RDCOST_OTHER_BIT_OFFSET % 8)
790#define RDCOST_OTHER_BITS (25)
792#define INTRACOST_BIT_OFFSET (155)
793#define INTRACOST_BYTE_OFFSET (INTRACOST_BIT_OFFSET / 8)
794#define INTRACOST_BIT_POSITION (INTRACOST_BIT_OFFSET % 8)
795#define INTRACOST_BITS (25)
797#define INTERCOST_BIT_OFFSET (180)
798#define INTERCOST_BYTE_OFFSET (INTERCOST_BIT_OFFSET / 8)
799#define INTERCOST_BIT_POSITION (INTERCOST_BIT_OFFSET % 8)
800#define INTERCOST_BITS (25)
802#define DUMMY_BIT_OFFSET (205)
803#define DUMMY_BYTE_OFFSET (DUMMY_BIT_OFFSET / 8)
804#define DUMMY_BIT_POSITION (DUMMY_BIT_OFFSET % 8)
805#define DUMMY_BITS (3)
808#define AVC_MB_MODE_BIT_OFFSET (0)
809#define AVC_MB_MODE_BYTE_OFFSET (AVC_MB_MODE_BIT_OFFSET / 8)
810#define AVC_MB_MODE_BIT_POSITION (AVC_MB_MODE_BIT_OFFSET % 8)
811#define AVC_MB_MODE_BITS (1)
813#define AVC_RDCOST_BIT_OFFSET (1)
814#define AVC_RDCOST_BYTE_OFFSET (AVC_RDCOST_BIT_OFFSET / 8)
815#define AVC_RDCOST_BIT_POSITION (AVC_RDCOST_BIT_OFFSET % 8)
816#define AVC_RDCOST_BITS (25)
818#define AVC_INTER_PRED_IDC_BIT_OFFSET (26)
819#define AVC_INTER_PRED_IDC_BYTE_OFFSET (AVC_INTER_PRED_IDC_BIT_OFFSET / 8)
820#define AVC_INTER_PRED_IDC_BIT_POSITION (AVC_INTER_PRED_IDC_BIT_OFFSET % 8)
821#define AVC_INTER_PRED_IDC_BITS (2)
823#define AVC_MV0_REFIDX_BIT_OFFSET (28)
824#define AVC_MV0_REFIDX_BYTE_OFFSET (AVC_MV0_REFIDX_BIT_OFFSET / 8)
825#define AVC_MV0_REFIDX_BIT_POSITION (AVC_MV0_REFIDX_BIT_OFFSET % 8)
826#define AVC_MV0_REFIDX_BITS (2)
828#define AVC_MV0_MVX_BIT_OFFSET (30)
829#define AVC_MV0_MVX_BYTE_OFFSET (AVC_MV0_MVX_BIT_OFFSET / 8)
830#define AVC_MV0_MVX_BIT_POSITION (AVC_MV0_MVX_BIT_OFFSET % 8)
831#define AVC_MV0_MVX_BITS (14)
833#define AVC_MV0_MVY_BIT_OFFSET (44)
834#define AVC_MV0_MVY_BYTE_OFFSET (AVC_MV0_MVY_BIT_OFFSET / 8)
835#define AVC_MV0_MVY_BIT_POSITION (AVC_MV0_MVY_BIT_OFFSET % 8)
836#define AVC_MV0_MVY_BITS (14)
838#define AVC_MV1_REFIDX_BIT_OFFSET (58)
839#define AVC_MV1_REFIDX_BYTE_OFFSET (AVC_MV1_REFIDX_BIT_OFFSET / 8)
840#define AVC_MV1_REFIDX_BIT_POSITION (AVC_MV1_REFIDX_BIT_OFFSET % 8)
841#define AVC_MV1_REFIDX_BITS (2)
843#define AVC_MV1_MVX_BIT_OFFSET (60)
844#define AVC_MV1_MVX_BYTE_OFFSET (AVC_MV1_MVX_BIT_OFFSET / 8)
845#define AVC_MV1_MVX_BIT_POSITION (AVC_MV1_MVX_BIT_OFFSET % 8)
846#define AVC_MV1_MVX_BITS (14)
848#define AVC_MV1_MVY_BIT_OFFSET (74)
849#define AVC_MV1_MVY_BYTE_OFFSET (AVC_MV1_MVY_BIT_OFFSET / 8)
850#define AVC_MV1_MVY_BIT_POSITION (AVC_MV1_MVY_BIT_OFFSET % 8)
851#define AVC_MV1_MVY_BITS (14)
853#define AVC_INTRA_PART_MODE_BIT_OFFSET (26)
854#define AVC_INTRA_PART_MODE_BYTE_OFFSET (AVC_INTRA_PART_MODE_BIT_OFFSET / 8)
855#define AVC_INTRA_PART_MODE_BIT_POSITION (AVC_INTRA_PART_MODE_BIT_OFFSET % 8)
856#define AVC_INTRA_PART_MODE_BITS (2)
882 uint8_t intraPredMode[16];
920#define NI_MINIMUM_CROPPED_LENGTH 48
1003#define NI_MAX_SEGMENT_NUM 4
1044#define FRAME_CHUNK_INDEX_SIZE 4096
1045#define NI_SESSION_CLOSE_RETRY_MAX 10
1046#define NI_SESSION_CLOSE_RETRY_INTERVAL_US 500000
1049#define NI_HWDESC_UNIFIED_MEMBIN_SIZE 0x187000
1051#define NI_QUADRA_MEMORY_CONFIG_DR 0
1052#define NI_QUADRA_MEMORY_CONFIG_SR 1
1053#define NI_QUADRA_MEMORY_CONFIG_SR2_REMOVE_P2P 2
1054#define NI_QUADRA_MEMORY_CONFIG_SR_4G 3
1056#define NI_P2P_RECV 0
1057#define NI_P2P_SEND 1
1058#define NI_MAX_P2P_SGL_ENTRIES 128
1060#define NI_MAX_AI_NETWORK_BINARY_BUFFER_QUERY_RETRIES 300000
1061#define NI_MAX_DEC_SESSION_READ_QUERY_EOS_RETRIES 15000
1062#define NI_RETRY_INTERVAL_200US 200
1063#define NI_RETRY_INTERVAL_100US 100
1066#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE 32
1068#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_o 48
1070#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_rc 88
1072#define NI_FW_ENC_BITSTREAM_META_DATA_SIZE_UNDER_MAJOR_6_MINOR_sM 112
1075#define FW_LOG_START_DELIMITER_0 0x5A
1076#define FW_LOG_START_DELIMITER_1 0xA5
1077#define FW_LOG_END_DELIMITER_0 0xA5
1078#define FW_LOG_END_DELIMITER_1 0x5A
1084 uint8_t start_marker[2];
1085 uint8_t timestamp[8];
1093 uint8_t end_marker[2];
1108 uint64_t* frame_offset, uint32_t* frame_dropped,
bool is_hw_frame);
1116 uint32_t max_pkt_size);
1122 uint32_t max_err_len);
1127 uint32_t max_err_len);
1131 uint32_t max_err_len);
1138 ni_device_handle_t device_handle,
bool device_in_ctxt);
1187void ni_fix_VUI(uint8_t *vui,
int pos,
int value);
1365 int height,
int format,
int options,
1366 int rectangle_width,
int rectangle_height,
1367 int rectangle_x,
int rectangle_y,
1368 int rgba_color,
int frame_index);
1487 uint32_t *p_offset);
1515 uint8_t ddr_priority_mode);
1518#define NI_AI_HW_ALIGN_SIZE 64
1523 void *nb_data, uint32_t nb_size);
1533 int height,
int options,
int pool_size,
1582 uint32_t key, uint32_t value);
1590 void *p_dec_ppu_config,
int buffer_size);
Common NETINT definitions used by all modules.
#define NI_MAX_NUM_OF_DECODER_OUTPUTS
enum _ni_param_change_flags ni_param_change_flags_t
This is an enumeration for encoder parameter change.
#define NI_MAX_SPATIAL_LAYERS
struct _ni_log_fl_fw_versions ni_log_fl_fw_versions_t
ni_retcode_t ni_encoder_session_open(ni_session_context_t *p_ctx)
Open a xcoder encoder instance.
struct _ni_metadata_enc_frame ni_metadata_enc_frame_t
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_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_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_scaler_config_frame(ni_session_context_t *p_ctx, ni_frame_config_t *p_cfg)
config frame in the scaler
struct _ni_global_session_stats ni_global_session_stats_t
struct _ni_instance_mgr_stream_complete ni_instance_mgr_stream_complete_t
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
@ GOP_PRESET_IDX_HIERARCHICAL_IPPPP
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_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.
struct _ni_network_buffer_info ni_network_buffer_info_t
int ni_decoder_session_write(ni_session_context_t *p_ctx, ni_packet_t *p_packet)
Send a video p_packet to decoder.
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_decoder_session_close(ni_session_context_t *p_ctx, int eos_recieved)
Close a xcoder decoder instance.
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.
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_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_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.
ni_retcode_t ni_hwupload_session_query_buffer_avail(ni_session_context_t *p_ctx)
Query and acquire buffer from xcoder upload 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_ai_session_write(ni_session_context_t *p_ctx, ni_frame_t *p_frame)
ni_retcode_t ni_config_instance_hvsplus(ni_session_context_t *p_ctx)
ni_session_config_rw_type_t
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_set_cpu_affinity(ni_session_context_t *p_ctx)
set cpu affinity based on numa node
struct _ni_session_config_rw ni_session_config_rw_t
struct _ni_metadata_enc_bstream_rev61 ni_metadata_enc_bstream_rev61_t
struct _ni_ai_config_t ni_ai_config_t
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_encoder_session_close(ni_session_context_t *p_ctx, int eos_recieved)
Close a xcoder encoder instance.
ni_retcode_t ni_ai_session_query_metrics(ni_session_context_t *p_ctx, ni_network_perf_metrics_t *p_metrics)
struct _ni_decoder_config_t ni_decoder_config_t
struct _ni_instance_mgr_stream_info ni_instance_mgr_stream_info_t
int32_t ni_get_frame_index(uint32_t *value)
Get xcoder instance id.
struct _ni_instance_buf_info ni_instance_buf_info_t
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_encoder_session_send_eos(ni_session_context_t *p_ctx)
Flush encoder output.
ni_retcode_t ni_config_read_inout_layers(ni_session_context_t *p_ctx, ni_network_data_t *p_network)
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_metadata_buffer_alloc(ni_frame_t *p_frame, int extra_len)
Allocate memory for the metadata header and auxillary data for encoder input data.
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)
ni_retcode_t ni_ai_session_read(ni_session_context_t *p_ctx, ni_packet_t *p_packet)
struct _ni_segment ni_segment_t
struct _ni_metadata_dec_frame ni_metadata_dec_frame_t
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.
struct _ni_instance_upload_ret_hwdesc ni_instance_upload_ret_hwdesc_t
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_ai_alloc_dst_frame(ni_session_context_t *p_ctx, niFrameSurface1_t *p_out_surface)
struct _ni_scaler_config ni_scaler_config_t
enum _ni_xcoder_mgr_retcode ni_xcoder_mgr_retcode_t
ni_retcode_t ni_check_ratecontrol_params(ni_encoder_config_t *p_cfg, char *param_err, uint32_t max_err_len)
struct _ni_session_stats ni_session_stats_t
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.
struct _ni_metadata_common ni_metadata_common_t
ni_retcode_t ni_decoder_session_open(ni_session_context_t *p_ctx)
Open a xcoder decoder instance.
enum _ni_gop_preset_idx ni_gop_preset_idx_t
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_scaler_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_uploader_session_close(ni_session_context_t *p_ctx)
Close an xcoder upload 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
void * ni_session_keep_alive_thread(void *arguments)
decoder keep alive thread function triggers every 1 second
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_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_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_config_instance_network_binary(ni_session_context_t *p_ctx, void *nb_data, uint32_t nb_size)
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.
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.
int ni_get_planar_from_pixfmt(int pix_fmt)
Grab planar info from NI_PIX_FMT.
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_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_xcoder_request_success
@ ni_xcoder_request_pending
@ ni_xcoder_resource_recovery
@ ni_xcoder_resource_insufficient
@ ni_xcoder_general_error
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.
int ni_hwupload_session_read_hwdesc(ni_session_context_t *p_ctx, niFrameSurface1_t *hwdesc)
Retrieve a HW descriptor of uploaded 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)
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
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_ai_session_close(ni_session_context_t *p_ctx, int eos_received)
struct _ni_encoder_config_t ni_encoder_config_t
int ni_xcoder_session_query(ni_session_context_t *p_ctx, ni_device_type_t device_type)
Query current xcoder status.
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_device_get_ddr_configuration(ni_session_context_t *p_ctx)
Get DDR configuration of Quadra device.
struct _ni_metadata_enc_bstream ni_metadata_enc_bstream_t
struct _ni_t408_config_t ni_t408_config_t
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_ai_session_read_hwdesc(ni_session_context_t *p_ctx, ni_frame_t *p_frame)
read a hardware descriptor from a scaler session
struct _ni_instance_mgr_allocation_info ni_instance_mgr_allocation_info_t
ni_retcode_t ni_ai_query_network_ready(ni_session_context_t *p_ctx)
ni_retcode_t ni_send_to_target(ni_session_context_t *p_ctx, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
struct _ni_ddr_priority_config ni_ddr_priority_config_t
void ni_encoder_set_vui(uint8_t *vui, ni_encoder_config_t *p_cfg)
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.
struct _ni_encoder_frame_params ni_encoder_frame_params_t
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_decoder_session_send_eos(ni_session_context_t *p_ctx)
Send end of stream signal to the decoder.
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.
int ni_encoder_session_read(ni_session_context_t *p_ctx, ni_packet_t *p_packet)
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)
struct _ni_uploader_config_t ni_uploader_config_t
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.
struct _ni_instance_mgr_general_status ni_instance_mgr_general_status_t
ni_retcode_t ni_uploader_session_open(ni_session_context_t *p_ctx)
Open a xcoder uploader instance.
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.
struct _ni_resolution ni_resolution_t
ni_retcode_t ni_ai_session_open(ni_session_context_t *p_ctx)
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_clear_instance_buf(niFrameSurface1_t *surface)
clear a particular xcoder instance buffer/data
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_recv_from_target(ni_session_context_t *pSession, const ni_p2p_sgl_t *dmaAddrs, ni_frame_t *pDstFrame)
ni_instance_buf_info_rw_type_t
@ INST_BUF_INFO_R_ACQUIRE
@ INST_BUF_INFO_RW_WRITE_BUSY
@ INST_BUF_INFO_RW_UPLOAD
@ INST_BUF_INFO_RW_WRITE_BY_EP
@ INST_BUF_INFO_RW_READ_BY_AI
@ INST_BUF_INFO_RW_READ_BUSY
void ni_params_print(ni_xcoder_params_t *const p_encoder_params)
Print xcoder user configurations.
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_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)
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)
int lower_pixel_rate(const ni_load_query_t *pQuery, uint32_t ui32CurrentLowest)
#define NI_MAX_SEGMENT_NUM
void ni_fix_VUI(uint8_t *vui, int pos, int value)
insert the 32 bits of integer value at bit position pos
int ni_get_bitdepth_factor_from_pixfmt(int pix_fmt)
Grab bitdepth factor from NI_PIX_FMT.
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.
ni_retcode_t ni_decoder_session_flush(ni_session_context_t *p_ctx)
Flush decoder output.
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_dump_log_all_cores(ni_session_context_t *p_ctx, void *p_data, bool gen_log_file)
int ni_scaler_session_open(ni_session_context_t *p_ctx)
Open a xcoder scaler instance.
#define NI_VERSION_CHARACTER_COUNT
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_hwdownload_by_frame_idx(niFrameSurface1_t *hwdesc, ni_frame_t *p_frame, int is_auto_dl)
Retrieve a YUV p_frame by frame index.
Public definitions for managing NETINT video processing devices.
uint32_t ui32NetworkBinarySize
uint8_t ui8EnableAdvancedEc
uint8_t ui8ReduceDpbDelay
uint8_t ui8MaxExtraHwFrameCnt
uint16_t ui16MaxSeiDataSize
ni_decoder_output_config_t asOutputConfig[NI_MAX_NUM_OF_DECODER_OUTPUTS]
uint32_t ui32ErrRatioThreshold
uint8_t ui8DisableAdaptiveBuffers
uint8_t ui8DisablePictureReordering
uint8_t ui8EnablelowDelayCheck
uint8_t ui8SurviveStreamErr
uint32_t ui32SourceHeight
uint8_t ui8av1ErrResilientMode
uint8_t ui8customMinCoeffDiv
uint8_t ui8vbvBufferReencode
uint32_t ui32ltrRefInterval
uint8_t ui8crfMaxIframeEnable
uint8_t ui8mallocStrategy
uint8_t ui8av1OpLevel[NI_MAX_SPATIAL_LAYERS]
int32_t i32forceBframeQpFactor
int32_t i32userMinDeltaQp
int8_t i8statisticOutputLevel
int32_t i32userMaxDeltaQp
uint8_t ui8fixedframerate
uint8_t u8customizeRoiQpLevel
uint8_t ui8adaptiveLamdaMode
uint8_t ui8rcQpDeltaRange
uint8_t ui8totalCuTreeDepth
uint8_t ui8lowLatencyMode
uint16_t ui16iFrameSizeRatio
uint8_t ui8intraCompensateMode
uint16_t ui16aspectRatioHeight
uint8_t ui8EnableRdoQuant
uint8_t ui8pastFrameMaxIntraRatio
uint16_t ui16HDR10MaxLight
uint8_t ui8videoFullRange
uint32_t ui32hdr10_minluma
uint8_t ui8noHWMultiPassSupport
uint32_t ui32lumaLinesize
uint8_t ui8preIntraHandling
uint8_t ui8setLongTermCount
int32_t i32ltrRefQpOffset
uint8_t ui8useLowDelayPocType
uint8_t ui8EnableAcqLimit
uint8_t ui8multicoreJointMode
uint8_t ui8adaptiveCuTree
uint8_t ui8LookAheadDepth
uint8_t ui8HDR10CLLEnable
uint32_t ui32VuiDataSizeBytes
uint8_t ui8enableSmoothCrf
int32_t i32spatialLayerBitrate[NI_MAX_SPATIAL_LAYERS]
uint8_t ui8linkFrameMaxIntraRatio
uint8_t ui8enableTimecode
uint32_t ui32chromaLinesize
uint32_t ui32VuiDataSizeBits
uint8_t ui8enableCompensateQp
uint8_t ui8disableBframeRDOQ
uint8_t ui8sceneChangeDetectLevel
uint8_t ui8colorPrimaries
uint32_t ui32sourceEndian
uint8_t ui8disableAv1TimingInfo
uint8_t ui8enable2PassGopPatern
uint8_t ui8temporalLayersEnable
uint8_t u8skipFrameInterval
int8_t i8hvsBaseMbComplexity
uint8_t ui8colorDescPresent
uint8_t ui8intraResetRefresh
uint8_t ui8AiEnhanceLevel
uint16_t ui16maxFrameSize
uint32_t ui32hdr10_maxluma
uint8_t ui8tuneBframeVisual
int8_t i8maxConsecutiveSkipFrameNum
uint32_t ui32setLongTermInterval
uint16_t ui16HDR10AveLight
uint32_t ui32ltrNextInterval
uint8_t ui8adaptiveCrfMode
ni_t408_config_t niParamT408
uint8_t ui8spatialLayersRefBaseLayer
uint8_t ui8motionConstrainedMode
int32_t i32frameRateDenominator
uint8_t ui8stillImageDetectLevel
uint16_t ui16aspectRatioWidth
uint8_t ui8spatialLayersMinusOne
uint8_t ui8bitstreamFormat
uint16_t force_picture_type
ni_instance_upload_ret_hwdesc_t hw_inst_ind
uint16_t rectangle_height
uint32_t fw_model_load_overall
uint8_t active_sub_instances_cnt
uint8_t process_load_percent_upper
uint8_t process_load_percent
uint8_t active_hwupload_sub_inst_cnt
uint8_t fw_video_shared_mem_usage
uint8_t process_load_percent_overall
uint8_t fw_video_mem_usage
uint8_t active_sub_instances_cnt_overall
uint8_t fw_share_mem_usage
uint16_t data_bytes_available
uint16_t transfer_frame_height
uint16_t transfer_frame_stride
uint8_t current_fw_revision[NI_VERSION_CHARACTER_COUNT]
uint8_t nor_flash_fw_revision[NI_VERSION_CHARACTER_COUNT]
uint8_t last_ran_fl_version[NI_VERSION_CHARACTER_COUNT]
uint8_t nor_flash_fl_version[NI_VERSION_CHARACTER_COUNT]
ni_segment_t segment[NI_MAX_SEGMENT_NUM]
union _ni_session_config_rw::@20 uHWAccessField
uint16_t ui16WriteFrameId
uint32_t ui32LastTransactionId
uint32_t ui32Session_timestamp_high
uint32_t ui32LastTransactionCompletionStatus
uint32_t ui32LastErrorStatus
uint32_t ui32Session_timestamp_low
uint32_t ui32LastErrorTransactionId
int32_t lambdaScalingEnable
int32_t constIntraPredFlag
int32_t pu08IntraAngleDeltaRate
uint32_t strongIntraSmoothEnable
int32_t cu16InterDeltaRate
int32_t pu16IntraDcDeltaRate
int32_t enable_cu_level_rate_control
int32_t intra_mb_refresh_arg
int32_t cu08MergeDeltaRate
int32_t intra_mb_refresh_mode
int32_t independSliceMode
int32_t fixedBitRatio[NI_MAX_GOP_NUM]
int32_t dependSliceModeArg
int32_t use_recommend_enc_params
ni_custom_gop_params_t custom_gop_params
int32_t pu08IntraDcDeltaRate
int32_t decoding_refresh_type
int32_t independSliceModeArg
int32_t enable_mb_level_rc
uint32_t monochromeEnable
int32_t lfCrossSliceBoundaryEnable
uint32_t forcedHeaderEnable
uint32_t customLambdaEnable
int32_t pu04IntraDcDeltaRate
int32_t pu04IntraAngleDeltaRate
int32_t cu32InterDeltaRate
int32_t pu16IntraAngleDeltaRate
int32_t pu08IntraPlanarDeltaRate
uint32_t nrNoiseEstEnable
int32_t scalingListEnable
int32_t pu16IntraPlanarDeltaRate
uint32_t numTicksPocDiffOne
int32_t pu04IntraPlanarDeltaRate
int32_t enable_transform_8x8
int32_t entropy_coding_mode
int32_t cu32MergeDeltaRate
int32_t cu16MergeDeltaRate
uint32_t weightPredEnable
int32_t pu32IntraAngleDeltaRate
int32_t cu16IntraDeltaRate
int32_t cu08IntraDeltaRate
int32_t cu08InterDeltaRate
int32_t cu32IntraDeltaRate
int32_t pu32IntraDcDeltaRate
int32_t pu32IntraPlanarDeltaRate
uint32_t ui32lumaLinesize
uint32_t ui32chromaLinesize
Log entry information structure.
const uint8_t * start_ptr
Log entry trailer structure.
uint8_t ui8EnablePpuScaleLimit
ni_decoder_output_picture_size sOutputPictureSize
uint8_t ui8SemiPlanarEnabled
uint8_t ui8EnablePpuScaleAdapt
ni_decode_cropping_rectangle sCroppingRectable