 |
libxcoder
5.2.0
|
Go to the documentation of this file.
32 #ifndef _NETINTLIBXCODERAPI_H_
33 #define _NETINTLIBXCODERAPI_H_
37 #pragma GCC diagnostic push
38 #pragma GCC diagnostic ignored "-Wunused-variable"
40 #ifndef _NETINT_LIBXCODER_DYNAMIC_LOADING_TEST_
50 #pragma GCC diagnostic pop
63 typedef void (
LIB_API*
PNIENCCOPYAUXDATA) (
ni_session_context_t *p_enc_ctx,
ni_frame_t *p_enc_frame,
ni_frame_t *p_dec_frame,
ni_codec_format_t codec_format,
const uint8_t *
mdcv_data,
const uint8_t *
cll_data,
const uint8_t *
cc_data,
const uint8_t *
udu_data,
const uint8_t *
hdrp_data,
int is_hwframe,
int is_semiplanar);
66 typedef int (
LIB_API*
PNIDECPACKETPARSE) (
ni_session_context_t *p_session_ctx,
ni_xcoder_params_t *p_param, uint8_t *data,
int size,
ni_packet_t *p_packet,
int low_delay,
int codec_format,
int pkt_nal_bitmap,
int custom_sei_type,
int *svct_skip_next_packet,
int *is_lone_sei_pkt);
76 typedef void (
LIB_API*
PNICOPYHWYUV420P) (uint8_t *p_dst[
NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[
NI_MAX_NUM_DATA_POINTERS],
int width,
int height,
int bit_depth_factor,
int is_semiplanar,
int conf_win_right,
int dst_stride[
NI_MAX_NUM_DATA_POINTERS],
int dst_height[
NI_MAX_NUM_DATA_POINTERS],
int src_stride[
NI_MAX_NUM_DATA_POINTERS],
int src_height[
NI_MAX_NUM_DATA_POINTERS]);
77 typedef void (
LIB_API*
PNICOPYFRAMEDATA) (uint8_t *p_dst[
NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[
NI_MAX_NUM_DATA_POINTERS],
int frame_width,
int frame_height,
int factor,
ni_pix_fmt_t pix_fmt,
int conf_win_right,
int dst_stride[
NI_MAX_NUM_DATA_POINTERS],
int dst_height[
NI_MAX_NUM_DATA_POINTERS],
int src_stride[
NI_MAX_NUM_DATA_POINTERS],
int src_height[
NI_MAX_NUM_DATA_POINTERS]);
107 typedef int (
LIB_API*
PNIPTHREADCREATE) (ni_pthread_t *thread,
const ni_pthread_attr_t *attr,
void *(*start_routine)(
void *),
void *arg);
163 typedef int (
LIB_API*
PNIPACKETCOPY) (
void *p_destination,
const void *
const p_source,
int cur_size,
void *p_leftover,
int *p_prev_size);
184 typedef ni_retcode_t (
LIB_API*
PNIDEVICEALLOCFRAME) (
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,
ni_device_type_t device_type);
474 functionList->
niUsleep =
reinterpret_cast<decltype(
ni_usleep)*
>(dlsym(lib,
"ni_usleep"));
475 functionList->
niStrtok =
reinterpret_cast<decltype(
ni_strtok)*
>(dlsym(lib,
"ni_strtok"));
585 functionList->
niSetLtr =
reinterpret_cast<decltype(
ni_set_ltr)*
>(dlsym(lib,
"ni_set_ltr"));
640 #endif // _NETINTLIBXCODERAPI_H_
ni_retcode_t(LIB_API * PNIENCODERSETINPUTFRAMEFORMAT)(ni_session_context_t *p_enc_ctx, ni_xcoder_params_t *p_enc_params, int width, int height, int bit_depth, int src_endian, int planar)
ni_retcode_t ni_device_alloc_and_get_firmware_logs(ni_session_context_t *p_ctx, void **p_log_buffer, bool gen_log_file)
Allocate log buffer if needed and retrieve firmware logs from device.
ni_retcode_t ni_set_demo_roi_map(ni_session_context_t *p_enc_ctx)
Set up hard coded demo ROI map.
ni_event_handle_t(LIB_API * PNICREATEEVENT)(void)
PNIENCWRITEFROMYUVBUFFER niEncWriteFromYuvBuffer
ni_retcode_t(LIB_API * PNISETLTRINTERVAL)(ni_session_context_t *p_ctx, int32_t ltr_interval)
int ni_encoder_session_read_stream_header(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data)
Read encoder stream header from the device.
int ni_pthread_mutex_unlock(ni_pthread_mutex_t *mutex)
thread mutex unlock
ni_retcode_t(LIB_API * PNIP2PRECV)(ni_session_context_t *pSession, const ni_p2p_sgl_t *dmaAddrs, ni_frame_t *pDstFrame)
NI_DEPRECATED char * ni_get_compat_fw_api_ver(void)
Get FW API version libxcoder is compatible with. Deprecated in favour of ni_fmt_fw_api_ver_str(&NI_XC...
PNICUSTOMPACKETBUFFERALLOC niCustomPacketBufferAlloc
PNIRECONFIGCRF niReconfigCrf
int ni_pthread_cond_init(ni_pthread_cond_t *cond, const ni_pthread_condattr_t *attr)
initialize condition variables
ni_aux_data_t * ni_frame_get_aux_data(const ni_frame_t *frame, ni_aux_data_type_t type)
Retrieve from the frame auxiliary data of a given type if exists.
ni_retcode_t ni_scaler_set_params(ni_session_context_t *p_ctx, ni_scaler_params_t *p_params)
Set parameters on the device for the 2D engine.
NI_DEPRECATED ni_retcode_t ni_device_capability_query(ni_device_handle_t device_handle, ni_device_capability_t *p_cap)
Query device and return device capability structure This function had been replaced by ni_device_capa...
int(LIB_API * PNIPTHREADJOIN)(ni_pthread_t thread, void **value_ptr)
ni_retcode_t ni_encoder_params_set_value(ni_xcoder_params_t *p_params, const char *name, const char *value)
Set value referenced by name in encoder parameters structure.
ni_retcode_t(LIB_API * PNISETLTR)(ni_session_context_t *p_ctx, ni_long_term_ref_t *ltr)
PNIHWFRAMEBUFFERRECYCLE niHwframeBufferRecycle
PNIDEVICESESSIONUPDATEFRAMEPOOL niDeviceSessionUpdateFramepool
PNIPTHREADMUTEXUNLOCK niPthreadMutexUnlock
PNIENCODERSETINPUTFRAMEFORMAT niEncoderSetInputFrameFormat
PNIFORCEIDRFRAMETYPE niForceIdrFrameType
PNIREMOVEEMULATIONPREVENTBYTES niRemoveEmulationPreventBytes
PNIQUERYNVMESTATUS niQueryNvmeStatus
ni_retcode_t ni_device_config_qos_op(ni_device_handle_t device_handle, ni_device_handle_t device_handle_t, uint32_t over_provision)
Send qos over provisioning mode to target namespace with specified logic block address.
ni_retcode_t(LIB_API * PNIUPLOADERP2PTESTLOAD)(ni_session_context_t *p_upl_ctx, uint8_t *p_data, uint32_t len, ni_frame_t *p_hwframe)
ni_retcode_t ni_ai_config_network_binary(ni_session_context_t *p_ctx, ni_network_data_t *p_network, const char *file)
configure a network context based with the network binary
PNIFRAMEBUFFERALLOCHWENC niFrameBufferAllocHwenc
PNIENCODERFRAMEBUFFERALLOC niEncoderFrameBufferAlloc
PNINETWORKCONVERTTENSORTODATA niNetworkConvertTensorToData
ni_retcode_t(LIB_API * PNINETWORKLAYERCONVERTTENSOR)(uint8_t *dst, uint32_t dst_len, const char *tensor_file, ni_network_layer_params_t *p_param)
PNINETWORKLAYERCONVERTTENSOR niNetworkLayerConvertTensor
int(LIB_API * PNIRETRIEVEXCODERGOP)(char xcoderGop[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
PNIDECODERFRAMEBUFFERFREE niDecoderFrameBufferFree
ni_retcode_t ni_frame_buffer_free(ni_frame_t *p_frame)
Free frame buffer that was previously allocated with either ni_frame_buffer_alloc or ni_encoder_frame...
int(LIB_API * PNIEXPANDFRAME)(ni_frame_t *dst, ni_frame_t *src, int dst_stride[], int raw_width, int raw_height, int ni_fmt, int nb_planes)
ni_retcode_t(LIB_API * PNIDEVICESESSIONCOPY)(ni_session_context_t *src_p_ctx, ni_session_context_t *dst_p_ctx)
ni_retcode_t(LIB_API * PNIRECONFIGMAXFRAMESIZERATIO)(ni_session_context_t *p_ctx, int32_t max_frame_size_ratio)
ni_retcode_t(LIB_API * PNIFRAMEBUFFERALLOCPIXFMT)(ni_frame_t *pframe, int pixel_format, int video_width, int video_height, int linesize[], int alignment, int extra_len)
ni_retcode_t(LIB_API * PNIENCODERFRAMEBUFFERALLOC)(ni_frame_t *pframe, int video_width, int video_height, int linesize[], int alignment, int extra_len, bool alignment_2pass_wa)
const typedef char *LIB_API * PNIAIERRNOTOSTR(int rc)
ni_retcode_t(LIB_API * PNIDEVICEALLOCANDGETFIRMWARELOGS)(ni_session_context_t *p_ctx, void **p_log_buffer, bool gen_log_file)
ni_retcode_t(LIB_API * PNIFORCEIDRFRAMETYPE)(ni_session_context_t *p_ctx)
ni_retcode_t ni_frame_buffer_alloc_nv(ni_frame_t *p_frame, int video_width, int video_height, int linesize[], int extra_len, bool alignment_2pass_wa)
Allocate memory for the frame buffer based on provided parameters taking into account pic line size a...
void(LIB_API * PNIDECODERFRAMEBUFFERPOOLRETURNBUF)(ni_buf_t *buf, ni_buf_pool_t *p_buffer_pool)
PNIPTHREADMUTEXLOCK niPthreadMutexLock
int ni_retrieve_xcoder_gop(char xcoderGop[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
Retrieve custom gop config values from –xcoder-gop.
int(LIB_API * PNIPTHREADSIGMASK)(int how, const ni_sigset_t *set, ni_sigset_t *oldset)
ni_retcode_t ni_device_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)
Configure the 2D engine to work based on provided parameters.
PNIPTHREADJOIN niPthreadJoin
ni_aux_data_t *(LIB_API * PNIFRAMENEWAUXDATA)(ni_frame_t *frame, ni_aux_data_type_t type, int data_size)
PNIFRAMENEWAUXDATAFROMRAWDATA niFrameNewAuxDataFromRawData
ni_retcode_t ni_device_session_query(ni_session_context_t *p_ctx, ni_device_type_t device_type)
Query session data from the device - If device_type is valid, will query session data from specified ...
PNIUPLOADERFRAMEBUFFERUNLOCK niUploaderFrameBufferUnlock
PNIDECODERFRAMEBUFFERALLOC niDecoderFrameBufferAlloc
void ni_enc_copy_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, const uint8_t *mdcv_data, const uint8_t *cll_data, const uint8_t *cc_data, const uint8_t *udu_data, const uint8_t *hdrp_data, int is_hwframe, int is_semiplanar)
Copy auxiliary data that should be sent together with this frame to encoder.
PNIQUERYFLFWVERSIONS niQueryFlFwVersions
PNIHWFRAMEP2PBUFFERRECYCLE niHwframeP2PBufferRecycle
void ni_device_close(ni_device_handle_t device_handle)
Close device and release resources.
ni_aux_data_t *(LIB_API * PNIFRAMENEWAUXDATAFROMRAWDATA)(ni_frame_t *frame, ni_aux_data_type_t type, const uint8_t *raw_data, int data_size)
PNIDECODERINITDEFAULTPARAMS niDecoderInitDefaultParams
ni_retcode_t ni_force_idr_frame_type(ni_session_context_t *p_ctx)
Force next frame to be IDR frame during encoding.
ni_retcode_t ni_scaler_p2p_frame_acquire(ni_session_context_t *p_ctx, niFrameSurface1_t *p_surface, int data_len)
Acquire the scaler P2P DMA buffer for read/write.
PNIDEVICESESSIONCONTEXTFREE niDeviceSessionContextFree
char *(LIB_API * PNIGETLIBXCODERAPIVER)(void)
void(LIB_API * PNICOPYYUV444PTO420P)(uint8_t *p_dst0[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_dst1[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int width, int height, int factor, int mode)
ni_retcode_t(LIB_API * PNIDEVICESESSIONSEQUENCECHANGE)(ni_session_context_t *p_ctx, int width, int height, int bit_depth_factor, ni_device_type_t device_type)
uint8_t cll_data[NI_MAX_SEI_DATA]
ni_retcode_t ni_reconfig_intraprd(ni_session_context_t *p_ctx, int32_t intra_period)
Reconfigure intraPeriod dynamically during encoding.
LIB_API int ni_enc_insert_timecode(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_timecode_t *p_timecode)
Insert timecode data into picture timing SEI (H264) or time code SEI (H265)
ni_retcode_t ni_query_vf_ns_id(ni_device_handle_t device_handle, ni_device_vf_ns_id_t *p_dev_ns_vf, uint8_t fw_rev[])
Query VF and NS id from device.
ni_retcode_t ni_device_session_update_framepool(ni_session_context_t *p_ctx, uint32_t pool_size)
Sends frame pool change info to device.
PNIENCPREPAUXDATA niEncPrepAuxData
ni_retcode_t ni_device_session_sequence_change(ni_session_context_t *p_ctx, int width, int height, int bit_depth_factor, ni_device_type_t device_type)
Send sequence change information to device.
int(LIB_API * PNIPTHREADCREATE)(ni_pthread_t *thread, const ni_pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
PNINETWORKCONVERTDATATOTENSOR niNetworkConvertDataToTensor
ni_retcode_t ni_network_layer_convert_output(float *dst, uint32_t dst_len, ni_packet_t *p_packet, ni_network_data_t *p_network, uint32_t layer)
void(LIB_API * PNIFMTFWAPIVERSTR)(const char ver_str[], char fmt_str[])
uint32_t(LIB_API * PNIAINETWORKLAYERDIMS)(ni_network_layer_params_t *p_param)
ni_retcode_t ni_frame_buffer_alloc(ni_frame_t *p_frame, int video_width, int video_height, int alignment, int metadata_flag, int factor, int hw_frame_count, int is_planar)
Allocate preliminary memory for the frame buffer based on provided parameters. Applicable to YUV420 P...
int(LIB_API * PNIPARAMGETKEYVALUE)(char *p_str, char *key, char *value)
ni_retcode_t(LIB_API * PNIFRAMEBUFFERALLOCHWENC)(ni_frame_t *pframe, int video_width, int video_height, int extra_len)
ni_retcode_t(LIB_API * PNIDEVICESESSIONCLOSE)(ni_session_context_t *p_ctx, int eos_received, ni_device_type_t device_type)
PNIRECONFIGINTRAPRD niReconfigIntraprd
PNIAIFRAMEBUFFERALLOC niAiFrameBufferAlloc
PNIGETMINFRAMEDIM niGetMinFrameDim
ni_retcode_t(LIB_API * PNISETFRAMEREFINVALID)(ni_session_context_t *p_ctx, int32_t frame_num)
ni_device_handle_t ni_device_open(const char *p_dev, uint32_t *p_max_io_size_out)
Open device and return device device_handle if successful.
int(LIB_API * PNIPACKETCOPY)(void *p_destination, const void *const p_source, int cur_size, void *p_leftover, int *p_prev_size)
ni_retcode_t ni_encoder_sw_frame_buffer_alloc(bool planar, ni_frame_t *p_frame, int video_width, int video_height, int linesize[], int alignment, int extra_len, bool alignment_2pass_wa)
This API is a wrapper for ni_encoder_frame_buffer_alloc(), used for planar pixel formats,...
PNIDEVICECONFIGQOS niDeviceConfigQos
ni_session_context_t * ni_device_session_context_alloc_init(void)
Allocate and initialize a new ni_session_context_t struct.
ni_retcode_t ni_reconfig_framerate(ni_session_context_t *p_ctx, ni_framerate_t *framerate)
Reconfigure framerate dynamically during encoding.
int(LIB_API * PNIREMOVEEMULATIONPREVENTBYTES)(uint8_t *buf, int size)
ni_retcode_t(LIB_API * PNIQUERYTEMPERATURE)(ni_device_handle_t device_handle, ni_device_temp_t *p_dev_temp, uint8_t fw_rev[])
PNISETLTRINTERVAL niSetLtrInterval
PNIRETRIEVEXCODERGOP niRetrieveXcoderGop
PNIDEVICEDECSESSIONSAVEHDRS niDeviceDecSessionSaveHdrs
int ni_retrieve_xcoder_params(char xcoderParams[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
retrieve encoder config parameter values from –xcoder-params
ni_retcode_t(LIB_API * PNIDEVICESESSIONQUERYBUFFERAVAIL)(ni_session_context_t *p_ctx, ni_device_type_t device_type)
ni_retcode_t(LIB_API * PNIDEVICESESSIONFLUSH)(ni_session_context_t *p_ctx, ni_device_type_t device_type)
uint64_t ni_gettime_ns(void)
int(LIB_API * PNIDEVICESESSIONREADHWDESC)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
int ni_enc_write_from_yuv_buffer(ni_session_context_t *p_ctx, ni_frame_t *p_enc_frame, uint8_t *p_yuv_buffer)
Send an input data frame to the encoder with YUV data given in the inputs.
char *(LIB_API * PNISTRTOK)(char *s, const char *delim, char **saveptr)
PNIPTHREADCONDBROADCAST niPthreadCondBroadcast
ni_retcode_t(LIB_API * PNIQUERYNVMESTATUS)(ni_session_context_t *p_ctx, ni_load_query_t *p_load_query)
ni_retcode_t(LIB_API * PNIDEVICECAPABILITYQUERY)(ni_device_handle_t device_handle, ni_device_capability_t *p_cap)
ni_retcode_t(LIB_API * PNIUPLOADERP2PTESTSEND)(ni_session_context_t *p_upl_ctx, uint8_t *p_data, uint32_t len, ni_frame_t *p_hwframe)
ni_retcode_t ni_set_frame_ref_invalid(ni_session_context_t *p_ctx, int32_t frame_num)
Set frame reference invalidation.
PNIGETCOMPATFWAPIVER niGetCompatFwApiVer
PNIUPLOADERFRAMEBUFFERLOCK niUploaderFrameBufferLock
ni_retcode_t(LIB_API * PNIAIPACKETBUFFERALLOC)(ni_packet_t *p_packet, ni_network_data_t *p_network)
PNISCALERDESTFRAMEALLOC niScalerDestFrameAlloc
Audio/video related utility definitions.
int ni_pthread_cond_destroy(ni_pthread_cond_t *cond)
destroy condition variables
ni_retcode_t ni_reconfig_crf(ni_session_context_t *p_ctx, int32_t crf)
Reconfigure crf value dynamically during encoding.
enum _ni_frame_aux_data_type ni_aux_data_type_t
void(LIB_API * PNICLOSEEVENT)(ni_event_handle_t event_handle)
ni_retcode_t ni_packet_buffer_free(ni_packet_t *p_packet)
Free packet buffer that was previously allocated with ni_packet_buffer_alloc.
int(LIB_API * PNIEXTRACTCUSTOMSEI)(uint8_t *pkt_data, int pkt_size, long index, ni_packet_t *p_packet, uint8_t sei_type, int vcl_found)
ni_retcode_t ni_scaler_set_drawbox_params(ni_session_context_t *p_ctx, ni_scaler_drawbox_params_t *p_params)
Send a p_config command to configure scaling drawbox parameters.
PNIFMTFWAPIVERSTR niFmtFwApiVerStr
void ni_close_event(ni_event_handle_t event_handle)
Close event and release resources (Windows only)
int(LIB_API * PNIDEVICESESSIONHWUP)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_src_data, niFrameSurface1_t *hwdesc)
ni_retcode_t ni_device_dec_session_flush(ni_session_context_t *p_ctx)
Flush a decoder session to get ready to continue decoding. Note: this is different from ni_device_ses...
ni_retcode_t ni_uploader_frame_buffer_lock(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
Lock a hardware P2P frame prior to encoding.
PNIFRAMEBUFFERALLOC niFrameBufferAlloc
PNIDEVICESESSIONQUERYBUFFERAVAIL niDeviceSessionQueryBufferAvail
ni_retcode_t ni_encoder_frame_zerocopy_check(ni_session_context_t *p_enc_ctx, ni_xcoder_params_t *p_enc_params, int width, int height, const int linesize[], bool set_linesize)
Check if incoming frame is encoder zero copy compatible or not.
ni_retcode_t(LIB_API * PNIDEVICEALLOCDSTFRAME)(ni_session_context_t *p_ctx, niFrameSurface1_t *p_out_surface, ni_device_type_t device_type)
static void NiLibxcoderAPICreateInstance(void *lib, NETINT_LIBXCODER_API_FUNCTION_LIST *functionList)
PNIEXTRACTCUSTOMSEI niExtractCustomSei
PNIGETLIBXCODERRELEASEVER niGetLibxcoderReleaseVer
ni_retcode_t(LIB_API * PNIDEVICECONFIGNAMESPACENUM)(ni_device_handle_t device_handle, uint32_t namespace_num, uint32_t sriov_index)
PNIENCODERFRAMEZEROCOPYBUFFERALLOC niEncoderFrameZerocopyBufferAlloc
PNIENCPREPRECONFDEMODATA niEncPrepReconfDemoData
PNIDEVICESESSIONRESTART niDeviceSessionRestart
void ni_copy_hw_descriptors(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS])
Copy Descriptor data to Netint HW descriptor frame layout to be sent to encoder for encoding....
PNIFRAMEBUFFERALLOCNV niFrameBufferAllocNv
int ni_pthread_cond_signal(ni_pthread_cond_t *cond)
signal a condition
PNIDECPACKETPARSE niDecPacketParse
PNIFRAMENEWAUXDATA niFrameNewAuxData
ni_retcode_t ni_query_nvme_status(ni_session_context_t *p_ctx, ni_load_query_t *p_load_query)
Query NVMe load from the device.
PNIRECONFIGMAXFRAMESIZE niReconfigMaxFrameSize
ni_retcode_t ni_ai_config_hvsplus(ni_session_context_t *p_ctx, ni_network_data_t *p_network)
configure a hvsplus filter
void(LIB_API * PNIGOPPARAMSCHECKSET)(ni_xcoder_params_t *p_param, char *value)
PNIENCINSERTTIMECODE niEncInsertTimecode
PNISCALERSETDRAWBOXPARAMS niScalerSetDrawboxParams
PNISCALERP2PFRAMEACQUIRE niScalerP2PFrameAcquire
ni_retcode_t ni_reconfig_vbv_value(ni_session_context_t *p_ctx, int32_t vbvMaxRate, int32_t vbvBufferSize)
Reconfigure vbv buffer size and vbv max rate dynamically during encoding.
ni_retcode_t(LIB_API * PNIDECODERPARAMSSETVALUE)(ni_xcoder_params_t *p_params, const char *name, char *value)
ni_retcode_t(LIB_API * PNIQUERYEXTRAINFO)(ni_device_handle_t device_handle, ni_device_extra_info_t *p_dev_extra_info, uint8_t fw_rev[])
PNIRECONFIGPPUOUTPUT niReconfigPpuOutput
ni_retcode_t(LIB_API * PNISCALERSETDRAWBOXPARAMS)(ni_session_context_t *p_ctx, ni_scaler_drawbox_params_t *p_params)
PNISETFRAMEREFINVALID niSetFrameRefInvalid
const char * ni_ai_errno_to_str(int rc)
return error string according to error code from firmware
PNIQUERYEXTRAINFO niQueryExtraInfo
PNIHWFRAMEBUFFERRECYCLE2 niHwframeBufferRecycle2
PNIFRAMEBUFFERFREE niFrameBufferFree
ni_retcode_t(LIB_API * PNIDEVICESESSIONQUERYDETAIL)(ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_detail_status_t *detail_data)
PNIRECONFIGMAXFRAMESIZERATIO niReconfigMaxFrameSizeRatio
int(LIB_API * PNIPTHREADMUTEXINIT)(ni_pthread_mutex_t *mutex)
ni_retcode_t ni_device_config_frame(ni_session_context_t *p_ctx, ni_frame_config_t *p_cfg)
Configure the 2D engine to work based on provided parameters.
void(LIB_API * PNIFRAMEWIPEAUXDATA)(ni_frame_t *frame)
ni_retcode_t(LIB_API * PNIDEVICESESSIONQUERY)(ni_session_context_t *p_ctx, ni_device_type_t device_type)
int(LIB_API * PNIPTHREADCONDINIT)(ni_pthread_cond_t *cond, const ni_pthread_condattr_t *attr)
PNIAICONFIGNETWORKBINARY niAiConfigNetworkBinary
bool(LIB_API * PNIGOPPARAMSCHECK)(ni_xcoder_params_t *p_param)
ni_retcode_t(LIB_API * PNIAISESSIONREADMETRICS)(ni_session_context_t *p_ctx, ni_network_perf_metrics_t *p_metrics)
ni_retcode_t(LIB_API * PNIUPLOADERFRAMEBUFFERLOCK)(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
ni_aux_data_t *(LIB_API * PNIFRAMEGETAUXDATA)(const ni_frame_t *frame, ni_aux_data_type_t type)
void(LIB_API * PNIGETHWYUV420PDIM)(int width, int height, int bit_depth_factor, int is_semiplanar, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
void ni_copy_hw_yuv420p(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int frame_width, int frame_height, int factor, int is_semiplanar, int conf_win_right, int dst_stride[NI_MAX_NUM_DATA_POINTERS], int dst_height[NI_MAX_NUM_DATA_POINTERS], int src_stride[NI_MAX_NUM_DATA_POINTERS], int src_height[NI_MAX_NUM_DATA_POINTERS])
Copy YUV data to Netint HW YUV420p frame layout to be sent to encoder for encoding....
ni_retcode_t ni_reconfig_crf2(ni_session_context_t *p_ctx, float crf)
Reconfigure crf float point value dynamically during encoding.
PNIPTHREADCONDDESTROY niPthreadCondDestroy
ni_retcode_t(LIB_API * PNIRECONFIGVBVVALUE)(ni_session_context_t *p_ctx, int32_t vbvMaxRate, int32_t vbvBufferSize)
PNIRECONFIGCRF2 niReconfigCrf2
int ni_pthread_cond_wait(ni_pthread_cond_t *cond, ni_pthread_mutex_t *mutex)
wait on a condition
PNIPTHREADCONDSIGNAL niPthreadCondSignal
int ni_cmp_fw_api_ver(const char ver1[], const char ver2[])
Compare two 3 character strings containing a FW API version. Handle comparision when FW API version f...
ni_retcode_t ni_scaler_input_frame_alloc(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params, niFrameSurface1_t *p_src_surface)
allocate device input frame by hw descriptor. This call won't actually allocate a frame but sends the...
ni_retcode_t ni_device_clone_hwframe(ni_session_context_t *p_ctx, ni_frameclone_desc_t *p_frameclone_desc)
Copy the data of src hwframe to dst hwframe.
int(LIB_API * PNIPTHREADMUTEXDESTROY)(ni_pthread_mutex_t *mutex)
PNIRETRIEVEDECODERPARAMS niRetrieveDecoderParams
PNIENCODERSESSIONREADSTREAMHEADER niEncoderSessionReadStreamHeader
void(LIB_API * PNICOPYFRAMEDATA)(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int frame_width, int frame_height, int factor, ni_pix_fmt_t pix_fmt, int conf_win_right, int dst_stride[NI_MAX_NUM_DATA_POINTERS], int dst_height[NI_MAX_NUM_DATA_POINTERS], int src_stride[NI_MAX_NUM_DATA_POINTERS], int src_height[NI_MAX_NUM_DATA_POINTERS])
ni_retcode_t ni_uploader_frame_buffer_unlock(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
Unlock a hardware P2P frame after encoding.
uint64_t(LIB_API * PNIGETTIMENS)(void)
int ni_pthread_join(ni_pthread_t thread, void **value_ptr)
join with a terminated thread
void ni_enc_prep_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, int should_send_sei_with_frame, uint8_t *mdcv_data, uint8_t *cll_data, uint8_t *cc_data, uint8_t *udu_data, uint8_t *hdrp_data)
Prepare auxiliary data that should be sent together with this frame to encoder based on the auxiliary...
ni_retcode_t ni_packet_buffer_alloc(ni_packet_t *p_packet, int packet_size)
Allocate memory for the packet buffer based on provided packet size.
PNIDEVICECONFIGNAMESPACENUM niDeviceConfigNamespaceNum
ni_aux_data_t * ni_frame_new_aux_data(ni_frame_t *frame, ni_aux_data_type_t type, int data_size)
Add a new auxiliary data to a frame.
PNIENCODERINITDEFAULTPARAMS niEncoderInitDefaultParams
ni_retcode_t(LIB_API * PNISCALERP2PFRAMEACQUIRE)(ni_session_context_t *p_ctx, niFrameSurface1_t *p_surface, int data_len)
int(LIB_API * PNIPTHREADCONDWAIT)(ni_pthread_cond_t *cond, ni_pthread_mutex_t *mutex)
ni_retcode_t(LIB_API * PNIRECONFIGCRF)(ni_session_context_t *p_ctx, int32_t crf)
ni_retcode_t(LIB_API * PNIENCODERFRAMEZEROCOPYCHECK)(ni_session_context_t *p_enc_ctx, ni_xcoder_params_t *p_enc_params, int width, int height, const int linesize[], bool set_linesize)
int(LIB_API * PNIPTHREADCONDDESTROY)(ni_pthread_cond_t *cond)
ni_retcode_t(LIB_API * PNIPACKETBUFFERFREE)(ni_packet_t *ppacket)
PNIDEVICESESSIONCONTEXTINIT niDeviceSessionContextInit
ni_retcode_t ni_scaler_dest_frame_alloc(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params, niFrameSurface1_t *p_surface)
allocate device destination frame from scaler hwframe pool
PNIFRAMEFREEAUXDATA niFrameFreeAuxData
int(LIB_API * PNIPTHREADMUTEXLOCK)(ni_pthread_mutex_t *mutex)
void(LIB_API * PNIDEVICECLOSE)(ni_device_handle_t dev)
int(LIB_API * PNIPTHREADCONDSIGNAL)(ni_pthread_cond_t *cond)
PNISCALERSETWATERMARKPARAMS niScalerSetWatermarkParams
ni_retcode_t ni_device_config_namespace_num(ni_device_handle_t device_handle, uint32_t namespace_num, uint32_t sriov_index)
Send namespace num and SRIOv index to the device with specified logic block address.
PNIPACKETBUFFERFREE niPacketBufferFree
PNIRECONFIGSLICEARG niReconfigSliceArg
PNICOPYHWYUV420P niCopyHwYuv420P
ni_retcode_t(LIB_API * PNIRECONFIGBITRATE)(ni_session_context_t *p_ctx, int32_t bitrate)
uint8_t udu_data[NI_MAX_SEI_DATA]
char * ni_get_libxcoder_api_ver(void)
Get libxcoder API version.
uint32_t(LIB_API * PNIAINETWORKLAYERSIZE)(ni_network_layer_params_t *p_param)
PNIDEVICESESSIONHWUP niDeviceSessionHwup
int ni_device_session_acquire(ni_session_context_t *p_ctx, ni_frame_t *p_frame)
Acquire a P2P frame buffer from the hwupload session.
ni_retcode_t ni_query_extra_info(ni_device_handle_t device_handle, ni_device_extra_info_t *p_dev_extra_info, uint8_t fw_rev[])
Query CompositeTemp from device.
PNIDEVICESESSIONOPEN niDeviceSessionOpen
PNIDECRETRIEVEAUXDATA niDecRetrieveAuxData
ni_retcode_t ni_decoder_frame_buffer_alloc(ni_buf_pool_t *p_pool, ni_frame_t *p_frame, int alloc_mem, int video_width, int video_height, int alignment, int factor, int is_planar)
Allocate memory for decoder frame buffer based on provided parameters; the memory is retrieved from a...
ni_retcode_t(LIB_API * PNIQUERYFLFWVERSIONS)(ni_device_handle_t device_handle, ni_device_info_t *p_dev_info)
PNIUPLOADERP2PTESTLOAD niUploaderP2PTestLoad
PNISETDEMOROIMAP niSetDemoRoiMap
ni_retcode_t ni_ai_packet_buffer_alloc(ni_packet_t *p_packet, ni_network_data_t *p_network)
Allocate output layers memory for the packet buffer based on provided network.
ni_retcode_t ni_device_session_query_detail_v1(ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_detail_status_v1_t *detail_data)
Query detail session data from the device - If device_type is valid, will query session data from spe...
PNICREATEEVENT niCreateEvent
PNIDEVICEDECSESSIONFLUSH niDeviceDecSessionFlush
PNIDEVICECAPABILITYQUERY niDeviceCapabilityQuery
ni_retcode_t ni_encoder_gop_params_set_value(ni_xcoder_params_t *p_params, const char *name, const char *value)
Set GOP parameter value referenced by name in encoder parameters structure.
int(LIB_API * PNIDECPACKETPARSE)(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, uint8_t *data, int size, ni_packet_t *p_packet, int low_delay, int codec_format, int pkt_nal_bitmap, int custom_sei_type, int *svct_skip_next_packet, int *is_lone_sei_pkt)
void(LIB_API * PNICOPYHWDESCRIPTORS)(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS])
PNIDEVICESESSIONHWDL niDeviceSessionHwdl
ni_retcode_t(LIB_API * PNIENCODERINITDEFAULTPARAMS)(ni_xcoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height, ni_codec_format_t codec_format)
int(LIB_API * PNIDEVICESESSIONWRITE)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
PNIENCCOPYAUXDATA niEncCopyAuxData
ni_retcode_t(LIB_API * PNIFRAMEBUFFERFREE)(ni_frame_t *pframe)
PNIENCODERPARAMSSETVALUE niEncoderParamsSetValue
PNIUPLOADERFRAMEZEROCOPYCHECK niUploaderFrameZerocopyCheck
PNIFRAMEGETAUXDATA niFrameGetAuxData
int ni_device_session_hwup(ni_session_context_t *p_ctx, ni_session_data_io_t *p_src_data, niFrameSurface1_t *hwdesc)
Sends raw YUV input to uploader instance and retrieves a HW descriptor to represent it.
PNIAIPACKETBUFFERALLOC niAiPacketBufferAlloc
ni_retcode_t(LIB_API * PNIDECODERFRAMEBUFFERFREE)(ni_frame_t *pframe)
PNIUPLOADERSETFRAMEFORMAT niUploaderSetFrameFormat
void ni_gop_params_check_set(ni_xcoder_params_t *p_param, char *value)
Set custom gop and prepare to check if success.
PNIDEVICESESSIONCONTEXTCLEAR niDeviceSessionContextClear
ni_retcode_t(LIB_API * PNIPACKETBUFFERALLOC)(ni_packet_t *ppacket, int packet_size)
ni_retcode_t ni_encoder_init_default_params(ni_xcoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height, ni_codec_format_t codec_format)
Initialize default encoder parameters.
ni_aux_data_t * ni_frame_new_aux_data_from_raw_data(ni_frame_t *frame, ni_aux_data_type_t type, const uint8_t *raw_data, int data_size)
Add a new auxiliary data to a frame and copy in the raw data.
PNIINSERTEMULATIONPREVENTBYTES niInsertEmulationPreventBytes
PNIGETHWYUV420PDIM niGetHwYuv420PDim
PNIDEVICEALLOCFRAME niDeviceAllocFrame
void ni_calculate_sha256(const uint8_t aui8Data[], size_t ui32DataLength, uint8_t aui8Hash[])
int(LIB_API * PNIENCINSERTTIMECODE)(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_timecode_t *p_timecode)
PNIGETFRAMEDIM niGetFrameDim
ni_retcode_t ni_scaler_frame_pool_alloc(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params)
init output pool of scaler frames
ni_retcode_t ni_network_convert_data_to_tensor(float *dst, uint32_t dst_len, uint8_t *src, uint32_t src_len, ni_network_layer_params_t *p_param)
void(LIB_API * PNIGETFRAMEDIM)(int width, int height, ni_pix_fmt_t pix_fmt, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
int ni_pthread_cond_timedwait(ni_pthread_cond_t *cond, ni_pthread_mutex_t *mutex, const struct timespec *abstime)
wait on a condition
ni_retcode_t(LIB_API * PNIDEVICEDECSESSIONFLUSH)(ni_session_context_t *p_ctx)
int(LIB_API * PNICALCULATETOTALFRAMESIZE)(const ni_session_context_t *p_upl_ctx, const int linesize[])
ni_retcode_t(LIB_API * PNIDEVICECONFIGQOS)(ni_device_handle_t device_handle, uint32_t mode)
struct _NETINT_LIBXCODER_API_FUNCTION_LIST NETINT_LIBXCODER_API_FUNCTION_LIST
PNIPOSIXMEMALIGN niPosixMemalign
ni_retcode_t ni_scaler_set_watermark_params(ni_session_context_t *p_ctx, ni_scaler_watermark_params_t *p_params)
Send a p_config command to configure scaling watermark parameters.
ni_retcode_t(LIB_API * PNINETWORKLAYERCONVERTOUTPUT)(float *dst, uint32_t num, ni_packet_t *p_packet, ni_network_data_t *p_network, uint32_t layer)
int(LIB_API * PNIINSERTEMULATIONPREVENTBYTES)(uint8_t *buf, int size)
int(LIB_API * PNIRECONFIGPPUOUTPUT)(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, ni_ppu_config_t *ppu_config)
int ni_pthread_mutex_lock(ni_pthread_mutex_t *mutex)
thread mutex lock
ni_retcode_t(LIB_API * PNIDEVICESESSIONUPDATEFRAMEPOOL)(ni_session_context_t *p_ctx, uint32_t pool_size)
ni_retcode_t(LIB_API * PNIDEVICECONFIGQOSOP)(ni_device_handle_t device_handle, ni_device_handle_t device_handle_t, uint32_t over_provision)
ni_retcode_t(LIB_API * PNIENCODERSWFRAMEBUFFERALLOC)(bool planar, ni_frame_t *p_frame, int video_width, int video_height, int linesize[], int alignment, int extra_len, bool alignment_2pass_wa)
uint32_t ni_ai_network_layer_dims(ni_network_layer_params_t *p_param)
void(LIB_API * PNIUSLEEP)(int64_t usec)
uint8_t cc_data[NI_MAX_SEI_DATA]
PNIQUERYTEMPERATURE niQueryTemperature
ni_retcode_t ni_ai_session_read_metrics(ni_session_context_t *p_ctx, ni_network_perf_metrics_t *p_metrics)
Fetch perf metrics of inferences from device.
ni_retcode_t ni_decoder_params_set_value(ni_xcoder_params_t *p_params, const char *name, char *value)
Set value referenced by name in decoder parameters structure.
int ni_dec_packet_parse(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, uint8_t *data, int size, ni_packet_t *p_packet, int low_delay, int codec_format, int pkt_nal_bitmap, int custom_sei_type, int *svct_skip_next_packet, int *is_lone_sei_pkt)
Decode parse packet.
ni_retcode_t(LIB_API * PNIRECONFIGFRAMERATE)(ni_session_context_t *p_ctx, ni_framerate_t *framerate)
ni_retcode_t ni_enc_prep_reconf_demo_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_frame)
Convert various reconfig and demo modes (stored in encoder configuration) to aux data and store them ...
void(LIB_API * PNIENCPREPAUXDATA)(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, int should_send_sei_with_frame, uint8_t *mdcv_data, uint8_t *cll_data, uint8_t *cc_data, uint8_t *udu_data, uint8_t *hdrp_data)
ni_retcode_t(LIB_API * PNIRECONFIGCRF2)(ni_session_context_t *p_ctx, float crf)
PNICMPFWAPIVER niCmpFwApiVer
ni_retcode_t(LIB_API * PNISCALERSETPARAMS)(ni_session_context_t *p_ctx, ni_scaler_params_t *p_params)
void(LIB_API * PNIGETMINFRAMEDIM)(int width, int height, ni_pix_fmt_t pix_fmt, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
PNIGETTIMEOFDAY niGettimeofday
ni_retcode_t ni_enc_frame_buffer_alloc(ni_frame_t *p_frame, int video_width, int video_height, int alignment, int metadata_flag, int factor, int hw_frame_count, int is_planar, ni_pix_fmt_t pix_fmt)
Wrapper function for ni_frame_buffer_alloc. Meant to handle RGBA min. resoulution considerations for ...
ni_retcode_t ni_frame_buffer_alloc_pixfmt(ni_frame_t *p_frame, int pixel_format, int video_width, int video_height, int linesize[], int alignment, int extra_len)
Allocate memory for the frame buffer based on provided parameters taking into account the pixel forma...
PNIENCODERFRAMEZEROCOPYCHECK niEncoderFrameZerocopyCheck
ni_retcode_t ni_hwframe_p2p_buffer_recycle(ni_frame_t *p_frame)
Recycle hw P2P frames.
ni_retcode_t(LIB_API * PNIUPLOADERSETFRAMEFORMAT)(ni_session_context_t *p_upl_ctx, int width, int height, ni_pix_fmt_t pixel_format, int isP2P)
PNIPTHREADMUTEXDESTROY niPthreadMutexDestroy
int(LIB_API * PNIPTHREADMUTEXUNLOCK)(ni_pthread_mutex_t *mutex)
PNIGOPPARAMSCHECK niGopParamsCheck
ni_retcode_t(LIB_API * PNIP2PSEND)(ni_session_context_t *pSession, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
ni_retcode_t ni_reconfig_bitrate(ni_session_context_t *p_ctx, int32_t bitrate)
Reconfigure bitrate dynamically during encoding.
ni_retcode_t(LIB_API * PNIRECONFIGINTRAPRD)(ni_session_context_t *p_ctx, int32_t intra_period)
int(LIB_API * PNIDEVICESESSIONACQUIRE)(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
void ni_frame_free_aux_data(ni_frame_t *frame, ni_aux_data_type_t type)
If auxiliary data of the given type exists in the frame, free it and remove it from the frame.
ni_retcode_t ni_packet_buffer_free_av1(ni_packet_t *p_packet)
Free packet buffer that was previously allocated with ni_packet_buffer_alloc for AV1 packets merge.
ni_retcode_t ni_ai_frame_buffer_alloc(ni_frame_t *p_frame, ni_network_data_t *p_network)
Allocate input layers memory for AI frame buffer based on provided parameters taking into account wid...
void ni_fmt_fw_api_ver_str(const char ver_str[], char fmt_str[])
Get formatted FW API version string from unformatted FW API version string.
PNIDECODERPARAMSSETVALUE niDecoderParamsSetValue
ni_retcode_t ni_uploader_set_frame_format(ni_session_context_t *p_upl_ctx, int width, int height, ni_pix_fmt_t pixel_format, int isP2P)
Set the outgoing frame format for the uploader.
void ni_usleep(int64_t usec)
ni_retcode_t ni_query_fl_fw_versions(ni_device_handle_t device_handle, ni_device_info_t *p_dev_info)
Query firmware loader and firmware versions from the device.
PNIDEVICEMULTICONFIGFRAME niDeviceMultiConfigFrame
PNIFRAMEBUFFERALLOCDL niFrameBufferAllocDl
int(LIB_API * PNIRETRIEVEDECODERPARAMS)(char xcoderParams[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
ni_retcode_t ni_encoder_frame_zerocopy_buffer_alloc(ni_frame_t *p_frame, int video_width, int video_height, const int linesize[], const uint8_t *data[], int extra_len)
Allocate memory for encoder zero copy (metadata, etc.) for encoding based on given parameters,...
int ni_packet_copy(void *p_destination, const void *const p_source, int cur_size, void *p_leftover, int *p_prev_size)
Copy video packet accounting for alignment.
PNIENCODERGOPPARAMSSETVALUE niEncoderGopParamsSetValue
int ni_expand_frame(ni_frame_t *dst, ni_frame_t *src, int dst_stride[], int raw_width, int raw_height, int ni_fmt, int nb_planes)
Expand frame form src frame.
PNIRECONFIGMINMAXQP niReconfigMinMaxQp
PNIPTHREADMUTEXINIT niPthreadMutexInit
void(LIB_API * PNIFRAMEFREEAUXDATA)(ni_frame_t *frame, ni_aux_data_type_t type)
PNIPTHREADCONDINIT niPthreadCondInit
void ni_dec_retrieve_aux_data(ni_frame_t *frame)
Retrieve auxiliary data (close caption, various SEI) associated with this frame that is returned by d...
PNIDEVICESESSIONFLUSH niDeviceSessionFlush
char *(LIB_API * PNIGETCOMPATFWAPIVER)(void)
PNIAISESSIONREADMETRICS niAiSessionReadMetrics
int ni_pthread_cond_broadcast(ni_pthread_cond_t *cond)
broadcast a condition
void ni_device_session_context_clear(ni_session_context_t *p_ctx)
Clear already allocated session context.
int32_t ni_get_dma_buf_file_descriptor(const ni_frame_t *p_frame)
Get the DMA buffer file descriptor from the P2P frame.
int32_t(LIB_API * PNIGETDMABUFFILEDESCRIPTOR)(const ni_frame_t *p_frame)
ni_retcode_t(LIB_API * PNIUPLOADERFRAMEZEROCOPYCHECK)(ni_session_context_t *p_upl_ctx, int width, int height, const int linesize[], int pixel_format)
void(LIB_API * PNIDEVICESESSIONCONTEXTCLEAR)(ni_session_context_t *p_ctx)
PNIRECONFIGVBVVALUE niReconfigVbvValue
void ni_get_frame_dim(int width, int height, ni_pix_fmt_t pix_fmt, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
Get dimension information of frame to be sent to encoder for encoding. Caller usually retrieves this ...
ni_retcode_t(LIB_API * PNIDEVICEDECSESSIONSAVEHDRS)(ni_session_context_t *p_ctx, uint8_t *hdr_data, uint8_t hdr_size)
ni_retcode_t(LIB_API * PNIFRAMEBUFFERALLOCNV)(ni_frame_t *p_frame, int video_width, int video_height, int linesize[], int extra_len, bool alignment_2pass_wa)
ni_retcode_t(LIB_API * PNIFRAMEBUFFERALLOCDL)(ni_frame_t *p_frame, int video_width, int video_height, int pixel_format)
PNIDEVICESESSIONCOPY niDeviceSessionCopy
ni_retcode_t ni_encoder_set_input_frame_format(ni_session_context_t *p_enc_ctx, ni_xcoder_params_t *p_enc_params, int width, int height, int bit_depth, int src_endian, int planar)
Set the incoming frame format for the encoder.
ni_session_context_t *(LIB_API * PNIDEVICESESSIONCONTEXTALLOCINIT)(void)
int ni_pthread_create(ni_pthread_t *thread, const ni_pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
create a new thread
ni_retcode_t ni_hwframe_buffer_recycle2(niFrameSurface1_t *surface)
Recycle a frame buffer on card, only hwframe descriptor is needed.
ni_retcode_t ni_device_config_qos(ni_device_handle_t device_handle, uint32_t mode)
Send qos mode to the device with specified logic block address.
PNICLOSEEVENT niCloseEvent
ni_retcode_t ni_device_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, ni_device_type_t device_type)
Allocate a frame on the device for 2D engine or AI engine to work on based on provided parameters.
ni_retcode_t ni_decoder_init_default_params(ni_xcoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height)
Initialize default decoder parameters.
PNIDEVICESESSIONQUERY niDeviceSessionQuery
ni_retcode_t(LIB_API * PNISCALERSETWATERMARKPARAMS)(ni_session_context_t *p_ctx, ni_scaler_watermark_params_t *p_params)
PNIDEVICESESSIONACQUIRE niDeviceSessionAcquire
ni_retcode_t(LIB_API * PNINETWORKCONVERTTENSORTODATA)(uint8_t *dst, uint32_t dst_len, float *src, uint32_t src_len, ni_network_layer_params_t *p_param)
NI_DEPRECATED ni_retcode_t ni_p2p_xfer(ni_session_context_t *pSession, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
Initiate P2P transfer (P2P write) (deprecated)
int ni_param_get_key_value(char *p_str, char *key, char *value)
retrieve key and value from 'key=value' pair
int(LIB_API * PNIPOSIXMEMALIGN)(void **memptr, size_t alignment, size_t size)
PNIAINETWORKLAYERSIZE niAiNetworkLayerSize
ni_retcode_t ni_device_session_query_detail(ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_detail_status_t *detail_data)
Query detail session data from the device - If device_type is valid, will query session data from spe...
int ni_device_session_read(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
Read data from the device If device_type is NI_DEVICE_TYPE_DECODER reads data packet from decoder If ...
PNIRETRIEVEXCODERPARAMS niRetrieveXcoderParams
PNIDEVICESESSIONSEQUENCECHANGE niDeviceSessionSequenceChange
ni_retcode_t ni_frame_buffer_alloc_hwenc(ni_frame_t *p_frame, int video_width, int video_height, int extra_len)
Allocate memory for the hwDescriptor buffer based on provided parameters taking into account pic size...
#define NI_MAX_NUM_DATA_POINTERS
ni_retcode_t ni_device_session_restart(ni_session_context_t *p_ctx, int video_width, int video_height, ni_device_type_t device_type)
Send a restart command after flush command Only support Encoder now.
int(LIB_API * PNIDEVICESESSIONREAD)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
ni_retcode_t(LIB_API * PNIRECONFIGVUI)(ni_session_context_t *p_ctx, ni_vui_hrd_t *vui)
int ni_pthread_mutex_init(ni_pthread_mutex_t *mutex)
initialize a mutex
int ni_pthread_sigmask(int how, const ni_sigset_t *set, ni_sigset_t *oldset)
examine and change mask of blocked signals
ni_retcode_t ni_device_session_open(ni_session_context_t *p_ctx, ni_device_type_t device_type)
Open a new device session depending on the device_type parameter If device_type is NI_DEVICE_TYPE_DEC...
const typedef char *LIB_API * PNIGETRCTXT(ni_retcode_t rc)
void ni_device_session_context_free(ni_session_context_t *p_ctx)
Free previously allocated session context.
int ni_reconfig_ppu_output(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, ni_ppu_config_t *ppu_config)
Reset decoder ppu resolution.
ni_retcode_t(LIB_API * PNIDEVICECLONEHWFRAME)(ni_session_context_t *p_ctx, ni_frameclone_desc_t *p_frameclone_desc)
ni_retcode_t(LIB_API * PNIUPLOADERFRAMEBUFFERUNLOCK)(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
PNIRECONFIGVUI niReconfigVui
ni_retcode_t ni_network_convert_tensor_to_data(uint8_t *dst, uint32_t dst_len, float *src, uint32_t src_len, ni_network_layer_params_t *p_param)
ni_retcode_t(LIB_API * PNIENCODERFRAMEZEROCOPYBUFFERALLOC)(ni_frame_t *p_frame, int video_width, int video_height, const int linesize[], const uint8_t *data[], int extra_len)
char * ni_strtok(char *s, const char *delim, char **saveptr)
ni_retcode_t(LIB_API * PNIHWFRAMEBUFFERRECYCLE)(niFrameSurface1_t *surface, int32_t device_handle)
ni_retcode_t ni_device_session_copy(ni_session_context_t *src_p_ctx, ni_session_context_t *dst_p_ctx)
Copy existing decoding session params for hw frame usage.
PNIDECODERFRAMEBUFFERPOOLRETURNBUF niDecoderFrameBufferPoolReturnBuf
ni_retcode_t ni_reconfig_max_frame_size(ni_session_context_t *p_ctx, int32_t max_frame_size)
Reconfigure maxFrameSize dynamically during encoding.
PNISHOULDSENDSEIWITHFRAME niShouldSendSeiWithFrame
ni_retcode_t(LIB_API * PNIENCPREPRECONFDEMODATA)(ni_session_context_t *p_enc_ctx, ni_frame_t *p_frame)
ni_retcode_t ni_device_dec_session_save_hdrs(ni_session_context_t *p_ctx, uint8_t *hdr_data, uint8_t hdr_size)
Save a stream's headers in a decoder session that can be used later for continuous decoding from the ...
ni_retcode_t(LIB_API * PNIP2PXFER)(ni_session_context_t *pSession, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
char *(LIB_API * PNIGETLIBXCODERRELEASEVER)(void)
PNICOPYHWDESCRIPTORS niCopyHwDescriptors
PNIDEVICECAPABILITYQUERY2 niDeviceCapabilityQuery2
int(LIB_API * PNIDEVICESESSIONACQUIREFORREAD)(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
void ni_get_min_frame_dim(int width, int height, ni_pix_fmt_t pix_fmt, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
Get dimension information of frame to be sent to encoder for encoding. Caller usually retrieves this ...
PNISCALERSETPARAMS niScalerSetParams
ni_retcode_t(LIB_API * PNIENCFRAMEBUFFERALLOC)(ni_frame_t *p_frame, int video_width, int video_height, int alignment, int metadata_flag, int factor, int hw_frame_count, int is_planar, ni_pix_fmt_t pix_fmt)
ni_retcode_t(LIB_API * PNIFRAMEBUFFERALLOC)(ni_frame_t *p_frame, int video_width, int video_height, int alignment, int metadata_flag, int factor, int hw_frame_count, int is_planar)
PNIDEVICEOPEN niDeviceOpen
ni_retcode_t(LIB_API * PNIHWFRAMEBUFFERRECYCLE2)(niFrameSurface1_t *surface)
ni_retcode_t(LIB_API * PNIDEVICESESSIONCONTEXTINIT)(ni_session_context_t *p_ctx)
ni_retcode_t ni_reconfig_max_frame_size_ratio(ni_session_context_t *p_ctx, int32_t max_frame_size_ratio)
Reconfigure maxFrameSizeRatio dynamically during encoding.
ni_retcode_t ni_reconfig_vui(ni_session_context_t *p_ctx, ni_vui_hrd_t *vui)
Reconfigure VUI HRD dynamically during encoding.
void ni_copy_frame_data(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int frame_width, int frame_height, int factor, ni_pix_fmt_t pix_fmt, int conf_win_right, int dst_stride[NI_MAX_NUM_DATA_POINTERS], int dst_height[NI_MAX_NUM_DATA_POINTERS], int src_stride[NI_MAX_NUM_DATA_POINTERS], int src_height[NI_MAX_NUM_DATA_POINTERS])
Copy RGBA or YUV data to Netint HW frame layout to be sent to encoder for encoding....
PNICOPYFRAMEDATA niCopyFrameData
int ni_posix_memalign(void **memptr, size_t alignment, size_t size)
Allocate aligned memory.
ni_retcode_t(LIB_API * PNIHWFRAMEP2PBUFFERRECYCLE)(ni_frame_t *p_frame)
ni_retcode_t(LIB_API * PNINETWORKCONVERTDATATOTENSOR)(float *dst, uint32_t dst_len, uint8_t *src, uint32_t src_len, ni_network_layer_params_t *p_param)
ni_retcode_t ni_device_alloc_dst_frame(ni_session_context_t *p_ctx, niFrameSurface1_t *p_out_surface, ni_device_type_t device_type)
Allocate a frame on the device and return the frame index.
ni_retcode_t(LIB_API * PNIDEVICEMULTICONFIGFRAME)(ni_session_context_t *p_ctx, ni_frame_config_t p_cfg_in[], int numInCfgs, ni_frame_config_t *p_cfg_out)
PNIDEVICESESSIONINITFRAMEPOOL niDeviceSessionInitFramepool
int32_t(LIB_API * PNIGETTIMEOFDAY)(struct timeval *p_tp, void *p_tzp)
int ni_calculate_total_frame_size(const ni_session_context_t *p_upl_ctx, const int linesize[])
Calculate the total size of a frame based on the upload context attributes and includes rounding up t...
int(LIB_API * PNIRETRIEVEXCODERPARAMS)(char xcoderParams[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
ni_retcode_t(LIB_API * PNIPACKETBUFFERFREEAV1)(ni_packet_t *ppacket)
ni_retcode_t ni_set_ltr_interval(ni_session_context_t *p_ctx, int32_t ltr_interval)
Set Long Term Reference interval.
uint8_t mdcv_data[NI_MAX_SEI_DATA]
PNIDEVICEALLOCDSTFRAME niDeviceAllocDstFrame
ni_retcode_t(LIB_API * PNIDECODERINITDEFAULTPARAMS)(ni_xcoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height)
PNIAICONFIGHVSPLUS niAiConfigHvsplus
int(LIB_API * PNICMPFWAPIVER)(const char ver1[], const char ver2[])
ni_retcode_t(LIB_API * PNIENCODERGOPPARAMSSETVALUE)(ni_xcoder_params_t *p_params, const char *name, const char *value)
int ni_device_session_acquire_for_read(ni_session_context_t *p_ctx, ni_frame_t *p_frame)
Acquire a P2P frame buffer from the hwupload session for P2P read.
PNIDEVICECLONEHWFRAME niDeviceCloneHwframe
int ni_extract_custom_sei(uint8_t *pkt_data, int pkt_size, long index, ni_packet_t *p_packet, uint8_t sei_type, int vcl_found)
Extract custom sei payload data from pkt_data, and save it to ni_packet_t.
ni_retcode_t(LIB_API * PNIDEVICESESSIONOPEN)(ni_session_context_t *p_ctx, ni_device_type_t device_type)
ni_retcode_t ni_query_temperature(ni_device_handle_t device_handle, ni_device_temp_t *p_dev_temp, uint8_t fw_rev[])
Query CompositeTemp from device.
ni_retcode_t(LIB_API * PNIRECONFIGMINMAXQP)(ni_session_context_t *p_ctx, ni_rc_min_max_qp *p_min_max_qp)
PNICALCULATESHA256 niCalculateSha256
ni_retcode_t ni_encoder_frame_buffer_alloc(ni_frame_t *p_frame, int video_width, int video_height, int linesize[], int alignment, int extra_len, bool alignment_2pass_wa)
Allocate memory for the frame buffer for encoding based on given parameters, taking into account pic ...
PNIDEVICESESSIONQUERYDETAIL niDeviceSessionQueryDetail
ni_retcode_t(LIB_API * PNIQUERYVFNSID)(ni_device_handle_t device_handle, ni_device_vf_ns_id_t *p_dev_ns_vf, uint8_t fw_rev[])
ni_retcode_t(LIB_API * PNIAIFRAMEBUFFERALLOC)(ni_frame_t *p_frame, ni_network_data_t *p_network)
ni_event_handle_t ni_create_event(void)
Create event and return event handle if successful (Windows only)
PNIFRAMEWIPEAUXDATA niFrameWipeAuxData
int ni_insert_emulation_prevent_bytes(uint8_t *buf, int size)
Insert emulation prevention byte(s) as needed into the data buffer.
void ni_get_hw_yuv420p_dim(int width, int height, int factor, int is_semiplanar, int plane_stride[NI_MAX_NUM_DATA_POINTERS], int plane_height[NI_MAX_NUM_DATA_POINTERS])
Get dimension information of Netint HW YUV420p frame to be sent to encoder for encoding....
PNIDEVICESESSIONWRITE niDeviceSessionWrite
PNIDEVICESESSIONACQUIREFORREAD niDeviceSessionAcquireForRead
ni_retcode_t ni_custom_packet_buffer_alloc(void *p_buffer, ni_packet_t *p_packet, int buffer_size)
Allocate packet buffer using a user provided pointer, the memory is expected to have already been all...
ni_retcode_t ni_reconfig_min_max_qp(ni_session_context_t *p_ctx, ni_rc_min_max_qp *p_min_max_qp)
Reconfigure min&max qp dynamically during encoding.
PNIUPLOADERP2PTESTSEND niUploaderP2PTestSend
PNIENCFRAMEBUFFERALLOC niEncFrameBufferAlloc
ni_retcode_t(LIB_API * PNIDEVICECONFIGFRAME)(ni_session_context_t *p_ctx, ni_frame_config_t *p_cfg)
void(LIB_API * PNIDECRETRIEVEAUXDATA)(ni_frame_t *frame)
PNISCALERINPUTFRAMEALLOC niScalerInputFrameAlloc
int(LIB_API * PNIDEVICESESSIONINITFRAMEPOOL)(ni_session_context_t *p_ctx, uint32_t pool_size, uint32_t pool)
int ni_pthread_mutex_destroy(ni_pthread_mutex_t *mutex)
destory a mutex
ni_retcode_t ni_device_session_query_buffer_avail(ni_session_context_t *p_ctx, ni_device_type_t device_type)
Query the session if a buffer is available.
ni_retcode_t ni_p2p_recv(ni_session_context_t *pSession, const ni_p2p_sgl_t *dmaAddrs, ni_frame_t *pDstFrame)
Initiate a P2P transfer (P2P read)
ni_retcode_t(LIB_API * PNIDECODERFRAMEBUFFERALLOC)(ni_buf_pool_t *p_pool, ni_frame_t *pframe, int alloc_mem, int video_width, int video_height, int alignment, int factor, int is_planar)
char * ni_get_libxcoder_release_ver(void)
Get libxcoder SW release version.
bool ni_gop_params_check(ni_xcoder_params_t *p_param)
Check custom gop params set.
PNICOPYYUV444PTO420P niCopyYuv444PTo420P
PNIRECONFIGFRAMERATE niReconfigFramerate
PNIDEVICESESSIONREADHWDESC niDeviceSessionReadHwdesc
PNIPACKETBUFFERFREEAV1 niPacketBufferFreeAv1
PNIDEVICECONFIGQOSOP niDeviceConfigQosOp
ni_retcode_t(LIB_API * PNISCALERDESTFRAMEALLOC)(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params, niFrameSurface1_t *p_surface)
int ni_device_session_write(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
Sends data to the device If device_type is NI_DEVICE_TYPE_DECODER sends data packet to decoder If dev...
int32_t ni_gettimeofday(struct timeval *p_tp, void *p_tzp)
Get time for logs with microsecond timestamps.
Public definitions for operating NETINT video processing devices for video processing.
PNIDEVICESESSIONCLOSE niDeviceSessionClose
ni_retcode_t ni_hwframe_buffer_recycle(niFrameSurface1_t *surface, int32_t device_handle)
Recycle a frame buffer on card.
ni_retcode_t(LIB_API * PNIDEVICECAPABILITYQUERY2)(ni_device_handle_t device_handle, ni_device_capability_t *p_cap, bool device_in_ctxt)
ni_retcode_t(LIB_API * PNIRECONFIGSLICEARG)(ni_session_context_t *p_ctx, int16_t sliceArg)
PNIPTHREADCONDWAIT niPthreadCondWait
const char * ni_get_rc_txt(ni_retcode_t rc)
Get text string for the provided error.
void(LIB_API * PNIENCCOPYAUXDATA)(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, const uint8_t *mdcv_data, const uint8_t *cll_data, const uint8_t *cc_data, const uint8_t *udu_data, const uint8_t *hdrp_data, int is_hwframe, int is_semiplanar)
PNIPTHREADCONDTIMEDWAIT niPthreadCondTimedwait
PNIDEVICECONFIGFRAME niDeviceConfigFrame
int(LIB_API * PNISHOULDSENDSEIWITHFRAME)(ni_session_context_t *p_enc_ctx, ni_pic_type_t pic_type, ni_xcoder_params_t *p_param)
PNIDEVICESESSIONQUERYDETAILV1 niDeviceSessionQueryDetailV1
PNIEXPANDFRAME niExpandFrame
ni_retcode_t ni_network_layer_convert_tensor(uint8_t *dst, uint32_t dst_len, const char *tensor_file, ni_network_layer_params_t *p_param)
PNISCALERFRAMEPOOLALLOC niScalerFramePoolAlloc
ni_retcode_t ni_device_capability_query2(ni_device_handle_t device_handle, ni_device_capability_t *p_cap, bool device_in_ctxt)
Query device and return device capability structure This function had replaced ni_device_capability_q...
enum _ni_codec_format ni_codec_format_t
This is an enumeration for supported codec formats.
PNIPTHREADSIGMASK niPthreadSigmask
PNIDEVICESESSIONCONTEXTALLOCINIT niDeviceSessionContextAllocInit
ni_retcode_t(LIB_API * PNICUSTOMPACKETBUFFERALLOC)(void *p_buffer, ni_packet_t *p_packet, int buffer_size)
int ni_device_session_hwdl(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, niFrameSurface1_t *hwdesc)
Reads YUV data from hw descriptor stored location on device.
int ni_device_session_read_hwdesc(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
Read data from the device If device_type is NI_DEVICE_TYPE_DECODER reads data hwdesc from decoder If ...
int ni_remove_emulation_prevent_bytes(uint8_t *buf, int size)
Remove emulation prevention byte(s) as needed from the data buffer.
ni_retcode_t(LIB_API * PNIAICONFIGNETWORKBINARY)(ni_session_context_t *p_ctx, ni_network_data_t *p_network, const char *file)
ni_retcode_t(LIB_API * PNIRECONFIGMAXFRAMESIZE)(ni_session_context_t *p_ctx, int32_t max_frame_size)
ni_retcode_t ni_frame_buffer_alloc_dl(ni_frame_t *p_frame, int video_width, int video_height, int pixel_format)
Allocate preliminary memory for the frame buffer based on provided parameters.
ni_retcode_t(LIB_API * PNIDEVICESESSIONRESTART)(ni_session_context_t *p_ctx, int video_width, int video_height, ni_device_type_t device_type)
void(LIB_API * PNICOPYHWYUV420P)(uint8_t *p_dst[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int width, int height, int bit_depth_factor, int is_semiplanar, int conf_win_right, int dst_stride[NI_MAX_NUM_DATA_POINTERS], int dst_height[NI_MAX_NUM_DATA_POINTERS], int src_stride[NI_MAX_NUM_DATA_POINTERS], int src_height[NI_MAX_NUM_DATA_POINTERS])
ni_retcode_t ni_uploader_p2p_test_load(ni_session_context_t *p_upl_ctx, uint8_t *p_data, uint32_t len, ni_frame_t *p_hwframe)
Special P2P test API function. Copies video data from the software frame to the hardware P2P frame on...
PNIPACKETCOPY niPacketCopy
void(LIB_API * PNIDEVICESESSIONCONTEXTFREE)(ni_session_context_t *p_ctx)
ni_retcode_t ni_device_session_flush(ni_session_context_t *p_ctx, ni_device_type_t device_type)
Send a flush command to the device If device_type is NI_DEVICE_TYPE_DECODER sends EOS command to deco...
ni_retcode_t(LIB_API * PNIENCODERPARAMSSETVALUE)(ni_xcoder_params_t *p_params, const char *name, const char *value)
ni_retcode_t(LIB_API * PNISCALERINPUTFRAMEALLOC)(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params, niFrameSurface1_t *p_src_surface)
int ni_should_send_sei_with_frame(ni_session_context_t *p_enc_ctx, ni_pic_type_t pic_type, ni_xcoder_params_t *p_param)
Whether SEI (HDR) should be sent together with this frame to encoder.
ni_device_handle_t(LIB_API * PNIDEVICEOPEN)(const char *dev, uint32_t *p_max_io_size_out)
ni_retcode_t ni_device_session_context_init(ni_session_context_t *p_ctx)
Initialize already allocated session context to a known state.
ni_retcode_t ni_uploader_frame_zerocopy_check(ni_session_context_t *p_upl_ctx, int width, int height, const int linesize[], int pixel_format)
Check if incoming frame is hwupload zero copy compatible or not.
PNIGOPPARAMSCHECKSET niGopParamsCheckSet
ni_retcode_t(LIB_API * PNIAICONFIGHVSPLUS)(ni_session_context_t *p_ctx, ni_network_data_t *p_network)
int ni_device_session_init_framepool(ni_session_context_t *p_ctx, uint32_t pool_size, uint32_t pool)
Sends frame pool setup info to device.
uint8_t hdrp_data[NI_MAX_SEI_DATA]
uint32_t ni_ai_network_layer_size(ni_network_layer_params_t *p_param)
ni_retcode_t(LIB_API * PNIDEVICESESSIONQUERYDETAILV1)(ni_session_context_t *p_ctx, ni_device_type_t device_type, ni_instance_mgr_detail_status_v1_t *detail_data)
int ni_retrieve_decoder_params(char xcoderParams[], ni_xcoder_params_t *params, ni_session_context_t *ctx)
retrieve decoder config parameter values from –decoder-params
int(LIB_API * PNIENCODERSESSIONREADSTREAMHEADER)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data)
PNIDEVICEALLOCANDGETFIRMWARELOGS niDeviceAllocAndGetFirmwareLogs
ni_retcode_t ni_p2p_send(ni_session_context_t *pSession, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
Initiate P2P transfer (P2P write)
PNIDEVICECLOSE niDeviceClose
PNIPACKETBUFFERALLOC niPacketBufferAlloc
ni_retcode_t ni_uploader_p2p_test_send(ni_session_context_t *p_upl_ctx, uint8_t *p_data, uint32_t len, ni_frame_t *p_hwframe)
Special P2P test API function. Copies YUV data from the software frame to the hardware P2P frame on t...
void ni_decoder_frame_buffer_pool_return_buf(ni_buf_t *buf, ni_buf_pool_t *p_buffer_pool)
Return a memory buffer to memory buffer pool.
void ni_copy_yuv_444p_to_420p(uint8_t *p_dst0[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_dst1[NI_MAX_NUM_DATA_POINTERS], uint8_t *p_src[NI_MAX_NUM_DATA_POINTERS], int frame_width, int frame_height, int factor, int mode)
Copy yuv444p data to yuv420p frame layout to be sent to encoder for encoding. Data buffer (dst) is us...
ni_retcode_t(LIB_API * PNISCALERFRAMEPOOLALLOC)(ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params)
ni_retcode_t(LIB_API * PNISETDEMOROIMAP)(ni_session_context_t *p_enc_ctx)
PNIAINETWORKLAYERDIMS niAiNetworkLayerDims
PNICALCULATETOTALFRAMESIZE niCalculateTotalFrameSize
PNIRECONFIGBITRATE niReconfigBitrate
ni_retcode_t ni_device_session_close(ni_session_context_t *p_ctx, int eos_recieved, ni_device_type_t device_type)
Close device session that was previously opened by calling ni_device_session_open() If device_type is...
PNIPTHREADCREATE niPthreadCreate
PNIENCODERSWFRAMEBUFFERALLOC niEncoderSwFrameBufferAlloc
int(LIB_API * PNIDEVICESESSIONHWDL)(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, niFrameSurface1_t *hwdesc)
PNIGETDMABUFFILEDESCRIPTOR niGetDmaBufFileDescriptor
PNIPARAMGETKEYVALUE niParamGetKeyValue
PNIDEVICESESSIONREAD niDeviceSessionRead
PNIQUERYVFNSID niQueryVfNsId
int(LIB_API * PNIENCWRITEFROMYUVBUFFER)(ni_session_context_t *p_ctx, ni_frame_t *p_enc_frame, uint8_t *p_yuv_buffer)
ni_retcode_t ni_set_ltr(ni_session_context_t *p_ctx, ni_long_term_ref_t *ltr)
Set a frame's support of Long Term Reference frame during encoding.
ni_retcode_t(LIB_API * PNIDEVICEALLOCFRAME)(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, ni_device_type_t device_type)
ni_retcode_t ni_decoder_frame_buffer_free(ni_frame_t *p_frame)
Free decoder frame buffer that was previously allocated with ni_decoder_frame_buffer_alloc,...
ni_retcode_t ni_reconfig_slice_arg(ni_session_context_t *p_ctx, int16_t sliceArg)
Reconfigure sliceArg dynamically during encoding.
int(LIB_API * PNIPTHREADCONDBROADCAST)(ni_pthread_cond_t *cond)
void(LIB_API * PNICALCULATESHA256)(const uint8_t aui8Data[], size_t ui32DataLength, uint8_t aui8Hash[])
int(LIB_API * PNIPTHREADCONDTIMEDWAIT)(ni_pthread_cond_t *cond, ni_pthread_mutex_t *mutex, const struct timespec *abstime)
PNIAIERRNOTOSTR niAiErrnoToStr
PNIFRAMEBUFFERALLOCPIXFMT niFrameBufferAllocPixfmt
PNIGETLIBXCODERAPIVER niGetLibxcoderApiVer
void ni_frame_wipe_aux_data(ni_frame_t *frame)
Free and remove all auxiliary data from the frame.
PNINETWORKLAYERCONVERTOUTPUT niNetworkLayerConvertOutput