libxcoder  5.3.1
ni_device_api.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Copyright (C) 2022 NETINT Technologies
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to deal
7  * in the Software without restriction, including without limitation the rights
8  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9  * copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18  * SOFTWARE.
19  *
20  ******************************************************************************/
21 
22 /*!*****************************************************************************
23  * \file ni_device_api.h
24  *
25  * \brief Public definitions for operating NETINT video processing devices for
26  * video processing
27  ******************************************************************************/
28 
29 #pragma once
30 
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
37 #include "ni_defs.h"
38 #include "ni_rsrc_api.h"
39 
40 // resource allocation strategy names
41 #define NI_BEST_MODEL_LOAD_STR "bestmodelload"
42 #define NI_BEST_REAL_LOAD_STR "bestload"
43 
44 #define NI_DATA_FORMAT_VIDEO_PACKET 0
45 #define NI_DATA_FORMAT_YUV_FRAME 1
46 #define NI_DATA_FORMAT_Y_FRAME 2
47 #define NI_DATA_FORMAT_CB_FRAME 3
48 #define NI_DATA_FORMAT_CR_FRAME 4
49 
50 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
51 // If you change this,you should also change NI_QUADRA_NOPTS_VALUE in ni_quadra_filter_api.h
52 #define NI_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
53 
54 // the following are the default values from FFmpeg
55 #define AV_CODEC_DEFAULT_BITRATE 200 * 1000
56 
57 #define NI_MAX_GOP_NUM 8
58 
59 #define NI_MAX_REF_PIC 4
60 
62 #define NI_MAX_VUI_SIZE NI_DEPRECATED_MACRO 32
63 
64 #define NI_MAX_TX_RETRIES 1000
65 
66 #define NI_MAX_ENCODER_QUERY_RETRIES 5000
67 
68 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
69 // If you change this,you should also change NI_QUADRA_MAX_SUPPORT_DRAWBOX_NUM, NI_MAX_SUPPORT_WATERMARK_NUM
70 // in ni_quadra_filter_api.h
71 #define NI_MAX_SUPPORT_DRAWBOX_NUM 5
72 #define NI_MAX_SUPPORT_WATERMARK_NUM 6
73 
74 // Number of pixels for main stream resolutions
75 #define NI_NUM_OF_PIXELS_360P (640*360)
76 #define NI_NUM_OF_PIXELS_720P (1280*720)
77 #define NI_NUM_OF_PIXELS_1080P (1920*1080)
78 #define NI_NUM_OF_PIXELS_1440P (2560*1440)
79 #define NI_NUM_OF_PIXELS_4K (3840*2160)
80 #define NI_NUM_OF_PIXELS_4K_2 (4096*2160)
81 #define NI_NUM_OF_PIXELS_8K (7680*4320)
82 
83 #define NI_MIN_RESOLUTION_WIDTH_JPEG 48
84 #define NI_MIN_RESOLUTION_HEIGHT_JPEG 48
85 
86 #define NI_MIN_RESOLUTION_WIDTH 144
87 #define NI_MIN_RESOLUTION_HEIGHT 144
88 #define NI_ENC_MIN_RESOLUTION_WIDTH 144
89 #define NI_ENC_MIN_RESOLUTION_HEIGHT 128
90 
91 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
92 // If you change this,you should also change NI_MIN_RESOLUTION_WIDTH_SCALER,
93 // NI_MIN_RESOLUTION_HEIGHT_SCALER in ni_quadra_filter_api.h
94 #define NI_MIN_RESOLUTION_WIDTH_SCALER 16
95 #define NI_MIN_RESOLUTION_HEIGHT_SCALER 16
96 
97 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
98 // If you change this,you should also change NI_QUADRA_MAX_RESOLUTION_WIDTH,
99 // NI_QUADRA_MAX_RESOLUTION_HEIGHT in ni_quadra_filter_api.h
100 #define NI_MAX_RESOLUTION_WIDTH 8192
101 #define NI_MAX_RESOLUTION_HEIGHT 8192
102 #define NI_MAX_RESOLUTION_AREA 8192*8192
103 #define NI_MAX_RESOLUTION_RGBA_WIDTH 7040
104 #define NI_MAX_RESOLUTION_RGBA_HEIGHT 7040
105 
106 #define NI_MAX_RESOLUTION_LINESIZE (NI_MAX_RESOLUTION_WIDTH*2)
107 
108 #define NI_FRAME_LITTLE_ENDIAN 0
109 #define NI_FRAME_BIG_ENDIAN 1
110 
111 #define NI_INVALID_SESSION_ID 0xFFFF
112 
113 #define NI_MAX_BITRATE 1000000000
114 #define NI_MIN_BITRATE 10000
115 
116 #define NI_MAX_FRAMERATE 65535
117 #define NI_MAX_ASPECTRATIO 65535
118 
119 /*Values below used for VPU resolution range checking*/
120 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
121 // If you change this,you should also change NI_QUADRA_MAX_WIDTH, NI_QUADRA_MIN_WIDTH,
122 // NI_QUADRA_MAX_HEIGHT, NI_QUADRA_MIN_HEIGHT in ni_quadra_filter_api.h
123 #define NI_MAX_WIDTH 8192
124 #define NI_MIN_WIDTH 144
125 #define NI_MAX_HEIGHT 8192
126 #define NI_MIN_HEIGHT 128
127 
128 #define NI_2PASS_ENCODE_MIN_WIDTH ((272 + 31) / 32 * 32)
129 #define NI_2PASS_ENCODE_MIN_HEIGHT 256
130 
131 #define NI_MULTICORE_ENCODE_MIN_WIDTH 256
132 #define NI_MULTICORE_ENCODE_MIN_HEIGHT 256
133 
134 /*Values below used for parameter resolution range checking*/
135 #define NI_PARAM_MAX_WIDTH 8192
136 #define NI_PARAM_MIN_WIDTH 32
137 #define NI_PARAM_MAX_HEIGHT 8192
138 #define NI_PARAM_MIN_HEIGHT 32
139 
140 #define NI_PARAM_JPEG_MIN_WIDTH 48
141 #define NI_PARAM_JPEG_MIN_HEIGHT 48
142 
143 #define NI_PARAM_AV1_MIN_WIDTH 144
144 #define NI_PARAM_AV1_MIN_HEIGHT 128
145 #define NI_PARAM_AV1_MAX_WIDTH 4096
146 #define NI_PARAM_AV1_MAX_HEIGHT 4352
147 #define NI_PARAM_AV1_MAX_AREA (4096 * 2304)
148 #define NI_PARAM_AV1_ALIGN_WIDTH_HEIGHT 8
149 
150 #define NI_MAX_GOP_SIZE 8
151 #define NI_MIN_GOP_SIZE 1
152 #define NI_MAX_GOP_PRESET_IDX 15
153 #define NI_MIN_GOP_PRESET_IDX -1
154 #define NI_MAX_DECODING_REFRESH_TYPE 2
155 #define NI_MIN_DECODING_REFRESH_TYPE 0
156 #define NI_MAX_CU_SIZE_MODE 2
157 #define NI_MIN_CU_SIZE_MODE 0
158 #define NI_DEFAULT_CU_SIZE_MODE 7
159 #define NI_MAX_DYNAMIC_MERGE 1
160 #define NI_MIN_DYNAMIC_MERGE 0
161 #define NI_MAX_USE_RECOMMENDED_ENC_PARAMS 3
162 #define NI_MIN_USE_RECOMMENDED_ENC_PARAMS 0
163 #define NI_MAX_MAX_NUM_MERGE 3
164 #define NI_MIN_MAX_NUM_MERGE 0
165 #define NI_MAX_INTRA_QP 51
166 #define NI_MIN_INTRA_QP -1
167 #define NI_MAX_INTRA_QP_DELTA 51
168 #define NI_MIN_INTRA_QP_DELTA -51
169 #define NI_DEFAULT_INTRA_QP 22
170 #define NI_INTRA_QP_RANGE 25
171 #define NI_MIN_QP_DELTA (-25)
172 #define NI_MAX_QP_DELTA 25
173 #define NI_MAX_QP_INFO 63
174 #define NI_MAX_BIN 1
175 #define NI_MIN_BIN 0
176 #define NI_MAX_NUM_SESSIONS 32
177 #define NI_MIN_FRAME_SIZE 0
178 #define NI_MAX_FRAME_SIZE (7680*4320*3)
179 #define NI_AV1_INVALID_BUFFER_INDEX (-1)
180 #define NI_MAX_SPATIAL_LAYERS 4
181 
182 #define RC_SUCCESS true
183 #define RC_ERROR false
184 
185 #define MAX_CHAR_IN_DEVICE_NAME 32
186 
187 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
188 // If you change this,you should also change MAX_QUADRA_NUM_FRAMEPOOL_HWAVFRAME in ni_quadra_filter_api.h
189 #define MAX_NUM_FRAMEPOOL_HWAVFRAME 128
190 
191 /* These constants are the values used by the GC620 2D engine */
192 #define GC620_NV12 0x104
193 #define GC620_NV21 0x105
194 #define GC620_I420 0x103
195 #define GC620_P010_MSB 0x108
196 #define GC620_I010 0x10A
197 #define GC620_YUYV 0x100
198 #define GC620_UYVY 0x101
199 #define GC620_NV16 0x106
200 #define GC620_RGBA8888 0
201 #define GC620_BGRA8888 4
202 #define GC620_BGRX8888 5
203 #define GC620_ABGR8888 12
204 #define GC620_ARGB8888 15
205 #define GC620_RGB565 3
206 #define GC620_BGR565 11
207 #define GC620_B5G5R5X1 8
208 #define GC620_RGB888_PLANAR 0x10C
209 
210 #define NI_ENABLE_AUD_FOR_GLOBAL_HEADER 2
211 
212 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
213 // If you change this,you should also change NI_QUADRA_MAX_FIFO_CAPACITY in ni_quadra_filter_api.h
214 #define NI_MAX_FIFO_CAPACITY 120
215 
216 /* These are Namespace and QOS configuration related */
217 #define NI_NAMESPACE_MAX_NUM 128
218 
219 /* These are sliceArg configuration related */
220 #define NI_MAX_SLICE_SIZE 127
221 
222 /*!*
223 * Operation modes for QOS
224 */
225 typedef enum ni_qos_modes
226 {
231 
232 /*!*
233 * Operation codes for ni_device_config_ns_qos
234 */
235 typedef enum ni_qos_codes
236 {
241 
242 // XCODER STATE
243 typedef enum
244 {
245  NI_XCODER_IDLE_STATE = 0x00, // Xcoder idle state
246  NI_XCODER_OPEN_STATE = 0x01 << 1, // Xcoder open state
247  NI_XCODER_WRITE_STATE = 0x01 << 2, // Xcoder write state
248  NI_XCODER_READ_STATE = 0x01 << 3, // Xcoder read state
249  NI_XCODER_CLOSE_STATE = 0x01 << 4, // Xcoder close state
250  // Xcoder flush state, flush at the end of stream
252  // Xcoder inter flush state, flush during transcoding stream
254  NI_XCODER_READ_DESC_STATE = 0x01 << 7, // Xcoder Read Desc state
255  NI_XCODER_HWUP_STATE = 0x01 << 8, // Xcoder HW upload state
256  NI_XCODER_HWDL_STATE = 0x01 << 9, // Xcoder HW download state
257  // Other states, like init, alloc, etc.
260 
261 typedef enum
262 {
263  NI_PIX_FMT_YUV420P = 0, /* 8-bit YUV420 planar */
264  NI_PIX_FMT_YUV420P10LE = 1, /* 10-bit YUV420 planar */
265  NI_PIX_FMT_NV12 = 2, /* 8-bit YUV420 semi-planar */
266  NI_PIX_FMT_P010LE = 3, /* 10-bit YUV420 semi-planar */
267  NI_PIX_FMT_RGBA = 4, /* 32-bit RGBA packed */
268  NI_PIX_FMT_BGRA = 5, /* 32-bit BGRA packed */
269  NI_PIX_FMT_ARGB = 6, /* 32-bit ARGB packed */
270  NI_PIX_FMT_ABGR = 7, /* 32-bit ABGR packed */
271  NI_PIX_FMT_BGR0 = 8, /* 32-bit BGRX packed */
272  NI_PIX_FMT_BGRP = 9, /* 24-bit BGR planar */
273  NI_PIX_FMT_NV16 = 10, /* 8-bit YUV422 semi-planar */
274  NI_PIX_FMT_YUYV422 = 11, /* 8-bit YUV422 packed */
275  NI_PIX_FMT_UYVY422 = 12, /* 8-bit YUV422 packed */
276  NI_PIX_FMT_8_TILED4X4 = 13, /* 8 bit tiled4x4 */
277  NI_PIX_FMT_10_TILED4X4 = 14,/* 10 bit tiled4x4 */
278  NI_PIX_FMT_NONE = 15, /* invalid format */
279 } ni_pix_fmt_t;
280 
281 typedef enum
282 {
289 
290 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
291 // If you change this,you should also change NI_QUADRA_SCALER_FLAG_* in ni_quadra_filter_api.h
292 #define NI_SCALER_FLAG_IO 0x0001 /* 0 = source frame, 1 = destination frame */
293 #define NI_SCALER_FLAG_PC 0x0002 /* 0 = single allocation, 1 = create pool */
294 #define NI_SCALER_FLAG_PA 0x0004 /* 0 = straight alpha, 1 = premultiplied alpha */
295 #define NI_SCALER_FLAG_P2 0x0008 /* 0 = normal allocation, 1 = P2P allocation */
296 #define NI_SCALER_FLAG_FCE 0x0010 /* 0 = no fill color, 1 = fill color enabled */
297 #define NI_SCALER_FLAG_CS 0x0020 /* 0 = BT.709, 1 = BT.2020 */
298 #define NI_SCALER_FLAG_LM 0x0040 /* 0 == no memory acquisition limit, 1 == limit memory acquisition */
299 #define NI_SCALER_FLAG_CMP 0x0800 /* 0 = no compress, 1 = compress*/
300 
301 #define NI_AI_FLAG_IO 0x0001 /* 0 = source frame, 1 = destination frame */
302 #define NI_AI_FLAG_PC 0x0002 /* 0 = single allocation, 1 = create pool */
303 #define NI_AI_FLAG_LM 0x0004 /* 0 == no memory acquisition limit; 1 == limit memory acquisition */
304 #define NI_AI_FLAG_IOVEC 0x0008
305 
306 #define NI_UPLOADER_FLAG_LM 0x0010 /* 0 == no memory acquisition limit, 1 == limit memory acquisition */
307 
308 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
309 // If you change this,you should also change NI_QUADRA_MAX_KEEP_ALIVE_TIMEOUT,
310 // NI_QUADRA_MIN_KEEP_ALIVE_TIMEOUT,NI_QUADRA_DEFAULT_KEEP_ALIVE_TIMEOUT in ni_quadra_filter_api.h
311 #define NI_MAX_KEEP_ALIVE_TIMEOUT 100
312 #define NI_MIN_KEEP_ALIVE_TIMEOUT 1
313 #define NI_DEFAULT_KEEP_ALIVE_TIMEOUT 3
314 
315 #define NI_MIN_CUSTOM_SEI_PASSTHRU -1
316 #define NI_MAX_CUSTOM_SEI_PASSTHRU 254
317 #define NI_DISABLE_USR_DATA_SEI_PASSTHRU 0
318 #define NI_ENABLE_USR_DATA_SEI_PASSTHRU 1
319 #define NI_INVALID_SVCT_DECODING_LAYER -1
320 #define NI_EC_POLICY_TOLERANT 1
321 #define NI_EC_POLICY_IGNORE 2
322 #define NI_EC_POLICY_SKIP 3
323 #define NI_EC_POLICY_BEST_EFFORT 4
324 #define NI_EC_POLICY_LIMITED_ERROR 5
325 #define NI_EC_POLICY_BEST_EFFORT_OUT_DC 6
326 #define NI_EC_POLICY_DEFAULT NI_EC_POLICY_BEST_EFFORT
327 #define NI_EC_ERR_THRESHOLD_DEFAULT 10
328 
329 // Picked from the xcoder firmware, commit e3b882e7
330 #define NI_VPU_CEIL(_data, _align) (((_data)+((_align)-1))&~((_align)-1))
331 #define NI_VPU_ALIGN4(_x) (((_x)+0x03)&~0x03)
332 #define NI_VPU_ALIGN8(_x) (((_x)+0x07)&~0x07)
333 #define NI_VPU_ALIGN16(_x) (((_x)+0x0f)&~0x0f)
334 #define NI_VPU_ALIGN32(_x) (((_x)+0x1f)&~0x1f)
335 #define NI_VPU_ALIGN64(_x) (((_x)+0x3f)&~0x3f)
336 #define NI_VPU_ALIGN128(_x) (((_x)+0x7f)&~0x7f)
337 #define NI_VPU_ALIGN256(_x) (((_x)+0xff)&~0xff)
338 #define NI_VPU_ALIGN512(_x) (((_x)+0x1ff)&~0x1ff)
339 #define NI_VPU_ALIGN2048(_x) (((_x)+0x7ff)&~0x7ff)
340 #define NI_VPU_ALIGN4096(_x) (((_x)+0xfff)&~0xfff)
341 #define NI_VPU_ALIGN16384(_x) (((_x)+0x3fff)&~0x3fff)
342 
343 #if 1 // QUADRA_SEI_FMT
344 #pragma pack(1)
345 typedef struct _ni_sei_header {
346  uint8_t status;
347  uint16_t size;
348  uint8_t type;
350 #pragma pack()
351 #else // QUADRA_SEI_FMT
352 typedef struct _ni_sei_user_data_entry
353 {
354  uint32_t offset;
355  uint32_t size;
356 } ni_sei_user_data_entry_t;
357 #endif // QUADRA_SEI_FMT
358 
359 typedef enum
360 {
366  NI_H265_USERDATA_FLAG_ITU_T_T35_PRE = 5, /* SEI Prefix: user_data_registered_itu_t_t35 */
367  NI_H265_USERDATA_FLAG_UNREGISTERED_PRE = 6, /* SEI Prefix: user_data_unregistered */
368  NI_H265_USERDATA_FLAG_ITU_T_T35_SUF = 7, /* SEI Suffix: user_data_registered_itu_t_t35 */
369  NI_H265_USERDATA_FLAG_UNREGISTERED_SUF = 8, /* SEI Suffix: user_data_unregistered */
370  NI_H265_USERDATA_FLAG_RESERVED_9 = 9, /* SEI RESERVED */
371  NI_H265_USERDATA_FLAG_MASTERING_COLOR_VOL = 10, /* SEI Prefix: mastering_display_color_volume */
372  NI_H265_USERDATA_FLAG_CHROMA_RESAMPLING_FILTER_HINT = 11, /* SEI Prefix: chroma_resampling_filter_hint */
373  NI_H265_USERDATA_FLAG_KNEE_FUNCTION_INFO = 12, /* SEI Prefix: knee_function_info */
374  NI_H265_USERDATA_FLAG_TONE_MAPPING_INFO = 13, /* SEI Prefix: tone_mapping_info */
375  NI_H265_USER_DATA_FLAG_FILM_GRAIN_CHARACTERISTICS_INFO = 14, /* SEI Prefix: film_grain_characteristics_info */
376  NI_H265_USER_DATA_FLAG_CONTENT_LIGHT_LEVEL_INFO = 15, /* SEI Prefix: content_light_level_info */
377  NI_H265_USER_DATA_FLAG_COLOUR_REMAPPING_INFO = 16, /* SEI Prefix: content_light_level_info */
378  NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_1 = 28, /* SEI Prefix: additional user_data_registered_itu_t_t35 */
379  NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_2 = 29, /* SEI Prefix: additional user_data_registered_itu_t_t35 */
380  NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_1 = 30, /* SEI Suffix: additional user_data_registered_itu_t_t35 */
381  NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_2 = 31, /* SEI Suffix: additional user_data_registered_itu_t_t35 */
383 
384 typedef enum
385 {
386  PIC_TYPE_I = 0, /*!*< I picture */
387  PIC_TYPE_P = 1, /*!*< P picture */
388  PIC_TYPE_B = 2, /*!*< B picture (except VC1) */
389 
391  PIC_TYPE_IDR = 3, /*!*< Encoder IDR pic type */
392  DECODER_PIC_TYPE_IDR = 5, /*!*< Decoder-returned IDR pic type */
393  PIC_TYPE_NIDR = 5, /*!*< H.264/H.265 IDR picture */
394  PIC_TYPE_MAX /*!*< No Meaning */
395 } ni_pic_type_t;
396 
397 #if 1 // QUADRA_SEI_FMT
398 // user data unreg and custom SEIs have variable length;
399 // non-custom SEIs will be dropped if buffer overflow;
400 // custom SEIs passthru is via SW and host memory constrained
401 #define NI_ENC_MAX_SEI_BUF_SIZE NI_VPU_ALIGN64(1024) // sync with encoder
402 
403 // PIC_TIMING and BUFFERING_PERIOD apply to encoder only, not needed from decoder
404 // For now, only the following will be returned from decoder:
405 // - T35 has 3 possible data types: CLOSE_CAPTION, HDR10PLUS, AFD
406 // - MASTERING_DISPLAY_COLOUR
407 // - CONTENT_LIGHT_LEVEL
408 // - USER_DATA_UNREGISTERED
409 // - CUSTOM_SEI
410 // Note: USER_DATA_UNREGISTERED may have arbitrary size but SEI buffer
411 // size is limited. The SEI buffer on decoder has the following format:
412 // [byte0: #entries][entry1]..[entryN]
413 // up to (1 + sizeof(ni_sei_header_t) + NI_MAX_SEI_DATA) bytes maximum;
414 // where [entryX] := [ni_sei_header][payload]
415 // [payload] of ni_sei_header.size: present only if ni_sei_header.status == 1
416 // X in [1..N] with N <= #entries
417 // N == #entries only if NI_MAX_SEI_DATA is large enough to store all #entries
418 // ex:
419 // entryX header fits in the buffer during SEI extration, but payload can't fit in;
420 // so only entryX header is stored but payload is drop with status set 0.
421 // entryX header can't fit in the buffer (SEI buffer full); so extryX is not stored
422 // in the SEI buffer (neither will any further SEIs)
423 //
424 // To maintain alignment, current implementation retrieves SEI data buffer from
425 // entry 1's payload onwards (skipping byte0, and entry 1's header),
426 // while #entries (same value as SEI buffer byte0) and entry 1's header are notified
427 // separately via metadata.
428 #define NI_MAX_SEI_DATA (NI_ENC_MAX_SEI_BUF_SIZE) // sync with decoder_manager
429 // Custom SEI only applies to software delivery
430 #define NI_MAX_CUSTOM_SEI_DATA (8192)
431 
432 #else // QUADRA_SEI_FMT
433 #define NI_MAX_SEI_ENTRIES 32
434 // 32 user_data_entry_t records + various SEI messages sizes
435 #define NI_MAX_SEI_DATA \
436  NI_MAX_SEI_ENTRIES * sizeof(ni_sei_user_data_entry_t) + \
437  NI_MAX_T35_CLOSE_CAPTION_SIZE + \
438  NI_MASTERING_DISPLAY_COLOUR_VOLUME_SIZE + \
439  NI_CONTENT_LIGHT_LEVEL_INFO_SIZE + NI_MAX_T35_HDR10PLUS_SIZE + \
440  NI_MAX_T35_AFD_SIZE
441 #endif // QUADRA_SEI_FMT
442 
443 #define NI_DEC_MAX_CC_BUF_SIZE 93 // max 31 CC entries of 3 bytes each
444 
445 #define NI_CC_SEI_BYTE0 0xB5 // itu_t_t35_country_code =181 (North America)
446 #define NI_CC_SEI_BYTE1 0x00
447 #define NI_CC_SEI_BYTE2 0x31 // itu_t_t35_provider_code = 49
448 #define NI_CC_SEI_BYTE3 0x47 // ATSC_user_identifier = "GA94"
449 #define NI_CC_SEI_BYTE4 0x41
450 #define NI_CC_SEI_BYTE5 0x39
451 #define NI_CC_SEI_BYTE6 0x34
452 #define NI_CC_SEI_BYTE7 0x03 // cc_data = 0x03
453 
454 #define NI_HDR10P_SEI_BYTE0 0xB5 // itu_t_t35_country_code =181 (North America
455 #define NI_HDR10P_SEI_BYTE1 0x00
456 #define NI_HDR10P_SEI_BYTE2 0x3c // itu_t_t35_provider_code = 0x003c
457 #define NI_HDR10P_SEI_BYTE3 0x00
458 #define NI_HDR10P_SEI_BYTE4 0x01 // u16 itu_t_t35_provider_oriented_code = 0x0001
459 #define NI_HDR10P_SEI_BYTE5 0x04 // u8 application_identifier = 0x04
460 // no longer checking the application version as it was originally 0 but was recently specified as one by AOM.
461 #define NI_HDR10P_SEI_BYTE6 0x00 // u8 application version = 0x00
462 
463 #define NI_CC_SEI_HDR_HEVC_LEN 18
464 #define NI_HDR10P_SEI_HDR_HEVC_LEN 9
465 #define NI_HDR10P_SEI_HDR_H264_LEN 8
466 #define NI_CC_SEI_HDR_H264_LEN 17
467 #define NI_CC_SEI_TRAILER_LEN 2
468 #define NI_RBSP_TRAILING_BITS_LEN 1
469 
470 // The macro definition in ni_quadra_filter_api.h need to be synchronized with libxcoder
471 // If you change this,you should also change NI_QUADRA_MAX_NUM_AUX_DATA_PER_FRAME in ni_quadra_filter_api.h
472 #define NI_MAX_NUM_AUX_DATA_PER_FRAME 16
473 
475 #define NI_BITRATE_RECONFIG_FILE_MAX_LINES 50000
476 #define NI_BITRATE_RECONFIG_FILE_MAX_ENTRIES_PER_LINE 10
479 
481 #define NI_CUSTOMIZE_ROI_QPOFFSET_LEVEL 10
482 #define NI_CUSTOMIZE_ROI_QP_NUM 64
484 
485 #define MOTION_CONSTRAINED_PERFORMANCE_MODE 1
486 #define MOTION_CONSTRAINED_QUALITY_MODE 2
487 
488 /*!*
489 * \brief Frame pool type.
490 */
492 {
493  NI_POOL_TYPE_NONE = -1, /* frame pool not inited or allocated */
497 
498 // frame auxiliary data; mostly used for SEI data associated with frame
500 {
502 
503  // ATSC A53 Part 4 Closed Captions
505 
506  // HDR10 mastering display metadata associated with a video frame
508 
509  // HDR10 content light level (based on CTA-861.3). This payload contains
510  // data in the form of ni_content_light_level_t struct.
512 
513  // HDR10+ dynamic metadata associated with a video frame. The payload is
514  // a ni_dynamic_hdr_plus_t struct that contains information for color volume
515  // transform - application 4 of SMPTE 2094-40:2016 standard.
517 
518  // Regions of Interest, the payload is an array of ni_region_of_interest_t,
519  // the number of array element is implied by:
520  // ni_frame_aux_data.size / sizeof(ni_region_of_interest_t)
522 
523  // NETINT: user data unregistered SEI data, which takes SEI payload type
524  // USER_DATA_UNREGISTERED.
525  // There will be no byte reordering.
526  // Usually this payload would be: 16B UUID + other payload Bytes.
528 
529  // NETINT: custom SEI data, which takes SEI payload custom types.
530  // There will be no byte reordering.
531  // Usually this payload would be: 1B Custom SEI type + 16B UUID + other
532  // payload Bytes.
534 
535  // NETINT: bitrate adjustment, which takes int32_t type data as
536  // payload that indicates the new target bitrate value.
538 
539  // NETINT: custom INTRAPRD adjustment, which takes int32_t type data
540  // as payload that specifies the new intra period
542 
543  // NETINT: custom VUI adjustment, which is a struct of
544  // ni_vui_hrd_t that specifies a frame's support of vui
546 
547  // NETINT: long term reference frame support, which is a struct of
548  // ni_long_term_ref_t that specifies a frame's support of long term
549  // reference frame.
551 
552  // NETINT: long term reference interval adjustment, which takes int32_t
553  // type data as payload that indicates the new long term reference interval
554  // value.
556 
557  // NETINT: frame reference invalidation, which takes int32_t type data
558  // as payload that indicates the frame number after which all references
559  // shall be invalidated.
561 
562  // NETINT: framerate adjustment, which takes int32_t type data as
563  // payload that indicates the new target framerate numerator and denominator values.
565 
566  // NETINT: maxFrameSize adjustment, which takes int16_t type data as
567  // payload that indicates the new maxFrameSize value
569 
570  // NETINT: max&min QP adjustment, which is a struct of
571  // payload that indicate the new max&min QP values
573 
574  // NETINT: crf adjustment, which takes int32_t type data
575  // as payload that indicates the new crf value.
577 
578  // NETINT: crf adjustment, which takes float type data
579  // as payload that indicates the new crf value.
581 
582  // NETINT: VbvMaxRate adjust, which takes int32_t type
583  // as payload that indicates the VbvMaxRate value.
585 
586  // NETINT: VbvBufferSize adjust, which takes int32_t type
587  // as payload that indicates the vbvBufferSize value.
589 
590  // NETINT: sliceArg adjust, which takes int16_t type
591  // as payload that indicates the sliceArg value.
593 
594  // NETINT: sliceArg adjust, which takes ni_category_classify_t
595  // type as payload that indicates the class and prob.
598 
599 // rational number (pair of numerator and denominator)
600 typedef struct _ni_rational
601 {
602  int num; // numerator
603  int den; // denominator
604 } ni_rational_t;
605 
606 // create an ni_rational_t
607 static inline ni_rational_t ni_make_q(int num, int den)
608 {
609  ni_rational_t ret = {num, den};
610  return ret;
611 }
612 
613 // convert an ni_rational_t to a double
614 static inline double ni_q2d(ni_rational_t a)
615 {
616  return a.num / (double)a.den;
617 }
618 
619 // struct to hold auxiliary data for ni_frame_t
620 typedef struct _ni_aux_data
621 {
623  void *data;
624  int size;
625 } ni_aux_data_t;
626 
627 // struct describing a Region Of Interest (ROI)
629 {
630  // self size: must be set to: sizeof(ni_region_of_interest_t)
631  uint32_t self_size;
632 
633  // ROI rectangle: pixels from the frame's top edge to the top and bottom
634  // edges of the rectangle, from the frame's left edge to the left and right
635  // edges of the rectangle.
636  int top;
637  int bottom;
638  int left;
639  int right;
640 
641  // quantisation offset: [-1, +1], 0 means no quality change; < 0 value asks
642  // for better quality (less quantisation), > 0 value asks for worse quality
643  // (greater quantisation).
646 
647 // struct describing category class and prob
648 typedef struct _ni_category_classify
649 {
651  int category;
652  float prob;
654 
655 // struct describing VUI HRD support.
656 typedef struct _ni_vui_hrd
657 {
658  // Indicates the presence of color info such as primaries, trc etc.
660 
661  // Indicates the chromaticity of RGB and white components of the
662  // displayed image (See Table E.3 of H.265 spec)
663  int32_t colorPrimaries;
664 
665  // The opto-electronic transfer characteristic of the source picture
666  // (See Table E.4 of H.265 spec)
667  int32_t colorTrc;
668 
669  // Method to represent brightness, luminance or luma and colour (e.g. RGB)
670  int32_t colorSpace;
671 
672  // Luma sample aspect ratio width. With aspectRatioHeight, translates
673  // into specific display ratios such as 16:9, 4:3, etc.
675 
676  // Luma sample aspect ratio height
678 
679  // Input video signal sample range [0,1].
680  // 0 = Y range in [16..235] Cb,Cr in [16..240]. 1 = Y,Cb,Cr in [0..255]
681  int32_t videoFullRange;
682 } ni_vui_hrd_t;
683 
684 // struct describing long term reference frame support.
685 typedef struct _ni_long_term_ref
686 {
687  // A flag for the current picture to be used as a long term reference
688  // picture later at other pictures' encoding
690 
691  // A flag to use a long term reference picture in DPB when encoding the
692  // current picture
695 
696 // struct describing framerate.
697 typedef struct _ni_framerate
698 {
699  // framerate numerator
700  int32_t framerate_num;
701 
702  // framerate denominator
705 
706 typedef struct _ni_rc_min_max_qp
707 {
708  int32_t minQpI;
709  int32_t maxQpI;
710  int32_t maxDeltaQp;
711  int32_t minQpPB;
712  int32_t maxQpPB;
714 
715 typedef struct _ni_dec_win
716 {
717  int16_t left;
718  int16_t right;
719  int16_t top;
720  int16_t bottom;
721 } ni_dec_win_t;
722 
724 {
726  uint32_t time_scale;
728  uint8_t color_trc;
729  uint8_t color_space;
731  // 48 bytes reserved for receiving more header info
732  uint64_t rsvd0;
733  uint64_t rsvd1;
734  uint64_t rsvd2;
735  uint64_t rsvd3;
736  uint64_t rsvd4;
737  uint64_t rsvd5;
739 
740 /*!*
741 * \brief decoded payload format of H.265 VUI
742 *
743 */
745 {
750 
752  int8_t video_format;
753 
756 
757  uint16_t sar_width;
758  uint16_t sar_height;
759 
763 
767 
769 
770  uint8_t field_seq_flag;
771 
776 
778  uint32_t vui_time_scale;
779 
782 
789 
793 
795 
797 
798 /*!*
799 * \brief decoded payload format of H.264 VUI
800 *
801 */
803 {
808 
810  int8_t video_format;
813 
814  uint16_t sar_width;
815  uint16_t sar_height;
816 
821 
824 
827 
829  uint32_t vui_time_scale;
830 
835 
840 
846 
847 /*!*
848 * \brief encoder HEVC ROI custom map (1 CTU = 64bits)
849 */
851 {
852  struct
853  {
854  uint32_t ctu_force_mode : 2; //[ 1: 0]
855  uint32_t ctu_coeff_drop : 1; //[ 2]
856  uint32_t reserved : 5; //[ 7: 3]
857  uint32_t sub_ctu_qp_0 : 6; //[13: 8]
858  uint32_t sub_ctu_qp_1 : 6; //[19:14]
859  uint32_t sub_ctu_qp_2 : 6; //[25:20]
860  uint32_t sub_ctu_qp_3 : 6; //[31:26]
861 
862  uint32_t lambda_sad_0 : 8; //[39:32]
863  uint32_t lambda_sad_1 : 8; //[47:40]
864  uint32_t lambda_sad_2 : 8; //[55:48]
865  uint32_t lambda_sad_3 : 8; //[63:56]
866  } field;
868 
869 /*!*
870 * \brief encoder AVC ROI custom map (1 MB = 8bits)
871 */
873 {
874  struct
875  {
876  uint8_t mb_force_mode : 2; // [ 1: 0]
877  uint8_t mb_qp : 6; // [ 7: 2]
878  } field;
880 
881 /*!*
882 * \brief encoder AVC ROI custom map (1 MB = 8bits)
883 */
884 // QP/CU Control Information Format 1
886 {
887  struct
888  {
889  uint8_t roiAbsQp_flag : 1; // [ 0] (0: QP_delta, 1: abs_QP)
890  uint8_t
891  qp_info : 6; // [ 6: 1] (QP_delta: -32 <= qp_info <= 31, QP_info =- QP_delta, abs_QP: 0 <= Qp_info <= 51, Qp_info = abs_QP)
892  uint8_t
893  ipcm_flag : 1; // [ 7] (0: do not force IPCM mode, 1: force IPCM mode)
894  } field;
896 // QP/CU Control Information Format 2
897 /*
898 typedef union _ni_enc_quad_roi_custom_map
899 {
900  struct
901  {
902  uint8_t qp_info : 6; // [ 5: 0] (QP_delta: -32 <= qp_info <= 31, QP_info =- QP_delta, abs_QP: 0 <= Qp_info <= 51, Qp_info = abs_QP)
903  uint8_t roiAbsQp_flag : 1; // [ 6] (0: QP_delta, 1: abs_QP)
904  uint8_t skip_flag : 1; // [ 7] (0: do not force skip mode, 1: force skip)
905  } field;
906 } ni_enc_quad_roi_custom_map;
907 */
908 /*!*
909 * \brief This is an enumeration for supported codec formats.
910 */
911 typedef enum _ni_codec_format
912 {
919 
921 {
927 
928 typedef enum _ni_dec_crop_mode
929 {
934 
935 
936 /*!*
937 * \brief This is an enumeration for hw actions
938 */
940 {
942  NI_CODEC_HW_ENABLE = (1 << 0),
944  NI_CODEC_HW_UPLOAD = (1 << 2),
945  NI_CODEC_HW_RSVD = (1 << 3),
948 
949 /*!*
950 * \brief This is an enumeration for encoder parameter change.
951 */
953 {
954  // COMMON parameters which can be changed frame by frame.
956  //NI_SET_CHANGE_PARAM_INTRA_PARAM = (1 << 1), // not required by customers
958  //NI_SET_CHANGE_PARAM_RC = (1 << 9), // not required by customers
977  NI_SET_CHANGE_PARAM_INTRA_PERIOD = ((unsigned int)1 << 31),
978  //bit [2,7] and [13,15] is still unused
980 
985 {
986  uint32_t enable_option;
987 
988  // NI_SET_CHANGE_PARAM_RC_TARGET_RATE
989  int32_t bitRate;
992  // NI_SET_CHANGE_PARAM_RC
993 // (rcEnable, cuLevelRc, bitAllocMode, RoiEnable, RcInitQp can't be changed while encoding)
994  int32_t hvsQPEnable;
995  int32_t hvsQpScale;
996  int32_t vbvBufferSize;
997  int32_t mbLevelRcEnable;
999  // NI_SET_CHANGE_PARAM_RC_MIN_MAX_QP
1000  int32_t minQpI;
1001  int32_t maxQpI;
1003  int32_t maxDeltaQp;
1004 #ifdef QUADRA
1005  int32_t minQpPB;
1006  int32_t maxQpPB;
1007 #else
1008  int32_t minQpP;
1009  int32_t minQpB;
1010  int32_t maxQpP;
1011  int32_t maxQpB;
1012 #endif
1013 
1014  // NI_SET_CHANGE_PARAM_INTRA_PARAM
1015  int32_t intraQP;
1016  int32_t intraPeriod;
1017  int32_t repeatHeaders;
1019 #ifdef QUADRA
1020  // NI_SET_CHANGE_PARAM_VUI_HRD_PARAM
1022  uint8_t colorPrimaries;
1023  uint8_t colorTrc;
1024  uint8_t colorSpace;
1025  uint16_t aspectRatioWidth;
1027  uint8_t videoFullRange;
1029  // RESERVED FOR FUTURE USE
1030  uint8_t reserved[5];
1031 
1032  // NI_SET_CHANGE_PARAM_SLICE_ARG
1033  int16_t sliceArg;
1034  //NI_SET_CHANGE_PARAM_VBV also reconfig for ni_vbvBufferSize
1035  int32_t vbvMaxRate;
1036 
1037  // NI_SET_CHANGE_PARAM_CRF
1038  // crf reconfig (range in [0.00 .. 51.00])
1039  uint8_t crfDecimal; // crf decimal fraction * 100 (range in [0 .. 99])
1040  uint8_t crf; // crf integer (range in [0 .. 51])
1041 
1042  // NI_SET_CHANGE_PARAM_MAX_FRAME_SIZE
1043  uint16_t maxFrameSize; // maxFrameSize reconfig (in unit of 2000 bytes)
1044 
1045  // NI_SET_CHANGE_PARAM_INVALID_REF_FRAME
1047 
1048  // NI_SET_CHANGE_PARAM_LTR_INTERVAL
1049  int32_t ltrInterval;
1050 
1051  // NI_SET_CHANGE_PARAM_RC_FRAMERATE
1052  int32_t frameRateNum;
1054 #else
1055  int32_t reserved[8];
1056 #endif
1058 
1059 /*!*
1060 * \brief decoded payload format of HDR SEI mastering display colour volume
1061 *
1062 */
1064 {
1065  uint16_t display_primaries[3][2];
1066  uint16_t white_point_x;
1067  uint16_t white_point_y;
1071 
1072 /*!*
1073 * \brief payload format of HDR SEI content light level info
1074 *
1075 */
1077 {
1081 
1082 /*!*
1083 * \brief encoded payload format of HDR SEI mastering display colour volume
1084 *
1085 */
1087 {
1088  uint16_t display_primaries[3][2];
1089  uint16_t white_point_x;
1090  uint16_t white_point_y;
1094 
1095 typedef struct _ni_pkt_info
1096 {
1097  double psnr_y;
1098  double psnr_u;
1099  double psnr_v;
1101  double ssim_y;
1102  double ssim_u;
1103  double ssim_v;
1104  double reserved[1];
1105 } ni_pkt_info;
1106 
1107 /*!*
1108  * \brief This is an enumeration for illustrating the custom SEI locations.
1109  */
1111 {
1115 
1116 /*!*
1117  * \brief custom sei payload passthrough
1118  */
1119 typedef struct _ni_custom_sei
1120 {
1121  uint8_t type;
1123  uint32_t size;
1125 } ni_custom_sei_t;
1126 
1127 typedef struct _ni_custom_sei_set
1128 {
1130  int count;
1132 
1133 /*!*
1134 * \brief hardware capability type
1135 */
1136 typedef struct _ni_hw_capability
1137 {
1138  uint8_t hw_id;
1140  uint8_t max_4k_fps;
1141  uint8_t codec_format;
1142  uint8_t codec_type;
1147  uint8_t video_profile;
1148  uint8_t video_level;
1149  uint8_t reserved; // 16B alignment. Unnecessary?
1151 
1152 /*!*
1153 * \brief device capability type
1154 */
1156 {
1162 
1163  uint8_t serial_number[20];
1164  uint8_t model_number[40];
1165 
1166  uint8_t fw_rev[8]; // space right filled ASCII array, not a string
1167  uint8_t fw_branch_name[256];
1168  uint8_t fw_commit_time[26];
1169  uint8_t fw_commit_hash[41];
1170  uint8_t fw_build_time[26];
1171  uint8_t fw_build_id[256];
1173 
1174 /*!*
1175 * \brief Session running state type.
1176 */
1178 {
1185 
1186 typedef struct _ni_context_query
1187 {
1188  uint32_t context_id : 8; //07:00 SW Instance ID (0 to Max number of instances)
1189  uint32_t context_status : 8; //15:08 Instance Status (0-Idle, 1-Active)
1190  uint32_t
1191  codec_format : 8; //23:16 Codec Format (0-H264, 1-H265, 2-VP9, 3-JPEG, 4-AV1)
1192  uint32_t video_width : 16; //39:24 Video Width (0 to Max Width)
1193  uint32_t video_height : 16; //55:40 Video Height (0 to Max Height)
1194  uint32_t fps : 8; //63:56 FPS (0 to 255)
1195  uint32_t reserved : 8; //Alignment
1197 
1198 typedef struct _ni_load_query
1199 {
1200  uint32_t current_load;
1201  uint32_t fw_model_load;
1202  uint32_t fw_load;
1203  uint32_t total_contexts;
1204  union{
1206  uint32_t pcie_throughput; //PCIe throughput - ni_query_nvme_status
1207  };
1208  union {
1210  uint32_t pcie_load; //PCIe load - ni_query_nvme_status
1211  };
1214  union {
1216  uint32_t tp_fw_load; //TP FW load - ni_query_nvme_status
1217  };
1218 
1220 
1222 } ni_load_query_t;
1223 
1225 {
1229  uint32_t admin_queried;
1231 
1233 {
1234  uint8_t ui8AvgCost;
1235  uint8_t ui8MaxCost;
1236  uint16_t ui16FrameRate;
1237  uint32_t ui32BitRate;
1238  uint32_t ui32AvgBitRate;
1239  uint32_t ui32NumIDR;
1240  uint32_t ui32NumInFrame;
1243 
1245  uint32_t ui32Width;
1246  uint32_t ui32Height;
1247  uint32_t ui32UserIDR;
1248  uint8_t u8PixelFormat; // only support for enc
1249  uint8_t u8rsvd[3];
1250  uint32_t u32InstanceId;
1251  uint32_t reserved[6];
1253 
1258 
1260 {
1261  int hw_id; // Codec ID
1262  uint32_t session_id; // session id
1263  uint64_t session_timestamp; // Session Start Timestamp
1264  bool close_thread; // a flag that the keep alive thread is closed or need to be closed
1265  uint32_t device_type; // Device Type, Either NI_DEVICE_TYPE_DECODER or NI_DEVICE_TYPE_ENCODER
1266  ni_device_handle_t device_handle; // block device handler
1267  ni_event_handle_t thread_event_handle; // only for Windows asynchronous read and write
1268  void *p_buffer; // only be used when regular-io.
1269  ni_pthread_mutex_t *p_mutex; // referring to mutex of session context.
1270  uint32_t keep_alive_timeout; // keep alive timeout setting
1271  volatile uint64_t *plast_access_time; // shared variable for main thread to verify timeout. Keep alive thread will update last_access_time
1273 
1274 typedef struct _ni_buf_t
1275 {
1276  void* buf;
1282 } ni_buf_t;
1283 
1284 typedef struct _ni_buf_pool_t
1285 {
1286  ni_pthread_mutex_t mutex;
1288  uint32_t buf_size;
1293 } ni_buf_pool_t;
1294 
1295 typedef struct _ni_queue_node_t
1296 {
1297  uint64_t timestamp;
1298  uint64_t frame_info;
1304 } ni_queue_node_t;
1305 
1307 {
1308  uint32_t number_of_buffers; // total number of buffers
1314 
1315 typedef struct _ni_queue_t
1316 {
1317  char name[32];
1318  uint32_t count;
1321 } ni_queue_t;
1322 
1324 {
1327 
1329 {
1330  uint32_t num_of_dims; /* The number of dimensions specified in *sizes */
1331  uint32_t sizes[6]; /* The pointer to an array of dimension */
1332  int32_t
1333  data_format; /* Data format for the tensor, see ni_ai_buffer_format_e */
1334  int32_t
1335  quant_format; /* Quantized format see ni_ai_buffer_quantize_format_e */
1336  union
1337  {
1338  struct
1339  {
1340  int32_t
1341  fixed_point_pos; /* Specifies the fixed point position when the input element type is int16, if 0 calculations are performed in integer math */
1342  } dfp;
1343 
1344  struct
1345  {
1346  float scale; /* Scale value for the quantized value */
1347  int32_t zeroPoint; /* A 32 bit integer, in range [0, 255] */
1348  } affine;
1349  } quant_data; /* The union of quantization information */
1350  /* The type of this buffer memory. */
1351  uint32_t memory_type;
1353 
1355 {
1359 
1361 {
1362  int32_t offset;
1364 
1365 typedef struct _ni_network_data
1366 {
1367  uint32_t input_num;
1368  uint32_t output_num;
1371  *inset; /* point to each input layer start offset from p_frame */
1373  *outset; /* point to each output layer start offset from p_packet */
1375 
1376 // if change this structure, you need to change ni_quadra_filter_api.h ni_quadra_frameclone_desc_t
1377 typedef struct _ni_frameclone_desc
1378 {
1379  uint16_t ui16SrcIdx;
1380  uint16_t ui16DstIdx;
1381  uint32_t ui32Offset;
1382  uint32_t ui32Size;
1383  uint32_t reserved;
1385 
1387 {
1388  uint32_t total_cycles;
1390  uint64_t read_bw;
1391  uint64_t write_bw;
1392  uint64_t ocb_read_bw;
1393  uint64_t ocb_write_bw;
1394  uint64_t ddr_read_bw;
1395  uint64_t ddr_write_bw;
1397 
1398 typedef struct _ni_input_frame
1399 {
1400  uint8_t *p_input_buffer;
1401 
1402  uint32_t video_width;
1403  uint32_t video_height;
1404 
1405  int64_t pts;
1406 
1407  int8_t usable;
1409 
1410 typedef struct _ni_session_context
1411 {
1413  /* frame_time_q is pointer to ni_lat_meas_q_t but reserved as void pointer
1414  here as ni_lat_meas_q_t is part of private API */
1417 
1423 
1425 
1436 
1439  int64_t last_pts;
1440  int64_t last_dts;
1442  int64_t enc_pts_r_idx;
1443  int64_t enc_pts_w_idx;
1449 
1450  /* store pts values to create an accurate pts offset */
1455  uint64_t pkt_pos[NI_FIFO_SZ];
1456  uint64_t last_pkt_pos;
1459 
1462 
1464  ni_device_handle_t device_handle;
1465 
1467  ni_device_handle_t blk_io_handle;
1468 
1470  ni_device_handle_t sender_handle;
1471  ni_device_handle_t auto_dl_handle;
1472  uint8_t is_auto_dl;
1473 
1476 
1480  int hw_id;
1482  uint32_t session_id;
1486  uint32_t device_type;
1488  uint32_t codec_format;
1493 
1494  int src_bit_depth; // 8 or 10 bits/pixel formats, default 8
1495  int src_endian; // encoding 0: little endian (default) 1: big
1496  int bit_depth_factor; // for YUV buffer allocation
1497  // for encoder roi metadata
1498  uint32_t roi_len;
1499  uint32_t roi_avg_qp;
1500 
1503 
1504  /* Overall resource use among namespaces */
1506 
1508  uint8_t *p_leftover;
1510  uint32_t sent_size;
1511 
1513  uint8_t *p_hdr_buf;
1514  uint8_t hdr_buf_size;
1515 
1518 
1521 
1524 
1526  int status;
1528 
1529  void *p_dump[2];
1530  char param_err_msg[512];
1531 
1532  int keyframe_factor; // Unused
1533  uint64_t frame_num;
1534  uint64_t pkt_num;
1535  int rc_error_count; // Unused
1536 
1537  uint32_t hwd_Frame_Idx;
1538  uint32_t hwd_src_cpu;
1541  uint32_t hwd_Inst_ID;
1542 
1543  // frame forcing: for encoding
1545 
1546  uint32_t ready_to_close; //flag to indicate we are ready to close session
1547 
1548  // session running state
1550  //Current video width. this is used to do sequence change
1552  //Current video height ,this is used to do sequence change
1554  //Actual video width (without stride + cropped)
1556  // Used to track sequence changes that require bigger bitstream buffers
1558  ni_pthread_t keep_alive_thread;
1562 
1563  // original resolution this stream started with, this is used by encoder sequence change
1565 
1566  // a mutex for Xcoder API, to keep the thread-safety.
1567  ni_pthread_mutex_t mutex;
1568 
1569  // Xcoder running state
1570  uint32_t xcoder_state;
1571 
1572  // only be used when regular-io
1573  void *p_all_zero_buf; //This is for sos, eos, flush and keep alive request
1574 
1575  // these two event handle are only for Windows asynchronous read and write now
1576  ni_event_handle_t event_handle;
1577  ni_event_handle_t thread_event_handle;
1578 
1579  // ROI data
1581  // last passed in ni_region_of_interest_t
1583  int nb_rois;
1584  ni_enc_quad_roi_custom_map *roi_map; // actual AVC/HEVC QP map
1585 
1586  // only for H.264 test roi buffer for up to 8k resolution H.264 - 32 x 32 sub CTUs
1588  // only for H.265 custom map buffer for up to 8k resolution - 64x64 CTU Regions
1590  // only for hevc actual ROI map is stored in individual session context !
1592 
1593  // encoder reconfig parameters
1595  // decoder lowDelay mode for All I packets or IPPP packets
1598 
1599  // wrapper API request data, to be sent out once with the next input frame
1600  // to encoder
1601  int32_t target_bitrate; // A target bitrate to reconfig, -1 if inactive
1602  int force_idr_frame; // force IDR frame type
1603  ni_long_term_ref_t ltr_to_set; // LTR to be set
1604  int32_t ltr_interval; // LTR interval to set
1605  int32_t ltr_frame_ref_invalid; // frame after which all ref to be invalid
1606  ni_framerate_t framerate; // framerate to reconfig, 0 if inactive
1607  ni_vui_hrd_t vui; // vui to reconfig
1608 
1609  // path of decoder input pkt saving folder
1610  char stream_dir_name[256];
1613 
1614  // some parameters for decoder session
1615  // int hw_frame_extra_buffer; e.g. 3
1619  int32_t isP2P;
1621  unsigned short domain;
1622  unsigned short bus;
1623  unsigned short dev;
1624  unsigned short fn;
1625 
1626  // the FW API version of device that opened
1627  uint8_t fw_rev[8];
1628  uint8_t ddr_config;
1629 
1631 
1633  uint32_t prev_fps;
1635  uint64_t prev_pts;
1639 
1640  uint32_t meta_size;
1644 
1645  // flags_array to save packet flags
1647 
1648  // for decoder: store currently returned decoded frame's pkt offset
1651 
1653 
1654  uint32_t count_frame_num_in_sec; //used in the vfr mode, indicate the frame count in seconds
1655  uint32_t passed_time_in_timebase_unit; //used in the vfr mode, indicate how long it has passed
1656 
1657  int32_t max_frame_size; // maxFrameSize (in bytes) to reconfig, 0 if inactive
1658 
1659  // block device name requested by caller to open: when specified this block
1660  // device has priority over hw_id which is device specified by index.
1662 
1663  // decoder low delay send/recv sync; async_mode = 0 by default, i.e.
1664  // codec send-to/recv-from FW is in synchrounous mode by default.
1667  ni_pthread_mutex_t low_delay_sync_mutex;
1668  ni_pthread_cond_t low_delay_sync_cond;
1669 
1670  // muxtex default from source session
1671  // required pointer to external if used by hwdl
1672  ni_pthread_mutex_t* pext_mutex;
1674 
1675  // required parameters for slow sequence change
1676  int32_t last_bitrate;
1678 
1679  // AI embedded network parameters data
1681 
1684  //shared variable for main thread to read and keepalive thread to update
1685  volatile uint64_t last_access_time;
1686 
1687  int reconfig_crf; // crf value to reconfig (range in [0..51]), -1 if inactive
1688  int reconfig_crf_decimal; // crf decimal fration value to reconfig
1689  // (range in [0..99]), -1 if inactive
1690  int reconfig_vbv_buffer_size; // vbv buffer size value to reconfig
1691  int reconfig_vbv_max_rate; // vbv max rate value to reconfig
1692 
1697  uint64_t av1_pkt_num;
1698 
1704  uint32_t pkt_delay_cnt;
1705  char E2EID[128];
1707  int pixel_format_changed; // only for decoder now
1709 
1712  double psnr_y;
1713  double psnr_u;
1714  double psnr_v;
1718 
1720 
1721  // write packet/frame required buf size
1723 
1724  // record the drop num
1726 
1727  //for AI aio
1728  ni_aio_context_t aio_context;
1729  ni_iocb_t **iocbs;
1730  ni_io_event_t *io_event;
1732 
1733 typedef struct _ni_split_context_t
1734 {
1735  int enabled;
1736  int w[3];
1737  int h[3];
1738  int f[3]; //planar format
1739  int f8b[3]; //forced 8bit
1740  //int crop_meta_data_rltb[3][4]; //crop rectangle
1742 
1743 /*!*
1744 * \brief This is an enumeration for encoder reconfiguration test settings
1745 */
1746 typedef enum _ni_reconfig
1747 {
1753 //XCODER_TEST_RECONF_RC = 5, // not required by customers
1754  XCODER_TEST_RECONF_RC_MIN_MAX_QP = 6, // reconfig min&max QP
1755 #ifdef QUADRA
1760  XCODER_TEST_RECONF_RC_MIN_MAX_QP_REDUNDANT = 11, // reconfig min&max QP through libxcoder API (redundant demo mode index)
1766  XCODER_TEST_FORCE_IDR_FRAME = 100, // force IDR through libxcoder API
1767  XCODER_TEST_RECONF_BR_API = 101, // reconfig BR through libxcoder API
1768  XCODER_TEST_RECONF_INTRAPRD_API = 102, // reconfig intraperiod through libxcoder API
1769  XCODER_TEST_RECONF_VUI_HRD_API = 103, // reconfig VUI through libxcoder API
1770  XCODER_TEST_RECONF_LTR_API = 104, // reconfig LTR through libxcoder API
1771  XCODER_TEST_RECONF_RC_MIN_MAX_QP_API_REDUNDANT = 106, // reconfig min&max QP through libxcoder API (redundant demo mode index)
1772  XCODER_TEST_RECONF_LTR_INTERVAL_API = 107, // reconf LTR interval thru API
1773  XCODER_TEST_INVALID_REF_FRAME_API = 108, // invalidate ref frame thru API
1774  XCODER_TEST_RECONF_FRAMERATE_API = 109, // reconfig framerate through libxcoder API
1775  XCODER_TEST_RECONF_MAX_FRAME_SIZE_API = 110, // reconfig maxFrameSize through libxcoder API
1776  XCODER_TEST_RECONF_RC_MIN_MAX_QP_API = 111, // reconfig min&max QP through libxcoder API
1777  XCODER_TEST_CRF_API = 114, // reconfig crf through libxcoder API
1778  XCODER_TEST_CRF_FLOAT_API = 115, // reconfig crf float type through libxcoder API
1779  XCODER_TEST_RECONF_VBV_API = 116, // reconfig vbv buffer size and vbv max rate through libxcoder API
1780  XCODER_TEST_RECONF_MAX_FRAME_SIZE_RATIO_API = 117, // reconfig maxFrameSize ratio through libxcoder API
1781  XCODER_TEST_RECONF_SLICE_ARG_API = 118, // reconfig sliceArg through libxcoder API
1783 #endif
1784 } ni_reconfig_t;
1785 
1787 {
1788  /* A float type of buffer data */
1790  /* A half float type of buffer data */
1792  /* A 8 bit unsigned integer type of buffer data */
1794  /* A 8 bit signed integer type of buffer data */
1796  /* A 16 bit unsigned integer type of buffer data */
1798  /* A 16 signed integer type of buffer data */
1800  /* A char type of data */
1802  /* A bfloat 16 type of data */
1804  /* A 32 bit integer type of data */
1806  /* A 32 bit unsigned signed integer type of buffer */
1808  /* A 64 bit signed integer type of data */
1810  /* A 64 bit unsigned integer type of data */
1812  /* A 64 bit float type of buffer data */
1815 
1817 {
1818  /* Not quantized format */
1820  /* A quantization data type which specifies the fixed point position for whole tensor. */
1822  /* A quantization data type which has scale value and zero point to match with TF and
1823  Android NN API for whole tensor. */
1825  /* A max vaule support quantize format */
1828 
1830 {
1831  NI_DDR_PRIORITY_NONE = -1, // Do not change DDR priorities
1832  NI_DDR_PRIORITY_RESET, // Reset DDR priorities to default
1833  NI_DDR_PRIORITY_DECENC, // DDR prioritize decoder and encoder
1834  NI_DDR_PRIORITY_FILT, // DDR prioritize filter
1835  NI_DDR_PRIORITY_AI, // DDR prioritize AI
1838 
1839 #ifdef QUADRA
1840 #define NI_ENC_GOP_PARAMS_G0_POC_OFFSET "g0pocOffset"
1841 #define NI_ENC_GOP_PARAMS_G0_QP_OFFSET "g0QpOffset"
1842 //#define NI_ENC_GOP_PARAMS_G0_QP_FACTOR "g0QpFactor"
1843 #define NI_ENC_GOP_PARAMS_G0_TEMPORAL_ID "g0temporalId"
1844 #define NI_ENC_GOP_PARAMS_G0_PIC_TYPE "g0picType"
1845 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PICS "g0numRefPics"
1846 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC0 "g0refPic0"
1847 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC0_USED "g0refPic0Used"
1848 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC1 "g0refPic1"
1849 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC1_USED "g0refPic1Used"
1850 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC2 "g0refPic2"
1851 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC2_USED "g0refPic2Used"
1852 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC3 "g0refPic3"
1853 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC3_USED "g0refPic3Used"
1854 
1855 #define NI_ENC_GOP_PARAMS_G1_POC_OFFSET "g1pocOffset"
1856 #define NI_ENC_GOP_PARAMS_G1_QP_OFFSET "g1QpOffset"
1857 //#define NI_ENC_GOP_PARAMS_G1_QP_FACTOR "g1QpFactor"
1858 #define NI_ENC_GOP_PARAMS_G1_TEMPORAL_ID "g1temporalId"
1859 #define NI_ENC_GOP_PARAMS_G1_PIC_TYPE "g1picType"
1860 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PICS "g1numRefPics"
1861 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC0 "g1refPic0"
1862 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC0_USED "g1refPic0Used"
1863 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC1 "g1refPic1"
1864 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC1_USED "g1refPic1Used"
1865 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC2 "g1refPic2"
1866 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC2_USED "g1refPic2Used"
1867 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC3 "g1refPic3"
1868 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC3_USED "g1refPic3Used"
1869 
1870 #define NI_ENC_GOP_PARAMS_G2_POC_OFFSET "g2pocOffset"
1871 #define NI_ENC_GOP_PARAMS_G2_QP_OFFSET "g2QpOffset"
1872 //#define NI_ENC_GOP_PARAMS_G2_QP_FACTOR "g2QpFactor"
1873 #define NI_ENC_GOP_PARAMS_G2_TEMPORAL_ID "g2temporalId"
1874 #define NI_ENC_GOP_PARAMS_G2_PIC_TYPE "g2picType"
1875 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PICS "g2numRefPics"
1876 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC0 "g2refPic0"
1877 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC0_USED "g2refPic0Used"
1878 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC1 "g2refPic1"
1879 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC1_USED "g2refPic1Used"
1880 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC2 "g2refPic2"
1881 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC2_USED "g2refPic2Used"
1882 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC3 "g2refPic3"
1883 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC3_USED "g2refPic3Used"
1884 
1885 #define NI_ENC_GOP_PARAMS_G3_POC_OFFSET "g3pocOffset"
1886 #define NI_ENC_GOP_PARAMS_G3_QP_OFFSET "g3QpOffset"
1887 //#define NI_ENC_GOP_PARAMS_G3_QP_FACTOR "g3QpFactor"
1888 #define NI_ENC_GOP_PARAMS_G3_TEMPORAL_ID "g3temporalId"
1889 #define NI_ENC_GOP_PARAMS_G3_PIC_TYPE "g3picType"
1890 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PICS "g3numRefPics"
1891 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC0 "g3refPic0"
1892 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC0_USED "g3refPic0Used"
1893 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC1 "g3refPic1"
1894 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC1_USED "g3refPic1Used"
1895 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC2 "g3refPic2"
1896 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC2_USED "g3refPic2Used"
1897 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC3 "g3refPic3"
1898 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC3_USED "g3refPic3Used"
1899 
1900 #define NI_ENC_GOP_PARAMS_G4_POC_OFFSET "g4pocOffset"
1901 #define NI_ENC_GOP_PARAMS_G4_QP_OFFSET "g4QpOffset"
1902 //#define NI_ENC_GOP_PARAMS_G4_QP_FACTOR "g4QpFactor"
1903 #define NI_ENC_GOP_PARAMS_G4_TEMPORAL_ID "g4temporalId"
1904 #define NI_ENC_GOP_PARAMS_G4_PIC_TYPE "g4picType"
1905 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PICS "g4numRefPics"
1906 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC0 "g4refPic0"
1907 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC0_USED "g4refPic0Used"
1908 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC1 "g4refPic1"
1909 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC1_USED "g4refPic1Used"
1910 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC2 "g4refPic2"
1911 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC2_USED "g4refPic2Used"
1912 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC3 "g4refPic3"
1913 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC3_USED "g4refPic3Used"
1914 
1915 #define NI_ENC_GOP_PARAMS_G5_POC_OFFSET "g5pocOffset"
1916 #define NI_ENC_GOP_PARAMS_G5_QP_OFFSET "g5QpOffset"
1917 //#define NI_ENC_GOP_PARAMS_G5_QP_FACTOR "g5QpFactor"
1918 #define NI_ENC_GOP_PARAMS_G5_TEMPORAL_ID "g5temporalId"
1919 #define NI_ENC_GOP_PARAMS_G5_PIC_TYPE "g5picType"
1920 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PICS "g5numRefPics"
1921 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC0 "g5refPic0"
1922 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC0_USED "g5refPic0Used"
1923 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC1 "g5refPic1"
1924 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC1_USED "g5refPic1Used"
1925 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC2 "g5refPic2"
1926 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC2_USED "g5refPic2Used"
1927 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC3 "g5refPic3"
1928 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC3_USED "g5refPic3Used"
1929 
1930 #define NI_ENC_GOP_PARAMS_G6_POC_OFFSET "g6pocOffset"
1931 #define NI_ENC_GOP_PARAMS_G6_QP_OFFSET "g6QpOffset"
1932 //#define NI_ENC_GOP_PARAMS_G6_QP_FACTOR "g6QpFactor"
1933 #define NI_ENC_GOP_PARAMS_G6_TEMPORAL_ID "g6temporalId"
1934 #define NI_ENC_GOP_PARAMS_G6_PIC_TYPE "g6picType"
1935 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PICS "g6numRefPics"
1936 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC0 "g6refPic0"
1937 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC0_USED "g6refPic0Used"
1938 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC1 "g6refPic1"
1939 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC1_USED "g6refPic1Used"
1940 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC2 "g6refPic2"
1941 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC2_USED "g6refPic2Used"
1942 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC3 "g6refPic3"
1943 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC3_USED "g6refPic3Used"
1944 
1945 #define NI_ENC_GOP_PARAMS_G7_POC_OFFSET "g7pocOffset"
1946 #define NI_ENC_GOP_PARAMS_G7_QP_OFFSET "g7QpOffset"
1947 //#define NI_ENC_GOP_PARAMS_G7_QP_FACTOR "g7QpFactor"
1948 #define NI_ENC_GOP_PARAMS_G7_TEMPORAL_ID "g7temporalId"
1949 #define NI_ENC_GOP_PARAMS_G7_PIC_TYPE "g7picType"
1950 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PICS "g7numRefPics"
1951 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC0 "g7refPic0"
1952 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC0_USED "g7refPic0Used"
1953 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC1 "g7refPic1"
1954 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC1_USED "g7refPic1Used"
1955 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC2 "g7refPic2"
1956 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC2_USED "g7refPic2Used"
1957 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC3 "g7refPic3"
1958 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC3_USED "g7refPic3Used"
1959 
1960 typedef struct _ni_gop_rps
1961 {
1962  int ref_pic; /*!*< delta_poc of this short reference picture relative to the poc of current picture or index of LTR */
1963  int ref_pic_used; /*!*< whether this reference picture used by current picture */
1964 } ni_gop_rps_t;
1965 
1966 typedef struct _ni_gop_params
1967 {
1968  int poc_offset; /*!*< A POC of Nth picture in the custom GOP */
1969  int qp_offset; /*!*< QP offset of Nth picture in the custom GOP */
1970  float qp_factor; /*!*< QP factor of Nth picture in the custom GOP */
1971  int temporal_id; /*!*< A temporal ID of Nth picture in the custom GOP */
1972  int pic_type; /*!*< A picture type of Nth picture in the custom GOP */
1973  int num_ref_pics; /*!*< the number of reference pictures kept for this picture, the value should be within [0, 4] */
1975 } ni_gop_params_t;
1976 #else
1977 #define NI_ENC_GOP_PARAMS_G0_PIC_TYPE "g0picType"
1978 #define NI_ENC_GOP_PARAMS_G0_POC_OFFSET "g0pocOffset"
1979 #define NI_ENC_GOP_PARAMS_G0_PIC_QP "g0picQp"
1980 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_PIC_L0 "g0numRefPicL0"
1981 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_POC_L0 "g0refPocL0"
1982 #define NI_ENC_GOP_PARAMS_G0_NUM_REF_POC_L1 "g0refPocL1"
1983 #define NI_ENC_GOP_PARAMS_G0_TEMPORAL_ID "g0temporalId"
1984 
1985 #define NI_ENC_GOP_PARAMS_G1_PIC_TYPE "g1picType"
1986 #define NI_ENC_GOP_PARAMS_G1_POC_OFFSET "g1pocOffset"
1987 #define NI_ENC_GOP_PARAMS_G1_PIC_QP "g1picQp"
1988 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_PIC_L0 "g1numRefPicL0"
1989 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_POC_L0 "g1refPocL0"
1990 #define NI_ENC_GOP_PARAMS_G1_NUM_REF_POC_L1 "g1refPocL1"
1991 #define NI_ENC_GOP_PARAMS_G1_TEMPORAL_ID "g1temporalId"
1992 
1993 #define NI_ENC_GOP_PARAMS_G2_PIC_TYPE "g2picType"
1994 #define NI_ENC_GOP_PARAMS_G2_POC_OFFSET "g2pocOffset"
1995 #define NI_ENC_GOP_PARAMS_G2_PIC_QP "g2picQp"
1996 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_PIC_L0 "g2numRefPicL0"
1997 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_POC_L0 "g2refPocL0"
1998 #define NI_ENC_GOP_PARAMS_G2_NUM_REF_POC_L1 "g2refPocL1"
1999 #define NI_ENC_GOP_PARAMS_G2_TEMPORAL_ID "g2temporalId"
2000 
2001 #define NI_ENC_GOP_PARAMS_G3_PIC_TYPE "g3picType"
2002 #define NI_ENC_GOP_PARAMS_G3_POC_OFFSET "g3pocOffset"
2003 #define NI_ENC_GOP_PARAMS_G3_PIC_QP "g3picQp"
2004 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_PIC_L0 "g3numRefPicL0"
2005 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_POC_L0 "g3refPocL0"
2006 #define NI_ENC_GOP_PARAMS_G3_NUM_REF_POC_L1 "g3refPocL1"
2007 #define NI_ENC_GOP_PARAMS_G3_TEMPORAL_ID "g3temporalId"
2008 
2009 #define NI_ENC_GOP_PARAMS_G4_PIC_TYPE "g4picType"
2010 #define NI_ENC_GOP_PARAMS_G4_POC_OFFSET "g4pocOffset"
2011 #define NI_ENC_GOP_PARAMS_G4_PIC_QP "g4picQp"
2012 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_PIC_L0 "g4numRefPicL0"
2013 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_POC_L0 "g4refPocL0"
2014 #define NI_ENC_GOP_PARAMS_G4_NUM_REF_POC_L1 "g4refPocL1"
2015 #define NI_ENC_GOP_PARAMS_G4_TEMPORAL_ID "g4temporalId"
2016 
2017 #define NI_ENC_GOP_PARAMS_G5_PIC_TYPE "g5picType"
2018 #define NI_ENC_GOP_PARAMS_G5_POC_OFFSET "g5pocOffset"
2019 #define NI_ENC_GOP_PARAMS_G5_PIC_QP "g5picQp"
2020 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_PIC_L0 "g5numRefPicL0"
2021 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_POC_L0 "g5refPocL0"
2022 #define NI_ENC_GOP_PARAMS_G5_NUM_REF_POC_L1 "g5refPocL1"
2023 #define NI_ENC_GOP_PARAMS_G5_TEMPORAL_ID "g5temporalId"
2024 
2025 #define NI_ENC_GOP_PARAMS_G6_PIC_TYPE "g6picType"
2026 #define NI_ENC_GOP_PARAMS_G6_POC_OFFSET "g6pocOffset"
2027 #define NI_ENC_GOP_PARAMS_G6_PIC_QP "g6picQp"
2028 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_PIC_L0 "g6numRefPicL0"
2029 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_POC_L0 "g6refPocL0"
2030 #define NI_ENC_GOP_PARAMS_G6_NUM_REF_POC_L1 "g6refPocL1"
2031 #define NI_ENC_GOP_PARAMS_G6_TEMPORAL_ID "g6temporalId"
2032 
2033 #define NI_ENC_GOP_PARAMS_G7_PIC_TYPE "g7picType"
2034 #define NI_ENC_GOP_PARAMS_G7_POC_OFFSET "g7pocOffset"
2035 #define NI_ENC_GOP_PARAMS_G7_PIC_QP "g7picQp"
2036 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_PIC_L0 "g7numRefPicL0"
2037 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_POC_L0 "g7refPocL0"
2038 #define NI_ENC_GOP_PARAMS_G7_NUM_REF_POC_L1 "g7refPocL1"
2039 #define NI_ENC_GOP_PARAMS_G7_TEMPORAL_ID "g7temporalId"
2040 
2041 typedef struct _ni_gop_params
2042 {
2043  int pic_type; /*!*< A picture type of Nth picture in the custom GOP */
2044  int poc_offset; /*!*< A POC of Nth picture in the custom GOP */
2045  int pic_qp; /*!*< A quantization parameter of Nth picture in the custom GOP */
2046  int num_ref_pic_L0; /*!*< The number of reference L0 of Nth picture in the custom GOP */
2047  int ref_poc_L0; /*!*< A POC of reference L0 of Nth picture in the custom GOP */
2048  int ref_poc_L1; /*!*< A POC of reference L1 of Nth picture in the custom GOP */
2049  int temporal_id; /*!*< A temporal ID of Nth picture in the custom GOP */
2050 } ni_gop_params_t;
2051 #endif
2052 
2053 
2054 
2055 #define NI_ENC_GOP_PARAMS_CUSTOM_GOP_SIZE "customGopSize"
2056 
2058 {
2059  int custom_gop_size; /*!*< The size of custom GOP (0~8) */
2060  ni_gop_params_t pic_param[NI_MAX_GOP_NUM]; /*!*< Picture parameters of Nth picture in custom GOP */
2062 
2063 #define NI_ENC_REPEAT_HEADERS_FIRST_IDR 0
2064 #define NI_ENC_REPEAT_HEADERS_ALL_I_FRAMES 1
2065 #define NI_KEEP_ALIVE_TIMEOUT "keepAliveTimeout"
2066 
2068 {
2069 #define NI_ENC_PARAM_BITRATE "bitrate"
2070 #define NI_ENC_PARAM_RECONF_DEMO_MODE "ReconfDemoMode"
2071 #define NI_ENC_PARAM_RECONF_FILE "ReconfFile"
2072 #define NI_ENC_PARAM_ROI_DEMO_MODE "RoiDemoMode"
2073 #define NI_ENC_PARAM_CACHE_ROI "cacheRoi"
2074 #define NI_ENC_PARAM_FORCE_PIC_QP_DEMO_MODE "ForcePicQpDemoMode"
2075 #define NI_ENC_PARAM_GEN_HDRS "GenHdrs"
2076 #define NI_ENC_PARAM_PADDING "padding"
2077 #define NI_ENC_PARAM_FORCE_FRAME_TYPE "forceFrameType"
2078 #define NI_ENC_PARAM_PROFILE "profile"
2079 #define NI_ENC_PARAM_LEVEL "level"
2080 #define NI_ENC_PARAM_HIGH_TIER "high-tier"
2081 #define NI_ENC_PARAM_LOG_LEVEL "log-level"
2082 #define NI_ENC_PARAM_LOG "log"
2083 #define NI_ENC_PARAM_GOP_PRESET_IDX "gopPresetIdx"
2084 #define NI_ENC_PARAM_LOW_DELAY "lowDelay"
2085 #define NI_ENC_PARAM_MIN_FRAMES_DELAY "minFramesDelay"
2086 #define NI_ENC_PARAM_USE_RECOMMENDED_ENC_PARAMS "useRecommendEncParam"
2087 #define NI_ENC_PARAM_USE_LOW_DELAY_POC_TYPE "useLowDelayPocType"
2088 #define NI_ENC_PARAM_CU_SIZE_MODE "cuSizeMode"
2089 #define NI_ENC_PARAM_MAX_NUM_MERGE "maxNumMerge"
2090 #define NI_ENC_PARAM_ENABLE_DYNAMIC_8X8_MERGE "dynamicMerge8x8Enable"
2091 #define NI_ENC_PARAM_ENABLE_DYNAMIC_16X16_MERGE "dynamicMerge16x16Enable"
2092 #define NI_ENC_PARAM_ENABLE_DYNAMIC_32X32_MERGE "dynamicMerge32x32Enable"
2093 #define NI_ENC_PARAM_ENABLE_RATE_CONTROL "RcEnable"
2094 #define NI_ENC_PARAM_ENABLE_CU_LEVEL_RATE_CONTROL "cuLevelRCEnable"
2095 #define NI_ENC_PARAM_ENABLE_HVS_QP "hvsQPEnable"
2096 #define NI_ENC_PARAM_ENABLE_HVS_QP_SCALE "hvsQpScaleEnable"
2097 #define NI_ENC_PARAM_HVS_QP_SCALE "hvsQpScale"
2098 #define NI_ENC_PARAM_MIN_QP "minQp"
2099 #define NI_ENC_PARAM_MAX_QP "maxQp"
2100 #define NI_ENC_PARAM_MAX_DELTA_QP "maxDeltaQp"
2101 #define NI_ENC_PARAM_FORCED_HEADER_ENABLE "repeatHeaders"
2102 #define NI_ENC_PARAM_ROI_ENABLE "roiEnable"
2103 #define NI_ENC_PARAM_CONF_WIN_TOP "confWinTop"
2104 #define NI_ENC_PARAM_CONF_WIN_BOTTOM "confWinBot"
2105 #define NI_ENC_PARAM_CONF_WIN_LEFT "confWinLeft"
2106 #define NI_ENC_PARAM_CONF_WIN_RIGHT "confWinRight"
2107 #define NI_ENC_PARAM_INTRA_PERIOD "intraPeriod"
2108 #define NI_ENC_PARAM_TRANS_RATE "transRate"
2109 #define NI_ENC_PARAM_FRAME_RATE "frameRate"
2110 #define NI_ENC_PARAM_FRAME_RATE_DENOM "frameRateDenom"
2111 #define NI_ENC_PARAM_INTRA_QP "intraQP"
2112 #define NI_ENC_PARAM_DECODING_REFRESH_TYPE "decodingRefreshType"
2113 #define NI_ENC_PARAM_INTRA_REFRESH_RESET "intraRefreshResetOnForceIDR"
2114 // Rev. B: H.264 only parameters.
2115 #define NI_ENC_PARAM_ENABLE_8X8_TRANSFORM "transform8x8Enable"
2116 #define NI_ENC_PARAM_ENTROPY_CODING_MODE "entropyCodingMode"
2117 // Rev. B: shared between HEVC and H.264
2118 #define NI_ENC_PARAM_SLICE_MODE "sliceMode"
2119 #define NI_ENC_PARAM_SLICE_ARG "sliceArg"
2120 #define NI_ENC_PARAM_INTRA_MB_REFRESH_MODE "intraMbRefreshMode"
2121 #define NI_ENC_PARAM_INTRA_MB_REFRESH_ARG "intraMbRefreshArg"
2122 #define NI_ENC_PARAM_INTRA_REFRESH_MODE "intraRefreshMode"
2123 #define NI_ENC_PARAM_INTRA_REFRESH_ARG "intraRefreshArg"
2124 #define NI_ENC_PARAM_ENABLE_MB_LEVEL_RC "mbLevelRcEnable"
2125 #define NI_ENC_PARAM_PREFERRED_TRANSFER_CHARACTERISTICS "prefTRC"
2126 
2127 // To be deprecated: RcInitDelay -> vbvBufferSize, cbr -> fillerEnable
2128 #define NI_ENC_PARAM_RC_INIT_DELAY "RcInitDelay"
2129 #define NI_ENC_PARAM_CBR "cbr"
2130 #define NI_ENC_PARAM_INTRA_REFRESH_MIN_PERIOD "intraRefreshMinPeriod"
2131 
2132 //QUADRA
2134 #define NI_ENC_PARAM_CONSTANT_RATE_FACTOR NI_DEPRECATED_MACRO "crf"
2135 #define NI_ENC_PARAM_CONSTANT_RATE_FACTOR_FLOAT "crfFloat"
2136 #define NI_ENC_PARAM_RDO_LEVEL "rdoLevel"
2137 #define NI_ENC_PARAM_RDO_QUANT "EnableRdoQuant"
2138 #define NI_ENC_PARAM_MAX_CLL "maxCLL"
2139 #define NI_ENC_PARAM_MASTER_DISPLAY "masterDisplay"
2140 #define NI_ENC_PARAM_LOOK_AHEAD_DEPTH "lookAheadDepth"
2141 #define NI_ENC_PARAM_ENABLE_AUD "enableAUD"
2142 #define NI_ENC_PARAM_CTB_RC_MODE "ctbRcMode"
2143 #define NI_ENC_PARAM_GOP_SIZE "gopSize"
2144 #define NI_ENC_PARAM_GOP_LOW_DELAY "gopLowdelay"
2145 #define NI_ENC_PARAM_GDR_DURATION "intraRefreshDuration"
2146 #define NI_ENC_PARAM_HRD_ENABLE "hrdEnable"
2147 #define NI_ENC_PARAM_DOLBY_VISION_PROFILE "dolbyVisionProfile"
2148 #define NI_ENC_PARAM_VBV_BUFFER_SIZE "vbvBufferSize"
2149 #define NI_ENC_PARAM_VBV_MAXRAE "vbvMaxRate"
2150 #define NI_ENC_PARAM_ENABLE_FILLER "fillerEnable"
2151 #define NI_ENC_PARAM_ENABLE_PIC_SKIP "picSkip"
2153 #define NI_ENC_PARAM_MAX_FRAME_SIZE_LOW_DELAY NI_DEPRECATED_MACRO "maxFrameSize"
2154 #define NI_ENC_PARAM_MAX_FRAME_SIZE_BITS_LOW_DELAY "maxFrameSize-Bits"
2155 #define NI_ENC_PARAM_MAX_FRAME_SIZE_BYTES_LOW_DELAY "maxFrameSize-Bytes"
2156 #define NI_ENC_PARAM_LTR_REF_INTERVAL "ltrRefInterval"
2157 #define NI_ENC_PARAM_LTR_REF_QPOFFSET "ltrRefQpOffset"
2158 #define NI_ENC_PARAM_LTR_FIRST_GAP "ltrFirstGap"
2159 #define NI_ENC_PARAM_LTR_NEXT_INTERVAL "ltrNextInterval"
2160 #define NI_ENC_PARAM_MULTICORE_JOINT_MODE "multicoreJointMode"
2161 #define NI_ENC_PARAM_JPEG_QLEVEL "qlevel"
2162 #define NI_ENC_PARAM_CHROMA_QP_OFFSET "chromaQpOffset"
2163 #define NI_ENC_PARAM_TOL_RC_INTER "tolCtbRcInter"
2164 #define NI_ENC_PARAM_TOL_RC_INTRA "tolCtbRcIntra"
2165 #define NI_ENC_PARAM_BITRATE_WINDOW "bitrateWindow"
2166 #define NI_ENC_INLOOP_DS_RATIO "inLoopDSRatio"
2167 #define NI_ENC_BLOCK_RC_SIZE "blockRCSize"
2168 #define NI_ENC_RC_QP_DELTA_RANGE "rcQpDeltaRange"
2169 #define NI_ENC_CTB_ROW_QP_STEP "ctbRowQpStep"
2170 #define NI_ENC_NEW_RC_ENABLE "newRcEnable"
2171 #define NI_ENC_PARAM_INTRA_QP_DELTA "intraQpDelta"
2172 #define NI_ENC_PARAM_LONG_TERM_REFERENCE_ENABLE "longTermReferenceEnable"
2173 #define NI_ENC_PARAM_LONG_TERM_REFERENCE_COUNT "longTermReferenceCount"
2174 #define NI_ENC_PARAM_LONG_TERM_REFERENCE_INTERVAL "longTermReferenceInterval"
2175 #define NI_ENC_PARAM_SKIP_FRAME_ENABLE "skipFrameEnable"
2176 #define NI_ENC_PARAM_MAX_CONSUTIVE_SKIP_FRAME_NUMBER "maxConsecutiveSkipFrameNum"
2177 #define NI_ENC_PARAM_SKIP_FRAME_INTERVAL "skipFrameInterVal"
2178 #define NI_ENC_PARAM_IFRAME_SIZE_RATIO "iFrameSizeRatio"
2179 #define NI_ENC_PARAM_STILL_IMAGE_DETECT_LEVEL "stillImageDetectLevel"
2180 #define NI_ENC_PARAM_SCENE_CHANG_DETECT_LEVEL "sceneChangeDetectLevel"
2181 #define NI_ENC_PARAM_ENABLE_SMOOTH_CRF "enableSmoothCRF"
2182 #define NI_ENC_PARAM_ENABLE_COMPENSATE_QP "enableCompensateQp"
2183 // stream color info
2184 #define NI_ENC_PARAM_COLOR_PRIMARY "colorPri"
2185 #define NI_ENC_PARAM_COLOR_TRANSFER_CHARACTERISTIC "colorTrc"
2186 #define NI_ENC_PARAM_COLOR_SPACE "colorSpc"
2187 // sample aspect ratio specified in numerator/denominator
2188 #define NI_ENC_PARAM_SAR_NUM "sarNum"
2189 #define NI_ENC_PARAM_SAR_DENOM "sarDenom"
2190 // video_full_range_flag
2191 #define NI_ENC_PARAM_VIDEO_FULL_RANGE_FLAG "videoFullRangeFlag"
2192 // VFR related
2193 #define NI_ENC_PARAM_ENABLE_VFR "enableVFR"
2194 #define NI_ENC_ENABLE_SSIM "enableSSIM"
2195 #define NI_ENC_PARAM_AVCC_HVCC "avccHvcc"
2196 #define NI_ENC_PARAM_AV1_ERROR_RESILIENT_MODE "av1ErrorResilientMode"
2197 // set memory allocation parameters, M_MMAP_THRESHOLD and M_TRIM_THRESHOLD
2198 #define NI_ENC_PARAM_STATIC_MMAP_THRESHOLD "staticMmapThreshold"
2199 #define NI_ENC_PARAM_TEMPORAL_LAYERS_ENABLE "temporalLayersEnable"
2200 #define NI_ENC_PARAM_ENABLE_AI_ENHANCE "enableAIEnhance"
2201 #define NI_ENC_PARAM_ENABLE_AI_HVSPLUS "enableHVSPlus"
2202 #define NI_ENC_PARAM_ENABLE_2PASS_GOP "enable2PassGop"
2203 #define NI_ENC_PARAM_ZEROCOPY_MODE "zeroCopyMode"
2204 #define NI_ENC_PARAM_AI_ENHANCE_LEVEL "AIEnhanceLevel"
2205 #define NI_ENC_PARAM_HVSPLUS_LEVEL "HVSPlusLevel"
2206 #define NI_ENC_PARAM_CROP_WIDTH "cropWidth"
2207 #define NI_ENC_PARAM_CROP_HEIGHT "cropHeight"
2208 #define NI_ENC_PARAM_HORIZONTAL_OFFSET "horOffset"
2209 #define NI_ENC_PARAM_VERTICAL_OFFSET "verOffset"
2210 #define NI_ENC_PARAM_CONSTANT_RATE_FACTOR_MAX "crfMax"
2211 #define NI_ENC_PARAM_QCOMP "qcomp"
2212 #define NI_ENC_PARAM_NO_MBTREE "noMbtree"
2213 #define NI_ENC_PARAM_NO_HW_MULTIPASS_SUPPORT "noHWMultiPassSupport"
2214 #define NI_ENC_PARAM_CU_TREE_FACTOR "cuTreeFactor"
2215 #define NI_ENC_PARAM_IP_RATIO "ipRatio"
2216 #define NI_ENC_PARAM_ENABLE_IP_RATIO "enableipRatio"
2217 #define NI_ENC_PARAM_PB_RATIO "pbRatio"
2218 #define NI_ENC_PARAM_CPLX_DECAY "cplxDecay"
2219 #define NI_ENC_PARAM_PPS_INIT_QP "ppsInitQp"
2220 #define NI_ENC_PARAM_DDR_PRIORITY_MODE "ddrPriorityMode"
2221 #define NI_ENC_PARAM_BITRATE_MODE "bitrateMode"
2222 #define NI_ENC_PARAM_PASS1_QP "pass1Qp"
2223 #define NI_ENC_PARAM_HVS_BASE_MB_COMPLEXITY "hvsBaseMbComplexity"
2224 #define NI_ENC_PARAM_STATISTIC_OUTPUT_LEVEL "statisticOutputLevel"
2225 #define NI_ENC_PARAM_ENABLE_ALL_SEI_PASSTHRU "enableAllSeiPassthru"
2226 #define NI_ENC_PARAM_CRF_MAX_IFRAME_ENABLE "crfMaxIframeEnable"
2227 #define NI_ENC_PARAM_VBV_MINRATE "vbvMinRate"
2228 #define NI_ENC_PARAM_DISABLE_ADAPTIVE_BUFFERS "disableAdaptiveBuffers"
2229 #define NI_ENC_PARAM_DISABLE_BFRAME_RDOQ "disableBframeRDOQ"
2230 #define NI_ENC_PARAM_FORCE_BFRAME_QPFACTOR "forceBframeQpfactor"
2231 #define NI_ENC_PARAM_TUNE_BFRAME_VISUAL "tuneBframeVisual"
2232 #define NI_ENC_PARAM_ENABLE_ACQUIRE_LIMIT "enableAcqLimit"
2233 #define NI_ENC_PARAM_GET_PSNR_MODE "getPsnrMode"
2234 #define NI_ENC_PARAM_PSNR_INTERVAL "intervalOfPsnr"
2235 #define NI_ENC_PARAM_CUSTOMIZE_ROI_QP_LEVEL "customizeQpLevel"
2236 #define NI_ENC_PARAM_CUSTOMIZE_ROI_QP_MAP "customizeQpMapFile"
2237 #define NI_ENC_PARAM_MOTION_CONSTRAINED_MODE "motionConstrainedMode"
2238 #define NI_ENC_PARAM_ALLOCATE_STRAEGY "encMemAllocateStrategy"
2239 #define NI_ENC_PARAM_SPATIAL_LAYERS "spatialLayers"
2240 #define NI_ENC_PARAM_ENABLE_TIMECODE "enableTimecode"
2241 #define NI_ENC_PARAM_SPATIAL_LAYERS_REF_BASE_LAYER "spatialLayersRefBaseLayer"
2242 #define NI_ENC_PARAM_GET_RECONSTRUCTED_MODE "getReconstructedMode"
2243 #define NI_ENC_PARAM_VBV_BUFFER_REENCODE "vbvBufferReencode"
2244 #define NI_ENC_PARAM_TOTAL_CUTREE_DEPTH "totalCuTreeDepth"
2245 #define NI_ENC_PARAM_ADAPTIVE_CUTREE "adaptiveCuTree"
2246 #define NI_ENC_PARAM_PRE_INTRA_HANDLING "preIntraHandling"
2247 #define NI_ENC_PARAM_BASE_LAYER_ONLY "baseLayerOnly"
2248 #define NI_ENC_PARAM_PAST_FRAME_MAX_INTRA_RATIO "pastFrameMaxIntraRatio"
2249 #define NI_ENC_PARAM_LINK_FRAME_MAX_INTRA_RATIO "linkFrameMaxIntraRatio"
2250 #define NI_ENC_PARAM_SPATIAL_LAYER_BITRATE "spatialLayerBitrate"
2251 
2252  //----- Start supported by all codecs -----
2256  int planar;
2259  //----- End supported by all codecs -----
2260 
2261  //----- Start supported by AV1, AVC, HEVC only -----
2262  int profile;
2264  //GOP Pattern
2266  /*!*< A GOP structure preset option (IPP, IBP, IBBP, IbBbP, use Custom GOP, etc) */ // 0-custom 1-I-only 2-IPPP 3-IBBB 4-IBP .....
2267 
2268  // CUSTOM_GOP
2270 
2277 
2278  // HLG preferred transfer characteristics
2280 
2283  int crf;
2294  int HDR10wx;
2295  int HDR10wy;
2307  //----- End supported by AV1, AVC, HEVC only -----
2308 
2309  //----- Start supported by AVC, HEVC only -----
2310  //ConformanceWindowOffsets
2311  int conf_win_top; /*!*< A conformance window size of TOP */
2312  int conf_win_bottom; /*!*< A conformance window size of BOTTOM */
2313  int conf_win_left; /*!*< A conformance window size of LEFT */
2314  int conf_win_right; /*!*< A conformance window size of RIGHT */
2318  //----- End supported by AVC, HEVC only -----
2319 
2320  //----- Start supported by AVC only -----
2322  //----- End supported by AVC only -----
2323 
2324  //----- Start supported by HEVC only -----
2329  //----- End supported by HEVC only -----
2330 
2331  //----- Start supported by JPEG only -----
2332  int qlevel;
2333  //----- End supported by JPEG only -----
2334 
2335  //----- Start test use only -----
2337  int gopSize;
2339  //----- End test use only -----
2340 
2341  //----- Start supported by AV1, AVC, HEVC only -----
2346  //----- End supported by AV1, AVC, HEVC only -----
2347 
2348  //----- Start test use only -----
2351  //----- End test use only -----
2352 
2353  //----- Start supported by AV1, AVC, HEVC only -----
2355  //----- End supported by AV1, AVC, HEVC only -----
2356 
2357  //----- start DEPRECATED or for T408 -----
2359  //Preset Mode
2360  int use_recommend_enc_params; /*!*< 0: Custom, 1: Slow speed and best quality, 2: Normal Speed and quality, 3: Fast Speed and Low Quality */
2361  //Encode Options
2362  int cu_size_mode; /*!*< bit 0: enable 8x8 CU, bit 1: enable 16x16 CU, bit 2: enable 32x32 CU */
2363  int max_num_merge; /*!*< Maximum number of merge candidates (0~2) */
2364  int enable_dynamic_8x8_merge; /*!*< It enables dynamic merge 8x8 candidates. */
2365  int enable_dynamic_16x16_merge; /*!*< It enables dynamic merge 16x16 candidates. */
2366  int enable_dynamic_32x32_merge; /*!*< It enables dynamic merge 32x32 candidates. */
2367 
2368  // Rev. B: H.264 only parameters, in ni_t408_config_t
2369  // - for H.264 on T408:
2373 
2375  //----- end DEPRECATED or for T408 -----
2376 
2377  struct //Rate control parameters
2378  {
2379  int enable_rate_control; /*!*< It enable rate control */
2380  int min_qp; /*!*< A minimum QP for rate control */ //8
2381  int max_qp; /*!*< A maximum QP for rate control */ //51
2382  int intra_qp;
2385 
2386  //no JPEG
2387  int enable_cu_level_rate_control; /*!*< It enable CU level rate control */
2388  int enable_hvs_qp; /*!*< It enable CU QP adjustment for subjective quality enhancement */
2389  int hvs_qp_scale; /*!*< A QP scaling factor for CU QP adjustment when hvcQpenable = 1 */
2393 
2394  //deprecated
2395  int enable_hvs_qp_scale; /*!*< It enable QP scaling factor for CU QP adjustment when enable_hvs_qp = 1 */
2396  int max_delta_qp; /*!*< A maximum delta QP for rate control */ //10
2399  } rc;
2400  int keep_alive_timeout; /* keep alive timeout setting */
2413  int crfMax;
2414  float qcomp;
2418  float ipRatio;
2419  float pbRatio;
2420  float cplxDecay;
2424  float crfFloat;
2426  // 0: no extra output encoder information
2427  // 1: Frame Level output encoder information
2428  // 2: Cu Level Output encoder information
2429  // 3: Frame&Cu Level encoder information
2465 
2467 {
2468 #define NI_DEC_PARAM_OUT "out"
2469 #define NI_DEC_PARAM_ENABLE_OUT_1 "enableOut1"
2470 #define NI_DEC_PARAM_ENABLE_OUT_2 "enableOut2"
2471 #define NI_DEC_PARAM_FORCE_8BIT_0 "force8Bit0"
2472 #define NI_DEC_PARAM_FORCE_8BIT_1 "force8Bit1"
2473 #define NI_DEC_PARAM_FORCE_8BIT_2 "force8Bit2"
2474 #define NI_DEC_PARAM_SEMI_PLANAR_0 "semiplanar0"
2475 #define NI_DEC_PARAM_SEMI_PLANAR_1 "semiplanar1"
2476 #define NI_DEC_PARAM_SEMI_PLANAR_2 "semiplanar2"
2477 #define NI_DEC_PARAM_CROP_MODE_0 "cropMode0"
2478 #define NI_DEC_PARAM_CROP_MODE_1 "cropMode1"
2479 #define NI_DEC_PARAM_CROP_MODE_2 "cropMode2"
2480 #define NI_DEC_PARAM_CROP_PARAM_0 "crop0"
2481 #define NI_DEC_PARAM_CROP_PARAM_1 "crop1"
2482 #define NI_DEC_PARAM_CROP_PARAM_2 "crop2"
2483 #define NI_DEC_PARAM_SCALE_0 "scale0"
2484 #define NI_DEC_PARAM_SCALE_1 "scale1"
2485 #define NI_DEC_PARAM_SCALE_2 "scale2"
2486 #define NI_DEC_PARAM_SCALE_0_LONG_SHORT_ADAPT "scale0LongShortAdapt"
2487 #define NI_DEC_PARAM_SCALE_1_LONG_SHORT_ADAPT "scale1LongShortAdapt"
2488 #define NI_DEC_PARAM_SCALE_2_LONG_SHORT_ADAPT "scale2LongShortAdapt"
2489 #define NI_DEC_PARAM_SCALE_0_RES_CEIL "scale0ResCeil"
2490 #define NI_DEC_PARAM_SCALE_1_RES_CEIL "scale1ResCeil"
2491 #define NI_DEC_PARAM_SCALE_2_RES_CEIL "scale2ResCeil"
2492 #define NI_DEC_PARAM_SCALE_0_ROUND "scale0Round"
2493 #define NI_DEC_PARAM_SCALE_1_ROUND "scale1Round"
2494 #define NI_DEC_PARAM_SCALE_2_ROUND "scale2Round"
2495 #define NI_DEC_PARAM_MULTICORE_JOINT_MODE "multicoreJointMode"
2496 #define NI_DEC_PARAM_SAVE_PKT "savePkt"
2497 #define NI_DEC_PARAM_LOW_DELAY "lowDelay"
2498 #define NI_DEC_PARAM_FORCE_LOW_DELAY "forceLowDelay"
2499 #define NI_DEC_PARAM_MIN_PACKETS_DELAY "minPacketsDelay"
2500 #define NI_DEC_PARAM_ENABLE_LOW_DELAY_CHECK "enableLowDelayCheck"
2501 #define NI_DEC_PARAM_ENABLE_USR_DATA_SEI_PASSTHRU "enableUserDataSeiPassthru"
2502 #define NI_DEC_PARAM_ENABLE_CUSTOM_SEI_PASSTHRU "customSeiPassthru"
2503 #define NI_DEC_PARAM_SVC_T_DECODING_LAYER "svctDecodingLayer"
2504 #define NI_DEC_PARAM_DDR_PRIORITY_MODE "ddrPriorityMode"
2505 #define NI_DEC_PARAM_EC_POLICY "ecPolicy"
2506 #define NI_DEC_PARAM_ENABLE_ADVANCED_EC "enableAdvancedEc"
2507 #define NI_DEC_PARAM_ERROR_THRESHOLD "ecErrThreshold"
2508 #define NI_DEC_PARAM_ENABLE_PPU_SCALE_ADAPT "enablePpuScaleAdapt"
2509 #define NI_DEC_PARAM_ENABLE_PPU_SCALE_LIMIT "enablePpuScaleLimit"
2510 #define NI_DEC_PARAM_MAX_EXTRA_HW_FRAME_CNT "maxExtraHwFrameCnt"
2511 #define NI_DEC_PARAM_SKIP_PTS_GUESS "skipPtsGuess"
2512 #define NI_DEC_PARAM_PKT_PTS_UNCHANGE "pktPtsUnchange"
2513 #define NI_DEC_PARAM_ENABLE_ALL_SEI_PASSTHRU "enableAllSeiPassthru"
2514 #define NI_DEC_PARAM_ENABLE_FOLLOW_IFRAME "enableFollowIFrame"
2515 #define NI_DEC_PARAM_DISABLE_ADAPTIVE_BUFFERS "disableAdaptiveBuffers"
2516 #define NI_DEC_PARAM_SURVIVE_STREAM_ERR "surviveStreamErr"
2517 #define NI_DEC_PARAM_REDUCE_DPB_DELAY "reduceDpbDelay"
2518 #define NI_DEC_PARAM_SKIP_EXTRA_HEADERS "skipExtraHeaders"
2519 
2523  int mcmode;
2524  int nb_save_pkt; // number of decoder input packets to be saved
2531  1]; /*cut-out of expression to be parsed*/
2535  1]; /*cut-out of expression to be parsed*/
2536  int keep_alive_timeout; /* keep alive timeout setting */
2537  // decoder lowDelay mode for All I packets or IPPP packets
2546  int enable_ppu_scale_adapt; // 0: disabled; 1: adapt to long edge; 2: adapt to short edge.
2553  // 0: disabled; 1: adapt to long edge; 2: adapt to short edge.
2556  int scale_round[NI_MAX_NUM_OF_DECODER_OUTPUTS]; // 0 up align 1 dowm align
2564 
2566 {
2568  int32_t input_width;
2569  int32_t input_height;
2570  int32_t in_rec_width;
2571  int32_t in_rec_height;
2572  int32_t in_rec_x;
2573  int32_t in_rec_y;
2574 
2576  int32_t output_width;
2577  int32_t output_height;
2578  int32_t out_rec_width;
2580  int32_t out_rec_x;
2581  int32_t out_rec_y;
2582 
2583  uint32_t rgba_color;
2586 
2587 typedef struct _ni_scaler_params_t
2588 {
2595 
2597 {
2598  uint32_t start_x;
2599  uint32_t start_y;
2600  uint32_t end_x;
2601  uint32_t end_y;
2602  uint32_t rgba_c;
2604 
2606  uint32_t ui32StartX;
2607  uint32_t ui32StartY;
2608  uint32_t ui32Width;
2609  uint32_t ui32Height;
2610  uint32_t ui32Valid;
2612 
2614 {
2617 
2621 
2622 typedef struct _ni_iovec {
2623  uint32_t size;
2624  void *ptr;
2625 } ni_iovec_t;
2626 
2627 typedef struct _ni_frame
2628 {
2629  // codec of the source from which this frame is decoded
2631 
2632  long long dts;
2633  long long pts;
2634  uint32_t end_of_stream;
2636  uint32_t video_width;
2637  uint32_t video_height;
2638 
2639  uint32_t crop_top;
2640  uint32_t crop_bottom;
2641  uint32_t crop_left;
2642  uint32_t crop_right;
2643 
2644  // for encoder: force headers on this frame
2645  uint16_t force_headers;
2646  // for encoder: control long term reference picture feature
2649 
2651  // for encoding: frame picture type sent to encoder
2652  // for decoding: frame picture type returned from decoder
2654  // total SEI size: used by encoder
2655  unsigned int sei_total_len;
2656 
2657  // SEI info of closed caption: returned by decoder or set by encoder
2658  unsigned int sei_cc_offset;
2659  unsigned int sei_cc_len;
2660  // SEI info of HDR: returned by decoder
2665  // SEI info of HDR10+: returned by decoder
2666  unsigned int sei_hdr_plus_offset;
2667  unsigned int sei_hdr_plus_len;
2668  // SEI info of User Data Unregistered SEI: returned by decoder
2671  // SEI info of alternative transfer characteristics: returned by decoder
2674  // VUI info: returned by decoder
2675  unsigned int vui_offset;
2676  unsigned int vui_len;
2677 
2678  // ROI data length: for encoder
2679  unsigned int roi_len;
2680  // reconfig data length: for encoder
2681  unsigned int reconf_len;
2682  // total extra data data length: for encoder
2683  unsigned int extra_data_len;
2684  // force pic qp value
2685  uint16_t force_pic_qp;
2686  // frame chunk index
2688 
2691 
2692  uint8_t *p_buffer;
2693  uint32_t buffer_size;
2694 
2695  ni_buf_t
2696  *dec_buf; // buffer pool entry (has memory pointed to by p_buffer)
2699 
2701 
2702  // frame auxiliary data
2705 
2706  // the following info is of the source stream that is returned by decoder:
2707  // color info, sample aspect ratio, timing etc that are useful at encoding.
2709  uint8_t color_trc;
2710  uint8_t color_space;
2713  uint16_t sar_width;
2714  uint16_t sar_height;
2716  uint32_t vui_time_scale;
2717 
2718  int flags; // flags of demuxed packet
2719 
2720  // for encoder: metadata buffer info if not contiguous with YUV
2723  // for encoder: whether metadata should be sent separately for frame
2725  uint64_t pkt_pos;
2726 
2727  // for encoder: non-4k-aligned part at the start of YUV data
2728  uint8_t *p_start_buffer;
2732  // for encoder: whether the start of non-4k-aligned YUV data should be sent separately for frame
2735  long long orignal_pts;
2736  uint32_t error_ratio;
2737 
2738  //for AI non-4k-aligned memory buffer
2739  uint32_t iovec_num;
2741 } ni_frame_t;
2742 
2743 typedef struct _ni_xcoder_params
2744 {
2745  int log;
2746  int preset;
2747  /* Numerator and denominator of frame rate */
2748  uint32_t fps_number;
2750  /* Width (in pixels) of the source pictures. If this width is not an even
2751  * multiple of 4, the encoder will pad the pictures internally to meet this
2752  * minimum requirement. All valid HEVC widths are supported */
2754 
2755  /* Height (in pixels) of the source pictures. If this height is not an even
2756  * multiple of 4, the encoder will pad the pictures internally to meet this
2757  * minimum requirement. All valid HEVC heights are supported */
2759  int bitrate;
2760  int roi_demo_mode; // for encoder ROI testing
2761  int reconf_demo_mode; // for encoder reconfiguration testing
2762  int force_pic_qp_demo_mode; // for force pic qp mode testing
2763  int low_delay_mode; // encoder low latency mode
2764  int padding; // encoder input padding setting
2765  NI_DEPRECATED int generate_enc_hdrs; // in libavcodec, open a dummy session to generate codec headers during init
2766  int use_low_delay_poc_type; // specifies the encoder to set
2767  // picture_order_count_type=2 in the H.264 SPS
2768 
2770 
2771  // 1: force on every frame with same input type; 0: no (except for I-frame)
2773 
2776 
2777  int cacheRoi; // enables caching of ROIs applied to subsequent frames
2778 
2780  NI_DEPRECATED uint32_t
2785 
2789  int sar_num;
2792 
2793  union
2794  {
2797  };
2798 
2799  // for encoder reconfiguration testing, saving key:val1,val2,val3,...val9
2800  // (max 9 values) in the demo reconfig data file this supports max 50000
2801  // lines in reconfig file, max 10 key/values per line
2807 
2808  int enable_vfr; //enable the vfr
2809 
2822 
2823 typedef struct _niFrameSurface1
2824 {
2825  uint16_t ui16FrameIdx; //frame location on device
2826  uint16_t ui16session_ID; //for instance tracking
2827  uint16_t ui16width; // width on device
2828  uint16_t ui16height; // height on device
2829  uint32_t ui32nodeAddress; //currently not in use, formerly offset
2830  int32_t device_handle; //handle to access device
2831  int8_t bit_depth; //1 == 8bit per pixel, 2 == 10bit
2832  int8_t encoding_type; //0 = semiplanar, 1 = planar, 2 = tiled4x4
2833  int8_t output_idx; // 0-2 for decoder output index
2834  int8_t src_cpu; // frame origin location
2835  int32_t dma_buf_fd; // P2P dma buffer file descriptor
2837 
2838 typedef struct _ni_frame_config
2839 {
2840  uint16_t picture_width;
2841  uint16_t picture_height;
2842  uint16_t picture_format;
2843  uint16_t options;
2846  int16_t rectangle_x;
2847  int16_t rectangle_y;
2848  uint32_t rgba_color;
2849  uint16_t frame_index;
2850  uint16_t session_id;
2851  uint8_t output_index;
2852  uint8_t orientation; // 0 <= n <= 3, (n * 90°) clockwise rotation
2854 
2855 typedef struct _ni_packet
2856 {
2857  long long dts;
2858  long long pts;
2859  long long pos;
2860  uint64_t pkt_pos;
2861  uint32_t end_of_stream;
2863  uint32_t video_width;
2864  uint32_t video_height;
2865  uint32_t frame_type; // encoding only 0=I, 1=P, 2=B
2867  void* p_data;
2868  uint32_t data_len;
2870 
2871  void* p_buffer;
2872  uint32_t buffer_size;
2873  uint32_t avg_frame_qp; // average frame QP reported by VPU
2880 
2881  int flags; // flags of demuxed packet
2882 
2884 
2885  double psnr_y;
2886  double psnr_u;
2887  double psnr_v;
2889  double ssim_y;
2890  double ssim_u;
2891  double ssim_v;
2894 } ni_packet_t;
2895 
2896 typedef struct _ni_session_data_io
2897 {
2898  union
2899  {
2902  }data;
2903 
2905 
2906 #define NI_XCODER_PRESET_NAMES_ARRAY_LEN 3
2907 #define NI_XCODER_LOG_NAMES_ARRAY_LEN 7
2908 
2909 #define NI_XCODER_PRESET_NAME_DEFAULT "default"
2910 #define NI_XCODER_PRESET_NAME_CUSTOM "custom"
2911 
2912 #define NI_XCODER_LOG_NAME_NONE "none"
2913 #define NI_XCODER_LOG_NAME_ERROR "error"
2914 #define NI_XCODER_LOG_NAME_WARN "warning"
2915 #define NI_XCODER_LOG_NAME_INFO "info"
2916 #define NI_XCODER_LOG_NAME_DEBUG "debug"
2917 #define NI_XCODER_LOG_NAME_FULL "full"
2918 
2920 extern LIB_API const char* const g_xcoder_log_names[NI_XCODER_LOG_NAMES_ARRAY_LEN];
2921 
2922 /*!*****************************************************************************
2923  * \brief Allocate and initialize a new ni_session_context_t struct
2924  *
2925  *
2926  * \return On success returns a valid pointer to newly allocated context
2927  * On failure returns NULL
2928  ******************************************************************************/
2930 
2931 /*!*****************************************************************************
2932  * \brief Initialize already allocated session context to a known state
2933  *
2934  * \param[in] p_ctx Pointer to an already allocated ni_session_context_t
2935  * struct
2936  *
2937  * \return On success
2938  * NI_RETCODE_SUCCESS
2939  * On failure
2940  * NI_RETCODE_INVALID_PARAM
2941  * NI_RETCODE_FAILURE
2942  ******************************************************************************/
2945 
2946 /*!*****************************************************************************
2947  * \brief Clear already allocated session context
2948  *
2949  * \param[in] p_ctx Pointer to an already allocated ni_session_context_t
2950  *
2951  *
2952  ******************************************************************************/
2954 
2955 /*!*****************************************************************************
2956  * \brief Free previously allocated session context
2957  *
2958  * \param[in] p_ctx Pointer to an already allocated ni_session_context_t
2959  * struct
2960  *
2961  ******************************************************************************/
2963 
2964 /*!*****************************************************************************
2965  * \brief Create event and return event handle if successful (Windows only)
2966  *
2967  * \return On success returns a event handle
2968  * On failure returns NI_INVALID_EVENT_HANDLE
2969  ******************************************************************************/
2970 LIB_API ni_event_handle_t ni_create_event(void);
2971 
2972 /*!*****************************************************************************
2973  * \brief Close event and release resources (Windows only)
2974  *
2975  * \return NONE
2976  *
2977  ******************************************************************************/
2978 LIB_API void ni_close_event(ni_event_handle_t event_handle);
2979 
2980 /*!*****************************************************************************
2981  * \brief Open device and return device device_handle if successful
2982  *
2983  * \param[in] p_dev Device name represented as c string. ex: "/dev/nvme0"
2984  * \param[out] p_max_io_size_out Maximum IO Transfer size supported
2985  *
2986  * \return On success returns a device device_handle
2987  * On failure returns NI_INVALID_DEVICE_HANDLE
2988  ******************************************************************************/
2989 LIB_API ni_device_handle_t ni_device_open(const char *dev,
2990  uint32_t *p_max_io_size_out);
2991 
2992 /*!*****************************************************************************
2993  * \brief Close device and release resources
2994  *
2995  * \param[in] device_handle Device handle obtained by calling ni_device_open()
2996  *
2997  * \return NONE
2998  *
2999  ******************************************************************************/
3000 LIB_API void ni_device_close(ni_device_handle_t dev);
3001 
3002 /*!*****************************************************************************
3003  * \brief Query device and return device capability structure
3004  * This function had been replaced by ni_device_capability_query2
3005  * This function can't be callback in multi thread
3006  *
3007  * \param[in] device_handle Device handle obtained by calling ni_device_open
3008  * \param[in] p_cap Pointer to a caller allocated ni_device_capability_t
3009  * struct
3010  * \return On success
3011  * NI_RETCODE_SUCCESS
3012  * On failure
3013  * NI_RETCODE_INVALID_PARAM
3014  * NI_RETCODE_ERROR_MEM_ALOC
3015  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3016  ******************************************************************************/
3018  ni_device_handle_t device_handle, ni_device_capability_t *p_cap);
3019 
3020 /*!*****************************************************************************
3021  * \brief Query device and return device capability structure
3022  * This function had replaced ni_device_capability_query
3023  * This function can be callback with multi thread
3024  *
3025  * \param[in] device_handle Device handle obtained by calling ni_device_open
3026  * \param[in] p_cap Pointer to a caller allocated ni_device_capability_t
3027  * struct
3028  * \param[in] device_in_ctxt If device is in ctx
3029  * \return On success
3030  * NI_RETCODE_SUCCESS
3031  * On failure
3032  * NI_RETCODE_INVALID_PARAM
3033  * NI_RETCODE_ERROR_MEM_ALOC
3034  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3035  ******************************************************************************/
3036 LIB_API ni_retcode_t ni_device_capability_query2(ni_device_handle_t device_handle,
3037  ni_device_capability_t *p_cap, bool device_in_ctxt);
3038 
3039 /*!*****************************************************************************
3040  * \brief Open a new device session depending on the device_type parameter
3041  * If device_type is NI_DEVICE_TYPE_DECODER opens decoding session
3042  * If device_type is NI_DEVICE_TYPE_ENCODER opens encoding session
3043  * If device_type is NI_DEVICE_TYPE_SCALER opens scaling session
3044  *
3045  * \param[in] p_ctx Pointer to a caller allocated
3046  * ni_session_context_t struct
3047  * \param[in] device_type NI_DEVICE_TYPE_DECODER, NI_DEVICE_TYPE_ENCODER,
3048  * or NI_DEVICE_TYPE_SCALER
3049  * \return On success
3050  * NI_RETCODE_SUCCESS
3051  * On failure
3052  * NI_RETCODE_INVALID_PARAM
3053  * NI_RETCODE_ERROR_MEM_ALOC
3054  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3055  * NI_RETCODE_ERROR_INVALID_SESSION
3056  ******************************************************************************/
3058  ni_device_type_t device_type);
3059 
3060 /*!*****************************************************************************
3061  * \brief Close device session that was previously opened by calling
3062  * ni_device_session_open()
3063  * If device_type is NI_DEVICE_TYPE_DECODER closes decoding session
3064  * If device_type is NI_DEVICE_TYPE_ENCODER closes encoding session
3065  * If device_type is NI_DEVICE_TYPE_SCALER closes scaling session
3066  *
3067  * \param[in] p_ctx Pointer to a caller allocated
3068  * ni_session_context_t struct
3069  * \param[in] eos_received Flag indicating if End Of Stream indicator was
3070  * received
3071  * \param[in] device_type NI_DEVICE_TYPE_DECODER, NI_DEVICE_TYPE_ENCODER,
3072  * or NI_DEVICE_TYPE_SCALER
3073  * \return On success
3074  * NI_RETCODE_SUCCESS
3075  * On failure
3076  * NI_RETCODE_INVALID_PARAM
3077  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3078  * NI_RETCODE_ERROR_INVALID_SESSION
3079  ******************************************************************************/
3081  int eos_received,
3082  ni_device_type_t device_type);
3083 
3084 /*!*****************************************************************************
3085  * \brief Send a flush command to the device
3086  * If device_type is NI_DEVICE_TYPE_DECODER sends EOS command to
3087  * decoder
3088  * If device_type is NI_DEVICE_TYPE_ENCODER sends EOS command to
3089  * encoder
3090  *
3091  * \param[in] p_ctx Pointer to a caller allocated
3092  * ni_session_context_t struct
3093  * \param[in] device_type NI_DEVICE_TYPE_DECODER or NI_DEVICE_TYPE_ENCODER
3094  * \return On success
3095  * NI_RETCODE_SUCCESS
3096  * On failure
3097  * NI_RETCODE_INVALID_PARAM
3098  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3099  * NI_RETCODE_ERROR_INVALID_SESSION
3100  ******************************************************************************/
3102  ni_device_type_t device_type);
3103 
3104 /*!*****************************************************************************
3105  * \brief Save a stream's headers in a decoder session that can be used later
3106  * for continuous decoding from the same source.
3107  *
3108  * \param[in] p_ctx Pointer to a caller allocated
3109  * ni_session_context_t struct
3110  * \param[in] hdr_data Pointer to header data
3111  * \param[in] hdr_size Size of header data in bytes
3112  * \return On success
3113  * NI_RETCODE_SUCCESS
3114  * On failure
3115  * NI_RETCODE_INVALID_PARAM
3116  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3117  * NI_RETCODE_ERROR_INVALID_SESSION
3118  ******************************************************************************/
3120  ni_session_context_t *p_ctx, uint8_t *hdr_data, uint8_t hdr_size);
3121 
3122 /*!*****************************************************************************
3123  * \brief Flush a decoder session to get ready to continue decoding.
3124  * Note: this is different from ni_device_session_flush in that it closes the
3125  * current decode session and opens a new one for continuous decoding.
3126  *
3127  * \param[in] p_ctx Pointer to a caller allocated
3128  * ni_session_context_t struct
3129  * \return On success
3130  * NI_RETCODE_SUCCESS
3131  * On failure
3132  * NI_RETCODE_INVALID_PARAM
3133  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3134  * NI_RETCODE_ERROR_INVALID_SESSION
3135  ******************************************************************************/
3137 
3138 /*!*****************************************************************************
3139  * \brief Send data to the device
3140  * If device_type is NI_DEVICE_TYPE_DECODER sends data packet to
3141  * decoder
3142  * If device_type is NI_DEVICE_TYPE_ENCODER sends data frame to encoder
3143  * If device_type is NI_DEVICE_TYPE_AI sends data frame to AI engine
3144  *
3145  * \param[in] p_ctx Pointer to a caller allocated
3146  * ni_session_context_t struct
3147  * \param[in] p_data Pointer to a caller allocated
3148  * ni_session_data_io_t struct which contains either a
3149  * ni_frame_t data frame or ni_packet_t data packet to
3150  * send
3151  * \param[in] device_type NI_DEVICE_TYPE_DECODER or NI_DEVICE_TYPE_ENCODER or
3152  * NI_DEVICE_TYPE_AI
3153  * If NI_DEVICE_TYPE_DECODER is specified, it is
3154  * expected that the ni_packet_t struct inside the
3155  * p_data pointer contains data to send.
3156  * If NI_DEVICE_TYPE_ENCODER or NI_DEVICE_TYPE_AI is
3157  * specified, it is expected that the ni_frame_t
3158  * struct inside the p_data pointer contains data to
3159  * send.
3160  * \return On success
3161  * Total number of bytes written
3162  * On failure
3163  * NI_RETCODE_INVALID_PARAM
3164  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3165  * NI_RETCODE_ERROR_INVALID_SESSION
3166  ******************************************************************************/
3168  ni_session_data_io_t *p_data,
3169  ni_device_type_t device_type);
3170 
3171 /*!*****************************************************************************
3172  * \brief Read data from the device
3173  * If device_type is NI_DEVICE_TYPE_DECODER reads data packet from
3174  * decoder
3175  * If device_type is NI_DEVICE_TYPE_ENCODER reads data frame from
3176  * encoder
3177  * If device_type is NI_DEVICE_TYPE_AI reads data frame from AI engine
3178  *
3179  * \param[in] p_ctx Pointer to a caller allocated
3180  * ni_session_context_t struct
3181  * \param[in] p_data Pointer to a caller allocated ni_session_data_io_t
3182  * struct which contains either a ni_frame_t data frame
3183  * or ni_packet_t data packet to send
3184  * \param[in] device_type NI_DEVICE_TYPE_DECODER, NI_DEVICE_TYPE_ENCODER, or
3185  * NI_DEVICE_TYPE_SCALER
3186  * If NI_DEVICE_TYPE_DECODER is specified, data that
3187  * was read will be placed into ni_frame_t struct
3188  * inside the p_data pointer
3189  * If NI_DEVICE_TYPE_ENCODER is specified, data that
3190  * was read will be placed into ni_packet_t struct
3191  * inside the p_data pointer
3192  * If NI_DEVICE_TYPE_AI is specified, data that was
3193  * read will be placed into ni_frame_t struct inside
3194  * the p_data pointer
3195  * \return On success
3196  * Total number of bytes read
3197  * On failure
3198  * NI_RETCODE_INVALID_PARAM
3199  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3200  * NI_RETCODE_ERROR_INVALID_SESSION
3201  ******************************************************************************/
3203  ni_session_data_io_t *p_data,
3204  ni_device_type_t device_type);
3205 
3206 /*!*****************************************************************************
3207  * \brief Query session data from the device -
3208  * If device_type is valid, will query session data
3209  * from specified device type
3210  *
3211  * \param[in] p_ctx Pointer to a caller allocated
3212  * ni_session_context_t struct
3213  * \param[in] device_type NI_DEVICE_TYPE_DECODER or
3214  * NI_DEVICE_TYPE_ENCODER or
3215  * NI_DEVICE_TYPE_SCALER or
3216  * NI_DEVICE_TYPE_AI or
3217  * NI_DEVICE_TYPE_UPLOADER
3218  *
3219  * \return On success
3220  * NI_RETCODE_SUCCESS
3221  * On failure
3222  * NI_RETCODE_INVALID_PARAM
3223  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3224  * NI_RETCODE_ERROR_INVALID_SESSION
3225  ******************************************************************************/
3227  ni_device_type_t device_type);
3228 /*!*****************************************************************************
3229  * \brief Query detail session data from the device -
3230  * If device_type is valid, will query session data
3231  * from specified device type
3232  *
3233  * \param[in] p_ctx Pointer to a caller allocated
3234  * ni_session_context_t struct
3235  * \param[in] device_type NI_DEVICE_TYPE_DECODER or
3236  * NI_DEVICE_TYPE_ENCODER or
3237  *
3238  * \return On success
3239  * NI_RETCODE_SUCCESS
3240  * On failure
3241  * NI_RETCODE_INVALID_PARAM
3242  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3243  * NI_RETCODE_ERROR_INVALID_SESSION
3244  ******************************************************************************/
3246  ni_device_type_t device_type, ni_instance_mgr_detail_status_t *detail_data);
3247 
3248 /*!*****************************************************************************
3249  * \brief Query detail session data from the device -
3250  * If device_type is valid, will query session data
3251  * from specified device type
3252  *
3253  * \param[in] p_ctx Pointer to a caller allocated
3254  * ni_session_context_t struct
3255  * \param[in] device_type NI_DEVICE_TYPE_DECODER or
3256  * NI_DEVICE_TYPE_ENCODER or
3257  *
3258  * \return On success
3259  * NI_RETCODE_SUCCESS
3260  * On failure
3261  * NI_RETCODE_INVALID_PARAM
3262  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3263  * NI_RETCODE_ERROR_INVALID_SESSION
3264  ******************************************************************************/
3266 
3267 /*!*****************************************************************************
3268  * \brief Send namespace num and SRIOv index to the device with specified logic block
3269  * address.
3270  *
3271  * \param[in] device_handle Device handle obtained by calling ni_device_open
3272  * \param[in] namespace_num Set the namespace number with designated sriov
3273  * \param[in] sriov_index Identify which sriov need to be set
3274  *
3275  * \return On success
3276  * NI_RETCODE_SUCCESS
3277  * On failure
3278  * NI_RETCODE_ERROR_MEM_ALOC
3279  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3280  ******************************************************************************/
3281 LIB_API ni_retcode_t ni_device_config_namespace_num(ni_device_handle_t device_handle,
3282  uint32_t namespace_num, uint32_t sriov_index);
3283 
3284 /*!*****************************************************************************
3285  * \brief Send qos mode to the device with specified logic block
3286  * address.
3287  *
3288  * \param[in] device_handle Device handle obtained by calling ni_device_open
3289  * \param[in] mode The requested qos mode
3290  *
3291  * \return On success
3292  * NI_RETCODE_SUCCESS
3293  * On failure
3294  * NI_RETCODE_ERROR_MEM_ALOC
3295  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3296  ******************************************************************************/
3297 LIB_API ni_retcode_t ni_device_config_qos(ni_device_handle_t device_handle,
3298  uint32_t mode);
3299 
3300  /*!*****************************************************************************
3301  * \brief Send qos over provisioning mode to target namespace with specified logic
3302  * block address.
3303  *
3304  * \param[in] device_handle Device handle obtained by calling ni_device_open
3305  * \param[in] device_handle_t Target device handle of namespace required for OP
3306  * \param[in] over_provision The request overprovision percent
3307  *
3308  * \return On success
3309  * NI_RETCODE_SUCCESS
3310  * On failure
3311  * NI_RETCODE_ERROR_MEM_ALOC
3312  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3313  ******************************************************************************/
3314 LIB_API ni_retcode_t ni_device_config_qos_op(ni_device_handle_t device_handle,
3315  ni_device_handle_t device_handle_t,
3316  uint32_t over_provision);
3317 
3318 /*!*****************************************************************************
3319  * \brief Allocate preliminary memory for the frame buffer based on provided
3320  * parameters. Applicable to YUV420 Planar pixel (8 or 10 bit/pixel)
3321  * format or 32-bit RGBA.
3322  *
3323  * \param[in] p_frame Pointer to a caller allocated
3324  * ni_frame_t struct
3325  * \param[in] video_width Width of the video frame
3326  * \param[in] video_height Height of the video frame
3327  * \param[in] alignment Allignment requirement
3328  * \param[in] metadata_flag Flag indicating if space for additional metadata
3329  * should be allocated
3330  * \param[in] factor 1 for 8 bits/pixel format, 2 for 10 bits/pixel,
3331  * 4 for 32 bits/pixel (RGBA)
3332  * \param[in] hw_frame_count Number of hw descriptors stored in lieu of raw YUV
3333  * \param[in] is_planar 0 if semiplanar else planar
3334  *
3335  * \return On success
3336  * NI_RETCODE_SUCCESS
3337  * On failure
3338  * NI_RETCODE_INVALID_PARAM
3339  * NI_RETCODE_ERROR_MEM_ALOC
3340  ******************************************************************************/
3341 LIB_API ni_retcode_t ni_frame_buffer_alloc(ni_frame_t *p_frame, int video_width,
3342  int video_height, int alignment,
3343  int metadata_flag, int factor,
3344  int hw_frame_count, int is_planar);
3345 
3346 /*!*****************************************************************************
3347  * \brief Wrapper function for ni_frame_buffer_alloc. Meant to handle RGBA min.
3348  * resoulution considerations for encoder.
3349  *
3350  * \param[in] p_frame Pointer to a caller allocated
3351  * ni_frame_t struct
3352  * \param[in] video_width Width of the video frame
3353  * \param[in] video_height Height of the video frame
3354  * \param[in] alignment Allignment requirement
3355  * \param[in] metadata_flag Flag indicating if space for additional metadata
3356  * should be allocated
3357  * \param[in] factor 1 for 8 bits/pixel format, 2 for 10 bits/pixel,
3358  * 4 for 32 bits/pixel (RGBA)
3359  * \param[in] hw_frame_count Number of hw descriptors stored
3360  * \param[in] is_planar 0 if semiplanar else planar
3361  * \param[in] pix_fmt pixel format to distinguish between planar types
3362  * and/or components
3363  *
3364  * \return On success
3365  * NI_RETCODE_SUCCESS
3366  * On failure
3367  * NI_RETCODE_INVALID_PARAM
3368  * NI_RETCODE_ERROR_MEM_ALOC
3369  ******************************************************************************/
3370 LIB_API ni_retcode_t ni_enc_frame_buffer_alloc(ni_frame_t *p_frame, int video_width,
3371  int video_height, int alignment,
3372  int metadata_flag, int factor,
3373  int hw_frame_count, int is_planar,
3374  ni_pix_fmt_t pix_fmt);
3375 
3377  int video_width, int video_height,
3378  int pixel_format);
3379 
3380 /*!*****************************************************************************
3381  * \brief Allocate memory for decoder frame buffer based on provided
3382  * parameters; the memory is retrieved from a buffer pool and will be
3383  * returned to the same buffer pool by ni_decoder_frame_buffer_free.
3384  * Note: all attributes of ni_frame_t will be set up except for memory and
3385  * buffer, which rely on the pool being allocated; the pool will be
3386  * allocated only after the frame resolution is known.
3387  *
3388  * \param[in] p_pool Buffer pool to get the memory from
3389  * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
3390  * \param[in] alloc_mem Whether to get memory from buffer pool
3391  * \param[in] video_width Width of the video frame
3392  * \param[in] video_height Height of the video frame
3393  * \param[in] alignment Alignment requirement
3394  * \param[in] factor 1 for 8 bits/pixel format, 2 for 10 bits/pixel
3395  * \param[in] is_planar 0 if semiplanar else planar
3396  *
3397  * \return On success
3398  * NI_RETCODE_SUCCESS
3399  * On failure
3400  * NI_RETCODE_INVALID_PARAM
3401  * NI_RETCODE_ERROR_MEM_ALOC
3402  ******************************************************************************/
3404  ni_buf_pool_t *p_pool, ni_frame_t *pframe, int alloc_mem, int video_width,
3405  int video_height, int alignment, int factor, int is_planar);
3406 
3407 /*!*****************************************************************************
3408  * \brief Allocate memory for the frame buffer for encoding based on given
3409  * parameters, taking into account pic line size and extra data.
3410  * Applicable to YUV420p AVFrame only. 8 or 10 bit/pixel.
3411  * Cb/Cr size matches that of Y.
3412  *
3413  * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
3414  *
3415  * \param[in] video_width Width of the video frame
3416  * \param[in] video_height Height of the video frame
3417  * \param[in] linesize Picture line size
3418  * \param[in] alignment Allignment requirement
3419  * \param[in] extra_len Extra data size (incl. meta data). < 0 means not
3420  * to allocate any buffer (zero-copy from existing)
3421  * \param[in] alignment_2pass_wa set alignment to work with 2pass encode
3422  *
3423  * \return On success
3424  * NI_RETCODE_SUCCESS
3425  * On failure
3426  * NI_RETCODE_INVALID_PARAM
3427  * NI_RETCODE_ERROR_MEM_ALOC
3428  *****************************************************************************/
3430  ni_frame_t *pframe, int video_width, int video_height, int linesize[],
3431  int alignment, int extra_len, bool alignment_2pass_wa);
3432 
3434  ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params,
3435  niFrameSurface1_t *p_surface);
3436 
3438  ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params,
3439  niFrameSurface1_t *p_src_surface);
3440 
3442  ni_session_context_t *p_ctx, ni_scaler_input_params_t scaler_params);
3443 
3444 /*!*****************************************************************************
3445 * \brief Allocate memory for the frame buffer based on provided parameters
3446 * taking into account pic line size and extra data.
3447 * Applicable to nv12 AVFrame only. Cb/Cr size matches that of Y.
3448 *
3449 * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
3450 *
3451 * \param[in] video_width Width of the video frame
3452 * \param[in] video_height Height of the video frame
3453 * \param[in] linesize Picture line size
3454 * \param[in] extra_len Extra data size (incl. meta data). < 0 means not
3455 * to allocate any buffer (zero-copy from existing)
3456 * \param[in] alignment_2pass_wa set alignment to work with 2pass encode
3457 *
3458 * \return On success
3459 * NI_RETCODE_SUCCESS
3460 * On failure
3461 * NI_RETCODE_INVALID_PARAM
3462 * NI_RETCODE_ERROR_MEM_ALOC
3463 *****************************************************************************/
3465  int video_width, int video_height,
3466  int linesize[], int extra_len,
3467  bool alignment_2pass_wa);
3468 
3469 /*!*****************************************************************************
3470  * \brief This API is a wrapper for ni_encoder_frame_buffer_alloc(), used
3471  * for planar pixel formats, and ni_frame_buffer_alloc_nv(), used for
3472  * semi-planar pixel formats. This API is meant to combine the
3473  * functionality for both formats.
3474  * Allocate memory for the frame buffer for encoding based on given
3475  * parameters, taking into account pic line size and extra data.
3476  * Applicable to YUV420p(8 or 10 bit/pixel) or nv12 AVFrame.
3477  * Cb/Cr size matches that of Y.
3478  *
3479  * \param[in] planar true: if planar:
3480  * pixel_format == (NI_PIX_FMT_YUV420P ||
3481  * NI_PIX_FMT_YUV420P10LE ||NI_PIX_FMT_RGBA).
3482  * false: semi-planar:
3483  * pixel_format == (NI_PIX_FMT_NV12 ||
3484  * NI_PIX_FMT_P010LE).
3485  * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
3486  * \param[in] video_width Width of the video frame
3487  * \param[in] video_height Height of the video frame
3488  * \param[in] linesize Picture line size
3489  * \param[in] alignment Allignment requirement. Only used for planar format.
3490  * \param[in] extra_len Extra data size (incl. meta data). < 0 means not
3491  * to allocate any buffer (zero-copy from existing)
3492  * \param[in] alignment_2pass_wa set alignment to work with 2pass encode
3493  *
3494  * \return On success
3495  * NI_RETCODE_SUCCESS
3496  * On failure
3497  * NI_RETCODE_INVALID_PARAM
3498  * NI_RETCODE_ERROR_MEM_ALOC
3499  *****************************************************************************/
3501  int video_width, int video_height,
3502  int linesize[], int alignment,
3503  int extra_len,
3504  bool alignment_2pass_wa);
3505 
3506 /*!*****************************************************************************
3507  * \brief Free frame buffer that was previously allocated with either
3508  * ni_frame_buffer_alloc or ni_encoder_frame_buffer_alloc or
3509  * ni_frame_buffer_alloc_nv
3510  *
3511  * \param[in] p_frame Pointer to a previously allocated ni_frame_t struct
3512  *
3513  * \return On success NI_RETCODE_SUCCESS
3514  * On failure NI_RETCODE_INVALID_PARAM
3515  ******************************************************************************/
3517 
3518 /*!*****************************************************************************
3519  * \brief Free decoder frame buffer that was previously allocated with
3520  * ni_decoder_frame_buffer_alloc, returning memory to a buffer pool.
3521  *
3522  * \param[in] p_frame Pointer to a previously allocated ni_frame_t struct
3523  *
3524  * \return On success NI_RETCODE_SUCCESS
3525  * On failure NI_RETCODE_INVALID_PARAM
3526  ******************************************************************************/
3528 
3529 /*!*****************************************************************************
3530  * \brief Return a memory buffer to memory buffer pool, for a decoder frame.
3531  *
3532  * \param[in] buf Buffer to be returned.
3533  * \param[in] p_buffer_pool Buffer pool to return buffer to.
3534  *
3535  * \return None
3536  ******************************************************************************/
3537 LIB_API void
3539  ni_buf_pool_t *p_buffer_pool);
3540 
3541 /*!*****************************************************************************
3542  * \brief Allocate memory for the packet buffer based on provided packet size
3543  *
3544  * \param[in] p_packet Pointer to a caller allocated
3545  * ni_packet_t struct
3546  * \param[in] packet_size Required allocation size
3547  *
3548  * \return On success
3549  * NI_RETCODE_SUCCESS
3550  * On failure
3551  * NI_RETCODE_INVALID_PARAM
3552  * NI_RETCODE_ERROR_MEM_ALOC
3553  ******************************************************************************/
3555  int packet_size);
3556 
3557 /*!*****************************************************************************
3558  * \brief Allocate packet buffer using a user provided pointer, the memory
3559  * is expected to have already been allocated.
3560  *
3561  * For ideal performance memory should be 4k aligned. If it is not 4K aligned
3562  * then a temporary 4k aligned memory will be used to copy data to and from
3563  * when writing and reading. This will negatively impact performance.
3564  *
3565  * This API will overwrite p_packet->buffer_size, p_packet->p_buffer and
3566  * p_packet->p_data fields in p_packet.
3567  *
3568  * This API will not free any memory associated with p_packet->p_buffer and
3569  * p_packet->p_data fields in p_packet.
3570  * Common use case could be,
3571  * 1. Allocate memory to pointer
3572  * 2. Call ni_custom_packet_buffer_alloc() with allocated pointer.
3573  * 3. Use p_packet as required.
3574  * 4. Call ni_packet_buffer_free() to free up the memory.
3575  *
3576  * \param[in] p_buffer User provided pointer to be used for buffer
3577  * \param[in] p_packet Pointer to a caller allocated
3578  * ni_packet_t struct
3579  * \param[in] buffer_size Buffer size
3580  *
3581  * \return On success
3582  * NI_RETCODE_SUCCESS
3583  * On failure
3584  * NI_RETCODE_INVALID_PARAM
3585  * NI_RETCODE_ERROR_MEM_ALOC
3586  ******************************************************************************/
3588  ni_packet_t *p_packet,
3589  int buffer_size);
3590 
3591 /*!*****************************************************************************
3592  * \brief Free packet buffer that was previously allocated with
3593  * ni_packet_buffer_alloc
3594  *
3595  * \param[in] p_packet Pointer to a previously allocated ni_packet_t struct
3596  *
3597  * \return On success NI_RETCODE_SUCCESS
3598  * On failure NI_RETCODE_INVALID_PARAM
3599  ******************************************************************************/
3601 
3602 /*!*****************************************************************************
3603  * \brief Free packet buffer that was previously allocated with
3604  * ni_packet_buffer_alloc for AV1 packets merge
3605  *
3606  * \param[in] p_packet Pointer to a previously allocated ni_packet_t struct
3607  *
3608  * \return On success NI_RETCODE_SUCCESS
3609  * On failure NI_RETCODE_INVALID_PARAM
3610  ******************************************************************************/
3612 
3613 /*!*****************************************************************************
3614  * \brief Copy video packet accounting for alignment
3615  *
3616  * \param[in] p_destination Destination to where to copy to
3617  * \param[in] p_source Source from where to copy from
3618  * \param[in] cur_size current size
3619  * \param[out] p_leftover Pointer to the data that was left over
3620  * \param[out] p_prev_size Size of the data leftover
3621  *
3622  * \return On success Total number of bytes that were copied
3623  * On failure NI_RETCODE_FAILURE
3624  ******************************************************************************/
3625 LIB_API int ni_packet_copy(void *p_destination, const void *const p_source,
3626  int cur_size, void *p_leftover, int *p_prev_size);
3627 
3628 /*!*****************************************************************************
3629  * \brief Add a new auxiliary data to a frame
3630  *
3631  * \param[in/out] frame a frame to which the auxiliary data should be added
3632  * \param[in] type type of the added auxiliary data
3633  * \param[in] data_size size of the added auxiliary data
3634  *
3635  * \return a pointer to the newly added aux data on success, NULL otherwise
3636  ******************************************************************************/
3638  ni_aux_data_type_t type,
3639  int data_size);
3640 
3641 /*!*****************************************************************************
3642  * \brief Add a new auxiliary data to a frame and copy in the raw data
3643  *
3644  * \param[in/out] frame a frame to which the auxiliary data should be added
3645  * \param[in] type type of the added auxiliary data
3646  * \param[in] raw_data the raw data of the aux data
3647  * \param[in] data_size size of the added auxiliary data
3648  *
3649  * \return a pointer to the newly added aux data on success, NULL otherwise
3650  ******************************************************************************/
3653  const uint8_t *raw_data, int data_size);
3654 
3655 /*!*****************************************************************************
3656  * \brief Retrieve from the frame auxiliary data of a given type if exists
3657  *
3658  * \param[in] frame a frame from which the auxiliary data should be retrieved
3659  * \param[in] type type of the auxiliary data to be retrieved
3660  *
3661  * \return a pointer to the aux data of a given type on success, NULL otherwise
3662  ******************************************************************************/
3664  ni_aux_data_type_t type);
3665 
3666 /*!*****************************************************************************
3667  * \brief If auxiliary data of the given type exists in the frame, free it
3668  * and remove it from the frame.
3669  *
3670  * \param[in/out] frame a frame from which the auxiliary data should be removed
3671  * \param[in] type type of the auxiliary data to be removed
3672  *
3673  * \return None
3674  ******************************************************************************/
3676 
3677 /*!*****************************************************************************
3678  * \brief Free and remove all auxiliary data from the frame.
3679  *
3680  * \param[in/out] frame a frame from which the auxiliary data should be removed
3681  *
3682  * \return None
3683  ******************************************************************************/
3685 
3686 /*!*****************************************************************************
3687  * \brief Initialize default encoder parameters
3688  *
3689  * \param[out] param Pointer to a user allocated ni_xcoder_params_t
3690  * to initialize to default parameters
3691  * \param[in] fps_num Frames per second
3692  * \param[in] fps_denom FPS denomination
3693  * \param[in] bit_rate bit rate
3694  * \param[in] width frame width
3695  * \param[in] height frame height
3696  * \param[in] codec_format codec from ni_codec_format_t
3697  *
3698  * \return On success
3699  * NI_RETCODE_SUCCESS
3700  * On failure
3701  * NI_RETCODE_FAILURE
3702  * NI_RETCODE_INVALID_PARAM
3703  ******************************************************************************/
3705  ni_xcoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate,
3706  int width, int height, ni_codec_format_t codec_format);
3707 
3708 /*!*****************************************************************************
3709  * \brief Initialize default decoder parameters
3710  *
3711  * \param[out] param Pointer to a user allocated ni_xcoder_params_t
3712  * to initialize to default parameters
3713  * \param[in] fps_num Frames per second
3714  * \param[in] fps_denom FPS denomination
3715  * \param[in] bit_rate bit rate
3716  * \param[in] width frame width
3717  * \param[in] height frame height
3718  *
3719  * \return On success
3720  * NI_RETCODE_SUCCESS
3721  * On failure
3722  * NI_RETCODE_FAILURE
3723  * NI_RETCODE_INVALID_PARAM
3724  ******************************************************************************/
3726  int fps_num, int fps_denom,
3727  long bit_rate, int width,
3728  int height);
3729 
3730 /*!*****************************************************************************
3731  * \brief Set value referenced by name in encoder parameters structure
3732  *
3733  * \param[in] p_params Pointer to a user allocated ni_xcoder_params_t
3734  * to find and set a particular parameter
3735  * \param[in] name String represented parameter name to search
3736  * \param[in] value Parameter value to set
3737 *
3738  * \return On success
3739  * NI_RETCODE_SUCCESS
3740  * On failure
3741  * NI_RETCODE_FAILURE
3742  * NI_RETCODE_INVALID_PARAM
3743  ******************************************************************************/
3745  const char *name,
3746  const char *value);
3747 
3748 /*!*****************************************************************************
3749 * \brief Set value referenced by name in decoder parameters structure
3750 *
3751 * \param[in] p_params Pointer to a user allocated ni_xcoder_params_t (used
3752 * for decoder too for now ) to find and set a particular
3753 * parameter
3754 * \param[in] name String represented parameter name to search
3755 * \param[in] value Parameter value to set
3756 *
3757 * \return On success
3758 * NI_RETCODE_SUCCESS
3759 * On failure
3760 * NI_RETCODE_FAILURE
3761 * NI_RETCODE_INVALID_PARAM
3762 ******************************************************************************/
3764  const char *name, char *value);
3765 
3766 /*!*****************************************************************************
3767  * \brief Set GOP parameter value referenced by name in encoder parameters
3768  * structure
3769  *
3770  * \param[in] p_params Pointer to a user allocated ni_xcoder_params_t
3771  * to find and set a particular parameter
3772  * \param[in] name String represented parameter name to search
3773  * \param[in] value Parameter value to set
3774 *
3775  * \return On success
3776  * NI_RETCODE_SUCCESS
3777  * On failure
3778  * NI_RETCODE_FAILURE
3779  * NI_RETCODE_INVALID_PARAM
3780  ******************************************************************************/
3782  ni_xcoder_params_t *p_params, const char *name, const char *value);
3783 
3784 /*!*****************************************************************************
3785 * \brief Copy existing decoding session params for hw frame usage
3786 *
3787 * \param[in] src_p_ctx Pointer to a caller allocated source session context
3788 * \param[in] dst_p_ctx Pointer to a caller allocated destination session
3789 * context
3790 * \return On success
3791 * NI_RETCODE_SUCCESS
3792 * On failure
3793 * NI_RETCODE_INVALID_PARAM
3794 ******************************************************************************/
3796  ni_session_context_t *dst_p_ctx);
3797 
3798 /*!*****************************************************************************
3799 * \brief Send frame pool setup info to device
3800 *
3801 * \param[in] p_ctx Pointer to a caller allocated
3802 * ni_session_context_t struct
3803 * \param[in] pool_size Upload session initial allocated frames count
3804 * must be > 0,
3805 * \param[in] pool 0 use the normal pool
3806 * 1 use a dedicated P2P pool
3807 *
3808 * \return On success Return code
3809 * On failure
3810 * NI_RETCODE_INVALID_PARAM
3811 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3812 * NI_RETCODE_ERROR_INVALID_SESSION
3813 * NI_RETCODE_ERROR_MEM_ALOC
3814 ******************************************************************************/
3816  uint32_t pool_size, uint32_t pool);
3817 
3818 /*!*****************************************************************************
3819 * \brief Sends frame pool change info to device
3820 *
3821 * \param[in] p_ctx Pointer to a caller allocated
3822 * ni_session_context_t struct
3823 * \param[in] pool_size if pool_size = 0, free allocated device memory buffers
3824 * if pool_size > 0, expand device frame buffer pool of
3825 * current instance with pool_size more frame buffers
3826 *
3827 * \return On success Return code
3828 * On failure
3829 * NI_RETCODE_FAILURE
3830 * NI_RETCODE_INVALID_PARAM
3831 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3832 * NI_RETCODE_ERROR_INVALID_SESSION
3833 * NI_RETCODE_ERROR_MEM_ALOC
3834 * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
3835 *******************************************************************************/
3837  uint32_t pool_size);
3838 
3839 /*!*****************************************************************************
3840 * \brief Read data from the device
3841 * If device_type is NI_DEVICE_TYPE_DECODER reads data hwdesc from
3842 * decoder
3843 * If device_type is NI_DEVICE_TYPE_SCALER reads data hwdesc from
3844 * scaler
3845 *
3846 * \param[in] p_ctx Pointer to a caller allocated
3847 * ni_session_context_t struct
3848 * \param[in] p_data Pointer to a caller allocated
3849 * ni_session_data_io_t struct which contains either a
3850 * ni_frame_t data frame or ni_packet_t data packet to
3851 * send
3852 * \param[in] device_type NI_DEVICE_TYPE_DECODER or NI_DEVICE_TYPE_SCALER
3853 * If NI_DEVICE_TYPE_DECODER or NI_DEVICE_TYPE_SCALER is specified,
3854 * hw descriptor info will be stored in p_data ni_frame
3855 * \return On success
3856 * Total number of bytes read
3857 * On failure
3858 * NI_RETCODE_INVALID_PARAM
3859 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3860 * NI_RETCODE_ERROR_INVALID_SESSION
3861 ******************************************************************************/
3863  ni_session_data_io_t *p_data,
3864  ni_device_type_t device_type);
3865 
3866 /*!*****************************************************************************
3867 * \brief Read YUV data from hw descriptor stored location on device
3868 *
3869 * \param[in] p_ctx Pointer to a caller allocated
3870 * ni_session_context_t struct
3871 * \param[in] p_data Pointer to a caller allocated
3872 * ni_session_data_io_t struct which contains either a
3873 * ni_frame_t data frame or ni_packet_t data packet to
3874 * send
3875 * \param[in] hwdesc HW descriptor to find frame in XCODER
3876 * \return On success
3877 * Total number of bytes read
3878 * On failure
3879 * NI_RETCODE_INVALID_PARAM
3880 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3881 * NI_RETCODE_ERROR_INVALID_SESSION
3882 ******************************************************************************/
3884  ni_session_data_io_t *p_data,
3885  niFrameSurface1_t *hwdesc);
3886 
3887 /*!*****************************************************************************
3888 * \brief Query the session if a buffer is available
3889 *
3890 * \param[in] p_ctx Pointer to a caller allocated
3891 * ni_session_context_t struct
3892 * \param[in] device_type Quadra device type
3893 *
3894 * \return On success
3895 * NI_RETCODE_SUCCESS
3896 * On failure
3897 * NI_RETCODE_INVALID_PARAM
3898 * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
3899 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3900 * NI_RETCODE_ERROR_INVALID_SESSION
3901 *******************************************************************************/
3903  ni_device_type_t device_type);
3904 
3905 
3906 /*!*****************************************************************************
3907 * \brief Send raw YUV input to uploader instance and retrieve a HW descriptor
3908 * to represent it
3909 *
3910 * \param[in] p_ctx Pointer to a caller allocated
3911 * ni_session_context_t struct
3912 * \param[in] p_src_data Pointer to a caller allocated
3913 * ni_session_data_io_t struct which contains a
3914 * ni_frame_t data frame to send to uploader
3915 * \param[out] hwdesc HW descriptor to find frame in XCODER
3916 * \return On success
3917 * Total number of bytes read
3918 * On failure
3919 * NI_RETCODE_INVALID_PARAM
3920 * NI_RETCODE_ERROR_NVME_CMD_FAILED
3921 * NI_RETCODE_ERROR_INVALID_SESSION
3922 *******************************************************************************/
3924 
3925 /*!*****************************************************************************
3926 * \brief Allocate memory for the hwDescriptor buffer based on provided
3927 * parameters taking into account pic size and extra data.
3928 *
3929 * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
3930 *
3931 * \param[in] video_width Width of the video frame
3932 * \param[in] video_height Height of the video frame
3933 * \param[in] extra_len Extra data size (incl. meta data)
3934 *
3935 * \return On success
3936 * NI_RETCODE_SUCCESS
3937 * On failure
3938 * NI_RETCODE_INVALID_PARAM
3939 * NI_RETCODE_ERROR_MEM_ALOC
3940 *****************************************************************************/
3942  int video_width,
3943  int video_height,
3944  int extra_len);
3945 
3946 /*!*****************************************************************************
3947 * \brief Recycle a hwframe buffer on card
3948 *
3949 * \param[in] surface Struct containing device and frame location to clear out
3950 * \param[in] device_handle handle to access device memory buffer is stored in
3951 *
3952 * \return On success NI_RETCODE_SUCCESS
3953 * On failure NI_RETCODE_INVALID_PARAM
3954 *******************************************************************************/
3956  int32_t device_handle);
3957 
3958 
3959 /*!*****************************************************************************
3960 * \brief Recycle a hwframe buffer on card
3961 *
3962 * \param[in] surface Struct containing device and frame location to clear out
3963 *
3964 * \return On success NI_RETCODE_SUCCESS
3965 * On failure NI_RETCODE_INVALID_PARAM
3966 *******************************************************************************/
3968 
3969 /*!*****************************************************************************
3970  * \brief Set parameters on the device for the 2D engine
3971  *
3972  * \param[in] p_ctx pointer to session context
3973  * \param[in] p_params pointer to the scaler parameters
3974  *
3975  * \return NI_RETCODE_INVALID_PARAM
3976  * NI_RETCODE_ERROR_INVALID_SESSION
3977  * NI_RETCODE_ERROR_NVME_CMD_FAILED
3978 
3979  ******************************************************************************/
3981  ni_scaler_params_t *p_params);
3982 
3983 /*!*****************************************************************************
3984  * \brief Allocate a frame on the device for 2D engine or AI engine
3985  * to work on based on provided parameters
3986  *
3987  * \param[in] p_ctx pointer to session context
3988  * \param[in] width width, in pixels
3989  * \param[in] height height, in pixels
3990  * \param[in] format pixel format
3991  * \param[in] options options bitmap flags, bit 0 (NI_SCALER_FLAG_IO) is
3992  * 0=input frame or 1=output frame. Bit 1 (NI_SCALER_FLAG_PC) is
3993  * 0=single allocation, 1=create pool. Bit 2 (NI_SCALER_FLAG_PA) is
3994  * 0=straight alpha, 1=premultiplied alpha
3995  * \param[in] rectangle_width clipping rectangle width
3996  * \param[in] rectangle_height clipping rectangle height
3997  * \param[in] rectangle_x horizontal position of clipping rectangle
3998  * \param[in] rectangle_y vertical position of clipping rectangle
3999  * \param[in] rgba_color RGBA fill colour (for padding only)
4000  * \param[in] frame_index input hwdesc index
4001  * \param[in] device_type only NI_DEVICE_TYPE_SCALER
4002  * and NI_DEVICE_TYPE_AI (only needs p_ctx and frame_index)
4003  *
4004  * \return NI_RETCODE_INVALID_PARAM
4005  * NI_RETCODE_ERROR_INVALID_SESSION
4006  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4007  * NI_RETCODE_ERROR_MEM_ALOC
4008  ******************************************************************************/
4010  int width,
4011  int height,
4012  int format,
4013  int options,
4014  int rectangle_width,
4015  int rectangle_height,
4016  int rectangle_x,
4017  int rectangle_y,
4018  int rgba_color,
4019  int frame_index,
4020  ni_device_type_t device_type);
4021 
4022 /*!*****************************************************************************
4023  * \brief Allocate a frame on the device and return the frame index
4024  *
4025  * \param[in] p_ctx pointer to session context
4026  * \param[in] p_out_surface pointer to output frame surface
4027  * \param[in] device_type currently only NI_DEVICE_TYPE_AI
4028  *
4029  * \return NI_RETCODE_INVALID_PARAM
4030  * NI_RETCODE_ERROR_INVALID_SESSION
4031  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4032  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4033  * NI_RETCODE_ERROR_MEM_ALOC
4034  ******************************************************************************/
4036  niFrameSurface1_t *p_out_surface,
4037  ni_device_type_t device_type);
4038 
4039 /*!*****************************************************************************
4040  * \brief Copy the data of src hwframe to dst hwframe
4041  *
4042  * \param[in] p_ctx pointer to session context
4043  * \param[in] p_frameclone_desc pointer to the frameclone descriptor
4044  *
4045  * \return NI_RETCODE_INVALID_PARAM
4046  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4047  * NI_RETCODE_ERROR_INVALID_SESSION
4048  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4049  * NI_RETCODE_ERROR_MEM_ALOC
4050  ******************************************************************************/
4052  ni_frameclone_desc_t *p_frameclone_desc);
4053 
4054 /*!*****************************************************************************
4055  * \brief Config a frame on the device for 2D engined
4056  * to work on based on provided parameters
4057  *
4058  * \param[in] p_ctx pointer to session context
4059  * \param[in] p_cfg pointer to frame config
4060  *
4061  * \return NI_RETCODE_INVALID_PARAM
4062  * NI_RETCODE_ERROR_INVALID_SESSION
4063  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4064  * NI_RETCODE_ERROR_MEM_ALOC
4065  ******************************************************************************/
4067  ni_frame_config_t *p_cfg);
4068 
4070  ni_scaler_drawbox_params_t *p_params);
4071 
4073  ni_scaler_watermark_params_t *p_params);
4074 
4075 /*!*****************************************************************************
4076  * \brief Config multiple frame on the device for 2D engined
4077  * to work on based on provided parameters
4078  *
4079  * \param[in] p_ctx pointer to session context
4080  * \param[in] p_cfg_in input frame config array
4081  * \param[in] numInCfgs number of frame config entries in the p_cfg_in array
4082  * \param[in] p_cfg_out output frame config
4083  *
4084  * \return NI_RETCODE_INVALID_PARAM
4085  * NI_RETCODE_ERROR_INVALID_SESSION
4086  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4087  * NI_RETCODE_ERROR_MEM_ALOC
4088  ******************************************************************************/
4090  ni_frame_config_t p_cfg_in[],
4091  int numInCfgs,
4092  ni_frame_config_t *p_cfg_out);
4093 
4094 /*!*****************************************************************************
4095  * \brief Allocate memory for the frame buffer based on provided parameters
4096  * taking into account the pixel format, width, height, stride,
4097  * alignment, and extra data
4098  * \param[in] p_frame Pointer to caller allocated ni_frame_t
4099  * \param[in] pixel_format a pixel format in ni_pix_fmt_t enum
4100  * \param[in] video_width width, in pixels
4101  * \param[in] video_height height, in pixels
4102  * \param[in] linesize horizontal stride
4103  * \param[in] alignment apply a 16 pixel height alignment (T408 only)
4104  * \param[in] extra_len meta data size
4105  *
4106  * \return NI_RETCODE_SUCCESS
4107  * NI_RETCODE_INVALID_PARAM
4108  * NI_RETCODE_ERROR_MEM_ALOC
4109  *
4110  ******************************************************************************/
4112  ni_frame_t *pframe, int pixel_format, int video_width, int video_height,
4113  int linesize[], int alignment, int extra_len);
4114 
4115 /*!*****************************************************************************
4116  * \brief configure a network context based with the network binary
4117  *
4118  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4119  * \param[in] file Pointer to caller network binary file path
4120  *
4121  * \return NI_RETCODE_SUCCESS
4122  * NI_RETCODE_INVALID_PARAM
4123  * NI_RETCODE_ERROR_MEM_ALOC
4124  * NI_RETCODE_ERROR_INVALID_SESSION
4125  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4126  * NI_RETCODE_FAILURE
4127  *
4128  ******************************************************************************/
4130  ni_network_data_t *p_network,
4131  const char *file);
4132 
4133 /*!*****************************************************************************
4134  * \brief configure a hvsplus filter
4135  *
4136  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4137  *
4138  * \return NI_RETCODE_SUCCESS
4139  * NI_RETCODE_FAILURE
4140  *
4141  ******************************************************************************/
4143  ni_network_data_t *p_network);
4144 
4145 /*!*****************************************************************************
4146  * \brief Allocate input layers memory for AI frame buffer based on provided parameters
4147  * taking into account width, height, format defined by network.
4148  *
4149  * \param[out] p_frame Pointer to caller allocated ni_frame_t
4150  * \param[in] p_network Pointer to caller allocated ni_network_data_t
4151  *
4152  * \return NI_RETCODE_SUCCESS
4153  * NI_RETCODE_INVALID_PARAM
4154  * NI_RETCODE_ERROR_MEM_ALOC
4155  *
4156  ******************************************************************************/
4158  ni_network_data_t *p_network);
4159 
4160 /*!*****************************************************************************
4161  * \brief Allocate output layers memory for the packet buffer based on provided network
4162  *
4163  * \param[out] p_packet Pointer to a caller allocated
4164  * ni_packet_t struct
4165  * \param[in] p_network Pointer to a caller allocated
4166  * ni_network_data_t struct
4167  *
4168  * \return On success
4169  * NI_RETCODE_SUCCESS
4170  * On failure
4171  * NI_RETCODE_INVALID_PARAM
4172  * NI_RETCODE_ERROR_MEM_ALOC
4173  ******************************************************************************/
4175  ni_network_data_t *p_network);
4176 
4177 // wrapper API request, dynamic encode configuration setting to be sent to the
4178 // encoder with the next frame
4179 
4180 /*!*****************************************************************************
4181  * \brief Reconfigure bitrate dynamically during encoding.
4182  *
4183  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4184  * \param[in] bitrate Target bitrate to set
4185  *
4186  * \return On success NI_RETCODE_SUCCESS
4187  * On failure NI_RETCODE_INVALID_PARAM
4188  ******************************************************************************/
4190  int32_t bitrate);
4191 
4192 /*!*****************************************************************************
4193  * \brief Reconfigure intraPeriod dynamically during encoding.
4194  *
4195  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4196  * \param[in] intra_period Target intra period to set
4197  *
4198  * \return On success NI_RETCODE_SUCCESS
4199  * On failure NI_RETCODE_INVALID_PARAM
4200  *
4201  * NOTE - the frame upon which intra period is reconfigured is encoded as IDR frame
4202  * NOTE - reconfigure intra period is not allowed if intraRefreshMode is enabled or if gopPresetIdx is 1
4203  *
4204  ******************************************************************************/
4206  int32_t intra_period);
4207 
4208 /*!*****************************************************************************
4209  * \brief Reconfigure VUI dynamically during encoding.
4210  *
4211  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4212  * \param[in] bitrate Target bitrate to set
4213  *
4214  * \return On success NI_RETCODE_SUCCESS
4215  * On failure NI_RETCODE_INVALID_PARAM
4216  ******************************************************************************/
4218  ni_vui_hrd_t *vui);
4219 
4220 /*!*****************************************************************************
4221  * \brief Force next frame to be IDR frame during encoding.
4222  *
4223  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4224  *
4225  * \return On success NI_RETCODE_SUCCESS
4226  ******************************************************************************/
4228 
4229 /*!*****************************************************************************
4230  * \brief Set a frame's support of Long Term Reference frame during encoding.
4231  *
4232  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4233  * \param[in] ltr Pointer to struct specifying LTR support
4234  *
4235  * \return On success NI_RETCODE_SUCCESS
4236  * On failure NI_RETCODE_INVALID_PARAM
4237  ******************************************************************************/
4239  ni_long_term_ref_t *ltr);
4240 
4241 /*!*****************************************************************************
4242  * \brief Set Long Term Reference interval
4243  *
4244  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4245  * \param[in] ltr_interval the new long term reference inteval value
4246  *
4247  * \return On success NI_RETCODE_SUCCESS
4248  * On failure NI_RETCODE_INVALID_PARAM
4249  ******************************************************************************/
4251  int32_t ltr_interval);
4252 
4253 /*!*****************************************************************************
4254  * \brief Set frame reference invalidation
4255  *
4256  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4257  * \param[in] frame_num frame number after which all references shall be
4258  * invalidated
4259  *
4260  * \return On success NI_RETCODE_SUCCESS
4261  * On failure NI_RETCODE_INVALID_PARAM
4262  ******************************************************************************/
4264  int32_t frame_num);
4265 
4266 /*!*****************************************************************************
4267  * \brief Reconfigure framerate dynamically during encoding.
4268  *
4269  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4270  * \param[in] framerate Pointer to struct specifying framerate to set
4271  *
4272  * \return On success NI_RETCODE_SUCCESS
4273  * On failure NI_RETCODE_INVALID_PARAM
4274  ******************************************************************************/
4276  ni_framerate_t *framerate);
4277 
4278 /*!*****************************************************************************
4279  * \brief Reconfigure maxFrameSize dynamically during encoding.
4280  *
4281  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4282  * \param[in] max_frame_size the new maxFrameSize value
4283  *
4284  * \return On success NI_RETCODE_SUCCESS
4285  * On failure NI_RETCODE_INVALID_PARAM
4286  *
4287  * NOTE - maxFrameSize_Bytes value less than ((bitrate / 8) / framerate) will be rejected
4288  *
4289  ******************************************************************************/
4291  int32_t max_frame_size);
4292 
4293 /*!*****************************************************************************
4294  * \brief Reconfigure min&max qp dynamically during encoding.
4295  *
4296  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4297  * \param[in] ni_rc_min_max_qp Target min&max qp to set
4298  *
4299  * \return On success NI_RETCODE_SUCCESS
4300  * On failure NI_RETCODE_INVALID_PARAM
4301  ******************************************************************************/
4303  ni_rc_min_max_qp *p_min_max_qp);
4304 
4305 
4306 /*!*****************************************************************************
4307  * \brief Reconfigure crf value dynamically during encoding.
4308  *
4309  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4310  * \param[in] crf crf value to reconfigure
4311  *
4312  * \return On success NI_RETCODE_SUCCESS
4313  * On failure NI_RETCODE_INVALID_PARAM
4314  ******************************************************************************/
4316  int32_t crf);
4317 
4318 /*!*****************************************************************************
4319  * \brief Reconfigure crf float point value dynamically during encoding.
4320  *
4321  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4322  * \param[in] crf crf float point value to reconfigure
4323  *
4324  * \return On success NI_RETCODE_SUCCESS
4325  * On failure NI_RETCODE_INVALID_PARAM
4326  ******************************************************************************/
4328  float crf);
4329 
4330 
4331 /*!*****************************************************************************
4332  * \brief Reconfigure vbv buffer size and vbv max rate dynamically during encoding.
4333  *
4334  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4335  * \param[in] vbvBufferSize Target vbvBufferSize to set
4336  * \param[in] vbvMaxRate Target vbvMaxRate to set
4337  *
4338  * \return On success NI_RETCODE_SUCCESS
4339  * On failure NI_RETCODE_INVALID_PARAM
4340  ******************************************************************************/
4342  int32_t vbvMaxRate, int32_t vbvBufferSize);
4343 
4344 /*!*****************************************************************************
4345  * \brief Reconfigure maxFrameSizeRatio dynamically during encoding.
4346  *
4347  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4348  * \param[in] max_frame_size_ratio the new maxFrameSizeRatio value
4349  *
4350  * \return On success NI_RETCODE_SUCCESS
4351  * On failure NI_RETCODE_INVALID_PARAM
4352  ******************************************************************************/
4354  int32_t max_frame_size_ratio);
4355 
4356 /*!*****************************************************************************
4357  * \brief Reconfigure sliceArg dynamically during encoding.
4358  *
4359  * \param[in] p_ctx Pointer to caller allocated ni_session_context_t
4360  * \param[in] sliceArg the new sliceArg value
4361  *
4362  * \return On success NI_RETCODE_SUCCESS
4363  * On failure NI_RETCODE_INVALID_PARAM
4364  ******************************************************************************/
4366  int16_t sliceArg);
4367 
4368 #ifndef _WIN32
4369 /*!*****************************************************************************
4370 * \brief Acquire a P2P frame buffer from the hwupload session
4371 *
4372 * \param[in] p_upl_ctx Pointer to a caller allocated
4373 * ni_session_context_t struct
4374 * \param[out] p_frame Pointer to a caller allocated hw frame
4375 *
4376 * \return On success
4377 * NI_RETCODE_SUCCESS
4378 * On failure
4379 * NI_RETCODE_INVALID_PARAM
4380 * NI_RETCODE_ERROR_NVME_CMD_FAILED
4381 * NI_RETCODE_ERROR_INVALID_SESSION
4382 *******************************************************************************/
4384  ni_frame_t *p_frame);
4385 
4386 /*!*****************************************************************************
4387 * \brief Acquire a P2P frame buffer from the hwupload session for P2P read
4388 *
4389 * \param[in] p_upl_ctx Pointer to a caller allocated
4390 * ni_session_context_t struct
4391 * \param[out] p_frame Pointer to a caller allocated hw frame
4392 *
4393 * \return On success
4394 * NI_RETCODE_SUCCESS
4395 * On failure
4396 * NI_RETCODE_INVALID_PARAM
4397 * NI_RETCODE_ERROR_NVME_CMD_FAILED
4398 * NI_RETCODE_ERROR_INVALID_SESSION
4399 *******************************************************************************/
4401  ni_frame_t *p_frame);
4402 
4403 /*!*****************************************************************************
4404  * \brief Lock a hardware P2P frame prior to encoding
4405  *
4406  * \param[in] p_upl_ctx pointer to caller allocated upload context
4407  * [in] p_frame pointer to caller allocated hardware P2P frame
4408  *
4409  * \return On success
4410  * NI_RETCODE_SUCCESS
4411  * On failure NI_RETCODE_FAILURE
4412  * NI_RETCODE_INVALID_PARAM
4413 *******************************************************************************/
4415  ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame);
4416 
4417 /*!*****************************************************************************
4418  * \brief Unlock a hardware P2P frame after encoding
4419  *
4420  * \param[in] p_upl_ctx pointer to caller allocated upload context
4421  * [in] p_frame pointer to caller allocated hardware P2P frame
4422  *
4423  * \return On success
4424  * NI_RETCODE_SUCCESS
4425  * On failure NI_RETCODE_FAILURE
4426  * NI_RETCODE_INVALID_PARAM
4427 *******************************************************************************/
4429  ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame);
4430 
4431 /*!*****************************************************************************
4432  * \brief Special P2P test API call. Copies YUV data from the software
4433  * frame to the hardware P2P frame on the Quadra device
4434  *
4435  * \param[in] p_upl_ctx pointer to caller allocated uploader session
4436  * context
4437  * [in] p_swframe pointer to a caller allocated software frame
4438  * [in] p_hwframe pointer to a caller allocated hardware frame
4439  *
4440  * \return On success
4441  * NI_RETCODE_SUCCESS
4442  * On failure
4443  * NI_RETCODE_FAILURE
4444  * NI_RETCODE_INVALID_PARAM
4445 *******************************************************************************/
4447  uint8_t *p_data, uint32_t len,
4448  ni_frame_t *p_hwframe);
4449 
4450 
4452  uint8_t *p_data, uint32_t len,
4453  ni_frame_t *p_hwframe);
4454 
4455 /*!*****************************************************************************
4456  * \brief Set the incoming frame format for the encoder
4457  *
4458  * \param[in] p_enc_ctx pointer to encoder context
4459  * [in] p_enc_params pointer to encoder parameters
4460  * [in] width input width
4461  * [in] height input height
4462  * [in] bit_depth 8 for 8-bit YUV, 10 for 10-bit YUV
4463  * [in] src_endian NI_FRAME_LITTLE_ENDIAN or NI_FRAME_BIG_ENDIAN
4464  * [in] planar 0 for semi-planar YUV, 1 for planar YUV
4465  *
4466  * \return on success
4467  * NI_RETCODE_SUCCESS
4468  *
4469  * on failure
4470  * NI_RETCODE_INVALID_PARAM
4471 *******************************************************************************/
4473  ni_session_context_t *p_enc_ctx, ni_xcoder_params_t *p_enc_params,
4474  int width, int height, int bit_depth, int src_endian, int planar);
4475 
4476 /*!*****************************************************************************
4477  * \brief Acquire the scaler P2P DMA buffer for read/write
4478  *
4479  * \param [in] p_ctx pointer to caller allocated upload context
4480  * [in] p_surface pointer to a caller allocated hardware frame
4481  * [in] data_len scaler frame buffer data length
4482  *
4483  * \return on success
4484  * NI_RETCODE_SUCCESS
4485  *
4486  * on failure
4487  * NI_RETCODE_FAILURE
4488 *******************************************************************************/
4490  niFrameSurface1_t *p_surface,
4491  int data_len);
4492 
4493 /*!*****************************************************************************
4494  * \brief Recycle hw P2P frames
4495  *
4496  * \param [in] p_frame pointer to an acquired P2P hw frame
4497  *
4498  * \return on success
4499  * NI_RETCODE_SUCCESS
4500  *
4501  * on failure
4502  * NI_RETCODE_INVALID_PARAM
4503 *******************************************************************************/
4505 #endif
4506 
4507 /*!*****************************************************************************
4508  * \brief Set the frame format for the uploader
4509  *
4510  * \param[in] p_upl_ctx pointer to uploader context
4511  * [in] width width
4512  * [in] height height
4513  * [in] pixel_format pixel format
4514  * [in] isP2P 0 = normal, 1 = P2P
4515  *
4516  * \return on success
4517  * NI_RETCODE_SUCCESS
4518  *
4519  * on failure
4520  * NI_RETCODE_INVALID_PARAM
4521 *******************************************************************************/
4524  int height, ni_pix_fmt_t pixel_format, int isP2P);
4525 
4526 /*!*****************************************************************************
4527  * \brief Read encoder stream header from the device
4528  *
4529  * \param[in] p_ctx Pointer to a caller allocated
4530  * ni_session_context_t struct from encoder
4531  * \param[in] p_data Pointer to a caller allocated ni_session_data_io_t
4532  * struct which contains a ni_packet_t data packet to
4533  * receive
4534  * \return On success
4535  * Total number of bytes read
4536  * On failure
4537  * NI_RETCODE_INVALID_PARAM
4538  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4539  * NI_RETCODE_ERROR_INVALID_SESSION
4540 *******************************************************************************/
4542  ni_session_data_io_t *p_data);
4543 
4544 
4545 /*!*****************************************************************************
4546  * \brief Get the DMA buffer file descriptor from the P2P frame
4547  *
4548  * \param[in] p_frame pointer to a P2P frame
4549  *
4550  * \return On success
4551  * DMA buffer file descriptor
4552  * On failure
4553  * NI_RETCODE_FAILURE
4554 *******************************************************************************/
4555 LIB_API int32_t ni_get_dma_buf_file_descriptor(const ni_frame_t* p_frame);
4556 
4557 
4558 /*!*****************************************************************************
4559  * \brief Send sequence change information to device
4560  *
4561  * \param[in] p_ctx Pointer to a caller allocated
4562  * ni_session_context_t struct
4563  * \param[in] width input width
4564  * \param[in] height input height
4565  * \param[in] bit_depth_factor 1 for 8-bit YUV, 2 for 10-bit YUV
4566  * \param[in] device_type device type (must be encoder)
4567  * \return On success
4568  * NI_RETCODE_SUCCESS
4569  * On failure
4570  * NI_RETCODE_INVALID_PARAM
4571  * NI_RETCODE_ERROR_MEM_ALOC
4572  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4573  * NI_RETCODE_ERROR_INVALID_SESSION
4574  ******************************************************************************/
4576  int width, int height, int bit_depth_factor, ni_device_type_t device_type);
4577 
4578 /*!*****************************************************************************
4579  * \brief Fetch perf metrics of inferences from device
4580  *
4581  * \param[in] p_ctx Pointer to a caller allocated
4582  * ni_session_context_t struct
4583  * \param[in] p_metrics Pointer to network metrics
4584  * \return On success
4585  * NI_RETCODE_SUCCESS
4586  * On failure
4587  * NI_RETCODE_INVALID_PARAM
4588  * NI_RETCODE_ERROR_MEM_ALOC
4589  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4590  ******************************************************************************/
4592  ni_session_context_t *p_ctx, ni_network_perf_metrics_t *p_metrics);
4593 
4594 /*!*****************************************************************************
4595  * \brief Query firmware loader and firmware versions from the device
4596  *
4597  * \param[in] device_handle Device handle obtained by calling ni_device_open()
4598  * \param[in] device_info
4599  *
4600  * \return On success
4601  * NI_RETCODE_SUCCESS
4602  * On failure
4603  * NI_RETCODE_INVALID_PARAM
4604  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4605  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4606  * NI_RETCODE_ERROR_MEM_ALOC
4607  ******************************************************************************/
4608 LIB_API ni_retcode_t ni_query_fl_fw_versions(ni_device_handle_t device_handle,
4609  ni_device_info_t *p_dev_info);
4610 
4611 /*!*****************************************************************************
4612  * \brief Query NVMe load from the device
4613  *
4614  * \param[in] p_ctx Pointer to a caller allocated
4615  * ni_session_context_t struct
4616  * \param[in] p_load_query Pointer to a caller allocated
4617  * ni_load_query_t struct
4618  *
4619  * \return On success
4620  * NI_RETCODE_SUCCESS
4621  * On failure
4622  * NI_RETCODE_INVALID_PARAM
4623  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4624  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4625  * NI_RETCODE_ERROR_MEM_ALOC
4626  ******************************************************************************/
4628  ni_session_context_t *p_ctx, ni_load_query_t *p_load_query);
4629 
4630 /*!*****************************************************************************
4631  * \brief Query VF and NS id from device
4632  *
4633  * \param[in] device_handle Device handle obtained by calling ni_device_open()
4634  * \param[in] p_dev_ns_vf Pointer to a ni_device_vf_ns_id_t struct
4635  * \param[in] fw_rev[] Fw version to check if this function is supported
4636  *
4637  * \return On success
4638  * NI_RETCODE_SUCCESS
4639  * On failure
4640  * NI_RETCODE_INVALID_PARAM
4641  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4642  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4643  * NI_RETCODE_ERROR_MEM_ALOC
4644  ******************************************************************************/
4645 LIB_API ni_retcode_t ni_query_vf_ns_id(ni_device_handle_t device_handle,
4646  ni_device_vf_ns_id_t *p_dev_ns_vf,
4647  uint8_t fw_rev[]);
4648 
4649 /*!*****************************************************************************
4650  * \brief Query CompositeTemp from device
4651  *
4652  * \param[in] device_handle Device handle obtained by calling ni_device_open()
4653  * \param[in] p_dev_temp Pointer to device temperature
4654  * \param[in] fw_rev[] Fw version to check if this function is supported
4655  *
4656  * \return On success
4657  * NI_RETCODE_SUCCESS
4658  * On failure
4659  * NI_RETCODE_INVALID_PARAM
4660  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4661  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4662  * NI_RETCODE_ERROR_MEM_ALOC
4663  ******************************************************************************/
4664 LIB_API ni_retcode_t ni_query_temperature(ni_device_handle_t device_handle,
4665  ni_device_temp_t *p_dev_temp,
4666  uint8_t fw_rev[]);
4667 
4668 /*!*****************************************************************************
4669  * \brief Query CompositeTemp from device
4670  *
4671  * \param[in] device_handle Device handle obtained by calling ni_device_open()
4672  * \param[in] p_dev_extra_info Pointer to device extra info
4673  * \param[in] fw_rev[] Fw version to check if this function is supported
4674  *
4675  * \return On success
4676  * NI_RETCODE_SUCCESS
4677  * On failure
4678  * NI_RETCODE_INVALID_PARAM
4679  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4680  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4681  * NI_RETCODE_ERROR_MEM_ALOC
4682  ******************************************************************************/
4683 LIB_API ni_retcode_t ni_query_extra_info(ni_device_handle_t device_handle,
4684  ni_device_extra_info_t *p_dev_extra_info,
4685  uint8_t fw_rev[]);
4686 
4687 /*!*****************************************************************************
4688  * \brief Check if incoming frame is encoder zero copy compatible or not
4689  *
4690  * \param[in] p_enc_ctx pointer to encoder context
4691  * [in] p_enc_params pointer to encoder parameters
4692  * [in] width input width
4693  * [in] height input height
4694  * [in] linesize input linesizes (pointer to array)
4695  * [in] set_linesize setup linesizes 0 means not setup linesizes, 1 means setup linesizes (before encoder open)
4696  *
4697  * \return on success and can do zero copy
4698  * NI_RETCODE_SUCCESS
4699  *
4700  * cannot do zero copy
4701  * NI_RETCODE_ERROR_UNSUPPORTED_FEATURE
4702  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4703  * NI_RETCODE_INVALID_PARAM
4704  *
4705 *******************************************************************************/
4707  ni_xcoder_params_t *p_enc_params,
4708  int width, int height,
4709  const int linesize[],
4710  bool set_linesize);
4711 
4712 /*!*****************************************************************************
4713  * \brief Allocate memory for encoder zero copy (metadata, etc.)
4714  * for encoding based on given
4715  * parameters, taking into account pic linesize and extra data.
4716  * Applicable to YUV planr / semi-planar 8 or 10 bit and RGBA pixel formats.
4717  *
4718  *
4719  * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
4720  * \param[in] video_width Width of the video frame
4721  * \param[in] video_height Height of the video frame
4722  * \param[in] linesize Picture line size
4723  * \param[in] data Picture data pointers (for each of YUV planes)
4724  * \param[in] extra_len Extra data size (incl. meta data)
4725  *
4726  * \return On success
4727  * NI_RETCODE_SUCCESS
4728  * On failure
4729  * NI_RETCODE_INVALID_PARAM
4730  * NI_RETCODE_ERROR_MEM_ALOC
4731  *****************************************************************************/
4733  int video_width, int video_height,
4734  const int linesize[], const uint8_t *data[],
4735  int extra_len);
4736 
4737 /*!*****************************************************************************
4738  * \brief Check if incoming frame is hwupload zero copy compatible or not
4739  *
4740  * \param[in] p_upl_ctx pointer to uploader context
4741  * [in] width input width
4742  * [in] height input height
4743  * [in] linesize input linesizes (pointer to array)
4744  * [in] pixel_format input pixel format
4745  *
4746  * \return on success and can do zero copy
4747  * NI_RETCODE_SUCCESS
4748  *
4749  * cannot do zero copy
4750  * NI_RETCODE_ERROR_UNSUPPORTED_FEATURE
4751  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4752  * NI_RETCODE_INVALID_PARAM
4753  *
4754 *******************************************************************************/
4756  int width, int height,
4757  const int linesize[], int pixel_format);
4758 
4759 /*!*****************************************************************************
4760  * \brief Allocate log buffer if needed and retrieve firmware logs from device
4761  *
4762  * \param[in] p_ctx Pointer to a caller allocated
4763  * ni_session_context_t struct
4764  * \param[in] p_log_buffer Reference to pointer to a log buffer
4765  * If log buffer pointer is NULL, this function will allocate log buffer
4766  * NOTE caller is responsible for freeing log buffer after calling this function
4767  * \param[in] gen_log_file Indicating whether it is required to generate log files
4768  *
4769  *
4770  * \return on success
4771  * NI_RETCODE_SUCCESS
4772  *
4773  * on failure
4774  * NI_RETCODE_ERROR_MEM_ALOC
4775  * NI_RETCODE_INVALID_PARAM
4776 *******************************************************************************/
4777 LIB_API ni_retcode_t ni_device_alloc_and_get_firmware_logs(ni_session_context_t *p_ctx, void** p_log_buffer, bool gen_log_file);
4778 
4779 /*!*****************************************************************************
4780  * \brief Set up hard coded demo ROI map
4781  *
4782  * \param[in] p_enc_ctx Pointer to a caller allocated
4783  *
4784  * \return on success
4785  * NI_RETCODE_SUCCESS
4786  *
4787  * on failure
4788  * NI_RETCODE_ERROR_MEM_ALOC
4789 *******************************************************************************/
4791 
4792 /*!*****************************************************************************
4793  * \brief Convert various reconfig and demo modes (stored in encoder configuration) to
4794  * aux data and store them in frame
4795  *
4796  * \param[in] p_enc_ctx Pointer to a caller allocated
4797  * ni_session_context_t struct
4798  * \param[in] p_frame Pointer to a caller allocated ni_frame_t struct
4799  *
4800  *
4801  * \return on success
4802  * NI_RETCODE_SUCCESS
4803  *
4804  * on failure
4805  * NI_RETCODE_ERROR_MEM_ALOC
4806 *******************************************************************************/
4808  ni_frame_t *p_frame);
4809 
4810 /*!*****************************************************************************
4811  * \brief Set custom gop and prepare to check if success
4812  *
4813  * \param[in] p_param Pointer to a caller allocated ni_xcoder_params_t struct
4814  * \param[in] value Pointer to a caller allocated custom gop name
4815  *
4816  * \return none
4817  *
4818 *******************************************************************************/
4819 LIB_API void ni_gop_params_check_set(ni_xcoder_params_t *p_param, char *value);
4820 
4821 /*!*****************************************************************************
4822  * \brief Check custom gop params set.
4823  *
4824  * \param[in] p_param Pointer to a caller allocated ni_xcoder_params_t struct
4825  *
4826  *
4827  * \return on success
4828  * true
4829  *
4830  * on failure
4831  * false
4832 *******************************************************************************/
4834 
4835 /*!*****************************************************************************
4836  * \brief Initiate P2P transfer (P2P write) (deprecated)
4837  *
4838  * \param[in] pSession Pointer to source card destination
4839  * \param[in] source Pointer to source frame to transmit
4840  * \param[in] ui64DestAddr Destination address on target device
4841  * \param[in] ui32FrameSize Size of frame to transfer
4842  *
4843  * \return always returns
4844  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4845 *******************************************************************************/
4847  niFrameSurface1_t *source,
4848  uint64_t ui64DestAddr,
4849  uint32_t ui32FrameSize);
4850 
4851 /*!*****************************************************************************
4852  * \brief Initiate P2P transfer to another device (P2P write)
4853  *
4854  * \param[in] pSession Pointer to source card destination
4855  * \param[in] source Pointer to source frame to transmit
4856  * \param[in] ui64DestAddr Destination address on target device
4857  * \param[in] ui32FrameSize Size of frame to transfer
4858  *
4859  * \return on success
4860  * NI_RETCODE_SUCCESS
4861  * on failure
4862  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4863  * NI_RETCODE_INVALID_PARAM
4864  * NI_RETCODE_ERROR_INVALID_SESSION
4865  * NI_RETCODE_ERROR_MEM_ALOC
4866  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4867 *******************************************************************************/
4869  niFrameSurface1_t *source,
4870  uint64_t ui64DestAddr,
4871  uint32_t ui32FrameSize);
4872 
4873 /*!*****************************************************************************
4874  * \brief Calculate the total size of a frame based on the upload
4875  * context attributes and includes rounding up to the page size
4876  *
4877  * \param[in] p_upl_ctx pointer to an uploader session context
4878  * \param[in] linesize array of line stride
4879  *
4880  * \return size
4881  * NI_RETCODE_INVALID_PARAM
4882  *
4883  ******************************************************************************/
4885  const int linesize[]);
4886 
4887 
4888 /*!*****************************************************************************
4889  * \brief Initiate a P2P transfer (P2P read)
4890  *
4891  * \param[in] pSession Pointer to destination upload session
4892  * \param[in] dmaAddrs Pointer to source DMA addresses
4893  * \param[in] pDstFrame Pointer to destination P2P frame
4894  *
4895  * \return on success
4896  * NI_RETCODE_SUCCESS
4897  * on failure
4898  * NI_RETCODE_ERROR_UNSUPPORTED_FW_VERSION
4899  * NI_RETCODE_INVALID_PARAM
4900  * NI_RETCODE_ERROR_INVALID_SESSION
4901  * NI_RETCODE_ERROR_MEM_ALOC
4902  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4903 *******************************************************************************/
4905  const ni_p2p_sgl_t *dmaAddrs,
4906  ni_frame_t *pDstFrame);
4907 
4908 /*!*****************************************************************************
4909  * \brief Send a restart command after flush command
4910  * Only support Encoder now
4911  *
4912  * \param[in] p_ctx Pointer to a caller allocated
4913  * ni_session_context_t struct
4914  * \param[in] width width, in pixels
4915  * \param[in] height height, in pixels
4916  * \param[in] device_type NI_DEVICE_TYPE_ENCODER
4917  * \return On success
4918  * NI_RETCODE_SUCCESS
4919  * On failure
4920  * NI_RETCODE_INVALID_PARAM
4921  * NI_RETCODE_ERROR_NVME_CMD_FAILED
4922  * NI_RETCODE_ERROR_INVALID_SESSION
4923  ******************************************************************************/
4925  int video_width,
4926  int video_height,
4927  ni_device_type_t device_type);
4928 
4929 #ifdef __cplusplus
4930 }
4931 #endif
XCODER_TEST_RECONF_LTR_INTERVAL_API
@ XCODER_TEST_RECONF_LTR_INTERVAL_API
Definition: ni_device_api.h:1772
_ni_dec_h264_vui_param::colour_description_present_flag
uint8_t colour_description_present_flag
Definition: ni_device_api.h:812
ni_vui_hrd_t
struct _ni_vui_hrd ni_vui_hrd_t
_ni_xcoder_params::reconf_demo_mode
int reconf_demo_mode
Definition: ni_device_api.h:2761
NI_CODEC_HW_RSVD
@ NI_CODEC_HW_RSVD
Definition: ni_device_api.h:945
_ni_xcoder_params::ui32VuiDataSizeBytes
NI_DEPRECATED uint32_t ui32VuiDataSizeBytes
Definition: ni_device_api.h:2781
_ni_encoder_cfg_params::enable_mb_level_rc
int enable_mb_level_rc
Definition: ni_device_api.h:2398
_ni_long_term_ref::use_long_term_ref
uint8_t use_long_term_ref
Definition: ni_device_api.h:693
_ni_instance_mgr_detail_status_append
Definition: ni_device_api.h:1244
ni_frame_buffer_alloc_pixfmt
LIB_API ni_retcode_t ni_frame_buffer_alloc_pixfmt(ni_frame_t *pframe, 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...
Definition: ni_device_api.c:9337
_ni_param_change_flags
_ni_param_change_flags
This is an enumeration for encoder parameter change.
Definition: ni_device_api.h:952
_ni_encoder_cfg_params::frame_rate
int frame_rate
Definition: ni_device_api.h:2253
NI_ENC_MEM_ALLOCATE_STRATEGY_INVALID_MAX
@ NI_ENC_MEM_ALLOCATE_STRATEGY_INVALID_MAX
Definition: ni_device_api.h:287
NI_XCODER_CLOSE_STATE
@ NI_XCODER_CLOSE_STATE
Definition: ni_device_api.h:249
_ni_frame_config::picture_width
uint16_t picture_width
Definition: ni_device_api.h:2840
_ni_xcoder_params::fps_denominator
uint32_t fps_denominator
Definition: ni_device_api.h:2749
_ni_dec_h264_vui_param::overscan_appropriate_flag
uint8_t overscan_appropriate_flag
Definition: ni_device_api.h:807
NI_PIX_FMT_UYVY422
@ NI_PIX_FMT_UYVY422
Definition: ni_device_api.h:275
_ni_region_of_interest::left
int left
Definition: ni_device_api.h:638
ni_device_session_restart
LIB_API 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.
Definition: ni_device_api.c:13009
_ni_xcoder_params::luma_linesize
int luma_linesize
Definition: ni_device_api.h:2814
NI_PIX_FMT_BGRA
@ NI_PIX_FMT_BGRA
Definition: ni_device_api.h:268
_ni_instance_mgr_detail_status_v1::sInstDetailStatusAppend
ni_instance_mgr_detail_status_append_t sInstDetailStatusAppend[NI_MAX_CONTEXTS_PER_HW_INSTANCE]
Definition: ni_device_api.h:1256
ni_encoder_frame_buffer_alloc
LIB_API ni_retcode_t ni_encoder_frame_buffer_alloc(ni_frame_t *pframe, 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 ...
Definition: ni_device_api.c:3162
_ni_scaler_input_params_t::output_height
int32_t output_height
Definition: ni_device_api.h:2577
_ni_packet::psnr_v
double psnr_v
Definition: ni_device_api.h:2887
_ni_load_query::fw_p2p_mem_usage
uint32_t fw_p2p_mem_usage
Definition: ni_device_api.h:1213
ni_uploader_p2p_test_send
LIB_API 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 call. Copies YUV data from the software frame to the hardware P2P frame on the Q...
Definition: ni_device_api.c:10957
_ni_sei_header::size
uint16_t size
Definition: ni_device_api.h:347
_ni_session_context::force_idr_frame
int force_idr_frame
Definition: ni_device_api.h:1602
NI_CODEC_FORMAT_JPEG
@ NI_CODEC_FORMAT_JPEG
Definition: ni_device_api.h:916
_ni_encoder_cfg_params::ver_offset
int ver_offset
Definition: ni_device_api.h:2412
_ni_scaler_watermark_params_t::ui32Height
uint32_t ui32Height
Definition: ni_device_api.h:2609
ni_device_alloc_frame
LIB_API 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.
Definition: ni_device_api.c:8965
NI_FRAME_AUX_DATA_MAX_FRAME_SIZE
@ NI_FRAME_AUX_DATA_MAX_FRAME_SIZE
Definition: ni_device_api.h:568
_ni_dec_mastering_display_colour_volume_bytes::display_primaries
uint16_t display_primaries[3][2]
Definition: ni_device_api.h:1065
_ni_dec_h265_vui_param::vui_poc_proportional_to_timing_flag
uint8_t vui_poc_proportional_to_timing_flag
Definition: ni_device_api.h:775
_ni_session_context::sei_hdr_mastering_display_color_vol_len
int sei_hdr_mastering_display_color_vol_len
Definition: ni_device_api.h:1431
_ni_dec_h265_vui_param::bitstream_restriction_flag
uint8_t bitstream_restriction_flag
Definition: ni_device_api.h:781
_ni_dec_win
Definition: ni_device_api.h:715
_ni_context_query::codec_format
uint32_t codec_format
Definition: ni_device_api.h:1191
_ni_device_capability::fw_commit_time
uint8_t fw_commit_time[26]
Definition: ni_device_api.h:1168
ni_device_session_hwup
LIB_API int ni_device_session_hwup(ni_session_context_t *p_ctx, ni_session_data_io_t *p_src_data, niFrameSurface1_t *hwdesc)
Send raw YUV input to uploader instance and retrieve a HW descriptor to represent it.
Definition: ni_device_api.c:8448
NI_SET_CHANGE_PARAM_RC_TARGET_RATE
@ NI_SET_CHANGE_PARAM_RC_TARGET_RATE
Definition: ni_device_api.h:957
_ni_session_context::hevc_sub_ctu_roi_buf
uint8_t * hevc_sub_ctu_roi_buf
Definition: ni_device_api.h:1589
_ni_decoder_input_params_t::mcmode
int mcmode
Definition: ni_device_api.h:2523
NI_ENC_PARAM_MAX_FRAME_SIZE_LOW_DELAY
#define NI_ENC_PARAM_MAX_FRAME_SIZE_LOW_DELAY
Definition: ni_device_api.h:2153
_ni_dec_h264_vui_param::chroma_sample_loc_type_bottom_field
int8_t chroma_sample_loc_type_bottom_field
Definition: ni_device_api.h:823
_ni_frame::separate_start
uint8_t separate_start
Definition: ni_device_api.h:2733
ni_hwframe_p2p_buffer_recycle
LIB_API ni_retcode_t ni_hwframe_p2p_buffer_recycle(ni_frame_t *p_frame)
Recycle hw P2P frames.
Definition: ni_device_api.c:11084
_ni_session_context::hwd_Inst_ID
uint32_t hwd_Inst_ID
Definition: ni_device_api.h:1541
_ni_packet::p_custom_sei_set
ni_custom_sei_set_t * p_custom_sei_set
Definition: ni_device_api.h:2883
XCODER_TEST_RECONF_CRF_FLOAT
@ XCODER_TEST_RECONF_CRF_FLOAT
Definition: ni_device_api.h:1762
_ni_hw_capability
hardware capability type
Definition: ni_device_api.h:1136
_ni_p2p_sgl_t
Definition: ni_defs.h:415
ni_encoder_frame_zerocopy_buffer_alloc
LIB_API 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,...
Definition: ni_device_api.c:2880
_ni_frame::buffer_size
uint32_t buffer_size
Definition: ni_device_api.h:2693
_ni_network_data
Definition: ni_device_api.h:1365
_ni_xcoder_params::dolby_vision_profile
int dolby_vision_profile
Definition: ni_device_api.h:2769
_ni_session_context::ltr_interval
int32_t ltr_interval
Definition: ni_device_api.h:1604
_ni_session_context::decoder_low_delay
int decoder_low_delay
Definition: ni_device_api.h:1596
_ni_decoder_input_params_t::error_ratio_threshold
int error_ratio_threshold
Definition: ni_device_api.h:2559
ni_param_change_flags_t
enum _ni_param_change_flags ni_param_change_flags_t
This is an enumeration for encoder parameter change.
_ni_session_context::p_all_zero_buf
void * p_all_zero_buf
Definition: ni_device_api.h:1573
_ni_session_context::required_buf_size
uint32_t required_buf_size
Definition: ni_device_api.h:1722
_ni_session_context::auto_dl_handle
ni_device_handle_t auto_dl_handle
Definition: ni_device_api.h:1471
ni_custom_packet_buffer_alloc
LIB_API 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...
Definition: ni_device_api.c:3808
_ni_instance_mgr_detail_status::ui8AvgCost
uint8_t ui8AvgCost
Definition: ni_device_api.h:1234
_ni_thread_arg_struct_t::p_mutex
ni_pthread_mutex_t * p_mutex
Definition: ni_device_api.h:1269
_ni_encoder_cfg_params::skip_frame_interval
int skip_frame_interval
Definition: ni_device_api.h:2433
ni_pix_fmt_t
ni_pix_fmt_t
Definition: ni_device_api.h:261
_ni_dec_h265_vui_param::overscan_appropriate_flag
uint8_t overscan_appropriate_flag
Definition: ni_device_api.h:749
NI_POOL_TYPE_P2P
@ NI_POOL_TYPE_P2P
Definition: ni_device_api.h:495
NI_H265_USERDATA_FLAG_MASTERING_COLOR_VOL
@ NI_H265_USERDATA_FLAG_MASTERING_COLOR_VOL
Definition: ni_device_api.h:371
_ni_context_query::reserved
uint32_t reserved
Definition: ni_device_api.h:1195
NI_ENC_MEM_ALLOCATE_STRATEGY_REGION_1_FIRST
@ NI_ENC_MEM_ALLOCATE_STRATEGY_REGION_1_FIRST
Definition: ni_device_api.h:286
_ni_hw_capability::codec_type
uint8_t codec_type
Definition: ni_device_api.h:1142
ni_enc_avc_roi_custom_map_t
union _ni_enc_avc_roi_custom_map ni_enc_avc_roi_custom_map_t
encoder AVC ROI custom map (1 MB = 8bits)
_ni_encoder_cfg_params::enable_dynamic_32x32_merge
int enable_dynamic_32x32_merge
Definition: ni_device_api.h:2366
_ni_encoder_cfg_params::hor_offset
int hor_offset
Definition: ni_device_api.h:2411
_ni_encoder_cfg_params::inLoopDSRatio
int inLoopDSRatio
Definition: ni_device_api.h:2349
ni_rational_t
struct _ni_rational ni_rational_t
_ni_session_context::max_retry_fail_count
int max_retry_fail_count[2]
Definition: ni_device_api.h:1703
XCODER_TEST_RECONF_END
@ XCODER_TEST_RECONF_END
Definition: ni_device_api.h:1782
ni_custom_gop_params_t
struct _ni_custom_gop_params ni_custom_gop_params_t
XCODER_TEST_CRF_API
@ XCODER_TEST_CRF_API
Definition: ni_device_api.h:1777
_ni_enc_avc_roi_custom_map
encoder AVC ROI custom map (1 MB = 8bits)
Definition: ni_device_api.h:872
ni_device_config_qos_op
LIB_API 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.
Definition: ni_device_api.c:2080
_ni_dec_h264_vui_param::aspect_ratio_idc
uint8_t aspect_ratio_idc
Definition: ni_device_api.h:805
_ni_content_light_level_info_bytes
payload format of HDR SEI content light level info
Definition: ni_device_api.h:1076
NI_SET_CHANGE_PARAM_CRF
@ NI_SET_CHANGE_PARAM_CRF
Definition: ni_device_api.h:975
ni_scaler_input_frame_alloc
LIB_API 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...
Definition: ni_device_api.c:3334
ni_reconfig_crf
LIB_API ni_retcode_t ni_reconfig_crf(ni_session_context_t *p_ctx, int32_t crf)
Reconfigure crf value dynamically during encoding.
Definition: ni_device_api.c:10389
_ni_frame::vui_len
unsigned int vui_len
Definition: ni_device_api.h:2676
_ni_frame::sei_hdr_content_light_level_info_offset
unsigned int sei_hdr_content_light_level_info_offset
Definition: ni_device_api.h:2663
ni_queue_buffer_pool_t
struct _ni_queue_buffer_pool_t ni_queue_buffer_pool_t
_ni_queue_buffer_pool_t::p_free_head
ni_queue_node_t * p_free_head
Definition: ni_device_api.h:1309
_ni_decoder_input_params_t::enable_ppu_scale_adapt
int enable_ppu_scale_adapt
Definition: ni_device_api.h:2546
_ni_encoder_cfg_params::pbRatio
float pbRatio
Definition: ni_device_api.h:2419
_ni_decoder_input_params_t::enable_out1
int enable_out1
Definition: ni_device_api.h:2521
ni_device_session_sequence_change
LIB_API 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.
Definition: ni_device_api.c:11410
ni_encoder_sw_frame_buffer_alloc
LIB_API 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,...
Definition: ni_device_api.c:3532
_ni_scaler_multi_watermark_params_t
Definition: ni_device_api.h:2618
_ni_network_layer_info::in_param
ni_network_layer_params_t * in_param
Definition: ni_device_api.h:1356
_ni_packet::pts
long long pts
Definition: ni_device_api.h:2858
_ni_dec_h265_vui_param::vui_timing_info_present_flag
uint8_t vui_timing_info_present_flag
Definition: ni_device_api.h:774
ni_frame_wipe_aux_data
LIB_API void ni_frame_wipe_aux_data(ni_frame_t *frame)
Free and remove all auxiliary data from the frame.
Definition: ni_device_api.c:4116
_ni_encoder_cfg_params::vbvBufferReencode
int vbvBufferReencode
Definition: ni_device_api.h:2456
ni_frame_buffer_alloc_dl
LIB_API 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.
Definition: ni_device_api.c:2393
NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_2
@ NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_2
Definition: ni_device_api.h:381
_ni_session_context::nb_rois
int nb_rois
Definition: ni_device_api.h:1583
_ni_session_context::xcoder_state
uint32_t xcoder_state
Definition: ni_device_api.h:1570
_ni_buf_pool_t::p_free_tail
ni_buf_t * p_free_tail
Definition: ni_device_api.h:1290
ni_instance_mgr_detail_status_v1_t
struct _ni_instance_mgr_detail_status_v1 ni_instance_mgr_detail_status_v1_t
_ni_frame::sar_width
uint16_t sar_width
Definition: ni_device_api.h:2713
XCODER_TEST_RECONF_MAX_FRAME_SIZE
@ XCODER_TEST_RECONF_MAX_FRAME_SIZE
Definition: ni_device_api.h:1759
_ni_dec_h265_vui_param::vui_time_scale
uint32_t vui_time_scale
Definition: ni_device_api.h:778
_ni_dec_h265_vui_param::max_bits_per_mincu_denom
int8_t max_bits_per_mincu_denom
Definition: ni_device_api.h:788
_ni_xcoder_params::padding
int padding
Definition: ni_device_api.h:2764
_ni_encoder_cfg_params::enable_filler
int enable_filler
Definition: ni_device_api.h:2390
_ni_session_context::itu_t_t35_cc_sei_hdr_h264
uint8_t itu_t_t35_cc_sei_hdr_h264[NI_CC_SEI_HDR_H264_LEN]
Definition: ni_device_api.h:1420
NI_AI_BUFFER_QUANTIZE_NONE
@ NI_AI_BUFFER_QUANTIZE_NONE
Definition: ni_device_api.h:1819
_ni_split_context_t::f8b
int f8b[3]
Definition: ni_device_api.h:1739
_ni_session_context::mdcv_max_min_lum_data_len
int mdcv_max_min_lum_data_len
Definition: ni_device_api.h:1432
ni_frame_new_aux_data
LIB_API 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.
Definition: ni_device_api.c:4006
_ni_session_context::force_low_delay
bool force_low_delay
Definition: ni_device_api.h:1701
_ni_custom_sei::size
uint32_t size
Definition: ni_device_api.h:1123
ni_encoder_init_default_params
LIB_API 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.
Definition: ni_device_api.c:4148
_ni_session_context::hwd_Frame_Idx
uint32_t hwd_Frame_Idx
Definition: ni_device_api.h:1537
_ni_encoder_cfg_params::gopLowdelay
int gopLowdelay
Definition: ni_device_api.h:2338
_ni_session_context::prev_fps
uint32_t prev_fps
Params used in VFR mode Start///.
Definition: ni_device_api.h:1633
_ni_session_context::preferred_characteristics_data
uint8_t preferred_characteristics_data
Definition: ni_device_api.h:1435
_ni_frame_config::rectangle_x
int16_t rectangle_x
Definition: ni_device_api.h:2846
ni_gop_params_t
struct _ni_gop_params ni_gop_params_t
_ni_frame::aspect_ratio_idc
uint8_t aspect_ratio_idc
Definition: ni_device_api.h:2712
_ni_gop_rps::ref_pic_used
int ref_pic_used
Definition: ni_device_api.h:1963
_ni_buf_t::p_next_buffer
struct _ni_buf_t * p_next_buffer
Definition: ni_device_api.h:1281
ni_frame_buffer_alloc_nv
LIB_API 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...
Definition: ni_device_api.c:3398
_ni_load_query::current_load
uint32_t current_load
Definition: ni_device_api.h:1200
_ni_packet::ssim_u
double ssim_u
Definition: ni_device_api.h:2890
_ni_session_context::dev_xcoder_name
char dev_xcoder_name[MAX_CHAR_IN_DEVICE_NAME]
Definition: ni_device_api.h:1490
ni_dec_win_t
struct _ni_dec_win ni_dec_win_t
NI_AI_BUFFER_FORMAT_INT16
@ NI_AI_BUFFER_FORMAT_INT16
Definition: ni_device_api.h:1799
_ni_packet::recycle_index
int recycle_index
Definition: ni_device_api.h:2866
_ni_scaler_input_params_t::op
ni_scaler_opcode_t op
Definition: ni_device_api.h:2584
_ni_dec_h265_vui_param::aspect_ratio_idc
uint8_t aspect_ratio_idc
Definition: ni_device_api.h:747
NI_AI_BUFFER_QUANTIZE_TF_ASYMM
@ NI_AI_BUFFER_QUANTIZE_TF_ASYMM
Definition: ni_device_api.h:1824
_ni_dec_win::right
int16_t right
Definition: ni_device_api.h:718
_ni_load_query::total_contexts
uint32_t total_contexts
Definition: ni_device_api.h:1203
ni_encoder_change_params_t
struct _ni_encoder_change_params_t ni_encoder_change_params_t
This is a data structure for encoding parameters that have changed.
_ni_session_context::frame_time_q
void * frame_time_q
Definition: ni_device_api.h:1415
XCODER_TEST_RECONF_LTR_INTERVAL
@ XCODER_TEST_RECONF_LTR_INTERVAL
Definition: ni_device_api.h:1756
_ni_encoder_cfg_params::statistic_output_level
int statistic_output_level
Definition: ni_device_api.h:2430
_ni_dec_mastering_display_colour_volume_bytes::white_point_y
uint16_t white_point_y
Definition: ni_device_api.h:1067
_ni_session_statistic_t
Definition: ni_defs.h:386
_ni_session_context::itu_t_t35_hdr10p_sei_hdr_h264
uint8_t itu_t_t35_hdr10p_sei_hdr_h264[NI_HDR10P_SEI_HDR_H264_LEN]
Definition: ni_device_api.h:1422
NI_SET_CHANGE_PARAM_VBV
@ NI_SET_CHANGE_PARAM_VBV
Definition: ni_device_api.h:976
XCODER_TEST_RECONF_FRAMERATE_API
@ XCODER_TEST_RECONF_FRAMERATE_API
Definition: ni_device_api.h:1774
_ni_dec_mastering_display_colour_volume_bytes
decoded payload format of HDR SEI mastering display colour volume
Definition: ni_device_api.h:1063
_ni_decoder_input_params_t::ec_policy
int ec_policy
Definition: ni_device_api.h:2544
_ni_pkt_info::reserved
double reserved[1]
Definition: ni_device_api.h:1104
_ni_frame::metadata_buffer_size
uint32_t metadata_buffer_size
Definition: ni_device_api.h:2722
_ni_queue_buffer_pool_t::p_free_tail
ni_queue_node_t * p_free_tail
Definition: ni_device_api.h:1310
_ni_decoder_input_params_t::skip_pts_guess
int skip_pts_guess
Definition: ni_device_api.h:2549
_ni_packet::psnr_u
double psnr_u
Definition: ni_device_api.h:2886
_ni_vui_hrd
Definition: ni_device_api.h:656
_ni_session_context::ui8_mdcv_max_min_lum_data
uint8_t ui8_mdcv_max_min_lum_data[9]
Definition: ni_device_api.h:1433
_ni_rc_min_max_qp::minQpI
int32_t minQpI
Definition: ni_device_api.h:708
_ni_encoder_cfg_params::temporal_layers_enable
int temporal_layers_enable
Definition: ni_device_api.h:2406
_ni_session_context::fn
unsigned short fn
Definition: ni_device_api.h:1624
_ni_packet::flags
int flags
Definition: ni_device_api.h:2881
_niFrameSurface1::ui16height
uint16_t ui16height
Definition: ni_device_api.h:2828
_ni_enc_avc_roi_custom_map::field
struct _ni_enc_avc_roi_custom_map::@5 field
SESSION_RUN_STATE_FLUSHING
@ SESSION_RUN_STATE_FLUSHING
Definition: ni_device_api.h:1183
_ni_session_context::enc_pts_w_idx
int64_t enc_pts_w_idx
Definition: ni_device_api.h:1443
_ni_session_context::key_frame_type
int key_frame_type
Definition: ni_device_api.h:1527
_ni_session_context::roi_side_data_size
int roi_side_data_size
Definition: ni_device_api.h:1580
_ni_dec_h264_vui_param::vui_time_scale
uint32_t vui_time_scale
Definition: ni_device_api.h:829
_ni_dec_h264_vui_param::max_bits_per_mincu_denom
int8_t max_bits_per_mincu_denom
Definition: ni_device_api.h:839
XCODER_TEST_RECONF_RC_MIN_MAX_QP_API
@ XCODER_TEST_RECONF_RC_MIN_MAX_QP_API
Definition: ni_device_api.h:1776
_ni_session_context::input_frame_fifo
ni_input_frame input_frame_fifo[120]
encoder:calculate PSNR start
Definition: ni_device_api.h:1711
ni_query_nvme_status
LIB_API 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.
Definition: ni_device_api.c:11549
_ni_session_context::current_frame_delay
int current_frame_delay
Definition: ni_device_api.h:1695
_ni_extended_dec_metadata
Definition: ni_device_api.h:723
_ni_scaler_watermark_params_t
Definition: ni_device_api.h:2605
ni_set_ltr_interval
LIB_API ni_retcode_t ni_set_ltr_interval(ni_session_context_t *p_ctx, int32_t ltr_interval)
Set Long Term Reference interval.
Definition: ni_device_api.c:10142
_ni_session_context::session_id
uint32_t session_id
Definition: ni_device_api.h:1482
NI_SET_CHANGE_PARAM_DEPEND_SLICE
@ NI_SET_CHANGE_PARAM_DEPEND_SLICE
Definition: ni_device_api.h:963
NI_H265_USERDATA_FLAG_ITU_T_T35_SUF
@ NI_H265_USERDATA_FLAG_ITU_T_T35_SUF
Definition: ni_device_api.h:368
ni_codec_hw_actions
ni_codec_hw_actions
This is an enumeration for hw actions.
Definition: ni_device_api.h:939
_ni_queue_buffer_pool_t::p_used_tail
ni_queue_node_t * p_used_tail
Definition: ni_device_api.h:1312
_ni_packet::start_of_stream
uint32_t start_of_stream
Definition: ni_device_api.h:2862
_ni_xcoder_params::source_width
int source_width
Definition: ni_device_api.h:2753
_ni_frame::reconf_len
unsigned int reconf_len
Definition: ni_device_api.h:2681
_ni_scaler_multi_watermark_params_t::multi_watermark_params
ni_scaler_watermark_params_t multi_watermark_params[NI_MAX_SUPPORT_WATERMARK_NUM]
Definition: ni_device_api.h:2619
_ni_instance_mgr_detail_status::ui16FrameRate
uint16_t ui16FrameRate
Definition: ni_device_api.h:1236
_ni_input_frame::usable
int8_t usable
Definition: ni_device_api.h:1407
_ni_decoder_input_params_t::enable_ppu_scale_limit
int enable_ppu_scale_limit
Definition: ni_device_api.h:2547
_ni_scaler_input_params_t::out_rec_height
int32_t out_rec_height
Definition: ni_device_api.h:2579
ni_device_session_hwdl
LIB_API int ni_device_session_hwdl(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, niFrameSurface1_t *hwdesc)
Read YUV data from hw descriptor stored location on device.
Definition: ni_device_api.c:8295
_ni_encoder_cfg_params::ltrRefInterval
int ltrRefInterval
Definition: ni_device_api.h:2299
_ni_session_context::target_bitrate
int32_t target_bitrate
Definition: ni_device_api.h:1601
_ni_session_context::mutex_initialized
bool mutex_initialized
Definition: ni_device_api.h:1673
ni_scaler_p2p_frame_acquire
LIB_API 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.
Definition: ni_device_api.c:11117
ni_enc_frame_buffer_alloc
LIB_API 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 ...
Definition: ni_device_api.c:2321
_ni_device_capability::xcoder_devices
ni_hw_capability_t xcoder_devices[NI_MAX_DEVICES_PER_HW_INSTANCE]
Definition: ni_device_api.h:1161
_ni_device_capability::fw_branch_name
uint8_t fw_branch_name[256]
Definition: ni_device_api.h:1167
_ni_custom_sei::location
ni_custom_sei_location_t location
Definition: ni_device_api.h:1122
NI_HDR10P_SEI_HDR_H264_LEN
#define NI_HDR10P_SEI_HDR_H264_LEN
Definition: ni_device_api.h:465
ni_reconfig_t
enum _ni_reconfig ni_reconfig_t
This is an enumeration for encoder reconfiguration test settings.
_ni_session_context::netint_fd
int netint_fd
Definition: ni_device_api.h:1620
_ni_hw_capability::hw_id
uint8_t hw_id
Definition: ni_device_api.h:1138
_ni_frame_config::frame_index
uint16_t frame_index
Definition: ni_device_api.h:2849
_ni_session_context::keyframe_factor
int keyframe_factor
Definition: ni_device_api.h:1532
_ni_pkt_info::psnr_u
double psnr_u
Definition: ni_device_api.h:1098
QOS_OP_CONFIG_REC_OP_CODE
@ QOS_OP_CONFIG_REC_OP_CODE
Definition: ni_device_api.h:238
PIC_TYPE_P
@ PIC_TYPE_P
Definition: ni_device_api.h:387
NI_CODEC_HW_NONE
@ NI_CODEC_HW_NONE
Definition: ni_device_api.h:941
_ni_buf_t::p_previous_buffer
struct _ni_buf_t * p_previous_buffer
Definition: ni_device_api.h:1280
NI_PIX_FMT_YUV420P
@ NI_PIX_FMT_YUV420P
Definition: ni_device_api.h:263
_ni_scaler_drawbox_params_t::start_y
uint32_t start_y
Definition: ni_device_api.h:2599
ni_category_classify_t
struct _ni_category_classify ni_category_classify_t
ni_buf_t
struct _ni_buf_t ni_buf_t
_ni_rc_min_max_qp
Definition: ni_device_api.h:706
_ni_scaler_watermark_params_t::ui32Valid
uint32_t ui32Valid
Definition: ni_device_api.h:2610
ni_device_type_t
ni_device_type_t
Definition: ni_defs.h:353
_niFrameSurface1::ui32nodeAddress
uint32_t ui32nodeAddress
Definition: ni_device_api.h:2829
ni_p2p_recv
LIB_API 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)
Definition: ni_device_api.c:12962
_ni_session_context::isP2P
int32_t isP2P
Definition: ni_device_api.h:1619
_ni_packet::end_of_stream
uint32_t end_of_stream
Definition: ni_device_api.h:2861
_ni_encoder_cfg_params::enable_hvs_qp_scale
int enable_hvs_qp_scale
Definition: ni_device_api.h:2395
ni_reconfig_vbv_value
LIB_API 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.
Definition: ni_device_api.c:10506
NI_SET_CHANGE_PARAM_RC2
@ NI_SET_CHANGE_PARAM_RC2
Definition: ni_device_api.h:969
NI_XCODER_READ_STATE
@ NI_XCODER_READ_STATE
Definition: ni_device_api.h:248
_ni_encoder_cfg_params::trans_rate
int trans_rate
Definition: ni_device_api.h:2397
_ni_thread_arg_struct_t::close_thread
bool close_thread
Definition: ni_device_api.h:1264
_ni_session_context::p_leftover
uint8_t * p_leftover
Definition: ni_device_api.h:1508
NI_H265_USER_DATA_FLAG_COLOUR_REMAPPING_INFO
@ NI_H265_USER_DATA_FLAG_COLOUR_REMAPPING_INFO
Definition: ni_device_api.h:377
_ni_session_data_io::packet
ni_packet_t packet
Definition: ni_device_api.h:2901
_ni_network_layer_params_t::quant_data
union _ni_network_layer_params_t::@13 quant_data
_ni_dec_h265_vui_param::motion_vectors_over_pic_boundaries_flag
uint8_t motion_vectors_over_pic_boundaries_flag
Definition: ni_device_api.h:784
_ni_xcoder_params::enable2PassGop
int enable2PassGop
Definition: ni_device_api.h:2812
_ni_frame::src_codec
ni_codec_format_t src_codec
Definition: ni_device_api.h:2630
_ni_device_capability::model_number
uint8_t model_number[40]
Definition: ni_device_api.h:1164
_ni_session_context::ltr_to_set
ni_long_term_ref_t ltr_to_set
Definition: ni_device_api.h:1603
_ni_encoder_change_params_t::frameRateDenom
int32_t frameRateDenom
Definition: ni_device_api.h:1053
_ni_packet::dts
long long dts
Definition: ni_device_api.h:2857
NI_NAMESPACE_MAX_NUM
#define NI_NAMESPACE_MAX_NUM
Definition: ni_device_api.h:217
_ni_encoder_cfg_params::crf_max_iframe_enable
int crf_max_iframe_enable
Definition: ni_device_api.h:2437
ni_frame_new_aux_data_from_raw_data
LIB_API 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.
Definition: ni_device_api.c:4046
XCODER_TEST_RECONF_SLICE_ARG
@ XCODER_TEST_RECONF_SLICE_ARG
Definition: ni_device_api.h:1765
_ni_session_context::active_video_width
uint32_t active_video_width
Definition: ni_device_api.h:1551
ni_codec_hw_actions_t
enum ni_codec_hw_actions ni_codec_hw_actions_t
This is an enumeration for hw actions.
_ni_network_layer_params_t::num_of_dims
uint32_t num_of_dims
Definition: ni_device_api.h:1330
_ni_extended_dec_metadata::rsvd0
uint64_t rsvd0
Definition: ni_device_api.h:732
_ni_encoder_cfg_params::enable_ai_enhance
int enable_ai_enhance
Definition: ni_device_api.h:2407
ni_device_session_flush
LIB_API 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...
Definition: ni_device_api.c:1512
_ni_network_layer_params_t::data_format
int32_t data_format
Definition: ni_device_api.h:1333
_ni_gop_params::poc_offset
int poc_offset
Definition: ni_device_api.h:1968
NI_SET_CHANGE_PARAM_CUSTOM_LAMBDA
@ NI_SET_CHANGE_PARAM_CUSTOM_LAMBDA
Definition: ni_device_api.h:968
_ni_gop_params::qp_offset
int qp_offset
Definition: ni_device_api.h:1969
_ni_framerate::framerate_denom
int32_t framerate_denom
Definition: ni_device_api.h:703
_ni_decoder_input_params_t::enable_user_data_sei_passthru
int enable_user_data_sei_passthru
Definition: ni_device_api.h:2541
_ni_session_context::pts_correction_last_dts
int64_t pts_correction_last_dts
Definition: ni_device_api.h:1445
NI_XCODER_HWDL_STATE
@ NI_XCODER_HWDL_STATE
Definition: ni_device_api.h:256
_ni_session_context::status
int status
Definition: ni_device_api.h:1526
_ni_network_perf_metrics::ddr_write_bw
uint64_t ddr_write_bw
Definition: ni_device_api.h:1395
NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_2
@ NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_2
Definition: ni_device_api.h:379
_ni_session_context::domain
unsigned short domain
Definition: ni_device_api.h:1621
ni_encoder_session_read_stream_header
LIB_API 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.
Definition: ni_device_api.c:11320
NI_FRAME_AUX_DATA_CATEGORY_CLASSIFY
@ NI_FRAME_AUX_DATA_CATEGORY_CLASSIFY
Definition: ni_device_api.h:596
_ni_session_context::is_dec_pkt_512_aligned
int is_dec_pkt_512_aligned
Definition: ni_device_api.h:1461
_ni_session_context::pool_type
ni_frame_pool_type_t pool_type
Definition: ni_device_api.h:1699
_ni_session_context::av_rois
ni_region_of_interest_t * av_rois
Definition: ni_device_api.h:1582
_ni_frame::color_trc
uint8_t color_trc
Definition: ni_device_api.h:2709
NI_SET_CHANGE_PARAM_RC_BIT_RATIO_LAYER
@ NI_SET_CHANGE_PARAM_RC_BIT_RATIO_LAYER
Definition: ni_device_api.h:960
XCODER_TEST_RECONF_CRF
@ XCODER_TEST_RECONF_CRF
Definition: ni_device_api.h:1761
NI_FRAME_AUX_DATA_CRF
@ NI_FRAME_AUX_DATA_CRF
Definition: ni_device_api.h:576
_ni_queue_node_t::p_next_buffer
struct _ni_queue_node_t * p_next_buffer
Definition: ni_device_api.h:1303
_ni_encoder_cfg_params::enable_ssim
int enable_ssim
Definition: ni_device_api.h:2401
ni_network_layer_params_t
struct _ni_network_layer_params_t ni_network_layer_params_t
_ni_region_of_interest
Definition: ni_device_api.h:628
_ni_session_context::param_err_msg
char param_err_msg[512]
Definition: ni_device_api.h:1530
_ni_xcoder_params::color_primaries
int color_primaries
Definition: ni_device_api.h:2786
_ni_device_capability::xcoder_cnt
uint8_t xcoder_cnt[NI_DEVICE_TYPE_XCODER_MAX]
Definition: ni_device_api.h:1160
_ni_session_context::ori_chroma_linesize
int ori_chroma_linesize
Definition: ni_device_api.h:1683
_ni_encoder_cfg_params::enable_compensate_qp
int enable_compensate_qp
Definition: ni_device_api.h:2451
_ni_queue_node_t::checkout_timestamp
time_t checkout_timestamp
Definition: ni_device_api.h:1299
_ni_network_layer_offset
Definition: ni_device_api.h:1360
ni_hw_capability_t
struct _ni_hw_capability ni_hw_capability_t
hardware capability type
_ni_frame::total_start_len
uint32_t total_start_len
Definition: ni_device_api.h:2731
_ni_session_context::last_bitrate
int32_t last_bitrate
Definition: ni_device_api.h:1676
ni_device_dec_session_flush
LIB_API 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...
Definition: ni_device_api.c:1621
_ni_input_frame::video_width
uint32_t video_width
Definition: ni_device_api.h:1402
_ni_session_context::pts_correction_num_faulty_dts
int pts_correction_num_faulty_dts
Definition: ni_device_api.h:1444
NI_AI_BUFFER_FORMAT_UINT32
@ NI_AI_BUFFER_FORMAT_UINT32
Definition: ni_device_api.h:1807
NI_DEC_CROP_MODE_AUTO
@ NI_DEC_CROP_MODE_AUTO
Definition: ni_device_api.h:931
_ni_session_context::actual_video_width
uint32_t actual_video_width
Definition: ni_device_api.h:1555
XCODER_TEST_RECONF_VUI_HRD
@ XCODER_TEST_RECONF_VUI_HRD
Definition: ni_device_api.h:1751
_ni_dec_h264_vui_param::motion_vectors_over_pic_boundaries_flag
uint8_t motion_vectors_over_pic_boundaries_flag
Definition: ni_device_api.h:837
NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_1
@ NI_H265_USERDATA_FLAG_ITU_T_T35_SUF_1
Definition: ni_device_api.h:380
_ni_encoder_cfg_params::chromaQpOffset
int chromaQpOffset
Definition: ni_device_api.h:2342
_ni_frame::iovec
ni_iovec_t * iovec
Definition: ni_device_api.h:2740
NI_PIX_FMT_BGR0
@ NI_PIX_FMT_BGR0
Definition: ni_device_api.h:271
XCODER_TEST_RECONF_RC_MIN_MAX_QP_REDUNDANT
@ XCODER_TEST_RECONF_RC_MIN_MAX_QP_REDUNDANT
Definition: ni_device_api.h:1760
_ni_load_query::pcie_throughput
uint32_t pcie_throughput
Definition: ni_device_api.h:1206
_ni_frameclone_desc
Definition: ni_device_api.h:1377
_ni_pkt_info::ssim_v
double ssim_v
Definition: ni_device_api.h:1103
NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_1
@ NI_H265_USERDATA_FLAG_ITU_T_T35_PRE_1
Definition: ni_device_api.h:378
_ni_xcoder_params::rootBufId
int rootBufId
Definition: ni_device_api.h:2805
NI_H265_USERDATA_FLAG_VUI
@ NI_H265_USERDATA_FLAG_VUI
Definition: ni_device_api.h:363
_ni_encoder_change_params_t::bitRate
int32_t bitRate
Definition: ni_device_api.h:989
_ni_custom_sei::data
uint8_t data[NI_MAX_CUSTOM_SEI_DATA]
Definition: ni_device_api.h:1124
_ni_frame::vui_num_units_in_tick
uint32_t vui_num_units_in_tick
Definition: ni_device_api.h:2715
_ni_region_of_interest::right
int right
Definition: ni_device_api.h:639
ni_rsrc_api.h
Public definitions for managing NETINT video processing devices.
_ni_frame::p_start_buffer
uint8_t * p_start_buffer
Definition: ni_device_api.h:2728
_ni_session_context::event_handle
ni_event_handle_t event_handle
Definition: ni_device_api.h:1576
XCODER_TEST_RECONF_FRAMERATE
@ XCODER_TEST_RECONF_FRAMERATE
Definition: ni_device_api.h:1758
ni_scaler_multi_watermark_params_t
struct _ni_scaler_multi_watermark_params_t ni_scaler_multi_watermark_params_t
ni_device_multi_config_frame
LIB_API 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)
Config multiple frame on the device for 2D engined to work on based on provided parameters.
Definition: ni_device_api.c:9180
ni_query_extra_info
LIB_API 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.
Definition: ni_device_api.c:11719
_ni_frame::aux_data
ni_aux_data_t * aux_data[NI_MAX_NUM_AUX_DATA_PER_FRAME]
Definition: ni_device_api.h:2703
g_xcoder_preset_names
const LIB_API char *const g_xcoder_preset_names[NI_XCODER_PRESET_NAMES_ARRAY_LEN]
Definition: ni_device_api.c:69
_ni_device_capability::hw_elements_cnt
uint8_t hw_elements_cnt
Definition: ni_device_api.h:1158
ni_aux_data_type_t
enum _ni_frame_aux_data_type ni_aux_data_type_t
ni_instance_mgr_detail_status_t
struct _ni_instance_mgr_detail_status ni_instance_mgr_detail_status_t
_ni_frame::crop_top
uint32_t crop_top
Definition: ni_device_api.h:2639
_ni_overall_load_query
Definition: ni_device_api.h:1224
_ni_encoder_cfg_params::enable_acq_limit
int enable_acq_limit
Definition: ni_device_api.h:2443
_ni_encoder_cfg_params::noMbtree
int noMbtree
Definition: ni_device_api.h:2415
_ni_scaler_drawbox_params_t::rgba_c
uint32_t rgba_c
Definition: ni_device_api.h:2602
XCODER_TEST_RECONF_INTRAPRD
@ XCODER_TEST_RECONF_INTRAPRD
Definition: ni_device_api.h:1750
ni_device_capability_query2
LIB_API 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...
Definition: ni_device_api.c:647
_ni_session_context::last_dts
int64_t last_dts
Definition: ni_device_api.h:1440
_ni_session_context::blk_io_handle
ni_device_handle_t blk_io_handle
Definition: ni_device_api.h:1467
_ni_frame::start_len
uint32_t start_len[NI_MAX_NUM_DATA_POINTERS]
Definition: ni_device_api.h:2730
NI_HDR10P_SEI_HDR_HEVC_LEN
#define NI_HDR10P_SEI_HDR_HEVC_LEN
Definition: ni_device_api.h:464
_ni_scaler_input_params_t
Definition: ni_device_api.h:2565
_ni_encoder_cfg_params::roi_enable
int roi_enable
Definition: ni_device_api.h:2271
_ni_session_context::frame_pkt_offset
uint64_t frame_pkt_offset
Definition: ni_device_api.h:1649
_ni_encoder_cfg_params::pastFrameMaxIntraRatio
int pastFrameMaxIntraRatio
Definition: ni_device_api.h:2461
NI_MAX_DEVICES_PER_HW_INSTANCE
#define NI_MAX_DEVICES_PER_HW_INSTANCE
Definition: ni_defs.h:251
_ni_encoder_cfg_params::intra_period
int intra_period
Definition: ni_device_api.h:2274
_ni_queue_t::name
char name[32]
Definition: ni_device_api.h:1317
_ni_session_context::pts_correction_last_pts
int64_t pts_correction_last_pts
Definition: ni_device_api.h:1447
_ni_encoder_cfg_params::EnableRdoQuant
int EnableRdoQuant
Definition: ni_device_api.h:2316
_ni_extended_dec_metadata::time_scale
uint32_t time_scale
Definition: ni_device_api.h:726
_ni_encoder_cfg_params::spatialLayerBitrate
int spatialLayerBitrate[NI_MAX_SPATIAL_LAYERS]
Definition: ni_device_api.h:2463
_ni_frame_config::rectangle_height
uint16_t rectangle_height
Definition: ni_device_api.h:2845
_ni_decoder_input_params_t::min_packets_delay
bool min_packets_delay
Definition: ni_device_api.h:2552
ni_reconfig_bitrate
LIB_API ni_retcode_t ni_reconfig_bitrate(ni_session_context_t *p_ctx, int32_t bitrate)
Reconfigure bitrate dynamically during encoding.
Definition: ni_device_api.c:9957
_ni_dec_h265_vui_param::sar_width
uint16_t sar_width
Definition: ni_device_api.h:757
_ni_frame::separate_metadata
uint8_t separate_metadata
Definition: ni_device_api.h:2724
ni_custom_sei_set_t
struct _ni_custom_sei_set ni_custom_sei_set_t
_ni_session_context::reconfig_slice_arg
int16_t reconfig_slice_arg
Definition: ni_device_api.h:1708
ni_enc_allocate_strategy_t
ni_enc_allocate_strategy_t
Definition: ni_device_api.h:281
_ni_encoder_cfg_params::enable_pic_skip
int enable_pic_skip
Definition: ni_device_api.h:2384
ni_qos_codes
ni_qos_codes
Definition: ni_device_api.h:235
_ni_network_data::outset
ni_network_layer_offset_t * outset
Definition: ni_device_api.h:1373
_ni_network_perf_metrics
Definition: ni_device_api.h:1386
_ni_hw_capability::max_4k_fps
uint8_t max_4k_fps
Definition: ni_device_api.h:1140
ni_scaler_set_drawbox_params
LIB_API 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.
Definition: ni_device_api.c:8786
ni_encoder_cfg_params_t
struct _ni_encoder_cfg_params ni_encoder_cfg_params_t
_ni_encoder_cfg_params::use_recommend_enc_params
int use_recommend_enc_params
Definition: ni_device_api.h:2360
_ni_packet::frame_type
uint32_t frame_type
Definition: ni_device_api.h:2865
_ni_thread_arg_struct_t::p_buffer
void * p_buffer
Definition: ni_device_api.h:1268
_ni_session_context::prev_pts
uint64_t prev_pts
Definition: ni_device_api.h:1635
_ni_network_layer_params_t::fixed_point_pos
int32_t fixed_point_pos
Definition: ni_device_api.h:1341
_ni_dec_h265_vui_param::default_display_window_flag
uint8_t default_display_window_flag
Definition: ni_device_api.h:773
ni_device_session_read
LIB_API 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 ...
Definition: ni_device_api.c:1769
_ni_session_context::light_level_data_len
int light_level_data_len
Definition: ni_device_api.h:1429
_ni_hw_capability::min_video_height
uint16_t min_video_height
Definition: ni_device_api.h:1146
_ni_load_query::fw_share_mem_usage
uint32_t fw_share_mem_usage
Definition: ni_device_api.h:1212
_ni_gop_params::pic_type
int pic_type
Definition: ni_device_api.h:1972
ni_split_context_t
struct _ni_split_context_t ni_split_context_t
_ni_encoder_cfg_params::min_qp
int min_qp
Definition: ni_device_api.h:2380
_ni_encoder_change_params_t::minQpPB
int32_t minQpPB
Definition: ni_device_api.h:1005
_ni_buf_pool_t::mutex
ni_pthread_mutex_t mutex
Definition: ni_device_api.h:1286
_ni_frame::error_ratio
uint32_t error_ratio
Definition: ni_device_api.h:2736
NI_FRAME_AUX_DATA_SLICE_ARG
@ NI_FRAME_AUX_DATA_SLICE_ARG
Definition: ni_device_api.h:592
_ni_encoder_cfg_params::gop_preset_index
int gop_preset_index
Definition: ni_device_api.h:2265
ni_set_demo_roi_map
LIB_API ni_retcode_t ni_set_demo_roi_map(ni_session_context_t *p_enc_ctx)
Set up hard coded demo ROI map.
Definition: ni_device_api.c:11853
_ni_frame::sei_user_data_unreg_len
unsigned int sei_user_data_unreg_len
Definition: ni_device_api.h:2670
_ni_encoder_cfg_params::max_qp
int max_qp
Definition: ni_device_api.h:2381
_ni_frame_config
Definition: ni_device_api.h:2838
ni_scaler_dest_frame_alloc
LIB_API 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
Definition: ni_device_api.c:3299
_ni_encoder_cfg_params::ipRatio
float ipRatio
Definition: ni_device_api.h:2418
NI_PIX_FMT_BGRP
@ NI_PIX_FMT_BGRP
Definition: ni_device_api.h:272
ni_pic_type_t
ni_pic_type_t
Definition: ni_device_api.h:384
_ni_packet::av1_p_data
uint8_t * av1_p_data[MAX_AV1_ENCODER_GOP_NUM]
Definition: ni_device_api.h:2875
ni_frame_t
struct _ni_frame ni_frame_t
QOS_MODE_ENABLED_NO_SHARE
@ QOS_MODE_ENABLED_NO_SHARE
Definition: ni_device_api.h:228
_ni_session_context::force_frame_type
int force_frame_type
Definition: ni_device_api.h:1544
_ni_encoder_cfg_params::blockRCSize
int blockRCSize
Definition: ni_device_api.h:2350
ni_uploader_frame_buffer_lock
LIB_API 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.
Definition: ni_device_api.c:10851
_ni_instance_mgr_detail_status::ui32NumOutFrame
uint32_t ui32NumOutFrame
Definition: ni_device_api.h:1241
_ni_xcoder_params::roi_demo_mode
int roi_demo_mode
Definition: ni_device_api.h:2760
_ni_sei_header::status
uint8_t status
Definition: ni_device_api.h:346
_niFrameSurface1::src_cpu
int8_t src_cpu
Definition: ni_device_api.h:2834
_ni_network_perf_metrics::total_idle_cycles
uint32_t total_idle_cycles
Definition: ni_device_api.h:1389
NI_H265_USERDATA_FLAG_TONE_MAPPING_INFO
@ NI_H265_USERDATA_FLAG_TONE_MAPPING_INFO
Definition: ni_device_api.h:374
_ni_session_context::src_endian
int src_endian
Definition: ni_device_api.h:1495
_ni_dec_win::top
int16_t top
Definition: ni_device_api.h:719
NI_ENC_MEM_ALLOCATE_STRATEGY_INVALID_MIN
@ NI_ENC_MEM_ALLOCATE_STRATEGY_INVALID_MIN
Definition: ni_device_api.h:283
ni_qos_modes_t
enum ni_qos_modes ni_qos_modes_t
ni_device_session_read_hwdesc
LIB_API 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 ...
Definition: ni_device_api.c:8128
_ni_session_context::low_delay_sync_mutex
ni_pthread_mutex_t low_delay_sync_mutex
Definition: ni_device_api.h:1667
_ni_encoder_cfg_params::intra_mb_refresh_mode
int intra_mb_refresh_mode
Definition: ni_device_api.h:2275
_ni_xcoder_params::pos_time_scale
NI_DEPRECATED uint32_t pos_time_scale
Definition: ni_device_api.h:2784
_ni_gop_params
Definition: ni_device_api.h:1966
NI_PIX_FMT_NONE
@ NI_PIX_FMT_NONE
Definition: ni_device_api.h:278
_ni_frame::orignal_pts
long long orignal_pts
Definition: ni_device_api.h:2735
_ni_encoder_cfg_params::vbv_buffer_size
int vbv_buffer_size
Definition: ni_device_api.h:2391
_ni_packet::av1_buffer_size
uint32_t av1_buffer_size[MAX_AV1_ENCODER_GOP_NUM]
Definition: ni_device_api.h:2876
_ni_frame::sei_total_len
unsigned int sei_total_len
Definition: ni_device_api.h:2655
_ni_session_context::pts_offsets
int64_t pts_offsets[NI_FIFO_SZ]
Definition: ni_device_api.h:1451
_ni_frame::p_buffer
uint8_t * p_buffer
Definition: ni_device_api.h:2692
NI_H265_USERDATA_FLAG_CHROMA_RESAMPLING_FILTER_HINT
@ NI_H265_USERDATA_FLAG_CHROMA_RESAMPLING_FILTER_HINT
Definition: ni_device_api.h:372
_ni_encoder_cfg_params::noHWMultiPassSupport
int noHWMultiPassSupport
Definition: ni_device_api.h:2416
_ni_encoder_cfg_params::gdrDuration
int gdrDuration
Definition: ni_device_api.h:2298
NI_AI_BUFFER_FORMAT_FP64
@ NI_AI_BUFFER_FORMAT_FP64
Definition: ni_device_api.h:1813
_ni_packet::psnr_y
double psnr_y
Definition: ni_device_api.h:2885
_ni_xcoder_params::video_full_range_flag
int video_full_range_flag
Definition: ni_device_api.h:2791
NI_FIFO_SZ
#define NI_FIFO_SZ
Definition: ni_defs.h:303
_ni_encoder_change_params_t::aspectRatioHeight
uint16_t aspectRatioHeight
Definition: ni_device_api.h:1026
_ni_frame::dts
long long dts
Definition: ni_device_api.h:2632
_ni_encoder_change_params_t::enable_option
uint32_t enable_option
Definition: ni_device_api.h:986
XCODER_TEST_RECONF_VBV
@ XCODER_TEST_RECONF_VBV
Definition: ni_device_api.h:1763
_ni_decoder_input_params_t::force_low_delay
bool force_low_delay
Definition: ni_device_api.h:2539
_ni_encoder_change_params_t::mbLevelRcEnable
int32_t mbLevelRcEnable
Definition: ni_device_api.h:997
_ni_encoder_cfg_params::aspectRatioWidth
int aspectRatioWidth
Definition: ni_device_api.h:2254
_ni_instance_mgr_detail_status::ui32BitRate
uint32_t ui32BitRate
Definition: ni_device_api.h:1237
_ni_network_perf_metrics::ddr_read_bw
uint64_t ddr_read_bw
Definition: ni_device_api.h:1394
_ni_split_context_t::h
int h[3]
Definition: ni_device_api.h:1737
_ni_session_context::avc_roi_map
ni_enc_avc_roi_custom_map_t * avc_roi_map
Definition: ni_device_api.h:1587
_ni_scaler_input_params_t::input_height
int32_t input_height
Definition: ni_device_api.h:2569
_ni_frame::pkt_pos
uint64_t pkt_pos
Definition: ni_device_api.h:2725
_ni_session_context::buffered_frame_index
int16_t buffered_frame_index
Definition: ni_device_api.h:1719
ni_decoder_params_set_value
LIB_API 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.
Definition: ni_device_api.c:4892
NI_XCODER_INTER_FLUSH_STATE
@ NI_XCODER_INTER_FLUSH_STATE
Definition: ni_device_api.h:253
_ni_device_capability::fw_commit_hash
uint8_t fw_commit_hash[41]
Definition: ni_device_api.h:1169
ni_region_of_interest_t
struct _ni_region_of_interest ni_region_of_interest_t
_ni_frame::crop_left
uint32_t crop_left
Definition: ni_device_api.h:2641
_ni_packet::ssim_y
double ssim_y
Definition: ni_device_api.h:2889
_ni_encoder_cfg_params::maxFrameSizeRatio
int maxFrameSizeRatio
Definition: ni_device_api.h:2258
_ni_decoder_input_params_t::enable_advanced_ec
int enable_advanced_ec
Definition: ni_device_api.h:2545
ni_dec_crop_mode
enum _ni_dec_crop_mode ni_dec_crop_mode
_ni_encoder_cfg_params::HDR10AveLight
int HDR10AveLight
Definition: ni_device_api.h:2285
_ni_encoder_cfg_params::rc
struct _ni_encoder_cfg_params::@16 rc
XCODER_TEST_INVALID_REF_FRAME
@ XCODER_TEST_INVALID_REF_FRAME
Definition: ni_device_api.h:1757
_ni_decoder_input_params_t::sc_expr
char sc_expr[NI_MAX_NUM_OF_DECODER_OUTPUTS][2][NI_MAX_PPU_PARAM_EXPR_CHAR+1]
Definition: ni_device_api.h:2535
_ni_encoder_cfg_params::cu_size_mode
int cu_size_mode
Definition: ni_device_api.h:2362
ni_dec_mastering_display_colour_volume_bytes_t
struct _ni_dec_mastering_display_colour_volume_bytes ni_dec_mastering_display_colour_volume_bytes_t
decoded payload format of HDR SEI mastering display colour volume
_ni_packet::av1_data_len
uint32_t av1_data_len[MAX_AV1_ENCODER_GOP_NUM]
Definition: ni_device_api.h:2877
ni_dec_h264_vui_param_t
struct _ni_dec_h264_vui_param ni_dec_h264_vui_param_t
decoded payload format of H.264 VUI
_ni_encoder_cfg_params::hrdEnable
int hrdEnable
Definition: ni_device_api.h:2317
_ni_session_run_state
_ni_session_run_state
Session running state type.
Definition: ni_device_api.h:1177
_ni_frame::preferred_characteristics_data_len
uint8_t preferred_characteristics_data_len
Definition: ni_device_api.h:2697
_ni_frame_config::session_id
uint16_t session_id
Definition: ni_device_api.h:2850
_ni_network_perf_metrics::write_bw
uint64_t write_bw
Definition: ni_device_api.h:1391
NI_SET_CHANGE_PARAM_PPS
@ NI_SET_CHANGE_PARAM_PPS
Definition: ni_device_api.h:955
NI_PIX_FMT_8_TILED4X4
@ NI_PIX_FMT_8_TILED4X4
Definition: ni_device_api.h:276
_ni_session_context::bit_depth_factor
int bit_depth_factor
Definition: ni_device_api.h:1496
_ni_queue_node_t::frame_info
uint64_t frame_info
Definition: ni_device_api.h:1298
XCODER_TEST_RECONF_RC_MIN_MAX_QP_API_REDUNDANT
@ XCODER_TEST_RECONF_RC_MIN_MAX_QP_API_REDUNDANT
Definition: ni_device_api.h:1771
ni_scaler_set_watermark_params
LIB_API 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.
Definition: ni_device_api.c:8866
_ni_session_context::reconfig_crf_decimal
int reconfig_crf_decimal
Definition: ni_device_api.h:1688
_ni_encoder_change_params_t
This is a data structure for encoding parameters that have changed.
Definition: ni_device_api.h:984
_ni_encoder_cfg_params::encMallocStrategy
int encMallocStrategy
Definition: ni_device_api.h:2449
_ni_category_classify::prob
float prob
Definition: ni_device_api.h:652
ni_network_layer_info_t
struct _ni_network_layer_info ni_network_layer_info_t
ni_content_light_level_info_bytes_t
struct _ni_content_light_level_info_bytes ni_content_light_level_info_bytes_t
payload format of HDR SEI content light level info
_ni_xcoder_params::log
int log
Definition: ni_device_api.h:2745
ni_frame_get_aux_data
LIB_API 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.
Definition: ni_device_api.c:4067
_ni_frame::force_pic_qp
uint16_t force_pic_qp
Definition: ni_device_api.h:2685
_ni_encoder_cfg_params::high_tier
int high_tier
Definition: ni_device_api.h:2358
_ni_session_context::mutex
ni_pthread_mutex_t mutex
Definition: ni_device_api.h:1567
NI_FRAME_AUX_DATA_HDR_PLUS
@ NI_FRAME_AUX_DATA_HDR_PLUS
Definition: ni_device_api.h:516
_ni_encoder_cfg_params::max_num_merge
int max_num_merge
Definition: ni_device_api.h:2363
_ni_gop_params::num_ref_pics
int num_ref_pics
Definition: ni_device_api.h:1973
_ni_packet::av1_buffer_index
int av1_buffer_index
Definition: ni_device_api.h:2878
_ni_decoder_input_params_t::crop_mode
int crop_mode[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2527
ni_frame_buffer_free
LIB_API ni_retcode_t ni_frame_buffer_free(ni_frame_t *pframe)
Free frame buffer that was previously allocated with either ni_frame_buffer_alloc or ni_encoder_frame...
Definition: ni_device_api.c:3562
_ni_aux_data::size
int size
Definition: ni_device_api.h:624
_ni_encoder_cfg_params::crf
int crf
Definition: ni_device_api.h:2283
_ni_load_query::pcie_load
uint32_t pcie_load
Definition: ni_device_api.h:1210
NI_H265_USERDATA_FLAG_ITU_T_T35_PRE
@ NI_H265_USERDATA_FLAG_ITU_T_T35_PRE
Definition: ni_device_api.h:366
_ni_session_context::hw_id
int hw_id
Definition: ni_device_api.h:1480
ni_xcoder_params_t
struct _ni_xcoder_params ni_xcoder_params_t
_ni_hw_capability::video_level
uint8_t video_level
Definition: ni_device_api.h:1148
_ni_dec_h264_vui_param::pic_struct_present_flag
uint8_t pic_struct_present_flag
Definition: ni_device_api.h:834
_ni_region_of_interest::self_size
uint32_t self_size
Definition: ni_device_api.h:631
_ni_network_layer_params_t
Definition: ni_device_api.h:1328
ni_device_session_write
LIB_API int ni_device_session_write(ni_session_context_t *p_ctx, ni_session_data_io_t *p_data, ni_device_type_t device_type)
Send data to the device If device_type is NI_DEVICE_TYPE_DECODER sends data packet to decoder If devi...
Definition: ni_device_api.c:1668
NI_FRAME_AUX_DATA_VBV_BUFFER_SIZE
@ NI_FRAME_AUX_DATA_VBV_BUFFER_SIZE
Definition: ni_device_api.h:588
ni_iovec_t
struct _ni_iovec ni_iovec_t
ni_scaler_drawbox_params_t
struct _ni_scaler_drawbox_params_t ni_scaler_drawbox_params_t
_ni_dec_h264_vui_param::video_format
int8_t video_format
Definition: ni_device_api.h:810
ni_session_context_t
struct _ni_session_context ni_session_context_t
_ni_session_context::ori_width
int ori_width
Definition: ni_device_api.h:1564
_ni_xcoder_params::fps_number
uint32_t fps_number
Definition: ni_device_api.h:2748
NI_FRAME_AUX_DATA_VBV_MAX_RATE
@ NI_FRAME_AUX_DATA_VBV_MAX_RATE
Definition: ni_device_api.h:584
_ni_enc_quad_roi_custom_map::roiAbsQp_flag
uint8_t roiAbsQp_flag
Definition: ni_device_api.h:889
ni_device_session_query
LIB_API 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 ...
Definition: ni_device_api.c:1920
_ni_session_context::ddr_config
uint8_t ddr_config
Definition: ni_device_api.h:1628
_ni_enc_mastering_display_colour_volume::max_display_mastering_luminance
uint32_t max_display_mastering_luminance
Definition: ni_device_api.h:1091
NI_XCODER_OPEN_STATE
@ NI_XCODER_OPEN_STATE
Definition: ni_device_api.h:246
_ni_scaler_input_params_t::input_format
int input_format
Definition: ni_device_api.h:2567
_ni_instance_mgr_detail_status_append::ui32Height
uint32_t ui32Height
Definition: ni_device_api.h:1246
_ni_xcoder_params::hdrEnableVUI
int hdrEnableVUI
Definition: ni_device_api.h:2775
_ni_load_query::fw_video_shared_mem_usage
uint32_t fw_video_shared_mem_usage
Definition: ni_device_api.h:1209
_ni_scaler_params_t
Definition: ni_device_api.h:2587
ni_calculate_total_frame_size
LIB_API 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...
Definition: ni_device_api.c:9230
_ni_scaler_input_params_t::out_rec_width
int32_t out_rec_width
Definition: ni_device_api.h:2578
NI_SET_CHANGE_PARAM_VUI_HRD_PARAM
@ NI_SET_CHANGE_PARAM_VUI_HRD_PARAM
Definition: ni_device_api.h:970
_ni_device_capability::fw_build_id
uint8_t fw_build_id[256]
Definition: ni_device_api.h:1171
ni_set_ltr
LIB_API 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.
Definition: ni_device_api.c:10114
_ni_queue_node_t::timestamp
uint64_t timestamp
Definition: ni_device_api.h:1297
_ni_timestamp_table_t::list
ni_queue_t list
Definition: ni_device_api.h:1325
_ni_encoder_cfg_params::enable_timecode
int enable_timecode
Definition: ni_device_api.h:2453
_ni_session_context::reconfig_intra_period
int reconfig_intra_period
Definition: ni_device_api.h:1706
ni_retcode_t
ni_retcode_t
Definition: ni_defs.h:437
NI_FRAME_AUX_DATA_MAX_MIN_QP
@ NI_FRAME_AUX_DATA_MAX_MIN_QP
Definition: ni_device_api.h:572
_ni_load_query::fw_model_load
uint32_t fw_model_load
Definition: ni_device_api.h:1201
_ni_session_context::template_config_id
uint32_t template_config_id
Definition: ni_device_api.h:1474
NI_SET_CHANGE_PARAM_BG
@ NI_SET_CHANGE_PARAM_BG
Definition: ni_device_api.h:966
ni_uploader_p2p_test_load
LIB_API 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...
Definition: ni_device_api.c:11012
_ni_enc_hevc_roi_custom_map::sub_ctu_qp_2
uint32_t sub_ctu_qp_2
Definition: ni_device_api.h:859
_ni_vui_hrd::colorPrimaries
int32_t colorPrimaries
Definition: ni_device_api.h:663
_ni_enc_hevc_roi_custom_map::sub_ctu_qp_0
uint32_t sub_ctu_qp_0
Definition: ni_device_api.h:857
SESSION_RUN_STATE_SEQ_CHANGE_DRAINING
@ SESSION_RUN_STATE_SEQ_CHANGE_DRAINING
Definition: ni_device_api.h:1180
NI_FRAME_AUX_DATA_UDU_SEI
@ NI_FRAME_AUX_DATA_UDU_SEI
Definition: ni_device_api.h:527
_ni_frame_aux_data_type
_ni_frame_aux_data_type
Definition: ni_device_api.h:499
NI_CC_SEI_HDR_H264_LEN
#define NI_CC_SEI_HDR_H264_LEN
Definition: ni_device_api.h:466
_ni_enc_mastering_display_colour_volume::white_point_y
uint16_t white_point_y
Definition: ni_device_api.h:1090
_ni_session_context::fw_rev
uint8_t fw_rev[8]
Definition: ni_device_api.h:1627
_ni_reconfig
_ni_reconfig
This is an enumeration for encoder reconfiguration test settings.
Definition: ni_device_api.h:1746
_ni_enc_mastering_display_colour_volume::display_primaries
uint16_t display_primaries[3][2]
Definition: ni_device_api.h:1088
ni_thread_arg_struct_t
struct _ni_thread_arg_struct_t ni_thread_arg_struct_t
_ni_dec_win::bottom
int16_t bottom
Definition: ni_device_api.h:720
_ni_encoder_cfg_params::intra_mb_refresh_arg
int intra_mb_refresh_arg
Definition: ni_device_api.h:2276
_ni_network_data::output_num
uint32_t output_num
Definition: ni_device_api.h:1368
_ni_extended_dec_metadata::rsvd4
uint64_t rsvd4
Definition: ni_device_api.h:736
SESSION_RUN_STATE_NORMAL
@ SESSION_RUN_STATE_NORMAL
Definition: ni_device_api.h:1179
_ni_session_context::decoder_last_drop_frame_num
uint32_t decoder_last_drop_frame_num
Definition: ni_device_api.h:1725
NI_MAX_REF_PIC
#define NI_MAX_REF_PIC
Definition: ni_device_api.h:59
_ni_session_context::pts_correction_num_faulty_pts
int pts_correction_num_faulty_pts
Definition: ni_device_api.h:1446
_ni_custom_sei_location
_ni_custom_sei_location
This is an enumeration for illustrating the custom SEI locations.
Definition: ni_device_api.h:1110
NI_BITRATE_RECONFIG_FILE_MAX_ENTRIES_PER_LINE
#define NI_BITRATE_RECONFIG_FILE_MAX_ENTRIES_PER_LINE
Definition: ni_device_api.h:478
ni_frame_pool_type_t
enum _ni_frame_pool_type ni_frame_pool_type_t
Frame pool type.
_ni_encoder_cfg_params::pps_init_qp
int pps_init_qp
Definition: ni_device_api.h:2421
_ni_session_context::pkt_pos
uint64_t pkt_pos[NI_FIFO_SZ]
Definition: ni_device_api.h:1455
_ni_encoder_change_params_t::colorPrimaries
uint8_t colorPrimaries
Definition: ni_device_api.h:1022
_ni_frame::sei_hdr_mastering_display_color_vol_offset
unsigned int sei_hdr_mastering_display_color_vol_offset
Definition: ni_device_api.h:2661
ni_ai_config_hvsplus
LIB_API ni_retcode_t ni_ai_config_hvsplus(ni_session_context_t *p_ctx, ni_network_data_t *p_network)
configure a hvsplus filter
Definition: ni_device_api.c:9736
_ni_frame::sei_cc_offset
unsigned int sei_cc_offset
Definition: ni_device_api.h:2658
_ni_packet::pkt_pos
uint64_t pkt_pos
Definition: ni_device_api.h:2860
_ni_extended_dec_metadata::rsvd2
uint64_t rsvd2
Definition: ni_device_api.h:734
_ni_encoder_cfg_params::gopSize
int gopSize
Definition: ni_device_api.h:2337
_ni_pkt_info::average_psnr
double average_psnr
Definition: ni_device_api.h:1100
_ni_session_context::reconfig_vbv_buffer_size
int reconfig_vbv_buffer_size
Definition: ni_device_api.h:1690
_ni_session_context::average_psnr
double average_psnr
Definition: ni_device_api.h:1715
_ni_frameclone_desc::reserved
uint32_t reserved
Definition: ni_device_api.h:1383
_ni_frame_config::options
uint16_t options
Definition: ni_device_api.h:2843
_ni_session_context::framerate
ni_framerate_t framerate
Definition: ni_device_api.h:1606
_ni_buf_pool_t::buf_size
uint32_t buf_size
Definition: ni_device_api.h:1288
_ni_xcoder_params::ui8VuiRbsp
NI_DEPRECATED uint8_t ui8VuiRbsp[NI_MAX_VUI_SIZE]
Definition: ni_device_api.h:2782
ni_gop_params_check_set
LIB_API void ni_gop_params_check_set(ni_xcoder_params_t *p_param, char *value)
Set custom gop and prepare to check if success.
Definition: ni_device_api.c:12710
_ni_session_context::pext_mutex
ni_pthread_mutex_t * pext_mutex
Definition: ni_device_api.h:1672
_ni_frame_config::picture_format
uint16_t picture_format
Definition: ni_device_api.h:2842
_ni_frame::iovec_num
uint32_t iovec_num
Definition: ni_device_api.h:2739
_ni_dec_h264_vui_param::sar_width
uint16_t sar_width
Definition: ni_device_api.h:814
_ni_thread_arg_struct_t::device_handle
ni_device_handle_t device_handle
Definition: ni_device_api.h:1266
_ni_context_query
Definition: ni_device_api.h:1186
_ni_decoder_input_params_t::crop_whxy
int crop_whxy[NI_MAX_NUM_OF_DECODER_OUTPUTS][4]
Definition: ni_device_api.h:2528
NI_MAX_NUM_AUX_DATA_PER_FRAME
#define NI_MAX_NUM_AUX_DATA_PER_FRAME
Definition: ni_device_api.h:472
_ni_input_frame::pts
int64_t pts
Definition: ni_device_api.h:1405
_ni_encoder_cfg_params::qlevel
int qlevel
Definition: ni_device_api.h:2332
NI_MAX_SPATIAL_LAYERS
#define NI_MAX_SPATIAL_LAYERS
Definition: ni_device_api.h:180
_ni_decoder_input_params_t::keep_alive_timeout
int keep_alive_timeout
Definition: ni_device_api.h:2536
NI_MAX_CONTEXTS_PER_HW_INSTANCE
#define NI_MAX_CONTEXTS_PER_HW_INSTANCE
Definition: ni_defs.h:248
_ni_custom_gop_params::custom_gop_size
int custom_gop_size
Definition: ni_device_api.h:2059
XCODER_TEST_RECONF_OFF
@ XCODER_TEST_RECONF_OFF
Definition: ni_device_api.h:1748
_ni_scaler_input_params_t::rgba_color
uint32_t rgba_color
Definition: ni_device_api.h:2583
_ni_encoder_change_params_t::crf
uint8_t crf
Definition: ni_device_api.h:1040
_ni_pkt_info
Definition: ni_device_api.h:1095
NI_SET_CHANGE_PARAM_NR
@ NI_SET_CHANGE_PARAM_NR
Definition: ni_device_api.h:965
_niFrameSurface1::ui16FrameIdx
uint16_t ui16FrameIdx
Definition: ni_device_api.h:2825
ni_reconfig_slice_arg
LIB_API ni_retcode_t ni_reconfig_slice_arg(ni_session_context_t *p_ctx, int16_t sliceArg)
Reconfigure sliceArg dynamically during encoding.
Definition: ni_device_api.c:10629
_ni_encoder_cfg_params::HDR10dx2
int HDR10dx2
Definition: ni_device_api.h:2292
NI_AI_BUFFER_FORMAT_FP32
@ NI_AI_BUFFER_FORMAT_FP32
Definition: ni_device_api.h:1789
_ni_context_query::fps
uint32_t fps
Definition: ni_device_api.h:1194
_ni_rational
Definition: ni_device_api.h:600
_ni_long_term_ref
Definition: ni_device_api.h:685
_ni_session_context::psnr_v
double psnr_v
Definition: ni_device_api.h:1714
_ni_vui_hrd::colorDescPresent
int32_t colorDescPresent
Definition: ni_device_api.h:659
_ni_scaler_multi_drawbox_params_t
Definition: ni_device_api.h:2613
_ni_session_context::reconfig_vbv_max_rate
int reconfig_vbv_max_rate
Definition: ni_device_api.h:1691
_ni_frameclone_desc::ui16DstIdx
uint16_t ui16DstIdx
Definition: ni_device_api.h:1380
_ni_dec_crop_mode
_ni_dec_crop_mode
Definition: ni_device_api.h:928
NI_SET_CHANGE_PARAM_RDO
@ NI_SET_CHANGE_PARAM_RDO
Definition: ni_device_api.h:964
_ni_encoder_cfg_params::HDR10wx
int HDR10wx
Definition: ni_device_api.h:2294
_ni_ddr_priority_mode_t
_ni_ddr_priority_mode_t
Definition: ni_device_api.h:1829
_ni_session_context::io_event
ni_io_event_t * io_event
Definition: ni_device_api.h:1730
_ni_xcoder_params::source_height
int source_height
Definition: ni_device_api.h:2758
NI_SET_CHANGE_PARAM_CUSTOM_MD
@ NI_SET_CHANGE_PARAM_CUSTOM_MD
Definition: ni_device_api.h:967
_ni_encoder_change_params_t::colorSpace
uint8_t colorSpace
Definition: ni_device_api.h:1024
_ni_decoder_input_params_t::cr_expr
char cr_expr[NI_MAX_NUM_OF_DECODER_OUTPUTS][4][NI_MAX_PPU_PARAM_EXPR_CHAR+1]
Definition: ni_device_api.h:2531
_ni_encoder_cfg_params::rcQpDeltaRange
int rcQpDeltaRange
Definition: ni_device_api.h:2354
_ni_encoder_change_params_t::intraQP
int32_t intraQP
Definition: ni_device_api.h:1015
_ni_encoder_change_params_t::maxDeltaQp
int32_t maxDeltaQp
Definition: ni_device_api.h:1003
NI_MAX_CUSTOM_SEI_CNT
#define NI_MAX_CUSTOM_SEI_CNT
Definition: ni_defs.h:315
XCODER_TEST_RECONF_BR_API
@ XCODER_TEST_RECONF_BR_API
Definition: ni_device_api.h:1767
_ni_encoder_cfg_params::hvsBaseMbComplexity
int hvsBaseMbComplexity
Definition: ni_device_api.h:2425
_ni_frame::ni_pict_type
ni_pic_type_t ni_pict_type
Definition: ni_device_api.h:2653
_ni_session_context::src_bit_depth
int src_bit_depth
Definition: ni_device_api.h:1494
NI_FRAME_AUX_DATA_VUI
@ NI_FRAME_AUX_DATA_VUI
Definition: ni_device_api.h:545
_ni_vui_hrd::colorTrc
int32_t colorTrc
Definition: ni_device_api.h:667
_ni_framerate::framerate_num
int32_t framerate_num
Definition: ni_device_api.h:700
_ni_network_layer_params_t::scale
float scale
Definition: ni_device_api.h:1346
_ni_packet::ssim_v
double ssim_v
Definition: ni_device_api.h:2891
_ni_network_perf_metrics::ocb_write_bw
uint64_t ocb_write_bw
Definition: ni_device_api.h:1393
ni_uploader_frame_zerocopy_check
LIB_API 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.
Definition: ni_device_api.c:3029
_ni_scaler_watermark_params_t::ui32Width
uint32_t ui32Width
Definition: ni_device_api.h:2608
_ni_encoder_cfg_params::HDR10maxluma
int HDR10maxluma
Definition: ni_device_api.h:2296
ni_frame_buffer_alloc
LIB_API 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...
Definition: ni_device_api.c:2123
_ni_network_data::linfo
ni_network_layer_info_t linfo
Definition: ni_device_api.h:1369
_niFrameSurface1::ui16session_ID
uint16_t ui16session_ID
Definition: ni_device_api.h:2826
_ni_enc_hevc_roi_custom_map::lambda_sad_2
uint32_t lambda_sad_2
Definition: ni_device_api.h:864
_ni_encoder_change_params_t::repeatHeaders
int32_t repeatHeaders
Definition: ni_device_api.h:1017
_ni_xcoder_params::cfg_enc_params
ni_encoder_cfg_params_t cfg_enc_params
Definition: ni_device_api.h:2795
_ni_session_context::last_pkt_pos
uint64_t last_pkt_pos
Definition: ni_device_api.h:1456
ni_pkt_info
struct _ni_pkt_info ni_pkt_info
_ni_encoder_cfg_params::vbv_max_rate
int vbv_max_rate
Definition: ni_device_api.h:2392
_ni_gop_params::qp_factor
float qp_factor
Definition: ni_device_api.h:1970
_ni_ai_buffer_quantize_format_e
_ni_ai_buffer_quantize_format_e
Definition: ni_device_api.h:1816
_ni_category_classify
Definition: ni_device_api.h:648
NI_FRAME_AUX_DATA_NONE
@ NI_FRAME_AUX_DATA_NONE
Definition: ni_device_api.h:501
ni_defs.h
Common NETINT definitions used by all modules.
_ni_xcoder_params::force_frame_type
int force_frame_type
Definition: ni_device_api.h:2772
_ni_gop_rps::ref_pic
int ref_pic
Definition: ni_device_api.h:1962
_ni_ai_buffer_format_e
_ni_ai_buffer_format_e
Definition: ni_device_api.h:1786
NI_XCODER_IDLE_STATE
@ NI_XCODER_IDLE_STATE
Definition: ni_device_api.h:245
_ni_dec_h265_vui_param::vui_hrd_parameters_present_flag
uint8_t vui_hrd_parameters_present_flag
Definition: ni_device_api.h:780
NI_PIX_FMT_NV12
@ NI_PIX_FMT_NV12
Definition: ni_device_api.h:265
ni_device_session_context_clear
LIB_API void ni_device_session_context_clear(ni_session_context_t *p_ctx)
Clear already allocated session context.
Definition: ni_device_api.c:249
_ni_network_layer_params_t::dfp
struct _ni_network_layer_params_t::@13::@14 dfp
NI_SET_CHANGE_PARAM_SLICE_ARG
@ NI_SET_CHANGE_PARAM_SLICE_ARG
Definition: ni_device_api.h:961
_ni_gop_rps
Definition: ni_device_api.h:1960
XCODER_TEST_RECONF_INTRAPRD_API
@ XCODER_TEST_RECONF_INTRAPRD_API
Definition: ni_device_api.h:1768
_ni_frame::data_len
uint32_t data_len[NI_MAX_NUM_DATA_POINTERS]
Definition: ni_device_api.h:2690
NI_H265_USERDATA_FLAG_UNREGISTERED_PRE
@ NI_H265_USERDATA_FLAG_UNREGISTERED_PRE
Definition: ni_device_api.h:367
_ni_dec_h265_vui_param::field_seq_flag
uint8_t field_seq_flag
Definition: ni_device_api.h:770
_ni_session_context::pixel_format_changed
int pixel_format_changed
Definition: ni_device_api.h:1707
_ni_frame::extra_data_len
unsigned int extra_data_len
Definition: ni_device_api.h:2683
NI_AI_BUFFER_FORMAT_INT64
@ NI_AI_BUFFER_FORMAT_INT64
Definition: ni_device_api.h:1809
NI_H265_USERDATA_FLAG_RESERVED_3
@ NI_H265_USERDATA_FLAG_RESERVED_3
Definition: ni_device_api.h:364
ni_create_event
LIB_API ni_event_handle_t ni_create_event(void)
Create event and return event handle if successful (Windows only)
Definition: ni_device_api.c:266
_ni_encoder_change_params_t::maxFrameSize
uint16_t maxFrameSize
Definition: ni_device_api.h:1043
_ni_encoder_cfg_params::intra_qp
int intra_qp
Definition: ni_device_api.h:2382
PIC_TYPE_I
@ PIC_TYPE_I
Definition: ni_device_api.h:386
_ni_encoder_cfg_params::enable_rate_control
int enable_rate_control
Definition: ni_device_api.h:2379
_ni_session_context::start_dts_offset
NI_DEPRECATED int64_t start_dts_offset
Definition: ni_device_api.h:1448
ni_reconfig_vui
LIB_API ni_retcode_t ni_reconfig_vui(ni_session_context_t *p_ctx, ni_vui_hrd_t *vui)
Reconfigure VUI dynamically during encoding.
Definition: ni_device_api.c:10033
ni_ddr_priority_mode_t
enum _ni_ddr_priority_mode_t ni_ddr_priority_mode_t
_ni_network_layer_params_t::zeroPoint
int32_t zeroPoint
Definition: ni_device_api.h:1347
_ni_encoder_cfg_params::max_consecutive_skip_num
int max_consecutive_skip_num
Definition: ni_device_api.h:2432
DECODER_PIC_TYPE_IDR
@ DECODER_PIC_TYPE_IDR
Definition: ni_device_api.h:392
_ni_encoder_change_params_t::crfDecimal
uint8_t crfDecimal
Definition: ni_device_api.h:1039
_ni_dec_h264_vui_param::nal_hrd_parameters_present_flag
uint8_t nal_hrd_parameters_present_flag
Definition: ni_device_api.h:831
NI_PIXEL_PLANAR_MAX
@ NI_PIXEL_PLANAR_MAX
Definition: ni_device_api.h:925
_ni_decoder_input_params_t::semi_planar
int semi_planar[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2526
_ni_decoder_input_params_t::scale_long_short_edge
int scale_long_short_edge[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2554
NI_ENC_MEM_ALLOCATE_STRATEGY_REGION_0_FIRST
@ NI_ENC_MEM_ALLOCATE_STRATEGY_REGION_0_FIRST
Definition: ni_device_api.h:285
ni_aux_data_t
struct _ni_aux_data ni_aux_data_t
_ni_scaler_input_params_t::out_rec_y
int32_t out_rec_y
Definition: ni_device_api.h:2581
ni_enc_mastering_display_colour_volume_t
struct _ni_enc_mastering_display_colour_volume ni_enc_mastering_display_colour_volume_t
encoded payload format of HDR SEI mastering display colour volume
NI_H265_USER_DATA_FLAG_FILM_GRAIN_CHARACTERISTICS_INFO
@ NI_H265_USER_DATA_FLAG_FILM_GRAIN_CHARACTERISTICS_INFO
Definition: ni_device_api.h:375
_ni_network_perf_metrics::ocb_read_bw
uint64_t ocb_read_bw
Definition: ni_device_api.h:1392
_ni_decoder_input_params_t::hwframes
int hwframes
Definition: ni_device_api.h:2520
NI_POOL_TYPE_NORMAL
@ NI_POOL_TYPE_NORMAL
Definition: ni_device_api.h:494
_ni_device_info
Definition: ni_rsrc_api.h:102
ni_overall_load_query_t
struct _ni_overall_load_query ni_overall_load_query_t
ni_packet_buffer_free_av1
LIB_API ni_retcode_t ni_packet_buffer_free_av1(ni_packet_t *ppacket)
Free packet buffer that was previously allocated with ni_packet_buffer_alloc for AV1 packets merge.
Definition: ni_device_api.c:3885
_ni_context_query::context_id
uint32_t context_id
Definition: ni_device_api.h:1188
ni_device_close
LIB_API void ni_device_close(ni_device_handle_t dev)
Close device and release resources.
Definition: ni_device_api.c:503
ni_frame_config_t
struct _ni_frame_config ni_frame_config_t
_ni_session_context::passed_time_in_timebase_unit
uint32_t passed_time_in_timebase_unit
Definition: ni_device_api.h:1655
PIC_TYPE_B
@ PIC_TYPE_B
Definition: ni_device_api.h:388
_ni_dec_h265_vui_param::min_spatial_segmentation_idc
int8_t min_spatial_segmentation_idc
Definition: ni_device_api.h:786
_ni_buf_t::pool
struct _ni_buf_pool_t * pool
Definition: ni_device_api.h:1277
_ni_xcoder_params::customize_roi_qp_map
int8_t customize_roi_qp_map[NI_CUSTOMIZE_ROI_QPOFFSET_LEVEL][NI_CUSTOMIZE_ROI_QP_NUM]
Definition: ni_device_api.h:2820
ni_packet_copy
LIB_API 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.
Definition: ni_device_api.c:3937
_ni_encoder_cfg_params::multicoreJointMode
int multicoreJointMode
Definition: ni_device_api.h:2303
_ni_encoder_change_params_t::colorDescPresent
uint8_t colorDescPresent
Definition: ni_device_api.h:1021
_ni_xcoder_params::reconf_hash
int reconf_hash[NI_BITRATE_RECONFIG_FILE_MAX_LINES][NI_BITRATE_RECONFIG_FILE_MAX_ENTRIES_PER_LINE]
Definition: ni_device_api.h:2803
_ni_hw_capability::max_video_height
uint16_t max_video_height
Definition: ni_device_api.h:1144
NI_FRAME_AUX_DATA_FRAMERATE
@ NI_FRAME_AUX_DATA_FRAMERATE
Definition: ni_device_api.h:564
_ni_xcoder_params::enable_ai_enhance
int enable_ai_enhance
Definition: ni_device_api.h:2811
ni_encoder_gop_params_set_value
LIB_API 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.
Definition: ni_device_api.c:7282
ni_device_session_context_init
LIB_API ni_retcode_t ni_device_session_context_init(ni_session_context_t *p_ctx)
Initialize already allocated session context to a known state.
Definition: ni_device_api.c:156
_ni_load_query::tp_fw_load
uint32_t tp_fw_load
Definition: ni_device_api.h:1216
_ni_queue_t::p_first
ni_queue_node_t * p_first
Definition: ni_device_api.h:1319
_ni_session_context::p_dump
void * p_dump[2]
Definition: ni_device_api.h:1529
ni_dec_h265_vui_param_t
struct _ni_dec_h265_vui_param ni_dec_h265_vui_param_t
decoded payload format of H.265 VUI
ni_enc_prep_reconf_demo_data
LIB_API 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 ...
Definition: ni_device_api.c:12043
_ni_thread_arg_struct_t::device_type
uint32_t device_type
Definition: ni_device_api.h:1265
_ni_dec_h265_vui_param::video_format
int8_t video_format
Definition: ni_device_api.h:752
ni_device_session_acquire
LIB_API int ni_device_session_acquire(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
Acquire a P2P frame buffer from the hwupload session.
Definition: ni_device_api.c:10690
_ni_decoder_input_params_t
Definition: ni_device_api.h:2466
NI_XCODER_HWUP_STATE
@ NI_XCODER_HWUP_STATE
Definition: ni_device_api.h:255
_ni_queue_node_t::p_next
struct _ni_queue_node_t * p_next
Definition: ni_device_api.h:1301
NI_AI_BUFFER_QUANTIZE_DYNAMIC_FIXED_POINT
@ NI_AI_BUFFER_QUANTIZE_DYNAMIC_FIXED_POINT
Definition: ni_device_api.h:1821
_ni_enc_hevc_roi_custom_map::ctu_coeff_drop
uint32_t ctu_coeff_drop
Definition: ni_device_api.h:855
ni_device_open
LIB_API ni_device_handle_t ni_device_open(const char *dev, uint32_t *p_max_io_size_out)
Open device and return device device_handle if successful.
Definition: ni_device_api.c:360
_ni_encoder_cfg_params::HDR10dy0
int HDR10dy0
Definition: ni_device_api.h:2289
_ni_load_query::fw_video_mem_usage
uint32_t fw_video_mem_usage
Definition: ni_device_api.h:1205
_ni_encoder_change_params_t::hvsQPEnable
int32_t hvsQPEnable
Definition: ni_device_api.h:994
_ni_encoder_cfg_params::enable_dynamic_8x8_merge
int enable_dynamic_8x8_merge
Definition: ni_device_api.h:2364
_ni_scaler_params_t::nb_inputs
int nb_inputs
Definition: ni_device_api.h:2590
_ni_encoder_cfg_params::ctbRcMode
int ctbRcMode
Definition: ni_device_api.h:2336
_ni_scaler_drawbox_params_t
Definition: ni_device_api.h:2596
_ni_dec_h264_vui_param
decoded payload format of H.264 VUI
Definition: ni_device_api.h:802
_ni_thread_arg_struct_t::keep_alive_timeout
uint32_t keep_alive_timeout
Definition: ni_device_api.h:1270
_ni_encoder_cfg_params::long_term_ref_interval
int long_term_ref_interval
Definition: ni_device_api.h:2305
ni_ai_buffer_quantize_format_e
enum _ni_ai_buffer_quantize_format_e ni_ai_buffer_quantize_format_e
NI_FRAME_AUX_DATA_A53_CC
@ NI_FRAME_AUX_DATA_A53_CC
Definition: ni_device_api.h:504
_ni_xcoder_params::interval_of_psnr
int interval_of_psnr
Definition: ni_device_api.h:2819
_ni_frame::end_of_stream
uint32_t end_of_stream
Definition: ni_device_api.h:2634
ni_device_alloc_and_get_firmware_logs
LIB_API 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.
Definition: ni_device_api.c:11815
_ni_session_context::network_data
ni_network_data_t * network_data
Definition: ni_device_api.h:1680
_ni_dec_h265_vui_param::aspect_ratio_info_present_flag
uint8_t aspect_ratio_info_present_flag
Definition: ni_device_api.h:746
_ni_frame_config::orientation
uint8_t orientation
Definition: ni_device_api.h:2852
_ni_buf_t
Definition: ni_device_api.h:1274
_ni_hw_capability::video_profile
uint8_t video_profile
Definition: ni_device_api.h:1147
ni_session_data_io_t
struct _ni_session_data_io ni_session_data_io_t
NI_CODEC_HW_DOWNLOAD
@ NI_CODEC_HW_DOWNLOAD
Definition: ni_device_api.h:943
PIC_TYPE_IDR
@ PIC_TYPE_IDR
Definition: ni_device_api.h:391
_ni_scaler_watermark_params_t::ui32StartX
uint32_t ui32StartX
Definition: ni_device_api.h:2606
ni_queue_t
struct _ni_queue_t ni_queue_t
ni_device_session_acquire_for_read
LIB_API int ni_device_session_acquire_for_read(ni_session_context_t *p_upl_ctx, ni_frame_t *p_frame)
Acquire a P2P frame buffer from the hwupload session for P2P read.
Definition: ni_device_api.c:10785
_niFrameSurface1::encoding_type
int8_t encoding_type
Definition: ni_device_api.h:2832
_ni_xcoder_params::generate_enc_hdrs
NI_DEPRECATED int generate_enc_hdrs
Definition: ni_device_api.h:2765
_ni_frameclone_desc::ui16SrcIdx
uint16_t ui16SrcIdx
Definition: ni_device_api.h:1379
_ni_xcoder_params::hwframes
int hwframes
Definition: ni_device_api.h:2804
_ni_session_context::prev_size
int prev_size
Definition: ni_device_api.h:1509
NI_PIX_FMT_NV16
@ NI_PIX_FMT_NV16
Definition: ni_device_api.h:273
ni_ai_buffer_format_e
enum _ni_ai_buffer_format_e ni_ai_buffer_format_e
_ni_encoder_cfg_params::newRcEnable
int newRcEnable
Definition: ni_device_api.h:2405
_ni_session_context::device_handle
ni_device_handle_t device_handle
Definition: ni_device_api.h:1464
_ni_session_context::enc_change_params
ni_encoder_change_params_t * enc_change_params
Definition: ni_device_api.h:1594
_ni_instance_mgr_detail_status_v1::sInstDetailStatus
ni_instance_mgr_detail_status_t sInstDetailStatus[NI_MAX_CONTEXTS_PER_HW_INSTANCE]
Definition: ni_device_api.h:1255
_ni_session_context::p_session_config
void * p_session_config
Definition: ni_device_api.h:1475
NI_CODEC_FORMAT_AV1
@ NI_CODEC_FORMAT_AV1
Definition: ni_device_api.h:917
_ni_encoder_cfg_params::skip_frame_enable
int skip_frame_enable
Definition: ni_device_api.h:2431
_ni_frame::sei_hdr_plus_len
unsigned int sei_hdr_plus_len
Definition: ni_device_api.h:2667
XCODER_TEST_RECONF_SLICE_ARG_API
@ XCODER_TEST_RECONF_SLICE_ARG_API
Definition: ni_device_api.h:1781
_ni_packet::av1_p_buffer
uint8_t * av1_p_buffer[MAX_AV1_ENCODER_GOP_NUM]
Definition: ni_device_api.h:2874
_ni_dec_h265_vui_param::transfer_characteristics
uint8_t transfer_characteristics
Definition: ni_device_api.h:761
_ni_xcoder_params::preset
int preset
Definition: ni_device_api.h:2746
_ni_dec_win::left
int16_t left
Definition: ni_device_api.h:717
_ni_session_context::dec_fme_buf_pool
ni_buf_pool_t * dec_fme_buf_pool
Definition: ni_device_api.h:1561
_ni_enc_avc_roi_custom_map::mb_qp
uint8_t mb_qp
Definition: ni_device_api.h:877
NI_DDR_PRIORITY_MAX
@ NI_DDR_PRIORITY_MAX
Definition: ni_device_api.h:1836
_ni_encoder_change_params_t::intraPeriod
int32_t intraPeriod
Definition: ni_device_api.h:1016
_ni_custom_sei_set
Definition: ni_device_api.h:1127
_ni_encoder_cfg_params::entropy_coding_mode
int entropy_coding_mode
Definition: ni_device_api.h:2321
_ni_extended_dec_metadata::video_full_range_flag
uint8_t video_full_range_flag
Definition: ni_device_api.h:730
NI_AI_BUFFER_FORMAT_FP16
@ NI_AI_BUFFER_FORMAT_FP16
Definition: ni_device_api.h:1791
_ni_packet::p_data
void * p_data
Definition: ni_device_api.h:2867
_ni_session_context::hwd_src_cpu
uint32_t hwd_src_cpu
Definition: ni_device_api.h:1538
_ni_hw_capability::min_video_width
uint16_t min_video_width
Definition: ni_device_api.h:1145
_ni_region_of_interest::top
int top
Definition: ni_device_api.h:636
_ni_session_data_io
Definition: ni_device_api.h:2896
_ni_enc_quad_roi_custom_map::ipcm_flag
uint8_t ipcm_flag
Definition: ni_device_api.h:893
ni_hwframe_buffer_recycle
LIB_API ni_retcode_t ni_hwframe_buffer_recycle(niFrameSurface1_t *surface, int32_t device_handle)
Recycle a hwframe buffer on card.
Definition: ni_device_api.c:8572
_ni_context_query::context_status
uint32_t context_status
Definition: ni_device_api.h:1189
_ni_decoder_input_params_t::svct_decoding_layer
int svct_decoding_layer
Definition: ni_device_api.h:2543
_ni_encoder_cfg_params::ltrFirstGap
int ltrFirstGap
Definition: ni_device_api.h:2301
_ni_extended_dec_metadata::rsvd5
uint64_t rsvd5
Definition: ni_device_api.h:737
_ni_content_light_level_info_bytes::max_pic_average_light_level
uint16_t max_pic_average_light_level
Definition: ni_device_api.h:1079
_ni_encoder_cfg_params::ltrRefQpOffset
int ltrRefQpOffset
Definition: ni_device_api.h:2300
_ni_enc_quad_roi_custom_map::field
struct _ni_enc_quad_roi_custom_map::@6 field
ni_device_session_copy
LIB_API 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.
Definition: ni_device_api.c:8100
_ni_scaler_drawbox_params_t::end_x
uint32_t end_x
Definition: ni_device_api.h:2600
ni_custom_sei_t
struct _ni_custom_sei ni_custom_sei_t
custom sei payload passthrough
_ni_session_context::last_change_framenum
uint32_t last_change_framenum
Definition: ni_device_api.h:1636
_ni_dec_h265_vui_param::frame_field_info_present_flag
uint8_t frame_field_info_present_flag
Definition: ni_device_api.h:772
_ni_dec_h264_vui_param::aspect_ratio_info_present_flag
uint8_t aspect_ratio_info_present_flag
Definition: ni_device_api.h:804
_ni_rational::num
int num
Definition: ni_device_api.h:602
NI_PIX_FMT_YUV420P10LE
@ NI_PIX_FMT_YUV420P10LE
Definition: ni_device_api.h:264
ni_scaler_multi_drawbox_params_t
struct _ni_scaler_multi_drawbox_params_t ni_scaler_multi_drawbox_params_t
_ni_frame_config::rgba_color
uint32_t rgba_color
Definition: ni_device_api.h:2848
_ni_scaler_input_params_t::in_rec_x
int32_t in_rec_x
Definition: ni_device_api.h:2572
ni_device_config_qos
LIB_API 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.
Definition: ni_device_api.c:2058
_ni_enc_mastering_display_colour_volume
encoded payload format of HDR SEI mastering display colour volume
Definition: ni_device_api.h:1086
_ni_dec_h265_vui_param::vui_num_ticks_poc_diff_one_minus1
int16_t vui_num_ticks_poc_diff_one_minus1
Definition: ni_device_api.h:790
_ni_extended_dec_metadata::color_space
uint8_t color_space
Definition: ni_device_api.h:729
_ni_encoder_cfg_params::enable_transform_8x8
int enable_transform_8x8
Definition: ni_device_api.h:2370
_ni_session_context::sender_handle
ni_device_handle_t sender_handle
Definition: ni_device_api.h:1470
_ni_frame::vui_time_scale
uint32_t vui_time_scale
Definition: ni_device_api.h:2716
_ni_split_context_t
Definition: ni_device_api.h:1733
ni_ai_packet_buffer_alloc
LIB_API 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.
Definition: ni_device_api.c:9867
_ni_xcoder_params::pos_num_units_in_tick
NI_DEPRECATED uint32_t pos_num_units_in_tick
Definition: ni_device_api.h:2783
NI_H265_USERDATA_FLAG_RESERVED_1
@ NI_H265_USERDATA_FLAG_RESERVED_1
Definition: ni_device_api.h:362
QOS_NAMESPACE_CODE
@ QOS_NAMESPACE_CODE
Definition: ni_device_api.h:237
ni_packet_buffer_alloc
LIB_API ni_retcode_t ni_packet_buffer_alloc(ni_packet_t *ppacket, int packet_size)
Allocate memory for the packet buffer based on provided packet size.
Definition: ni_device_api.c:3714
_ni_dec_mastering_display_colour_volume_bytes::min_display_mastering_luminance
uint32_t min_display_mastering_luminance
Definition: ni_device_api.h:1069
NI_MAX_GOP_NUM
#define NI_MAX_GOP_NUM
Definition: ni_device_api.h:57
NI_FRAME_AUX_DATA_REGIONS_OF_INTEREST
@ NI_FRAME_AUX_DATA_REGIONS_OF_INTEREST
Definition: ni_device_api.h:521
NI_CUSTOMIZE_ROI_QP_NUM
#define NI_CUSTOMIZE_ROI_QP_NUM
Max number of entries per line supported for the qp number.
Definition: ni_device_api.h:483
_ni_encoder_change_params_t::frameRateNum
int32_t frameRateNum
Definition: ni_device_api.h:1052
_ni_encoder_cfg_params::enable_smooth_crf
int enable_smooth_crf
Definition: ni_device_api.h:2450
_ni_network_layer_info
Definition: ni_device_api.h:1354
ni_buf_pool_t
struct _ni_buf_pool_t ni_buf_pool_t
_ni_dec_h264_vui_param::transfer_characteristics
uint8_t transfer_characteristics
Definition: ni_device_api.h:818
NI_AI_BUFFER_FORMAT_UINT8
@ NI_AI_BUFFER_FORMAT_UINT8
Definition: ni_device_api.h:1793
ni_device_session_close
LIB_API ni_retcode_t ni_device_session_close(ni_session_context_t *p_ctx, int eos_received, ni_device_type_t device_type)
Close device session that was previously opened by calling ni_device_session_open() If device_type is...
Definition: ni_device_api.c:1379
_ni_session_context::keep_alive_timeout
uint32_t keep_alive_timeout
Definition: ni_device_api.h:1523
NI_SET_CHANGE_PARAM_INDEPEND_SLICE
@ NI_SET_CHANGE_PARAM_INDEPEND_SLICE
Definition: ni_device_api.h:962
_ni_dec_h264_vui_param::max_dec_frame_buffering
int8_t max_dec_frame_buffering
Definition: ni_device_api.h:844
_ni_encoder_cfg_params::totalCuTreeDepth
int totalCuTreeDepth
Definition: ni_device_api.h:2457
_ni_encoder_cfg_params::customize_roi_qp_level
int customize_roi_qp_level
Definition: ni_device_api.h:2445
_ni_packet::scene_change_detected
uint8_t scene_change_detected
Definition: ni_device_api.h:2893
_ni_encoder_cfg_params
Definition: ni_device_api.h:2067
NI_AI_BUFFER_FORMAT_INT32
@ NI_AI_BUFFER_FORMAT_INT32
Definition: ni_device_api.h:1805
ni_framerate_t
struct _ni_framerate ni_framerate_t
_ni_buf_pool_t::p_free_head
ni_buf_t * p_free_head
Definition: ni_device_api.h:1289
_ni_enc_mastering_display_colour_volume::min_display_mastering_luminance
uint32_t min_display_mastering_luminance
Definition: ni_device_api.h:1092
_ni_encoder_cfg_params::EnableAUD
int EnableAUD
Definition: ni_device_api.h:2315
_ni_session_context::pkt_offsets_index
uint64_t pkt_offsets_index[NI_FIFO_SZ]
Definition: ni_device_api.h:1453
_ni_encoder_cfg_params::spatial_layers
int spatial_layers
Definition: ni_device_api.h:2452
_ni_encoder_cfg_params::ai_enhance_level
int ai_enhance_level
Definition: ni_device_api.h:2408
ni_device_capability_t
struct _ni_device_capability ni_device_capability_t
device capability type
_ni_encoder_cfg_params::scene_change_detect_level
int scene_change_detect_level
Definition: ni_device_api.h:2448
_ni_session_context::device_type
uint32_t device_type
Definition: ni_device_api.h:1486
ni_device_session_query_detail_v1
LIB_API 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...
Definition: ni_device_api.c:2000
niFrameSurface1_t
struct _niFrameSurface1 niFrameSurface1_t
_ni_dec_h265_vui_param::max_bytes_per_pic_denom
int8_t max_bytes_per_pic_denom
Definition: ni_device_api.h:787
_ni_session_context::ui8_light_level_data
uint8_t ui8_light_level_data[5]
Definition: ni_device_api.h:1430
_ni_frame::force_key_frame
int force_key_frame
Definition: ni_device_api.h:2650
NI_DDR_PRIORITY_AI
@ NI_DDR_PRIORITY_AI
Definition: ni_device_api.h:1835
_ni_scaler_params_t::scaler_param_b
double scaler_param_b
Definition: ni_device_api.h:2591
NI_PIXEL_PLANAR_FORMAT_SEMIPLANAR
@ NI_PIXEL_PLANAR_FORMAT_SEMIPLANAR
Definition: ni_device_api.h:922
ni_xcoder_state_t
ni_xcoder_state_t
Definition: ni_device_api.h:243
_ni_dec_h264_vui_param::fixed_frame_rate_flag
uint8_t fixed_frame_rate_flag
Definition: ni_device_api.h:826
_ni_encoder_cfg_params::HDR10CLLEnable
int HDR10CLLEnable
Definition: ni_device_api.h:2286
ni_qos_codes_t
enum ni_qos_codes ni_qos_codes_t
_ni_scaler_params_t::enable_scaler_params
bool enable_scaler_params
Definition: ni_device_api.h:2593
_ni_session_context::E2EID
char E2EID[128]
Definition: ni_device_api.h:1705
_ni_frameclone_desc::ui32Offset
uint32_t ui32Offset
Definition: ni_device_api.h:1381
ni_network_layer_offset_t
struct _ni_network_layer_offset ni_network_layer_offset_t
_ni_aux_data::data
void * data
Definition: ni_device_api.h:623
_ni_content_light_level_info_bytes::max_content_light_level
uint16_t max_content_light_level
Definition: ni_device_api.h:1078
_ni_packet::video_height
uint32_t video_height
Definition: ni_device_api.h:2864
_ni_frame::dec_buf
ni_buf_t * dec_buf
Definition: ni_device_api.h:2696
_ni_session_context::buffer_pool
ni_queue_buffer_pool_t * buffer_pool
Definition: ni_device_api.h:1560
_ni_xcoder_params::chroma_linesize
int chroma_linesize
Definition: ni_device_api.h:2815
_ni_network_perf_metrics::read_bw
uint64_t read_bw
Definition: ni_device_api.h:1390
_ni_xcoder_params::minFramesDelay
int minFramesDelay
Definition: ni_device_api.h:2818
_ni_xcoder_params::sar_num
int sar_num
Definition: ni_device_api.h:2789
XCODER_TEST_RECONF_RC_MIN_MAX_QP
@ XCODER_TEST_RECONF_RC_MIN_MAX_QP
Definition: ni_device_api.h:1754
_ni_hw_capability::reserved
uint8_t reserved
Definition: ni_device_api.h:1149
_ni_packet
Definition: ni_device_api.h:2855
_ni_buf_pool_t
Definition: ni_device_api.h:1284
_ni_device_temp
Definition: ni_rsrc_api.h:235
_ni_session_context::frame_num
uint64_t frame_num
Definition: ni_device_api.h:1533
_ni_frame::sei_cc_len
unsigned int sei_cc_len
Definition: ni_device_api.h:2659
_ni_encoder_cfg_params::HDR10Enable
int HDR10Enable
Definition: ni_device_api.h:2287
_ni_enc_hevc_roi_custom_map::sub_ctu_qp_1
uint32_t sub_ctu_qp_1
Definition: ni_device_api.h:858
_ni_encoder_cfg_params::keep_alive_timeout
int keep_alive_timeout
Definition: ni_device_api.h:2400
ni_uploader_set_frame_format
LIB_API 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 frame format for the uploader.
Definition: ni_device_api.c:11259
_ni_queue_t::p_last
ni_queue_node_t * p_last
Definition: ni_device_api.h:1320
g_xcoder_log_names
const LIB_API char *const g_xcoder_log_names[NI_XCODER_LOG_NAMES_ARRAY_LEN]
Definition: ni_device_api.c:71
_ni_queue_t::count
uint32_t count
Definition: ni_device_api.h:1318
_ni_encoder_cfg_params::intra_qp_delta
int intra_qp_delta
Definition: ni_device_api.h:2383
_ni_session_context::ori_luma_linesize
int ori_luma_linesize
Definition: ni_device_api.h:1682
PIC_TYPE_CRA
@ PIC_TYPE_CRA
Definition: ni_device_api.h:390
_ni_xcoder_params::ai_enhance_level
int ai_enhance_level
Definition: ni_device_api.h:2816
_ni_network_layer_params_t::sizes
uint32_t sizes[6]
Definition: ni_device_api.h:1331
_ni_session_context::roi_map
ni_enc_quad_roi_custom_map * roi_map
Definition: ni_device_api.h:1584
_ni_buf_t::p_prev
struct _ni_buf_t * p_prev
Definition: ni_device_api.h:1278
_ni_category_classify::category
int category
Definition: ni_device_api.h:651
_ni_network_layer_offset::offset
int32_t offset
Definition: ni_device_api.h:1362
NI_H265_USERDATA_FLAG_PIC_TIMING
@ NI_H265_USERDATA_FLAG_PIC_TIMING
Definition: ni_device_api.h:365
NI_MAX_CUSTOM_SEI_DATA
#define NI_MAX_CUSTOM_SEI_DATA
Definition: ni_device_api.h:430
_ni_custom_sei::type
uint8_t type
Definition: ni_device_api.h:1121
_ni_instance_mgr_detail_status::ui32NumIDR
uint32_t ui32NumIDR
Definition: ni_device_api.h:1239
_ni_encoder_cfg_params::colorDescPresent
int colorDescPresent
Definition: ni_device_api.h:2325
_ni_encoder_change_params_t::hvsQpScale
int32_t hvsQpScale
Definition: ni_device_api.h:995
_ni_overall_load_query::overall_fw_model_load
uint32_t overall_fw_model_load
Definition: ni_device_api.h:1227
_ni_session_context::last_gop_size
int last_gop_size
Definition: ni_device_api.h:1693
_ni_dec_h264_vui_param::vcl_hrd_parameters_present_flag
uint8_t vcl_hrd_parameters_present_flag
Definition: ni_device_api.h:832
_ni_frame::vui_offset
unsigned int vui_offset
Definition: ni_device_api.h:2675
_ni_session_context::force_idr_intra_offset
uint32_t force_idr_intra_offset
Definition: ni_device_api.h:1650
_ni_encoder_cfg_params::tolCtbRcInter
float tolCtbRcInter
Definition: ni_device_api.h:2343
_ni_frame::p_data
uint8_t * p_data[NI_MAX_NUM_DATA_POINTERS]
Definition: ni_device_api.h:2689
_ni_encoder_cfg_params::custom_gop_params
ni_custom_gop_params_t custom_gop_params
Definition: ni_device_api.h:2269
ni_close_event
LIB_API void ni_close_event(ni_event_handle_t event_handle)
Close event and release resources (Windows only)
Definition: ni_device_api.c:294
_ni_encoder_cfg_params::HDR10dx0
int HDR10dx0
Definition: ni_device_api.h:2288
_ni_xcoder_params::zerocopy_mode
int zerocopy_mode
Definition: ni_device_api.h:2813
_ni_xcoder_params::sar_denom
int sar_denom
Definition: ni_device_api.h:2790
_ni_buf_t::p_next
struct _ni_buf_t * p_next
Definition: ni_device_api.h:1279
_ni_session_context::fps_change_detect_count
uint32_t fps_change_detect_count
Definition: ni_device_api.h:1637
_ni_iovec::size
uint32_t size
Definition: ni_device_api.h:2623
_ni_decoder_input_params_t::max_extra_hwframe_cnt
int max_extra_hwframe_cnt
Definition: ni_device_api.h:2548
_ni_device_capability::fw_build_time
uint8_t fw_build_time[26]
Definition: ni_device_api.h:1170
_ni_iovec::ptr
void * ptr
Definition: ni_device_api.h:2624
_ni_session_context::pkt_index
int pkt_index
Definition: ni_device_api.h:1452
_ni_encoder_cfg_params::disableBframeRdoq
int disableBframeRdoq
Definition: ni_device_api.h:2440
NI_CODEC_FORMAT_VP9
@ NI_CODEC_FORMAT_VP9
Definition: ni_device_api.h:915
_ni_frame::force_headers
uint16_t force_headers
Definition: ni_device_api.h:2645
_ni_dec_h265_vui_param
decoded payload format of H.265 VUI
Definition: ni_device_api.h:744
XCODER_TEST_RECONF_VBV_API
@ XCODER_TEST_RECONF_VBV_API
Definition: ni_device_api.h:1779
XCODER_TEST_FORCE_IDR_FRAME
@ XCODER_TEST_FORCE_IDR_FRAME
Definition: ni_device_api.h:1766
_ni_enc_hevc_roi_custom_map::reserved
uint32_t reserved
Definition: ni_device_api.h:856
_ni_scaler_input_params_t::in_rec_y
int32_t in_rec_y
Definition: ni_device_api.h:2573
ni_device_clone_hwframe
LIB_API 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.
Definition: ni_device_api.c:9082
_ni_encoder_cfg_params::tolCtbRcIntra
float tolCtbRcIntra
Definition: ni_device_api.h:2344
_ni_instance_mgr_detail_status_append::ui32UserIDR
uint32_t ui32UserIDR
Definition: ni_device_api.h:1247
QOS_MODE_ENABLED_SHARE
@ QOS_MODE_ENABLED_SHARE
Definition: ni_device_api.h:229
_ni_iovec
Definition: ni_device_api.h:2622
NI_XCODER_WRITE_STATE
@ NI_XCODER_WRITE_STATE
Definition: ni_device_api.h:247
NI_DDR_PRIORITY_RESET
@ NI_DDR_PRIORITY_RESET
Definition: ni_device_api.h:1832
_ni_dec_h264_vui_param::overscan_info_present_flag
uint8_t overscan_info_present_flag
Definition: ni_device_api.h:806
ni_device_session_context_alloc_init
LIB_API ni_session_context_t * ni_device_session_context_alloc_init(void)
Allocate and initialize a new ni_session_context_t struct.
Definition: ni_device_api.c:98
NI_XCODER_LOG_NAMES_ARRAY_LEN
#define NI_XCODER_LOG_NAMES_ARRAY_LEN
Definition: ni_device_api.h:2907
_ni_frame::roi_len
unsigned int roi_len
Definition: ni_device_api.h:2679
_ni_encoder_change_params_t::reserved
uint8_t reserved[5]
Definition: ni_device_api.h:1030
NI_ENC_MEM_ALLOCATE_STRATEGY_DEFAULT
@ NI_ENC_MEM_ALLOCATE_STRATEGY_DEFAULT
Definition: ni_device_api.h:284
_ni_session_context::last_pts_interval
int64_t last_pts_interval
Definition: ni_device_api.h:1642
_ni_encoder_cfg_params::enable_all_sei_passthru
bool enable_all_sei_passthru
Definition: ni_device_api.h:2435
_ni_decoder_input_params_t::enable_all_sei_passthru
bool enable_all_sei_passthru
Definition: ni_device_api.h:2551
_ni_frame_config::picture_height
uint16_t picture_height
Definition: ni_device_api.h:2841
_ni_encoder_cfg_params::disable_adaptive_buffers
bool disable_adaptive_buffers
Definition: ni_device_api.h:2439
_ni_queue_buffer_pool_t
Definition: ni_device_api.h:1306
_ni_session_context::vui
ni_vui_hrd_t vui
Definition: ni_device_api.h:1607
_ni_frame::sei_hdr_plus_offset
unsigned int sei_hdr_plus_offset
Definition: ni_device_api.h:2666
_ni_encoder_cfg_params::enable_dynamic_16x16_merge
int enable_dynamic_16x16_merge
Definition: ni_device_api.h:2365
ni_p2p_send
LIB_API ni_retcode_t ni_p2p_send(ni_session_context_t *pSession, niFrameSurface1_t *source, uint64_t ui64DestAddr, uint32_t ui32FrameSize)
Initiate P2P transfer to another device (P2P write)
Definition: ni_device_api.c:12918
_ni_dec_h264_vui_param::chroma_loc_info_present_flag
uint8_t chroma_loc_info_present_flag
Definition: ni_device_api.h:820
_ni_dec_h265_vui_param::sar_height
uint16_t sar_height
Definition: ni_device_api.h:758
_ni_session_context::hw_action
int hw_action
Definition: ni_device_api.h:1611
_ni_input_frame::video_height
uint32_t video_height
Definition: ni_device_api.h:1403
ni_frame_free_aux_data
LIB_API 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.
Definition: ni_device_api.c:4090
ni_scaler_input_params_t
struct _ni_scaler_input_params_t ni_scaler_input_params_t
_ni_session_context
Definition: ni_device_api.h:1410
_ni_session_context::itu_t_t35_cc_sei_hdr_hevc
uint8_t itu_t_t35_cc_sei_hdr_hevc[NI_CC_SEI_HDR_HEVC_LEN]
Definition: ni_device_api.h:1419
NI_AI_BUFFER_FORMAT_CHAR
@ NI_AI_BUFFER_FORMAT_CHAR
Definition: ni_device_api.h:1801
_ni_rc_min_max_qp::minQpPB
int32_t minQpPB
Definition: ni_device_api.h:711
_ni_scaler_input_params_t::out_rec_x
int32_t out_rec_x
Definition: ni_device_api.h:2580
_ni_encoder_cfg_params::iframe_size_ratio
int iframe_size_ratio
Definition: ni_device_api.h:2436
_ni_scaler_input_params_t::input_width
int32_t input_width
Definition: ni_device_api.h:2568
NI_H265_USERDATA_FLAG_RESERVED_0
@ NI_H265_USERDATA_FLAG_RESERVED_0
Definition: ni_device_api.h:361
ni_device_session_open
LIB_API 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...
Definition: ni_device_api.c:710
ni_device_config_frame
LIB_API ni_retcode_t ni_device_config_frame(ni_session_context_t *p_ctx, ni_frame_config_t *p_cfg)
Config a frame on the device for 2D engined to work on based on provided parameters.
Definition: ni_device_api.c:9134
NI_PIX_FMT_P010LE
@ NI_PIX_FMT_P010LE
Definition: ni_device_api.h:266
_ni_session_context::bus
unsigned short bus
Definition: ni_device_api.h:1622
ni_decoder_init_default_params
LIB_API 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.
Definition: ni_device_api.c:4557
_ni_region_of_interest::qoffset
ni_rational_t qoffset
Definition: ni_device_api.h:644
_ni_thread_arg_struct_t::hw_id
int hw_id
Definition: ni_device_api.h:1261
NI_H265_USERDATA_FLAG_KNEE_FUNCTION_INFO
@ NI_H265_USERDATA_FLAG_KNEE_FUNCTION_INFO
Definition: ni_device_api.h:373
NI_CODEC_HW_UPLOAD
@ NI_CODEC_HW_UPLOAD
Definition: ni_device_api.h:944
ni_query_fl_fw_versions
LIB_API 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.
Definition: ni_device_api.c:11487
ni_long_term_ref_t
struct _ni_long_term_ref ni_long_term_ref_t
_niFrameSurface1
Definition: ni_device_api.h:2823
_ni_dec_h265_vui_param::matrix_coefficients
uint8_t matrix_coefficients
Definition: ni_device_api.h:762
NI_CODEC_HW_ENABLE
@ NI_CODEC_HW_ENABLE
Definition: ni_device_api.h:942
ni_sei_header_t
struct _ni_sei_header ni_sei_header_t
NI_MAX_NUM_DATA_POINTERS
#define NI_MAX_NUM_DATA_POINTERS
Definition: ni_defs.h:244
NI_MAX_DEVICE_NAME_LEN
#define NI_MAX_DEVICE_NAME_LEN
Definition: ni_defs.h:236
NI_XCODER_GENERAL_STATE
@ NI_XCODER_GENERAL_STATE
Definition: ni_device_api.h:258
_ni_pixel_planar_format
_ni_pixel_planar_format
Definition: ni_device_api.h:920
_ni_session_context::last_dts_interval
int64_t last_dts_interval
Definition: ni_device_api.h:1641
_ni_encoder_cfg_params::adaptiveCuTree
int adaptiveCuTree
Definition: ni_device_api.h:2458
_ni_session_data_io::data
union _ni_session_data_io::@19 data
_ni_session_context::blk_xcoder_name
char blk_xcoder_name[MAX_CHAR_IN_DEVICE_NAME]
Definition: ni_device_api.h:1492
_ni_frame
Definition: ni_device_api.h:2627
_ni_session_context::prev_read_frame_time
NI_DEPRECATED uint64_t prev_read_frame_time
Definition: ni_device_api.h:1416
_ni_network_data::input_num
uint32_t input_num
Definition: ni_device_api.h:1367
_ni_packet::sent_size
int sent_size
Definition: ni_device_api.h:2869
_ni_dec_h265_vui_param::overscan_info_present_flag
uint8_t overscan_info_present_flag
Definition: ni_device_api.h:748
_ni_encoder_cfg_params::HDR10dy1
int HDR10dy1
Definition: ni_device_api.h:2291
NI_PIX_FMT_YUYV422
@ NI_PIX_FMT_YUYV422
Definition: ni_device_api.h:274
NI_PIX_FMT_RGBA
@ NI_PIX_FMT_RGBA
Definition: ni_device_api.h:267
_ni_encoder_change_params_t::maxQpPB
int32_t maxQpPB
Definition: ni_device_api.h:1006
ni_decoder_frame_buffer_alloc
LIB_API ni_retcode_t ni_decoder_frame_buffer_alloc(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)
Allocate memory for decoder frame buffer based on provided parameters; the memory is retrieved from a...
Definition: ni_device_api.c:2586
_ni_encoder_cfg_params::conf_win_bottom
int conf_win_bottom
Definition: ni_device_api.h:2312
_ni_frame::color_space
uint8_t color_space
Definition: ni_device_api.h:2710
_ni_decoder_input_params_t::scale_round
int scale_round[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2556
NI_DEPRECATED
#define NI_DEPRECATED
Definition: ni_defs.h:80
_ni_overall_load_query::overall_instance_count
uint32_t overall_instance_count
Definition: ni_device_api.h:1228
_ni_session_context::roi_len
uint32_t roi_len
Definition: ni_device_api.h:1498
_ni_encoder_cfg_params::linkFrameMaxIntraRatio
int linkFrameMaxIntraRatio
Definition: ni_device_api.h:2462
ni_reconfig_crf2
LIB_API ni_retcode_t ni_reconfig_crf2(ni_session_context_t *p_ctx, float crf)
Reconfigure crf float point value dynamically during encoding.
Definition: ni_device_api.c:10446
NI_DDR_PRIORITY_NONE
@ NI_DDR_PRIORITY_NONE
Definition: ni_device_api.h:1831
NI_AI_BUFFER_QUANTIZE_MAX
@ NI_AI_BUFFER_QUANTIZE_MAX
Definition: ni_device_api.h:1826
_ni_encoder_cfg_params::profile
int profile
Definition: ni_device_api.h:2262
_ni_context_query::video_width
uint32_t video_width
Definition: ni_device_api.h:1192
XCODER_TEST_RECONF_VUI_HRD_API
@ XCODER_TEST_RECONF_VUI_HRD_API
Definition: ni_device_api.h:1769
_ni_encoder_cfg_params::colorSpace
int colorSpace
Definition: ni_device_api.h:2328
_ni_session_context::max_frame_delay
int max_frame_delay
Definition: ni_device_api.h:1696
NI_SET_CHANGE_PARAM_MAX_FRAME_SIZE
@ NI_SET_CHANGE_PARAM_MAX_FRAME_SIZE
Definition: ni_device_api.h:974
_ni_gop_params::rps
ni_gop_rps_t rps[NI_MAX_REF_PIC]
Definition: ni_device_api.h:1974
ni_query_vf_ns_id
LIB_API 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.
Definition: ni_device_api.c:11611
NI_DDR_PRIORITY_DECENC
@ NI_DDR_PRIORITY_DECENC
Definition: ni_device_api.h:1833
_ni_xcoder_params::force_pic_qp_demo_mode
int force_pic_qp_demo_mode
Definition: ni_device_api.h:2762
NI_DEC_CROP_MODE_MANUAL
@ NI_DEC_CROP_MODE_MANUAL
Definition: ni_device_api.h:932
XCODER_TEST_RECONF_LONG_TERM_REF
@ XCODER_TEST_RECONF_LONG_TERM_REF
Definition: ni_device_api.h:1752
ni_encoder_params_set_value
LIB_API 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.
Definition: ni_device_api.c:5646
PIC_TYPE_MAX
@ PIC_TYPE_MAX
Definition: ni_device_api.h:394
NI_MAX_SUPPORT_DRAWBOX_NUM
#define NI_MAX_SUPPORT_DRAWBOX_NUM
Definition: ni_device_api.h:71
_ni_packet::average_psnr
double average_psnr
Definition: ni_device_api.h:2888
_ni_dec_h264_vui_param::sar_height
uint16_t sar_height
Definition: ni_device_api.h:815
_ni_encoder_cfg_params::bitrateWindow
int bitrateWindow
Definition: ni_device_api.h:2345
_ni_session_context::pkt_offsets_index_min
uint64_t pkt_offsets_index_min[NI_FIFO_SZ]
Definition: ni_device_api.h:1454
NI_PIX_FMT_ABGR
@ NI_PIX_FMT_ABGR
Definition: ni_device_api.h:270
_ni_frame::color_primaries
uint8_t color_primaries
Definition: ni_device_api.h:2708
ni_timestamp_table_t
struct _ni_timestamp_table_t ni_timestamp_table_t
ni_encoder_frame_zerocopy_check
LIB_API 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.
Definition: ni_device_api.c:2733
_ni_instance_mgr_detail_status_append::ui32Width
uint32_t ui32Width
Definition: ni_device_api.h:1245
_ni_enc_hevc_roi_custom_map::field
struct _ni_enc_hevc_roi_custom_map::@4 field
ni_pixel_planar_format
enum _ni_pixel_planar_format ni_pixel_planar_format
_ni_load_query::total_pixel_load
uint32_t total_pixel_load
Definition: ni_device_api.h:1219
ni_session_run_state_t
enum _ni_session_run_state ni_session_run_state_t
Session running state type.
ni_decoder_frame_buffer_free
LIB_API ni_retcode_t ni_decoder_frame_buffer_free(ni_frame_t *pframe)
Free decoder frame buffer that was previously allocated with ni_decoder_frame_buffer_alloc,...
Definition: ni_device_api.c:3645
NI_PIX_FMT_ARGB
@ NI_PIX_FMT_ARGB
Definition: ni_device_api.h:269
NI_ENC_PARAM_CONSTANT_RATE_FACTOR
#define NI_ENC_PARAM_CONSTANT_RATE_FACTOR
Definition: ni_device_api.h:2134
_ni_xcoder_params
Definition: ni_device_api.h:2743
_ni_frame::sei_hdr_content_light_level_info_len
unsigned int sei_hdr_content_light_level_info_len
Definition: ni_device_api.h:2664
_ni_session_context::p_hdr_buf
uint8_t * p_hdr_buf
Definition: ni_device_api.h:1513
_ni_dec_h264_vui_param::max_num_reorder_frames
int8_t max_num_reorder_frames
Definition: ni_device_api.h:843
_ni_enc_mastering_display_colour_volume::white_point_x
uint16_t white_point_x
Definition: ni_device_api.h:1089
SESSION_RUN_STATE_RESETTING
@ SESSION_RUN_STATE_RESETTING
Definition: ni_device_api.h:1182
NI_XCODER_READ_DESC_STATE
@ NI_XCODER_READ_DESC_STATE
Definition: ni_device_api.h:254
_ni_dec_h264_vui_param::max_bytes_per_pic_denom
int8_t max_bytes_per_pic_denom
Definition: ni_device_api.h:838
_ni_decoder_input_params_t::reduce_dpb_delay
int reduce_dpb_delay
Definition: ni_device_api.h:2561
_ni_encoder_cfg_params::max_delta_qp
int max_delta_qp
Definition: ni_device_api.h:2396
_ni_xcoder_params::staticMmapThreshold
int staticMmapThreshold
Definition: ni_device_api.h:2810
_ni_encoder_cfg_params::ctbRowQpStep
int ctbRowQpStep
Definition: ni_device_api.h:2404
_ni_dec_h265_vui_param::colour_primaries
uint8_t colour_primaries
Definition: ni_device_api.h:760
ni_scaler_opcode_t
enum _ni_scaler_opcode ni_scaler_opcode_t
_ni_extended_dec_metadata::rsvd1
uint64_t rsvd1
Definition: ni_device_api.h:733
_ni_session_context::low_delay_sync_cond
ni_pthread_cond_t low_delay_sync_cond
Definition: ni_device_api.h:1668
_ni_frame::sei_hdr_mastering_display_color_vol_len
unsigned int sei_hdr_mastering_display_color_vol_len
Definition: ni_device_api.h:2662
_ni_encoder_cfg_params::motionConstrainedMode
int motionConstrainedMode
Definition: ni_device_api.h:2446
_ni_frame::video_full_range_flag
int video_full_range_flag
Definition: ni_device_api.h:2711
XCODER_TEST_RECONF_MAX_FRAME_SIZE_RATIO_API
@ XCODER_TEST_RECONF_MAX_FRAME_SIZE_RATIO_API
Definition: ni_device_api.h:1780
_ni_session_context::ready_to_close
uint32_t ready_to_close
Definition: ni_device_api.h:1546
_ni_session_context::overall_load_query
ni_overall_load_query_t overall_load_query
Definition: ni_device_api.h:1505
_ni_session_context::thread_event_handle
ni_event_handle_t thread_event_handle
Definition: ni_device_api.h:1577
_ni_encoder_cfg_params::decoding_refresh_type
int decoding_refresh_type
Definition: ni_device_api.h:2374
ni_scaler_frame_pool_alloc
LIB_API 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
Definition: ni_device_api.c:3356
NI_DEC_CROP_MODE_DISABLE
@ NI_DEC_CROP_MODE_DISABLE
Definition: ni_device_api.h:930
_ni_device_capability::xcoder_devices_cnt
uint8_t xcoder_devices_cnt
Definition: ni_device_api.h:1159
ni_input_frame
struct _ni_input_frame ni_input_frame
_ni_encoder_change_params_t::invalidFrameNum
int32_t invalidFrameNum
Definition: ni_device_api.h:1046
_ni_load_query::fw_load
uint32_t fw_load
Definition: ni_device_api.h:1202
_ni_device_capability::fw_rev
uint8_t fw_rev[8]
Definition: ni_device_api.h:1166
_ni_encoder_cfg_params::crop_width
int crop_width
Definition: ni_device_api.h:2409
_ni_thread_arg_struct_t
Definition: ni_device_api.h:1259
_ni_device_vf_ns_id
Definition: ni_rsrc_api.h:229
_ni_encoder_cfg_params::slice_mode
int slice_mode
Definition: ni_device_api.h:2371
_ni_encoder_cfg_params::HDR10minluma
int HDR10minluma
Definition: ni_device_api.h:2297
NI_MAX_PPU_PARAM_EXPR_CHAR
#define NI_MAX_PPU_PARAM_EXPR_CHAR
Definition: ni_defs.h:259
XCODER_TEST_RECONF_LTR_API
@ XCODER_TEST_RECONF_LTR_API
Definition: ni_device_api.h:1770
_ni_extended_dec_metadata::num_units_in_tick
uint32_t num_units_in_tick
Definition: ni_device_api.h:725
_ni_session_context::codec_format
uint32_t codec_format
Definition: ni_device_api.h:1488
_ni_session_context::max_frame_size
int32_t max_frame_size
Definition: ni_device_api.h:1657
_ni_device_capability
device capability type
Definition: ni_device_api.h:1155
_ni_enc_hevc_roi_custom_map::ctu_force_mode
uint32_t ctu_force_mode
Definition: ni_device_api.h:854
NI_MAX_NUM_OF_DECODER_OUTPUTS
#define NI_MAX_NUM_OF_DECODER_OUTPUTS
Definition: ni_defs.h:255
_ni_rc_min_max_qp::maxQpPB
int32_t maxQpPB
Definition: ni_device_api.h:712
XCODER_TEST_RECONF_MAX_FRAME_SIZE_API
@ XCODER_TEST_RECONF_MAX_FRAME_SIZE_API
Definition: ni_device_api.h:1775
_ni_instance_mgr_detail_status_append::reserved
uint32_t reserved[6]
Definition: ni_device_api.h:1251
NI_DDR_PRIORITY_FILT
@ NI_DDR_PRIORITY_FILT
Definition: ni_device_api.h:1834
_ni_session_context::scaler_operation
uint32_t scaler_operation
Definition: ni_device_api.h:1612
_ni_session_context::stream_dir_name
char stream_dir_name[256]
Definition: ni_device_api.h:1610
_ni_session_context::itu_t_t35_hdr10p_sei_hdr_hevc
uint8_t itu_t_t35_hdr10p_sei_hdr_hevc[NI_HDR10P_SEI_HDR_HEVC_LEN]
Definition: ni_device_api.h:1421
_ni_session_context::psnr_y
double psnr_y
Definition: ni_device_api.h:1712
_ni_decoder_input_params_t::scale_wh
int scale_wh[NI_MAX_NUM_OF_DECODER_OUTPUTS][2]
Definition: ni_device_api.h:2532
_ni_encoder_cfg_params::colorPrimaries
int colorPrimaries
Definition: ni_device_api.h:2326
_ni_dec_h265_vui_param::log2_max_mv_length_horizontal
int8_t log2_max_mv_length_horizontal
Definition: ni_device_api.h:791
NI_XCODER_PRESET_NAMES_ARRAY_LEN
#define NI_XCODER_PRESET_NAMES_ARRAY_LEN
Definition: ni_device_api.h:2906
ni_device_config_namespace_num
LIB_API 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.
Definition: ni_device_api.c:2037
_ni_encoder_cfg_params::forceBframeQpfactor
float forceBframeQpfactor
Definition: ni_device_api.h:2441
ni_decoder_frame_buffer_pool_return_buf
LIB_API 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, for a decoder frame.
Definition: ni_device_api.c:3695
_ni_frame::frame_chunk_idx
uint32_t frame_chunk_idx
Definition: ni_device_api.h:2687
_ni_network_layer_params_t::quant_format
int32_t quant_format
Definition: ni_device_api.h:1335
_ni_load_query
Definition: ni_device_api.h:1198
XCODER_TEST_CRF_FLOAT_API
@ XCODER_TEST_CRF_FLOAT_API
Definition: ni_device_api.h:1778
_ni_session_context::is_auto_dl
uint8_t is_auto_dl
Definition: ni_device_api.h:1472
XCODER_TEST_RECONF_MAX_FRAME_SIZE_RATIO
@ XCODER_TEST_RECONF_MAX_FRAME_SIZE_RATIO
Definition: ni_device_api.h:1764
ni_force_idr_frame_type
LIB_API ni_retcode_t ni_force_idr_frame_type(ni_session_context_t *p_ctx)
Force next frame to be IDR frame during encoding.
Definition: ni_device_api.c:10080
_ni_thread_arg_struct_t::session_id
uint32_t session_id
Definition: ni_device_api.h:1262
ni_ai_session_read_metrics
LIB_API 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.
Definition: ni_device_api.c:11481
_ni_encoder_cfg_params::crfFloat
float crfFloat
Definition: ni_device_api.h:2424
_ni_encoder_cfg_params::long_term_ref_count
int long_term_ref_count
Definition: ni_device_api.h:2306
NI_CC_SEI_HDR_HEVC_LEN
#define NI_CC_SEI_HDR_HEVC_LEN
Definition: ni_device_api.h:463
NI_SET_CHANGE_PARAM_INTRA_PERIOD
@ NI_SET_CHANGE_PARAM_INTRA_PERIOD
Definition: ni_device_api.h:977
_niFrameSurface1::ui16width
uint16_t ui16width
Definition: ni_device_api.h:2827
ni_scaler_watermark_params_t
struct _ni_scaler_watermark_params_t ni_scaler_watermark_params_t
_ni_frame::sar_height
uint16_t sar_height
Definition: ni_device_api.h:2714
_ni_session_context::flags_array
int flags_array[NI_FIFO_SZ]
Definition: ni_device_api.h:1646
ni_scaler_params_t
struct _ni_scaler_params_t ni_scaler_params_t
_ni_frame::sei_alt_transfer_characteristics_offset
unsigned int sei_alt_transfer_characteristics_offset
Definition: ni_device_api.h:2672
_ni_thread_arg_struct_t::thread_event_handle
ni_event_handle_t thread_event_handle
Definition: ni_device_api.h:1267
_ni_session_context::keep_alive_thread
ni_pthread_t keep_alive_thread
Definition: ni_device_api.h:1558
_ni_session_context::load_query
ni_load_query_t load_query
Definition: ni_device_api.h:1502
_ni_session_data_io::frame
ni_frame_t frame
Definition: ni_device_api.h:2900
_ni_session_context::ori_pix_fmt
int ori_pix_fmt
Definition: ni_device_api.h:1564
ni_device_alloc_dst_frame
LIB_API 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.
Definition: ni_device_api.c:9032
_ni_decoder_input_params_t::enable_out2
int enable_out2
Definition: ni_device_api.h:2522
ni_rc_min_max_qp
struct _ni_rc_min_max_qp ni_rc_min_max_qp
ni_device_session_init_framepool
LIB_API int ni_device_session_init_framepool(ni_session_context_t *p_ctx, uint32_t pool_size, uint32_t pool)
Send frame pool setup info to device.
Definition: ni_device_api.c:8649
_ni_encoder_cfg_params::level_idc
int level_idc
Definition: ni_device_api.h:2263
_ni_scaler_params_t::filterblit
int filterblit
Definition: ni_device_api.h:2589
_ni_pkt_info::ssim_y
double ssim_y
Definition: ni_device_api.h:1101
_ni_encoder_cfg_params::HDR10dy2
int HDR10dy2
Definition: ni_device_api.h:2293
_ni_instance_mgr_detail_status_append::u32InstanceId
uint32_t u32InstanceId
Definition: ni_device_api.h:1250
_ni_dec_h265_vui_param::chroma_loc_info_present_flag
uint8_t chroma_loc_info_present_flag
Definition: ni_device_api.h:764
_ni_queue_node_t
Definition: ni_device_api.h:1295
ni_set_frame_ref_invalid
LIB_API ni_retcode_t ni_set_frame_ref_invalid(ni_session_context_t *p_ctx, int32_t frame_num)
Set frame reference invalidation.
Definition: ni_device_api.c:10170
_niFrameSurface1::output_idx
int8_t output_idx
Definition: ni_device_api.h:2833
NI_H265_USER_DATA_FLAG_CONTENT_LIGHT_LEVEL_INFO
@ NI_H265_USER_DATA_FLAG_CONTENT_LIGHT_LEVEL_INFO
Definition: ni_device_api.h:376
_ni_thread_arg_struct_t::session_timestamp
uint64_t session_timestamp
Definition: ni_device_api.h:1263
NI_FRAME_AUX_DATA_LTR_INTERVAL
@ NI_FRAME_AUX_DATA_LTR_INTERVAL
Definition: ni_device_api.h:555
_ni_dec_h265_vui_param::video_full_range_flag
uint8_t video_full_range_flag
Definition: ni_device_api.h:754
_ni_session_context::pts_table
ni_timestamp_table_t * pts_table
Definition: ni_device_api.h:1517
ni_qos_modes
ni_qos_modes
Definition: ni_device_api.h:225
_ni_pkt_info::psnr_y
double psnr_y
Definition: ni_device_api.h:1097
_ni_encoder_cfg_params::preIntraHandling
int preIntraHandling
Definition: ni_device_api.h:2459
_ni_frameclone_desc::ui32Size
uint32_t ui32Size
Definition: ni_device_api.h:1382
_ni_session_context::keep_alive_thread_args
ni_thread_arg_struct_t * keep_alive_thread_args
Definition: ni_device_api.h:1559
_ni_xcoder_params::color_space
int color_space
Definition: ni_device_api.h:2788
_ni_encoder_change_params_t::ltrInterval
int32_t ltrInterval
Definition: ni_device_api.h:1049
QOS_MODE_DISABLED
@ QOS_MODE_DISABLED
Definition: ni_device_api.h:227
_ni_encoder_cfg_params::baseLayerOnly
int baseLayerOnly
Definition: ni_device_api.h:2460
_ni_frame::nb_aux_data
int nb_aux_data
Definition: ni_device_api.h:2704
_ni_split_context_t::enabled
int enabled
Definition: ni_device_api.h:1735
_ni_session_context::reconfig_crf
int reconfig_crf
Definition: ni_device_api.h:1687
NI_SET_CHANGE_PARAM_LTR_INTERVAL
@ NI_SET_CHANGE_PARAM_LTR_INTERVAL
Definition: ni_device_api.h:972
_ni_dec_h264_vui_param::matrix_coefficients
uint8_t matrix_coefficients
Definition: ni_device_api.h:819
_ni_encoder_cfg_params::maxFrameSize
int maxFrameSize
Definition: ni_device_api.h:2257
_ni_encoder_cfg_params::hvs_qp_scale
int hvs_qp_scale
Definition: ni_device_api.h:2389
_ni_encoder_cfg_params::cplxDecay
float cplxDecay
Definition: ni_device_api.h:2420
_ni_packet::av1_show_frame
int av1_show_frame
Definition: ni_device_api.h:2879
_ni_encoder_change_params_t::minQpI
int32_t minQpI
Definition: ni_device_api.h:1000
_ni_frame::sei_user_data_unreg_offset
unsigned int sei_user_data_unreg_offset
Definition: ni_device_api.h:2669
_ni_decoder_input_params_t::skip_extra_headers
int skip_extra_headers
Definition: ni_device_api.h:2562
_ni_instance_mgr_detail_status
Definition: ni_device_api.h:1232
_ni_enc_hevc_roi_custom_map
encoder HEVC ROI custom map (1 CTU = 64bits)
Definition: ni_device_api.h:850
MAX_AV1_ENCODER_GOP_NUM
#define MAX_AV1_ENCODER_GOP_NUM
Definition: ni_defs.h:325
_ni_decoder_input_params_t::enable_follow_iframe
int enable_follow_iframe
Definition: ni_device_api.h:2557
_ni_encoder_cfg_params::enable_hvs_qp
int enable_hvs_qp
Definition: ni_device_api.h:2388
_ni_device_extra_info
Definition: ni_rsrc_api.h:242
ni_encoder_set_input_frame_format
LIB_API 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.
Definition: ni_device_api.c:11171
ni_uploader_frame_buffer_unlock
LIB_API 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.
Definition: ni_device_api.c:10909
_ni_frame::video_height
uint32_t video_height
Definition: ni_device_api.h:2637
ni_device_dec_session_save_hdrs
LIB_API 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 ...
Definition: ni_device_api.c:1566
_ni_decoder_input_params_t::pkt_pts_unchange
int pkt_pts_unchange
Definition: ni_device_api.h:2550
_ni_network_data::inset
ni_network_layer_offset_t * inset
Definition: ni_device_api.h:1371
_ni_packet::p_buffer
void * p_buffer
Definition: ni_device_api.h:2871
ni_decoder_input_params_t
struct _ni_decoder_input_params_t ni_decoder_input_params_t
_ni_decoder_input_params_t::force_8_bit
int force_8_bit[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2525
_ni_vui_hrd::colorSpace
int32_t colorSpace
Definition: ni_device_api.h:670
_ni_encoder_cfg_params::qcomp
float qcomp
Definition: ni_device_api.h:2414
_ni_session_context::low_delay_sync_flag
int low_delay_sync_flag
Definition: ni_device_api.h:1666
NI_CUSTOMIZE_ROI_QPOFFSET_LEVEL
#define NI_CUSTOMIZE_ROI_QPOFFSET_LEVEL
Max number of lines supported for qpoffset level.
Definition: ni_device_api.h:481
_ni_packet::pos
long long pos
Definition: ni_device_api.h:2859
_ni_frame_config::output_index
uint8_t output_index
Definition: ni_device_api.h:2851
_ni_encoder_cfg_params::avcc_hvcc
int avcc_hvcc
Definition: ni_device_api.h:2454
NI_DEPRECATE_MACRO
#define NI_DEPRECATE_MACRO(X)
Definition: ni_defs.h:82
_ni_decoder_input_params_t::custom_sei_passthru
int custom_sei_passthru
Definition: ni_device_api.h:2542
_ni_input_frame::p_input_buffer
uint8_t * p_input_buffer
Definition: ni_device_api.h:1400
_ni_xcoder_params::ddr_priority_mode
ni_ddr_priority_mode_t ddr_priority_mode
Definition: ni_device_api.h:2817
_ni_encoder_cfg_params::colorTrc
int colorTrc
Definition: ni_device_api.h:2327
_ni_session_context::hvsplus_level
int hvsplus_level
encoder:calculate PSNR end
Definition: ni_device_api.h:1717
_ni_session_context::active_video_height
uint32_t active_video_height
Definition: ni_device_api.h:1553
NI_FRAME_AUX_DATA_LONG_TERM_REF
@ NI_FRAME_AUX_DATA_LONG_TERM_REF
Definition: ni_device_api.h:550
ni_gop_params_check
LIB_API bool ni_gop_params_check(ni_xcoder_params_t *p_param)
Check custom gop params set.
Definition: ni_device_api.c:12845
ni_ai_config_network_binary
LIB_API 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
Definition: ni_device_api.c:9647
_ni_session_context::pkt_delay_cnt
uint32_t pkt_delay_cnt
Definition: ni_device_api.h:1704
_ni_encoder_cfg_params::av1_error_resilient_mode
int av1_error_resilient_mode
Definition: ni_device_api.h:2402
_ni_session_context::enc_pts_r_idx
int64_t enc_pts_r_idx
Definition: ni_device_api.h:1442
_ni_encoder_cfg_params::tune_bframe_visual
int tune_bframe_visual
Definition: ni_device_api.h:2442
_ni_custom_sei
custom sei payload passthrough
Definition: ni_device_api.h:1119
_ni_session_context::count_frame_num_in_sec
uint32_t count_frame_num_in_sec
Definition: ni_device_api.h:1654
_ni_encoder_cfg_params::conf_win_left
int conf_win_left
Definition: ni_device_api.h:2313
_ni_encoder_cfg_params::pass1_qp
int pass1_qp
Definition: ni_device_api.h:2423
_ni_session_context::rc_error_count
int rc_error_count
Definition: ni_device_api.h:1535
_ni_encoder_cfg_params::conf_win_right
int conf_win_right
Definition: ni_device_api.h:2314
_ni_dec_h264_vui_param::video_full_range_flag
uint8_t video_full_range_flag
Definition: ni_device_api.h:811
NI_AI_BUFFER_FORMAT_BFP16
@ NI_AI_BUFFER_FORMAT_BFP16
Definition: ni_device_api.h:1803
ni_enc_hevc_roi_custom_map_t
union _ni_enc_hevc_roi_custom_map ni_enc_hevc_roi_custom_map_t
encoder HEVC ROI custom map (1 CTU = 64bits)
_ni_enc_hevc_roi_custom_map::sub_ctu_qp_3
uint32_t sub_ctu_qp_3
Definition: ni_device_api.h:860
_ni_session_context::blk_dev_name
char blk_dev_name[NI_MAX_DEVICE_NAME_LEN]
Definition: ni_device_api.h:1661
_ni_decoder_input_params_t::enable_low_delay_check
int enable_low_delay_check
Definition: ni_device_api.h:2540
_ni_session_context::biggest_bitstream_buffer_allocated
uint32_t biggest_bitstream_buffer_allocated
Definition: ni_device_api.h:1557
NI_POOL_TYPE_NONE
@ NI_POOL_TYPE_NONE
Definition: ni_device_api.h:493
_ni_session_context::session_run_state
ni_session_run_state_t session_run_state
Definition: ni_device_api.h:1549
_ni_buf_pool_t::p_used_head
ni_buf_t * p_used_head
Definition: ni_device_api.h:1291
ni_query_temperature
LIB_API 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.
Definition: ni_device_api.c:11664
_ni_instance_mgr_detail_status::ui8MaxCost
uint8_t ui8MaxCost
Definition: ni_device_api.h:1235
_ni_long_term_ref::use_cur_src_as_long_term_pic
uint8_t use_cur_src_as_long_term_pic
Definition: ni_device_api.h:689
_ni_session_context::enable_low_delay_check
int enable_low_delay_check
Definition: ni_device_api.h:1597
_ni_session_context::sent_size
uint32_t sent_size
Definition: ni_device_api.h:1510
ni_hwframe_buffer_recycle2
LIB_API ni_retcode_t ni_hwframe_buffer_recycle2(niFrameSurface1_t *surface)
Recycle a hwframe buffer on card.
Definition: ni_device_api.c:8602
_niFrameSurface1::device_handle
int32_t device_handle
Definition: ni_device_api.h:2830
_ni_encoder_cfg_params::crfMax
int crfMax
Definition: ni_device_api.h:2413
NI_CC_SEI_TRAILER_LEN
#define NI_CC_SEI_TRAILER_LEN
Definition: ni_device_api.h:467
NI_MAX_VUI_SIZE
#define NI_MAX_VUI_SIZE
Definition: ni_device_api.h:62
_niFrameSurface1::bit_depth
int8_t bit_depth
Definition: ni_device_api.h:2831
_ni_scaler_drawbox_params_t::start_x
uint32_t start_x
Definition: ni_device_api.h:2598
ni_gop_rps_t
struct _ni_gop_rps ni_gop_rps_t
ni_h265_sei_user_data_type_t
ni_h265_sei_user_data_type_t
Definition: ni_device_api.h:359
_ni_dec_h264_vui_param::low_delay_hrd_flag
uint8_t low_delay_hrd_flag
Definition: ni_device_api.h:833
_ni_dec_h264_vui_param::log2_max_mv_length_vertical
int8_t log2_max_mv_length_vertical
Definition: ni_device_api.h:842
_ni_instance_mgr_detail_status::ui32NumInFrame
uint32_t ui32NumInFrame
Definition: ni_device_api.h:1240
_ni_encoder_cfg_params::cuTreeFactor
int cuTreeFactor
Definition: ni_device_api.h:2417
_ni_network_layer_info::out_param
ni_network_layer_params_t * out_param
Definition: ni_device_api.h:1357
XCODER_TEST_INVALID_REF_FRAME_API
@ XCODER_TEST_INVALID_REF_FRAME_API
Definition: ni_device_api.h:1773
_ni_encoder_cfg_params::enableipRatio
int enableipRatio
Definition: ni_device_api.h:2434
NI_CODEC_HW_PAYLOAD_OFFSET
@ NI_CODEC_HW_PAYLOAD_OFFSET
Definition: ni_device_api.h:946
_ni_enc_quad_roi_custom_map
encoder AVC ROI custom map (1 MB = 8bits)
Definition: ni_device_api.h:885
_ni_enc_hevc_roi_custom_map::lambda_sad_3
uint32_t lambda_sad_3
Definition: ni_device_api.h:865
_ni_decoder_input_params_t::scale_resolution_ceil
int scale_resolution_ceil[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_device_api.h:2555
_ni_device_capability::serial_number
uint8_t serial_number[20]
Definition: ni_device_api.h:1163
ni_frame_buffer_alloc_hwenc
LIB_API ni_retcode_t ni_frame_buffer_alloc_hwenc(ni_frame_t *pframe, int video_width, int video_height, int extra_len)
Allocate memory for the hwDescriptor buffer based on provided parameters taking into account pic size...
Definition: ni_device_api.c:8484
_ni_dec_h264_vui_param::colour_primaries
uint8_t colour_primaries
Definition: ni_device_api.h:817
_ni_session_context::meta_size
uint32_t meta_size
Params used in VFR mode Done///.
Definition: ni_device_api.h:1640
NI_SET_CHANGE_PARAM_RC_FRAMERATE
@ NI_SET_CHANGE_PARAM_RC_FRAMERATE
Definition: ni_device_api.h:973
_ni_encoder_cfg_params::vbv_min_rate
int vbv_min_rate
Definition: ni_device_api.h:2438
NI_DEVICE_TYPE_XCODER_MAX
@ NI_DEVICE_TYPE_XCODER_MAX
Definition: ni_defs.h:362
_ni_enc_avc_roi_custom_map::mb_force_mode
uint8_t mb_force_mode
Definition: ni_device_api.h:876
_ni_encoder_cfg_params::HDR10MaxLight
int HDR10MaxLight
Definition: ni_device_api.h:2284
ni_extended_dec_metadata_t
struct _ni_extended_dec_metadata ni_extended_dec_metadata_t
_ni_dec_h265_vui_param::neutral_chroma_indication_flag
uint8_t neutral_chroma_indication_flag
Definition: ni_device_api.h:768
_ni_network_layer_params_t::affine
struct _ni_network_layer_params_t::@13::@15 affine
_ni_xcoder_params::cacheRoi
int cacheRoi
Definition: ni_device_api.h:2777
_ni_session_context::session_timestamp
uint64_t session_timestamp
Definition: ni_device_api.h:1484
_ni_session_context::psnr_u
double psnr_u
Definition: ni_device_api.h:1713
_ni_dec_mastering_display_colour_volume_bytes::white_point_x
uint16_t white_point_x
Definition: ni_device_api.h:1066
ni_reconfig_max_frame_size
LIB_API ni_retcode_t ni_reconfig_max_frame_size(ni_session_context_t *p_ctx, int32_t max_frame_size)
Reconfigure maxFrameSize dynamically during encoding.
Definition: ni_device_api.c:10264
_ni_encoder_cfg_params::still_image_detect_level
int still_image_detect_level
Definition: ni_device_api.h:2447
_ni_encoder_change_params_t::maxQpI
int32_t maxQpI
Definition: ni_device_api.h:1001
_ni_region_of_interest::bottom
int bottom
Definition: ni_device_api.h:637
_ni_dec_h264_vui_param::vui_num_units_in_tick
uint32_t vui_num_units_in_tick
Definition: ni_device_api.h:828
_ni_encoder_cfg_params::crop_height
int crop_height
Definition: ni_device_api.h:2410
_ni_hw_capability::codec_format
uint8_t codec_format
Definition: ni_device_api.h:1141
_ni_frame_config::rectangle_width
uint16_t rectangle_width
Definition: ni_device_api.h:2844
_ni_queue_buffer_pool_t::p_used_head
ni_queue_node_t * p_used_head
Definition: ni_device_api.h:1311
_ni_session_context::max_nvme_io_size
uint32_t max_nvme_io_size
Definition: ni_device_api.h:1478
_ni_session_context::enable_user_data_sei_passthru
int enable_user_data_sei_passthru
Definition: ni_device_api.h:1616
_ni_encoder_cfg_params::aspectRatioHeight
int aspectRatioHeight
Definition: ni_device_api.h:2255
_ni_timestamp_table_t
Definition: ni_device_api.h:1323
_ni_dec_mastering_display_colour_volume_bytes::max_display_mastering_luminance
uint32_t max_display_mastering_luminance
Definition: ni_device_api.h:1068
NI_FRAME_AUX_DATA_MASTERING_DISPLAY_METADATA
@ NI_FRAME_AUX_DATA_MASTERING_DISPLAY_METADATA
Definition: ni_device_api.h:507
_ni_overall_load_query::admin_queried
uint32_t admin_queried
Definition: ni_device_api.h:1229
_ni_encoder_cfg_params::HDR10dx1
int HDR10dx1
Definition: ni_device_api.h:2290
_ni_instance_mgr_detail_status_append::u8PixelFormat
uint8_t u8PixelFormat
Definition: ni_device_api.h:1248
_ni_session_context::is_first_frame
int is_first_frame
Definition: ni_device_api.h:1438
_ni_encoder_change_params_t::vbvMaxRate
int32_t vbvMaxRate
Definition: ni_device_api.h:1035
XCODER_TEST_RECONF_BR
@ XCODER_TEST_RECONF_BR
Definition: ni_device_api.h:1749
NI_CUSTOM_SEI_LOC_BEFORE_VCL
@ NI_CUSTOM_SEI_LOC_BEFORE_VCL
Definition: ni_device_api.h:1112
_ni_dec_h265_vui_param::video_signal_type_present_flag
uint8_t video_signal_type_present_flag
Definition: ni_device_api.h:751
_ni_aux_data::type
ni_aux_data_type_t type
Definition: ni_device_api.h:622
_ni_pkt_info::ssim_u
double ssim_u
Definition: ni_device_api.h:1102
_ni_hw_capability::max_video_width
uint16_t max_video_width
Definition: ni_device_api.h:1143
ni_device_capability_query
LIB_API 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...
Definition: ni_device_api.c:587
_ni_scaler_drawbox_params_t::end_y
uint32_t end_y
Definition: ni_device_api.h:2601
_ni_dec_h265_vui_param::tiles_fixed_structure_flag
uint8_t tiles_fixed_structure_flag
Definition: ni_device_api.h:783
_niFrameSurface1::dma_buf_fd
int32_t dma_buf_fd
Definition: ni_device_api.h:2835
_ni_encoder_cfg_params::planar
int planar
Definition: ni_device_api.h:2256
_ni_buf_t::buf
void * buf
Definition: ni_device_api.h:1276
_ni_rational::den
int den
Definition: ni_device_api.h:603
_ni_frame::start_of_stream
uint32_t start_of_stream
Definition: ni_device_api.h:2635
_ni_session_context::reconfigCount
int reconfigCount
Definition: ni_device_api.h:1700
_ni_encoder_change_params_t::colorTrc
uint8_t colorTrc
Definition: ni_device_api.h:1023
_ni_packet::buffer_size
uint32_t buffer_size
Definition: ni_device_api.h:2872
ni_queue_node_t
struct _ni_queue_node_t ni_queue_node_t
NI_SET_CHANGE_PARAM_RC_MIN_MAX_QP
@ NI_SET_CHANGE_PARAM_RC_MIN_MAX_QP
Definition: ni_device_api.h:959
_ni_vui_hrd::videoFullRange
int32_t videoFullRange
Definition: ni_device_api.h:681
NI_FRAME_AUX_DATA_CUSTOM_SEI
@ NI_FRAME_AUX_DATA_CUSTOM_SEI
Definition: ni_device_api.h:533
_ni_sei_header::type
uint8_t type
Definition: ni_device_api.h:348
ni_p2p_xfer
LIB_API 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)
Definition: ni_device_api.c:12887
_ni_session_context::dts_queue
ni_timestamp_table_t * dts_queue
Definition: ni_device_api.h:1520
_ni_buf_pool_t::number_of_buffers
uint32_t number_of_buffers
Definition: ni_device_api.h:1287
_ni_vui_hrd::aspectRatioHeight
int32_t aspectRatioHeight
Definition: ni_device_api.h:677
_ni_session_context::hdr_buf_size
uint8_t hdr_buf_size
Definition: ni_device_api.h:1514
ni_scaler_set_params
LIB_API 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.
Definition: ni_device_api.c:8756
ni_device_session_query_buffer_avail
LIB_API 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.
Definition: ni_device_api.c:8381
NI_SET_CHANGE_PARAM_INVALID_REF_FRAME
@ NI_SET_CHANGE_PARAM_INVALID_REF_FRAME
Definition: ni_device_api.h:971
_ni_instance_mgr_detail_status_v1
Definition: ni_device_api.h:1254
ni_reconfig_max_frame_size_ratio
LIB_API 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.
Definition: ni_device_api.c:10556
_ni_frame::pts
long long pts
Definition: ni_device_api.h:2633
_ni_xcoder_params::enable_vfr
int enable_vfr
Definition: ni_device_api.h:2808
LIB_API
#define LIB_API
Definition: ni_libxcoder_dynamic_loading.h:52
_ni_frame::inconsecutive_transfer
uint8_t inconsecutive_transfer
Definition: ni_device_api.h:2734
_ni_overall_load_query::overall_current_load
uint32_t overall_current_load
Definition: ni_device_api.h:1226
_ni_queue_buffer_pool_t::number_of_buffers
uint32_t number_of_buffers
Definition: ni_device_api.h:1308
NI_CUSTOM_SEI_LOC_AFTER_VCL
@ NI_CUSTOM_SEI_LOC_AFTER_VCL
Definition: ni_device_api.h:1113
_ni_frame::crop_right
uint32_t crop_right
Definition: ni_device_api.h:2642
_ni_session_context::last_framerate
ni_framerate_t last_framerate
Definition: ni_device_api.h:1677
_ni_session_context::ltr_frame_ref_invalid
int32_t ltr_frame_ref_invalid
Definition: ni_device_api.h:1605
_ni_dec_h265_vui_param::log2_max_mv_length_vertical
int8_t log2_max_mv_length_vertical
Definition: ni_device_api.h:792
_ni_encoder_cfg_params::rdoLevel
int rdoLevel
Definition: ni_device_api.h:2282
ni_packet_t
struct _ni_packet ni_packet_t
_ni_encoder_cfg_params::long_term_ref_enable
int long_term_ref_enable
Definition: ni_device_api.h:2273
_ni_frame::pixel_format
int pixel_format
Definition: ni_device_api.h:2698
_ni_dec_h264_vui_param::log2_max_mv_length_horizontal
int8_t log2_max_mv_length_horizontal
Definition: ni_device_api.h:841
_ni_encoder_change_params_t::sliceArg
int16_t sliceArg
Definition: ni_device_api.h:1033
ni_get_dma_buf_file_descriptor
LIB_API int32_t ni_get_dma_buf_file_descriptor(const ni_frame_t *p_frame)
Get the DMA buffer file descriptor from the P2P frame.
Definition: ni_device_api.c:11371
_ni_encoder_cfg_params::get_psnr_mode
int get_psnr_mode
Definition: ni_device_api.h:2444
_ni_context_query::video_height
uint32_t video_height
Definition: ni_device_api.h:1193
ni_codec_format_t
enum _ni_codec_format ni_codec_format_t
This is an enumeration for supported codec formats.
_ni_dec_h264_vui_param::bitstream_restriction_flag
uint8_t bitstream_restriction_flag
Definition: ni_device_api.h:836
ni_load_query_t
struct _ni_load_query ni_load_query_t
_ni_session_context::av1_pkt_num
uint64_t av1_pkt_num
Definition: ni_device_api.h:1697
_ni_encoder_cfg_params::ltrNextInterval
int ltrNextInterval
Definition: ni_device_api.h:2302
_ni_decoder_input_params_t::survive_stream_err
int survive_stream_err
Definition: ni_device_api.h:2560
ni_context_query_t
struct _ni_context_query ni_context_query_t
_ni_encoder_cfg_params::videoFullRange
int videoFullRange
Definition: ni_device_api.h:2304
_ni_session_context::last_pts
int64_t last_pts
Definition: ni_device_api.h:1439
ni_network_perf_metrics_t
struct _ni_network_perf_metrics ni_network_perf_metrics_t
_ni_encoder_cfg_params::intra_reset_refresh
int intra_reset_refresh
Definition: ni_device_api.h:2403
_ni_split_context_t::f
int f[3]
Definition: ni_device_api.h:1738
_ni_custom_sei_set::count
int count
Definition: ni_device_api.h:1130
ni_enc_quad_roi_custom_map
union _ni_enc_quad_roi_custom_map ni_enc_quad_roi_custom_map
encoder AVC ROI custom map (1 MB = 8bits)
_ni_scaler_input_params_t::in_rec_height
int32_t in_rec_height
Definition: ni_device_api.h:2571
_ni_dec_h265_vui_param::chroma_sample_loc_type_bottom_field
int8_t chroma_sample_loc_type_bottom_field
Definition: ni_device_api.h:766
ni_network_data_t
struct _ni_network_data ni_network_data_t
NI_PIX_FMT_10_TILED4X4
@ NI_PIX_FMT_10_TILED4X4
Definition: ni_device_api.h:277
_ni_encoder_cfg_params::slice_arg
int slice_arg
Definition: ni_device_api.h:2372
_ni_frame::p_metadata_buffer
uint8_t * p_metadata_buffer
Definition: ni_device_api.h:2721
NI_H265_USERDATA_FLAG_UNREGISTERED_SUF
@ NI_H265_USERDATA_FLAG_UNREGISTERED_SUF
Definition: ni_device_api.h:369
_ni_dec_h265_vui_param::chroma_sample_loc_type_top_field
int8_t chroma_sample_loc_type_top_field
Definition: ni_device_api.h:765
_ni_dec_h264_vui_param::video_signal_type_present_flag
uint8_t video_signal_type_present_flag
Definition: ni_device_api.h:809
ni_device_session_query_detail
LIB_API 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...
Definition: ni_device_api.c:1960
_ni_rc_min_max_qp::maxQpI
int32_t maxQpI
Definition: ni_device_api.h:709
_ni_session_context::enc_pts_list
int64_t enc_pts_list[NI_FIFO_SZ]
Definition: ni_device_api.h:1441
NI_MAX_SUPPORT_WATERMARK_NUM
#define NI_MAX_SUPPORT_WATERMARK_NUM
Definition: ni_device_api.h:72
_ni_custom_sei_set::custom_sei
ni_custom_sei_t custom_sei[NI_MAX_CUSTOM_SEI_CNT]
Definition: ni_device_api.h:1129
_ni_dec_h265_vui_param::restricted_ref_pic_lists_flag
uint8_t restricted_ref_pic_lists_flag
Definition: ni_device_api.h:785
_ni_encoder_cfg_params::lookAheadDepth
int lookAheadDepth
Definition: ni_device_api.h:2281
SESSION_RUN_STATE_SEQ_CHANGE_OPENING
@ SESSION_RUN_STATE_SEQ_CHANGE_OPENING
Definition: ni_device_api.h:1181
_ni_packet::still_image_detected
uint8_t still_image_detected
Definition: ni_device_api.h:2892
_ni_frame_config::rectangle_y
int16_t rectangle_y
Definition: ni_device_api.h:2847
_ni_buf_pool_t::p_used_tail
ni_buf_t * p_used_tail
Definition: ni_device_api.h:1292
_ni_encoder_change_params_t::vbvBufferSize
int32_t vbvBufferSize
Definition: ni_device_api.h:996
NI_FRAME_AUX_DATA_CRF_FLOAT
@ NI_FRAME_AUX_DATA_CRF_FLOAT
Definition: ni_device_api.h:580
ni_device_session_update_framepool
LIB_API 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.
Definition: ni_device_api.c:8697
_ni_scaler_watermark_params_t::ui32StartY
uint32_t ui32StartY
Definition: ni_device_api.h:2607
_ni_frame::sei_alt_transfer_characteristics_len
unsigned int sei_alt_transfer_characteristics_len
Definition: ni_device_api.h:2673
_ni_session_context::hevc_roi_map
ni_enc_hevc_roi_custom_map_t * hevc_roi_map
Definition: ni_device_api.h:1591
_ni_custom_gop_params::pic_param
ni_gop_params_t pic_param[NI_MAX_GOP_NUM]
Definition: ni_device_api.h:2060
ni_packet_buffer_free
LIB_API ni_retcode_t ni_packet_buffer_free(ni_packet_t *ppacket)
Free packet buffer that was previously allocated with ni_packet_buffer_alloc.
Definition: ni_device_api.c:3844
_ni_session_context::pic_reorder_delay
int pic_reorder_delay
Definition: ni_device_api.h:1643
_ni_dec_h265_vui_param::def_disp_win
ni_dec_win_t def_disp_win
Definition: ni_device_api.h:794
_ni_session_context::dev
unsigned short dev
Definition: ni_device_api.h:1623
_ni_codec_format
_ni_codec_format
This is an enumeration for supported codec formats.
Definition: ni_device_api.h:911
NI_FRAME_AUX_DATA_CONTENT_LIGHT_LEVEL
@ NI_FRAME_AUX_DATA_CONTENT_LIGHT_LEVEL
Definition: ni_device_api.h:511
_ni_xcoder_params::low_delay_mode
int low_delay_mode
Definition: ni_device_api.h:2763
_ni_decoder_input_params_t::decoder_low_delay
int decoder_low_delay
Definition: ni_device_api.h:2538
_ni_decoder_input_params_t::nb_save_pkt
int nb_save_pkt
Definition: ni_device_api.h:2524
ni_custom_sei_location_t
enum _ni_custom_sei_location ni_custom_sei_location_t
This is an enumeration for illustrating the custom SEI locations.
_ni_packet::video_width
uint32_t video_width
Definition: ni_device_api.h:2863
ni_instance_mgr_detail_status_append_t
struct _ni_instance_mgr_detail_status_append ni_instance_mgr_detail_status_append_t
_ni_session_context::pkt_num
uint64_t pkt_num
Definition: ni_device_api.h:1534
_ni_encoder_cfg_params::enable_cu_level_rate_control
int enable_cu_level_rate_control
Definition: ni_device_api.h:2387
_ni_session_context::iocbs
ni_iocb_t ** iocbs
Definition: ni_device_api.h:1729
_ni_decoder_input_params_t::disable_adaptive_buffers
int disable_adaptive_buffers
Definition: ni_device_api.h:2558
NI_CODEC_FORMAT_H264
@ NI_CODEC_FORMAT_H264
Definition: ni_device_api.h:913
_ni_instance_mgr_detail_status_append::u8rsvd
uint8_t u8rsvd[3]
Definition: ni_device_api.h:1249
_ni_frame::use_cur_src_as_long_term_pic
uint8_t use_cur_src_as_long_term_pic
Definition: ni_device_api.h:2647
NI_AI_BUFFER_FORMAT_INT8
@ NI_AI_BUFFER_FORMAT_INT8
Definition: ni_device_api.h:1795
_ni_queue_t
Definition: ni_device_api.h:1315
NI_FRAME_AUX_DATA_INVALID_REF_FRAME
@ NI_FRAME_AUX_DATA_INVALID_REF_FRAME
Definition: ni_device_api.h:560
_ni_thread_arg_struct_t::plast_access_time
volatile uint64_t * plast_access_time
Definition: ni_device_api.h:1271
_ni_enc_hevc_roi_custom_map::lambda_sad_0
uint32_t lambda_sad_0
Definition: ni_device_api.h:862
_ni_frame::start_buffer_size
uint32_t start_buffer_size
Definition: ni_device_api.h:2729
NI_AI_BUFFER_FORMAT_UINT16
@ NI_AI_BUFFER_FORMAT_UINT16
Definition: ni_device_api.h:1797
_ni_frame::video_width
uint32_t video_width
Definition: ni_device_api.h:2636
_ni_session_context::initial_frame_delay
int initial_frame_delay
Definition: ni_device_api.h:1694
_ni_input_frame
Definition: ni_device_api.h:1398
_ni_xcoder_params::bitrate
int bitrate
Definition: ni_device_api.h:2759
_ni_encoder_cfg_params::HDR10wy
int HDR10wy
Definition: ni_device_api.h:2295
_ni_dec_h264_vui_param::vui_timing_info_present_flag
uint8_t vui_timing_info_present_flag
Definition: ni_device_api.h:825
_ni_session_context::sei_hdr_content_light_level_info_len
int sei_hdr_content_light_level_info_len
Definition: ni_device_api.h:1428
_ni_encoder_cfg_params::preferred_transfer_characteristics
int preferred_transfer_characteristics
Definition: ni_device_api.h:2279
_ni_queue_node_t::p_previous_buffer
struct _ni_queue_node_t * p_previous_buffer
Definition: ni_device_api.h:1302
_ni_session_context::pixel_format
int pixel_format
Definition: ni_device_api.h:1618
_ni_xcoder_params::use_low_delay_poc_type
int use_low_delay_poc_type
Definition: ni_device_api.h:2766
_ni_frame::flags
int flags
Definition: ni_device_api.h:2718
_ni_encoder_cfg_params::conf_win_top
int conf_win_top
Definition: ni_device_api.h:2311
_ni_xcoder_params::ui32VuiDataSizeBits
NI_DEPRECATED uint32_t ui32VuiDataSizeBits
Definition: ni_device_api.h:2779
_ni_dec_h264_vui_param::chroma_sample_loc_type_top_field
int8_t chroma_sample_loc_type_top_field
Definition: ni_device_api.h:822
ni_ai_frame_buffer_alloc
LIB_API 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...
Definition: ni_device_api.c:9783
_ni_session_context::sei_trailer
uint8_t sei_trailer[NI_CC_SEI_TRAILER_LEN]
Definition: ni_device_api.h:1424
_ni_scaler_multi_drawbox_params_t::multi_drawbox_params
ni_scaler_drawbox_params_t multi_drawbox_params[NI_MAX_SUPPORT_DRAWBOX_NUM]
Definition: ni_device_api.h:2615
MAX_CHAR_IN_DEVICE_NAME
#define MAX_CHAR_IN_DEVICE_NAME
Definition: ni_device_api.h:185
_ni_category_classify::class_type
int class_type
Definition: ni_device_api.h:650
_ni_encoder_cfg_params::bitrateMode
int bitrateMode
Definition: ni_device_api.h:2422
_ni_scaler_input_params_t::in_rec_width
int32_t in_rec_width
Definition: ni_device_api.h:2570
_ni_enc_hevc_roi_custom_map::lambda_sad_1
uint32_t lambda_sad_1
Definition: ni_device_api.h:863
_ni_aux_data
Definition: ni_device_api.h:620
_ni_extended_dec_metadata::color_trc
uint8_t color_trc
Definition: ni_device_api.h:728
_ni_session_context::pkt_custom_sei_set
ni_custom_sei_set_t * pkt_custom_sei_set[NI_FIFO_SZ]
Definition: ni_device_api.h:1458
NI_AI_BUFFER_FORMAT_UINT64
@ NI_AI_BUFFER_FORMAT_UINT64
Definition: ni_device_api.h:1811
NI_PIXEL_PLANAR_FORMAT_TILED4X4
@ NI_PIXEL_PLANAR_FORMAT_TILED4X4
Definition: ni_device_api.h:924
ni_device_session_context_free
LIB_API void ni_device_session_context_free(ni_session_context_t *p_ctx)
Free previously allocated session context.
Definition: ni_device_api.c:130
_ni_framerate
Definition: ni_device_api.h:697
_ni_vui_hrd::aspectRatioWidth
int32_t aspectRatioWidth
Definition: ni_device_api.h:674
_ni_encoder_change_params_t::aspectRatioWidth
uint16_t aspectRatioWidth
Definition: ni_device_api.h:1025
NI_FRAME_AUX_DATA_INTRAPRD
@ NI_FRAME_AUX_DATA_INTRAPRD
Definition: ni_device_api.h:541
ni_reconfig_framerate
LIB_API ni_retcode_t ni_reconfig_framerate(ni_session_context_t *p_ctx, ni_framerate_t *framerate)
Reconfigure framerate dynamically during encoding.
Definition: ni_device_api.c:10195
_ni_frame::crop_bottom
uint32_t crop_bottom
Definition: ni_device_api.h:2640
_ni_session_context::ori_bit_depth_factor
int ori_bit_depth_factor
Definition: ni_device_api.h:1564
_ni_session_context::ori_height
int ori_height
Definition: ni_device_api.h:1564
_ni_xcoder_params::dec_input_params
ni_decoder_input_params_t dec_input_params
Definition: ni_device_api.h:2796
_ni_network_perf_metrics::total_cycles
uint32_t total_cycles
Definition: ni_device_api.h:1388
QOS_OP_CONFIG_CODE
@ QOS_OP_CONFIG_CODE
Definition: ni_device_api.h:239
_ni_dec_h265_vui_param::colour_description_present_flag
uint8_t colour_description_present_flag
Definition: ni_device_api.h:755
_ni_xcoder_params::color_transfer_characteristic
int color_transfer_characteristic
Definition: ni_device_api.h:2787
_ni_load_query::context_status
ni_context_query_t context_status[NI_MAX_CONTEXTS_PER_HW_INSTANCE]
Definition: ni_device_api.h:1221
_ni_sei_header
Definition: ni_device_api.h:345
_ni_custom_gop_params
Definition: ni_device_api.h:2057
PIC_TYPE_NIDR
@ PIC_TYPE_NIDR
Definition: ni_device_api.h:393
_ni_enc_quad_roi_custom_map::qp_info
uint8_t qp_info
Definition: ni_device_api.h:891
_ni_session_context::hwd_minor_offset
uint32_t hwd_minor_offset
Definition: ni_device_api.h:1539
_ni_gop_params::temporal_id
int temporal_id
Definition: ni_device_api.h:1971
NI_PIXEL_PLANAR_FORMAT_PLANAR
@ NI_PIXEL_PLANAR_FORMAT_PLANAR
Definition: ni_device_api.h:923
_ni_extended_dec_metadata::color_primaries
uint8_t color_primaries
Definition: ni_device_api.h:727
_ni_rc_min_max_qp::maxDeltaQp
int32_t maxDeltaQp
Definition: ni_device_api.h:710
_ni_frame::p_custom_sei_set
ni_custom_sei_set_t * p_custom_sei_set
Definition: ni_device_api.h:2700
ni_reconfig_min_max_qp
LIB_API 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.
Definition: ni_device_api.c:10339
NI_XCODER_FLUSH_STATE
@ NI_XCODER_FLUSH_STATE
Definition: ni_device_api.h:251
_ni_packet::avg_frame_qp
uint32_t avg_frame_qp
Definition: ni_device_api.h:2873
_ni_pkt_info::psnr_v
double psnr_v
Definition: ni_device_api.h:1099
_ni_session_context::hwd_chunk_offset
uint32_t hwd_chunk_offset
Definition: ni_device_api.h:1540
_ni_frame_pool_type
_ni_frame_pool_type
Frame pool type.
Definition: ni_device_api.h:491
_ni_session_context::aio_context
ni_aio_context_t aio_context
Definition: ni_device_api.h:1728
_ni_session_context::roi_avg_qp
uint32_t roi_avg_qp
Definition: ni_device_api.h:1499
_ni_device_capability::device_is_xcoder
uint8_t device_is_xcoder
Definition: ni_device_api.h:1157
ni_frameclone_desc_t
struct _ni_frameclone_desc ni_frameclone_desc_t
_ni_split_context_t::w
int w[3]
Definition: ni_device_api.h:1736
NI_BITRATE_RECONFIG_FILE_MAX_LINES
#define NI_BITRATE_RECONFIG_FILE_MAX_LINES
Max number of lines supported for the bitrate reconfig file.
Definition: ni_device_api.h:475
_ni_session_context::force_low_delay_cnt
uint32_t force_low_delay_cnt
Definition: ni_device_api.h:1702
_ni_xcoder_params::p_first_frame
ni_frame_t * p_first_frame
Definition: ni_device_api.h:2806
_ni_session_context::p_master_display_meta_data
void * p_master_display_meta_data
Definition: ni_device_api.h:1434
_ni_session_context::last_frame_offset
uint64_t last_frame_offset
Definition: ni_device_api.h:1457
_ni_encoder_cfg_params::forced_header_enable
int forced_header_enable
Definition: ni_device_api.h:2272
_ni_hw_capability::max_number_of_contexts
uint8_t max_number_of_contexts
Definition: ni_device_api.h:1139
_ni_session_context::session_statistic
ni_session_statistic_t session_statistic
Definition: ni_device_api.h:1652
_ni_network_layer_params_t::memory_type
uint32_t memory_type
Definition: ni_device_api.h:1351
_ni_encoder_cfg_params::spatial_layers_ref_base_layer
int spatial_layers_ref_base_layer
Definition: ni_device_api.h:2455
_ni_session_context::burst_control
int burst_control
Definition: ni_device_api.h:1617
_ni_extended_dec_metadata::rsvd3
uint64_t rsvd3
Definition: ni_device_api.h:735
_ni_session_context::async_mode
int async_mode
Definition: ni_device_api.h:1665
NI_FRAME_AUX_DATA_BITRATE
@ NI_FRAME_AUX_DATA_BITRATE
Definition: ni_device_api.h:537
_ni_encoder_change_params_t::videoFullRange
uint8_t videoFullRange
Definition: ni_device_api.h:1027
_ni_scaler_params_t::scaler_param_c
double scaler_param_c
Definition: ni_device_api.h:2592
_ni_scaler_input_params_t::output_format
int output_format
Definition: ni_device_api.h:2575
_ni_scaler_input_params_t::output_width
int32_t output_width
Definition: ni_device_api.h:2576
NI_CODEC_FORMAT_H265
@ NI_CODEC_FORMAT_H265
Definition: ni_device_api.h:914
_ni_dec_h265_vui_param::vui_num_units_in_tick
uint32_t vui_num_units_in_tick
Definition: ni_device_api.h:777
_ni_queue_node_t::p_prev
struct _ni_queue_node_t * p_prev
Definition: ni_device_api.h:1300
_ni_load_query::active_hwuploaders
uint32_t active_hwuploaders
Definition: ni_device_api.h:1215
ni_reconfig_intraprd
LIB_API ni_retcode_t ni_reconfig_intraprd(ni_session_context_t *p_ctx, int32_t intra_period)
Reconfigure intraPeriod dynamically during encoding.
Definition: ni_device_api.c:9997
_ni_frame::use_long_term_ref
uint8_t use_long_term_ref
Definition: ni_device_api.h:2648
_ni_session_context::last_access_time
volatile uint64_t last_access_time
Definition: ni_device_api.h:1685
NI_H265_USERDATA_FLAG_RESERVED_9
@ NI_H265_USERDATA_FLAG_RESERVED_9
Definition: ni_device_api.h:370
_ni_instance_mgr_detail_status::ui32AvgBitRate
uint32_t ui32AvgBitRate
Definition: ni_device_api.h:1238
_ni_packet::data_len
uint32_t data_len
Definition: ni_device_api.h:2868