41 #define NI_LOGAN_DATA_FORMAT_VIDEO_PACKET 0
42 #define NI_LOGAN_DATA_FORMAT_YUV_FRAME 1
43 #define NI_LOGAN_DATA_FORMAT_Y_FRAME 2
44 #define NI_LOGAN_DATA_FORMAT_CB_FRAME 3
45 #define NI_LOGAN_DATA_FORMAT_CR_FRAME 4
47 #define NI_LOGAN_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
50 #define LOGAN_AV_CODEC_DEFAULT_BITRATE 200 * 1000
52 #define NI_LOGAN_MAX_GOP_NUM 8
54 #define NI_LOGAN_MAX_VUI_SIZE 32
56 #define LOGAN_FRAME_CHUNK_INDEX_SIZE 4096
57 #define NI_LOGAN_SIGNATURE_SIZE 256
59 #define NI_LOGAN_MAX_RESOLUTION_WIDTH 8192
60 #define NI_LOGAN_MAX_RESOLUTION_HEIGHT 8192
61 #define NI_LOGAN_MAX_RESOLUTION_AREA 8192*5120
63 #define NI_LOGAN_FRAME_LITTLE_ENDIAN 0
64 #define NI_LOGAN_FRAME_BIG_ENDIAN 1
66 #define NI_LOGAN_INVALID_SESSION_ID (-1)
67 #define NI_LOGAN_INVALID_HW_FRAME_IDX (-3)
68 #define NI_LOGAN_INVALID_HW_META_IDX (-5)
70 #define NI_LOGAN_MAX_BITRATE 700000000
71 #define NI_LOGAN_MIN_BITRATE 64000
73 #define NI_LOGAN_MAX_INTRA_PERIOD 1024
74 #define NI_LOGAN_MIN_INTRA_PERIOD 0
77 #define NI_LOGAN_MAX_SESSION_OPEN_RETRIES 20
78 #define NI_LOGAN_SESSION_OPEN_RETRY_INTERVAL_US 200
80 #define NI_LOGAN_MAX_ENC_SESSION_OPEN_QUERY_RETRIES 3000
81 #define NI_LOGAN_ENC_SESSION_OPEN_RETRY_INTERVAL_US 1000
83 #define NI_LOGAN_MAX_ENC_SESSION_WRITE_QUERY_RETRIES 2000
84 #define NI_LOGAN_MAX_ENC_SESSION_READ_QUERY_RETRIES 3000
86 #define NI_LOGAN_MAX_DEC_SESSION_WRITE_QUERY_RETRIES 100
87 #define NI_LOGAN_MAX_DEC_SESSION_READ_QUERY_RETRIES 3000
88 #define NI_LOGAN_MAX_DEC_SESSION_READ_QUERY_EOS_RETRIES 15000
90 #define NI_LOGAN_MAX_SESSION_CLOSE_RETRIES 10
91 #define NI_LOGAN_SESSION_CLOSE_RETRY_INTERVAL_US 500000
93 #define NI_LOGAN_RETRY_INTERVAL_100US 100
94 #define NI_LOGAN_RETRY_INTERVAL_200US 200
97 #define NI_LOGAN_NUM_OF_PIXELS_720P (1280*720)
100 #define NI_LOGAN_MAX_WIDTH 8192
101 #define NI_LOGAN_MIN_WIDTH 256
102 #define NI_LOGAN_MAX_HEIGHT 8192
103 #define NI_LOGAN_MIN_HEIGHT 128
106 #define NI_LOGAN_PARAM_MAX_WIDTH 8192
107 #define NI_LOGAN_PARAM_MIN_WIDTH 32
108 #define NI_LOGAN_PARAM_MAX_HEIGHT 8192
109 #define NI_LOGAN_PARAM_MIN_HEIGHT 32
111 #define NI_LOGAN_MAX_GOP_SIZE 8
112 #define NI_LOGAN_MIN_GOP_SIZE 1
113 #define NI_LOGAN_MAX_GOP_PRESET_IDX 9
114 #define NI_LOGAN_MIN_GOP_PRESET_IDX 0
115 #define NI_LOGAN_MAX_DECODING_REFRESH_TYPE 2
116 #define NI_LOGAN_MIN_DECODING_REFRESH_TYPE 0
117 #define NI_LOGAN_DEFAULT_CU_SIZE_MODE 7
118 #define NI_LOGAN_MAX_DYNAMIC_MERGE 1
119 #define NI_LOGAN_MIN_DYNAMIC_MERGE 0
120 #define NI_LOGAN_MAX_USE_RECOMMENDED_ENC_PARAMS 3
121 #define NI_LOGAN_MIN_USE_RECOMMENDED_ENC_PARAMS 0
122 #define NI_LOGAN_MAX_MAX_NUM_MERGE 3
123 #define NI_LOGAN_MIN_MAX_NUM_MERGE 0
124 #define NI_LOGAN_MAX_INTRA_QP 51
125 #define NI_LOGAN_MIN_INTRA_QP 0
126 #define NI_LOGAN_DEFAULT_INTRA_QP 22
127 #define NI_LOGAN_INTRA_QP_RANGE 25
128 #define NI_LOGAN_QP_MID_POINT 26
129 #define NI_LOGAN_MAX_MAX_QP 51
130 #define NI_LOGAN_MIN_MAX_QP 0
131 #define NI_LOGAN_MAX_MIN_QP 51
132 #define NI_LOGAN_MIN_MIN_QP 0
133 #define NI_LOGAN_DEFAULT_MAX_QP 51
134 #define NI_LOGAN_DEFAULT_MIN_QP 8
135 #define NI_LOGAN_MAX_MAX_DELTA_QP 51
136 #define NI_LOGAN_MIN_MAX_DELTA_QP 0
137 #define NI_LOGAN_DEFAULT_MAX_DELTA_QP 10
138 #define NI_LOGAN_MAX_BIN 1
139 #define NI_LOGAN_MIN_BIN 0
140 #define NI_LOGAN_MAX_NUM_SESSIONS 32
141 #define NI_LOGAN_MAX_CRF 51
142 #define NI_LOGAN_MIN_CRF 0
143 #define NI_LOGAN_MIN_INTRA_REFRESH_MIN_PERIOD 0
144 #define NI_LOGAN_MAX_INTRA_REFRESH_MIN_PERIOD 8191
145 #define NI_LOGAN_MAX_KEEP_ALIVE_TIMEOUT 100
146 #define NI_LOGAN_MIN_KEEP_ALIVE_TIMEOUT 1
147 #define NI_LOGAN_DEFAULT_KEEP_ALIVE_TIMEOUT 3
148 #define NI_LOGAN_MIN_CUSTOM_SEI_PASSTHRU (-1)
149 #define NI_LOGAN_MAX_CUSTOM_SEI_PASSTHRU 1000
150 #define NI_LOGAN_MIN_PRIORITY 0
151 #define NI_LOGAN_MAX_PRIORITY 1
152 #define NI_LOGAN_DISABLE_USR_DATA_SEI_PASSTHRU 0
153 #define NI_LOGAN_ENABLE_USR_DATA_SEI_PASSTHRU 1
154 #define NI_LOGAN_DISABLE_CHECK_PACKET 0
155 #define NI_LOGAN_ENABLE_CHECK_PACKET 1
157 #define RC_SUCCESS true
158 #define RC_ERROR false
160 #define NI_LOGAN_INVALID_HWID (-1)
162 #define BEST_LOAD_STR "bestload"
163 #define BEST_DEVICE_INST_STR "bestinst"
164 #define BEST_MODEL_LOAD_STR "bestmodelload"
165 #define LIST_DEVICES_STR "list"
166 #define LOGAN_MAX_CHAR_IN_DEVICE_NAME 32
168 #define LOGAN_MAX_NUM_FRAMEPOOL_HWAVFRAME 64
169 #define LOGAN_MAX_FIFO_CAPACITY 120
172 #define NI_LOGAN_VPU_CEIL(_data, _align) (((_data)+(_align-1))&~(_align-1))
173 #define NI_LOGAN_VPU_ALIGN4(_x) (((_x)+0x03)&~0x03)
174 #define NI_LOGAN_VPU_ALIGN8(_x) (((_x)+0x07)&~0x07)
175 #define NI_LOGAN_VPU_ALIGN16(_x) (((_x)+0x0f)&~0x0f)
176 #define NI_LOGAN_VPU_ALIGN32(_x) (((_x)+0x1f)&~0x1f)
177 #define NI_LOGAN_VPU_ALIGN64(_x) (((_x)+0x3f)&~0x3f)
178 #define NI_LOGAN_VPU_ALIGN128(_x) (((_x)+0x7f)&~0x7f)
179 #define NI_LOGAN_VPU_ALIGN256(_x) (((_x)+0xff)&~0xff)
180 #define NI_LOGAN_VPU_ALIGN512(_x) (((_x)+0x1ff)&~0x1ff)
181 #define NI_LOGAN_VPU_ALIGN2048(_x) (((_x)+0x7ff)&~0x7ff)
182 #define NI_LOGAN_VPU_ALIGN4096(_x) (((_x)+0xfff)&~0xfff)
183 #define NI_LOGAN_VPU_ALIGN16384(_x) (((_x)+0x3fff)&~0x3fff)
237 #define NI_LOGAN_ENC_MAX_SEI_BUF_SIZE NI_LOGAN_VPU_ALIGN16(1024)
238 #define NI_LOGAN_MAX_SEI_ENTRIES 32
240 #define NI_LOGAN_MAX_SEI_DATA NI_LOGAN_VPU_ALIGN8(NI_LOGAN_MAX_SEI_ENTRIES * sizeof(ni_logan_sei_user_data_entry_t) + 1024)
242 #define NI_LOGAN_DEC_MAX_CC_BUF_SIZE 93
246 #define NI_CC_SEI_BYTE0 0xB5
247 #define NI_CC_SEI_BYTE1 0x00
248 #define NI_CC_SEI_BYTE2 0x31
249 #define NI_CC_SEI_BYTE3 0x47
250 #define NI_CC_SEI_BYTE4 0x41
251 #define NI_CC_SEI_BYTE5 0x39
252 #define NI_CC_SEI_BYTE6 0x34
253 #define NI_CC_SEI_BYTE7 0x03
255 #define NI_HDR10P_SEI_BYTE0 0xB5
256 #define NI_HDR10P_SEI_BYTE1 0x00
257 #define NI_HDR10P_SEI_BYTE2 0x3c
258 #define NI_HDR10P_SEI_BYTE3 0x00
259 #define NI_HDR10P_SEI_BYTE4 0x01
260 #define NI_HDR10P_SEI_BYTE5 0x04
261 #define NI_HDR10P_SEI_BYTE6 0x00
263 #define NI_CC_SEI_HDR_HEVC_LEN 18
264 #define NI_HDR10P_SEI_HDR_HEVC_LEN 9
265 #define NI_HDR10P_SEI_HDR_H264_LEN 8
266 #define NI_CC_SEI_HDR_H264_LEN 17
267 #define NI_CC_SEI_TRAILER_LEN 2
268 #define NI_RBSP_TRAILING_BITS_LEN 1
270 #define NI_MAX_NUM_AUX_DATA_PER_FRAME 16
347 return a.
num / (double) a.
den;
1115 #define NI_LOGAN_ENC_GOP_PARAMS_G0_PIC_TYPE "g0picType"
1116 #define NI_LOGAN_ENC_GOP_PARAMS_G0_POC_OFFSET "g0pocOffset"
1117 #define NI_LOGAN_ENC_GOP_PARAMS_G0_PIC_QP "g0picQp"
1118 #define NI_LOGAN_ENC_GOP_PARAMS_G0_NUM_REF_PIC_L0 "g0numRefPicL0"
1119 #define NI_LOGAN_ENC_GOP_PARAMS_G0_NUM_REF_POC_L0 "g0refPocL0"
1120 #define NI_LOGAN_ENC_GOP_PARAMS_G0_NUM_REF_POC_L1 "g0refPocL1"
1121 #define NI_LOGAN_ENC_GOP_PARAMS_G0_TEMPORAL_ID "g0temporalId"
1123 #define NI_LOGAN_ENC_GOP_PARAMS_G1_PIC_TYPE "g1picType"
1124 #define NI_LOGAN_ENC_GOP_PARAMS_G1_POC_OFFSET "g1pocOffset"
1125 #define NI_LOGAN_ENC_GOP_PARAMS_G1_PIC_QP "g1picQp"
1126 #define NI_LOGAN_ENC_GOP_PARAMS_G1_NUM_REF_PIC_L0 "g1numRefPicL0"
1127 #define NI_LOGAN_ENC_GOP_PARAMS_G1_NUM_REF_POC_L0 "g1refPocL0"
1128 #define NI_LOGAN_ENC_GOP_PARAMS_G1_NUM_REF_POC_L1 "g1refPocL1"
1129 #define NI_LOGAN_ENC_GOP_PARAMS_G1_TEMPORAL_ID "g1temporalId"
1131 #define NI_LOGAN_ENC_GOP_PARAMS_G2_PIC_TYPE "g2picType"
1132 #define NI_LOGAN_ENC_GOP_PARAMS_G2_POC_OFFSET "g2pocOffset"
1133 #define NI_LOGAN_ENC_GOP_PARAMS_G2_PIC_QP "g2picQp"
1134 #define NI_LOGAN_ENC_GOP_PARAMS_G2_NUM_REF_PIC_L0 "g2numRefPicL0"
1135 #define NI_LOGAN_ENC_GOP_PARAMS_G2_NUM_REF_POC_L0 "g2refPocL0"
1136 #define NI_LOGAN_ENC_GOP_PARAMS_G2_NUM_REF_POC_L1 "g2refPocL1"
1137 #define NI_LOGAN_ENC_GOP_PARAMS_G2_TEMPORAL_ID "g2temporalId"
1139 #define NI_LOGAN_ENC_GOP_PARAMS_G3_PIC_TYPE "g3picType"
1140 #define NI_LOGAN_ENC_GOP_PARAMS_G3_POC_OFFSET "g3pocOffset"
1141 #define NI_LOGAN_ENC_GOP_PARAMS_G3_PIC_QP "g3picQp"
1142 #define NI_LOGAN_ENC_GOP_PARAMS_G3_NUM_REF_PIC_L0 "g3numRefPicL0"
1143 #define NI_LOGAN_ENC_GOP_PARAMS_G3_NUM_REF_POC_L0 "g3refPocL0"
1144 #define NI_LOGAN_ENC_GOP_PARAMS_G3_NUM_REF_POC_L1 "g3refPocL1"
1145 #define NI_LOGAN_ENC_GOP_PARAMS_G3_TEMPORAL_ID "g3temporalId"
1147 #define NI_LOGAN_ENC_GOP_PARAMS_G4_PIC_TYPE "g4picType"
1148 #define NI_LOGAN_ENC_GOP_PARAMS_G4_POC_OFFSET "g4pocOffset"
1149 #define NI_LOGAN_ENC_GOP_PARAMS_G4_PIC_QP "g4picQp"
1150 #define NI_LOGAN_ENC_GOP_PARAMS_G4_NUM_REF_PIC_L0 "g4numRefPicL0"
1151 #define NI_LOGAN_ENC_GOP_PARAMS_G4_NUM_REF_POC_L0 "g4refPocL0"
1152 #define NI_LOGAN_ENC_GOP_PARAMS_G4_NUM_REF_POC_L1 "g4refPocL1"
1153 #define NI_LOGAN_ENC_GOP_PARAMS_G4_TEMPORAL_ID "g4temporalId"
1155 #define NI_LOGAN_ENC_GOP_PARAMS_G5_PIC_TYPE "g5picType"
1156 #define NI_LOGAN_ENC_GOP_PARAMS_G5_POC_OFFSET "g5pocOffset"
1157 #define NI_LOGAN_ENC_GOP_PARAMS_G5_PIC_QP "g5picQp"
1158 #define NI_LOGAN_ENC_GOP_PARAMS_G5_NUM_REF_PIC_L0 "g5numRefPicL0"
1159 #define NI_LOGAN_ENC_GOP_PARAMS_G5_NUM_REF_POC_L0 "g5refPocL0"
1160 #define NI_LOGAN_ENC_GOP_PARAMS_G5_NUM_REF_POC_L1 "g5refPocL1"
1161 #define NI_LOGAN_ENC_GOP_PARAMS_G5_TEMPORAL_ID "g5temporalId"
1163 #define NI_LOGAN_ENC_GOP_PARAMS_G6_PIC_TYPE "g6picType"
1164 #define NI_LOGAN_ENC_GOP_PARAMS_G6_POC_OFFSET "g6pocOffset"
1165 #define NI_LOGAN_ENC_GOP_PARAMS_G6_PIC_QP "g6picQp"
1166 #define NI_LOGAN_ENC_GOP_PARAMS_G6_NUM_REF_PIC_L0 "g6numRefPicL0"
1167 #define NI_LOGAN_ENC_GOP_PARAMS_G6_NUM_REF_POC_L0 "g6refPocL0"
1168 #define NI_LOGAN_ENC_GOP_PARAMS_G6_NUM_REF_POC_L1 "g6refPocL1"
1169 #define NI_LOGAN_ENC_GOP_PARAMS_G6_TEMPORAL_ID "g6temporalId"
1171 #define NI_LOGAN_ENC_GOP_PARAMS_G7_PIC_TYPE "g7picType"
1172 #define NI_LOGAN_ENC_GOP_PARAMS_G7_POC_OFFSET "g7pocOffset"
1173 #define NI_LOGAN_ENC_GOP_PARAMS_G7_PIC_QP "g7picQp"
1174 #define NI_LOGAN_ENC_GOP_PARAMS_G7_NUM_REF_PIC_L0 "g7numRefPicL0"
1175 #define NI_LOGAN_ENC_GOP_PARAMS_G7_NUM_REF_POC_L0 "g7refPocL0"
1176 #define NI_LOGAN_ENC_GOP_PARAMS_G7_NUM_REF_POC_L1 "g7refPocL1"
1177 #define NI_LOGAN_ENC_GOP_PARAMS_G7_TEMPORAL_ID "g7temporalId"
1190 #define NI_LOGAN_ENC_GOP_PARAMS_CUSTOM_GOP_SIZE "customGopSize"
1198 #define NI_LOGAN_ENC_REPEAT_HEADERS_FIRST_IDR 0
1199 #define NI_LOGAN_ENC_REPEAT_HEADERS_ALL_KEY_FRAMES 1
1200 #define NI_LOGAN_ENC_REPEAT_HEADERS_ALL_I_FRAMES 2
1203 #define NI_LOGAN_ENC_PARAM_BITRATE "bitrate"
1204 #define NI_LOGAN_ENC_PARAM_RECONF_DEMO_MODE "ReconfDemoMode"
1205 #define NI_LOGAN_ENC_PARAM_RECONF_FILE "ReconfFile"
1206 #define NI_LOGAN_ENC_PARAM_ROI_DEMO_MODE "RoiDemoMode"
1207 #define NI_LOGAN_ENC_PARAM_CACHE_ROI "cacheRoi"
1208 #define NI_LOGAN_ENC_PARAM_FORCE_PIC_QP_DEMO_MODE "ForcePicQpDemoMode"
1209 #define NI_LOGAN_ENC_PARAM_GEN_HDRS "GenHdrs"
1210 #define NI_LOGAN_ENC_PARAM_PADDING "padding"
1211 #define NI_LOGAN_ENC_PARAM_FORCE_FRAME_TYPE "forceFrameType"
1212 #define NI_LOGAN_ENC_PARAM_PROFILE "profile"
1213 #define NI_LOGAN_ENC_PARAM_LEVEL "level"
1214 #define NI_LOGAN_ENC_PARAM_HIGH_TIER "high-tier"
1215 #define NI_LOGAN_ENC_PARAM_LOG_LEVEL "log-level"
1216 #define NI_LOGAN_ENC_PARAM_LOG "log"
1217 #define NI_LOGAN_ENC_PARAM_GOP_PRESET_IDX "gopPresetIdx"
1218 #define NI_LOGAN_ENC_PARAM_LOW_DELAY "lowDelay"
1219 #define NI_LOGAN_ENC_PARAM_USE_RECOMMENDED_ENC_PARAMS "useRecommendEncParam"
1220 #define NI_LOGAN_ENC_PARAM_USE_LOW_DELAY_POC_TYPE "useLowDelayPocType"
1221 #define NI_LOGAN_ENC_PARAM_ENABLE_RATE_CONTROL "RcEnable"
1222 #define NI_LOGAN_ENC_PARAM_ENABLE_CU_LEVEL_RATE_CONTROL "cuLevelRCEnable"
1223 #define NI_LOGAN_ENC_PARAM_ENABLE_HVS_QP "hvsQPEnable"
1224 #define NI_LOGAN_ENC_PARAM_ENABLE_HVS_QP_SCALE "hvsQpScaleEnable"
1225 #define NI_LOGAN_ENC_PARAM_HVS_QP_SCALE "hvsQpScale"
1226 #define NI_LOGAN_ENC_PARAM_MIN_QP "minQp"
1227 #define NI_LOGAN_ENC_PARAM_MAX_QP "maxQp"
1228 #define NI_LOGAN_ENC_PARAM_MAX_DELTA_QP "maxDeltaQp"
1229 #define NI_LOGAN_ENC_PARAM_RC_INIT_DELAY "RcInitDelay"
1230 #define NI_LOGAN_ENC_PARAM_FORCED_HEADER_ENABLE "repeatHeaders"
1231 #define NI_LOGAN_ENC_PARAM_ROI_ENABLE "roiEnable"
1232 #define NI_LOGAN_ENC_PARAM_CONF_WIN_TOP "confWinTop"
1233 #define NI_LOGAN_ENC_PARAM_CONF_WIN_BOTTOM "confWinBot"
1234 #define NI_LOGAN_ENC_PARAM_CONF_WIN_LEFT "confWinLeft"
1235 #define NI_LOGAN_ENC_PARAM_CONF_WIN_RIGHT "confWinRight"
1236 #define NI_LOGAN_ENC_PARAM_INTRA_PERIOD "intraPeriod"
1237 #define NI_LOGAN_ENC_PARAM_TRANS_RATE "transRate"
1238 #define NI_LOGAN_ENC_PARAM_FRAME_RATE "frameRate"
1239 #define NI_LOGAN_ENC_PARAM_FRAME_RATE_DENOM "frameRateDenom"
1240 #define NI_LOGAN_ENC_PARAM_INTRA_QP "intraQP"
1241 #define NI_LOGAN_ENC_PARAM_DECODING_REFRESH_TYPE "decodingRefreshType"
1242 #define NI_LOGAN_ENC_PARAM_INTRA_REFRESH_RESET "intraRefreshResetOnForceIDR"
1243 #define NI_LOGAN_ENC_PARAM_CHROMA_QP_OffSET "chromaQpOffset"
1245 #define NI_LOGAN_ENC_PARAM_MAX_FRAME_SIZE "maxFrameSize"
1246 #define NI_LOGAN_ENC_PARAM_MAX_FRAME_SIZE_BITS "maxFrameSize-Bits"
1247 #define NI_LOGAN_ENC_PARAM_MAX_FRAME_SIZE_BYTES "maxFrameSize-Bytes"
1250 #define NI_LOGAN_ENC_PARAM_ENABLE_8X8_TRANSFORM "transform8x8Enable"
1251 #define NI_LOGAN_ENC_PARAM_AVC_SLICE_MODE "avcSliceMode"
1252 #define NI_LOGAN_ENC_PARAM_AVC_SLICE_ARG "avcSliceArg"
1253 #define NI_LOGAN_ENC_PARAM_ENTROPY_CODING_MODE "entropyCodingMode"
1254 #define NI_LOGAN_ENC_PARAM_INTRA_MB_REFRESH_MODE "intraMbRefreshMode"
1255 #define NI_LOGAN_ENC_PARAM_INTRA_MB_REFRESH_ARG "intraMbRefreshArg"
1257 #define NI_LOGAN_ENC_PARAM_SLICE_MODE "sliceMode"
1258 #define NI_LOGAN_ENC_PARAM_SLICE_ARG "sliceArg"
1259 #define NI_LOGAN_ENC_PARAM_INTRA_REFRESH_MODE "intraRefreshMode"
1260 #define NI_LOGAN_ENC_PARAM_INTRA_REFRESH_ARG "intraRefreshArg"
1262 #define NI_LOGAN_ENC_PARAM_ENABLE_MB_LEVEL_RC "mbLevelRcEnable"
1263 #define NI_LOGAN_ENC_PARAM_PREFERRED_TRANSFER_CHARACTERISTICS "prefTRC"
1265 #define NI_LOGAN_ENC_PARAM_DOLBY_VISION_PROFILE "dolbyVisionProfile"
1266 #define NI_LOGAN_ENC_PARAM_HRD_ENABLE "hrdEnable"
1267 #define NI_LOGAN_ENC_PARAM_ENABLE_AUD "enableAUD"
1268 #define NI_LOGAN_ENC_PARAM_CRF "crf"
1269 #define NI_LOGAN_ENC_PARAM_CRF_IP_RATIO "ipRatio"
1270 #define NI_LOGAN_ENC_PARAM_CRF_PB_RATIO "pbRatio"
1271 #define NI_LOGAN_ENC_PARAM_CBR "cbr"
1272 #define NI_LOGAN_ENC_PARAM_INTRA_REFRESH_MIN_PERIOD "intraRefreshMinPeriod"
1273 #define NI_LOGAN_ENC_PARAM_LONG_TERM_REFERENCE_ENABLE "longTermReferenceEnable"
1275 #define NI_LOGAN_ENC_PARAM_STRICT_TIMEOUT_MODE "strictTimeout"
1276 #define NI_LOGAN_ENC_PARAM_LOSSLESS_ENABLE "losslessEnable"
1277 #define NI_LOGAN_ENC_PARAM_FLUSH_GOP "flushGop"
1279 #define NI_LOGAN_ENC_PARAM_COLOR_PRIMARY "colorPri"
1280 #define NI_LOGAN_ENC_PARAM_COLOR_TRANSFER_CHARACTERISTIC "colorTrc"
1281 #define NI_LOGAN_ENC_PARAM_COLOR_SPACE "colorSpc"
1283 #define NI_LOGAN_ENC_PARAM_SAR_NUM "sarNum"
1284 #define NI_LOGAN_ENC_PARAM_SAR_DENOM "sarDenom"
1286 #define NI_LOGAN_ENC_PARAM_VIDEO_FULL_RANGE_FLAG "videoFullRangeFlag"
1288 #define NI_LOGAN_ENC_PARAM_ENABLE_VFR "enableVFR"
1290 #define NI_LOGAN_ENC_PARAM_ENABLE_EXPLICIT_RPL "enableExplicitRPL"
1292 #define NI_LOGAN_ENC_PARAM_DISABLE_TIMING_INFO "disableTimingInfo"
1295 #define NI_LOGAN_DEC_PARAM_USR_DATA_SEI_PASSTHRU "enableUserDataSeiPassthru"
1296 #define NI_LOGAN_DEC_PARAM_CHECK_PACKET "checkPacket"
1297 #define NI_LOGAN_DEC_PARAM_CUSTOM_SEI_PASSTHRU "customSeiPassthru"
1298 #define NI_LOGAN_DEC_PARAM_LOW_DELAY "lowDelay"
1299 #define NI_LOGAN_DEC_PARAM_LOW_DELAY_MODE "lowDelayMode"
1300 #define NI_LOGAN_DEC_PARAM_ENABLE_FOLLOW_IFRAME "enableFollowIFrame"
1301 #define NI_LOGAN_DEC_PARAM_ENABLE_VUI_INFO_PASSTHRU "enableVuiInfoPassthru"
1304 #define NI_LOGAN_DEC_PARAM_SAVE_PKT "savePkt"
1307 #define NI_LOGAN_SET_HIGH_PRIORITY "setHighPriority"
1308 #define NI_LOGAN_KEEP_ALIVE_TIMEOUT "keepAliveTimeout"
1568 #define NI_LOGAN_DEC_PARAM_OUT "out"
1673 #define NI_LOGAN_XCODER_PRESET_NAMES_ARRAY_LEN 3
1674 #define NI_LOGAN_XCODER_LOG_NAMES_ARRAY_LEN 7
1676 #define NI_LOGAN_XCODER_PRESET_NAME_DEFAULT "default"
1677 #define NI_LOGAN_XCODER_PRESET_NAME_CUSTOM "custom"
1679 #define NI_LOGAN_XCODER_LOG_NAME_NONE "none"
1680 #define NI_LOGAN_XCODER_LOG_NAME_ERROR "error"
1681 #define NI_LOGAN_XCODER_LOG_NAME_WARN "warning"
1682 #define NI_LOGAN_XCODER_LOG_NAME_INFO "info"
1683 #define NI_LOGAN_XCODER_LOG_NAME_DEBUG "debug"
1684 #define NI_LOGAN_XCODER_LOG_NAME_FULL "full"
1757 LIB_API ni_device_handle_t
ni_logan_device_open(
const char* dev, uint32_t * p_max_io_size_out);
1994 int hw_frame_count);
2127 const void*
const p_source,
2297 const uint8_t* raw_data,
2380 uint32_t pool_size, uint32_t p2p_pool);
2499 uint8_t *p_data, uint32_t len,
2521 int width,
int height,
int bit_depth,
int src_endian);
2558 ni_device_handle_t device_handle,
2559 ni_event_handle_t event_handle);
2587 int rectangle_width,
2588 int rectangle_height,
2670 const int linesize[],
2671 const int dst_stride[],
2672 const int src_height[],
2673 const int dst_height[],
2674 const int bit_depth_factor,
2675 const uint8_t * data[]);
Common NETINT definitions used by all modules.
#define NI_LOGAN_LIGHT_LEVEL_DATA_SZ
#define NI_LOGAN_MAX_NUM_DATA_POINTERS
#define NI_LOGAN_MAX_CONTEXTS_PER_HW_INSTANCE
#define NI_LOGAN_MAX_CUSTOM_SEI_CNT
#define NI_LOGAN_MAX_CUSTOM_SEI_SZ
#define NI_LOGAN_MAX_FORCE_FRAME_TABLE_SIZE
#define NI_LOGAN_MAX_DEVICES_PER_HW_INSTANCE
#define NI_LOGAN_MDCV_LUM_DATA_SZ
struct _ni_logan_rational ni_rational_t
ni_logan_retcode_t ni_logan_uploader_frame_buffer_unlock(ni_logan_session_context_t *p_upl_ctx, ni_logan_frame_t *p_frame)
Unlock a hardware P2P frame after encoding.
struct _ni_hrd_params ni_hrd_params_t
struct _ni_logan_enc_mastering_display_colour_volume ni_logan_enc_mastering_display_colour_volume_t
encoded payload format of HDR SEI mastering display colour volume
LIB_API ni_aux_data_t * ni_logan_frame_new_aux_data(ni_logan_frame_t *frame, ni_aux_data_type_t type, int data_size)
Add a new auxiliary data to a frame.
struct _ni_logan_all_custom_sei ni_logan_all_custom_sei_t
LIB_API ni_event_handle_t ni_logan_create_event()
Create event and returnes event handle if successful.
enum _ni_logan_codec_hw_actions ni_logan_codec_hw_actions_t
This is an enumeration for hw actions.
LIB_API int ni_logan_device_session_hwdl(ni_logan_session_context_t *p_ctx, ni_logan_session_data_io_t *p_data, ni_logan_hwframe_surface_t *hwdesc)
Reads data from hw descriptor from decoder output buffer.
enum _ni_logan_session_run_state ni_logan_session_run_state_t
Session running state type.
struct _ni_logan_dec_h265_vui_param ni_logan_dec_h265_vui_param_t
decoded payload format of H.265 VUI
struct _ni_logan_context_query ni_logan_context_query_t
LIB_API ni_logan_retcode_t ni_logan_frame_buffer_alloc(ni_logan_frame_t *pframe, int video_width, int video_height, int alignment, int metadata_flag, int factor, int hw_frame_count)
Allocate preliminary memory for the frame buffer for encoding based on provided parameters....
LIB_API ni_logan_retcode_t ni_logan_decoder_frame_buffer_free(ni_logan_frame_t *pframe)
Free decoder frame buffer that was previously allocated with ni_logan_decoder_frame_buffer_alloc,...
struct _ni_logan_custom_gop_params ni_logan_custom_gop_params_t
LIB_API ni_logan_retcode_t ni_logan_frame_zerocopy_check(const int width, const int height, const int linesize[], const int dst_stride[], const int src_height[], const int dst_height[], const int bit_depth_factor, const uint8_t *data[])
Check if incoming frame is encoder zero copy compatible or not.
LIB_API ni_logan_retcode_t ni_logan_device_dec_session_save_hdrs(ni_logan_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 ...
LIB_API int ni_logan_get_num_ref_frame_of_gop_structure(ni_logan_encoder_params_t *p_params)
Get GOP's number of reference frames.
struct _ni_logan_encoder_change_params_t ni_logan_encoder_change_params_t
This is a data structure for encoding parameters that have changed.
_ni_logan_frame_aux_data_type
@ NI_FRAME_AUX_DATA_MASTERING_DISPLAY_METADATA
@ NI_FRAME_AUX_DATA_BITRATE
@ NI_FRAME_AUX_DATA_VUI_INFO
@ NI_FRAME_AUX_DATA_UDU_SEI
@ NI_FRAME_AUX_DATA_MIN_MAX_QP
@ NI_FRAME_AUX_DATA_HDR_PLUS
@ NI_FRAME_AUX_DATA_CUSTOM_SEI
@ NI_FRAME_AUX_DATA_A53_CC
@ NI_FRAME_AUX_DATA_CONTENT_LIGHT_LEVEL
@ NI_FRAME_AUX_DATA_REGIONS_OF_INTEREST
@ NI_FRAME_AUX_DATA_LONG_TERM_REF
struct _ni_logan_aux_data ni_aux_data_t
#define LOGAN_MAX_CHAR_IN_DEVICE_NAME
struct _ni_logan_hwframe_surface ni_logan_hwframe_surface_t
#define NI_CC_SEI_TRAILER_LEN
struct _ni_logan_session_data_io ni_logan_session_data_io_t
LIB_API ni_logan_session_context_t * ni_logan_device_session_context_alloc_init(void)
Allocate and initialize a new ni_logan_session_context_t struct.
ni_logan_retcode_t ni_logan_uploader_frame_buffer_lock(ni_logan_session_context_t *p_upl_ctx, ni_logan_frame_t *p_frame)
Lock a hardware P2P frame prior to encoding.
struct _ni_logan_encoder_input_params ni_logan_encoder_input_params_t
LIB_API ni_logan_retcode_t ni_logan_device_session_open(ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
Opens a new device session depending on the device_type parameter If device_type is NI_LOGAN_DEVICE_T...
int ni_logan_device_session_acquire(ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame)
Acquire a P2P frame buffer from the hwupload session.
LIB_API ni_logan_retcode_t ni_logan_device_handle_map_SN(ni_device_handle_t device_handle, ni_logan_serial_num_t *p_serial_num)
Queries device Serial number.
struct _ni_logan_serial_num_t ni_logan_serial_num_t
#define NI_LOGAN_MAX_VUI_SIZE
LIB_API ni_logan_retcode_t ni_logan_encoder_init_default_params(ni_logan_encoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height)
Initialize default encoder parameters.
LIB_API void ni_logan_decoder_frame_buffer_pool_return_buf(ni_logan_buf_t *buf, ni_logan_buf_pool_t *p_buffer_pool)
Return a memory buffer to memory buffer pool, for a decoder frame.
LIB_API ni_logan_retcode_t ni_logan_encoder_frame_buffer_alloc(ni_logan_frame_t *pframe, int video_width, int video_height, int linesize[], int alignment, int extra_len, int factor)
Allocate memory for the frame buffer for encoding based on given parameters, taking into account pic ...
struct _ni_logan_queue_node_t ni_logan_queue_node_t
LIB_API void ni_logan_device_close(ni_device_handle_t dev)
Closes device and releases resources.
_ni_logan_reconfig
This is an enumeration for encoder reconfiguration test settings.
@ LOGAN_XCODER_TEST_RECONF_BR
@ LOGAN_XCODER_TEST_RECONF_VUI_HRD
@ LOGAN_XCODER_TEST_RECONF_CRF
@ LOGAN_XCODER_TEST_RECONF_RC
@ LOGAN_XCODER_TEST_RECONF_INTRAPRD
@ LOGAN_XCODER_TEST_RECONF_RC_MIN_MAX_QP
@ LOGAN_XCODER_TEST_RECONF_OFF
@ LOGAN_XCODER_TEST_RECONF_LONG_TERM_REF
LIB_API ni_aux_data_t * ni_logan_frame_get_aux_data(const ni_logan_frame_t *frame, ni_aux_data_type_t type)
Retrieve from the frame auxiliary data of a given type if exists.
LIB_API int ni_logan_device_session_read(ni_logan_session_context_t *p_ctx, ni_logan_session_data_io_t *p_data, ni_logan_device_type_t device_type)
Reads data the device If device_type is NI_LOGAN_DEVICE_TYPE_DECODER reads data packet from decoder I...
_ni_logan_codec_hw_actions
This is an enumeration for hw actions.
@ NI_LOGAN_CODEC_HW_UPLOAD
@ NI_LOGAN_CODEC_HW_ENABLE
@ NI_LOGAN_CODEC_HW_DOWNLOAD
LIB_API ni_logan_retcode_t ni_logan_device_dec_session_flush(ni_logan_session_context_t *p_ctx)
Flush a decoder session to get ready to continue decoding. Note: this is different from ni_logan_devi...
LIB_API int ni_logan_device_session_read_hwdesc(ni_logan_session_context_t *p_ctx, ni_logan_session_data_io_t *p_data)
Reads data from the device device_type should be NI_LOGAN_DEVICE_TYPE_DECODER, and reads data hwdesc ...
#define NI_CC_SEI_HDR_H264_LEN
LIB_API ni_aux_data_t * ni_logan_frame_new_aux_data_from_raw_data(ni_logan_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.
LIB_API const char * ni_logan_err2str(int err)
Convert error numver into error messages.
struct _ni_logan_fifo_buffer_t ni_logan_fifo_buffer_t
struct _ni_logan_frame ni_logan_frame_t
LIB_API ni_logan_retcode_t ni_logan_device_session_copy(ni_logan_session_context_t *src_p_ctx, ni_logan_session_context_t *dst_p_ctx)
Copies existing decoding session params for hw frame usage.
ni_logan_h265_sei_user_data_type_t
@ NI_LOGAN_H265_USERDATA_FLAG_RESERVED_0
@ NI_LOGAN_H265_USER_DATA_FLAG_FILM_GRAIN_CHARACTERISTICS_INFO
@ NI_LOGAN_H265_USERDATA_FLAG_UNREGISTERED_SUF
@ NI_LOGAN_H265_USERDATA_FLAG_CHROMA_RESAMPLING_FILTER_HINT
@ NI_LOGAN_H265_USERDATA_FLAG_TONE_MAPPING_INFO
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_SUF_1
@ NI_LOGAN_H265_USERDATA_FLAG_MASTERING_COLOR_VOL
@ NI_LOGAN_H265_USERDATA_FLAG_VUI
@ NI_LOGAN_H265_USERDATA_FLAG_RESERVED_9
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_SUF_2
@ NI_LOGAN_H265_USERDATA_FLAG_UNREGISTERED_PRE
@ NI_LOGAN_H265_USERDATA_FLAG_KNEE_FUNCTION_INFO
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_PRE_2
@ NI_LOGAN_H265_USERDATA_FLAG_ALTERNATIVE_TRANSFER_CHARACTERISTICS
@ NI_LOGAN_H265_USERDATA_FLAG_PIC_TIMING
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_SUF
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_PRE_1
@ NI_LOGAN_H265_USER_DATA_FLAG_COLOUR_REMAPPING_INFO
@ NI_LOGAN_H265_USERDATA_FLAG_RESERVED_1
@ NI_LOGAN_H265_USERDATA_FLAG_ITU_T_T35_PRE
@ NI_LOGAN_H265_USER_DATA_FLAG_CONTENT_LIGHT_LEVEL_INFO
struct _ni_logan_encoder_params ni_logan_encoder_params_t
LIB_API ni_logan_retcode_t ni_logan_frame_buffer_free(ni_logan_frame_t *pframe)
Free frame buffer that was previously allocated with either ni_logan_frame_buffer_alloc or ni_logan_e...
_ni_logan_param_change_flags
This is an enumeration for encoder parameter change.
@ NI_LOGAN_SET_CHANGE_PARAM_VUI_HRD_PARAM
@ NI_LOGAN_SET_CHANGE_PARAM_CRF
@ NI_LOGAN_SET_CHANGE_PARAM_RDO
@ NI_LOGAN_SET_CHANGE_PARAM_CUSTOM_LAMBDA
@ NI_LOGAN_SET_CHANGE_PARAM_NR
@ NI_LOGAN_SET_CHANGE_PARAM_RC_BIT_RATIO_LAYER
@ NI_LOGAN_SET_CHANGE_PARAM_CUSTOM_MD
@ NI_LOGAN_SET_CHANGE_PARAM_RC2
@ NI_LOGAN_SET_CHANGE_PARAM_RC_TARGET_RATE
@ NI_LOGAN_SET_CHANGE_PARAM_PPS
@ NI_LOGAN_SET_CHANGE_PARAM_RC_MIN_MAX_QP
@ NI_LOGAN_SET_CHANGE_PARAM_BG
@ NI_LOGAN_SET_CHANGE_PARAM_DEPEND_SLICE
@ NI_LOGAN_SET_CHANGE_PARAM_INDEPEND_SLICE
@ NI_LOGAN_SET_CHANGE_PARAM_INTRA_PARAM
@ NI_LOGAN_SET_CHANGE_PARAM_RC
struct _ni_logan_decoder_params ni_logan_decoder_params_t
union _ni_logan_enc_hevc_roi_custom_map ni_logan_enc_hevc_roi_custom_map_t
encoder HEVC ROI custom map (1 CTU = 64bits)
LIB_API ni_logan_retcode_t ni_logan_frame_zerocopy_buffer_alloc(ni_logan_frame_t *pframe, int video_width, int video_height, int linesize[], int extra_len, int factor, uint8_t *buffer[])
Allocate memory for the frame buffer for encoding based on given parameters, taking into account pic ...
enum _ni_logan_param_change_flags ni_logan_param_change_flags_t
This is an enumeration for encoder parameter change.
_ni_logan_custom_sei_location
This is an enumeration for illustrating the custom SEI locations.
@ NI_LOGAN_CUSTOM_SEI_LOC_BEFORE_VCL
@ NI_LOGAN_CUSTOM_SEI_LOC_AFTER_VCL
struct _ni_logan_session_context ni_logan_session_context_t
struct _ni_logan_dec_mastering_display_colour_volume ni_logan_dec_mastering_display_colour_volume_t
decoded payload format of HDR SEI mastering display colour volume
LIB_API int ni_logan_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 allighment.
struct _ni_logan_load_query ni_logan_load_query_t
enum _ni_logan_reconfig ni_logan_reconfig_t
This is an enumeration for encoder reconfiguration test settings.
LIB_API ni_logan_retcode_t ni_logan_decode_buffer_free(ni_logan_hwframe_surface_t *surface, ni_device_handle_t device_handle, ni_event_handle_t event_handle)
POPULATE ME LATER.
LIB_API ni_logan_retcode_t ni_logan_decoder_frame_buffer_alloc(ni_logan_buf_pool_t *p_pool, ni_logan_frame_t *pframe, int alloc_mem, int video_width, int video_height, int alignment, int factor)
Allocate memory for decoder frame buffer based on provided parameters; the memory is retrieved from a...
LIB_API ni_logan_retcode_t ni_logan_encoder_params_set_value(ni_logan_encoder_params_t *p_params, const char *name, const char *value, ni_logan_session_context_t *ctx)
Set value referenced by name in encoder parameters structure.
struct _ni_logan_gop_params ni_logan_gop_params_t
LIB_API void ni_logan_device_session_context_clear(ni_logan_session_context_t *p_ctx)
Clear already allocated session context to all zeros buffer.
LIB_API ni_logan_retcode_t ni_logan_device_session_query(ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
Query session data from the device - Currently not implemented If device_type is NI_LOGAN_DEVICE_TYPE...
#define NI_HDR10P_SEI_HDR_H264_LEN
LIB_API ni_logan_retcode_t ni_logan_decoder_init_default_params(ni_logan_decoder_params_t *p_param, int fps_num, int fps_denom, long bit_rate, int width, int height)
Initialize default decoder parameters.
LIB_API void ni_logan_close_event(ni_event_handle_t event_handle)
Closes event and releases resources.
union _ni_logan_enc_avc_roi_custom_map ni_logan_enc_avc_roi_custom_map_t
encoder AVC ROI custom map (1 MB = 8bits)
struct _ni_logan_custom_sei ni_logan_custom_sei_t
custom sei payload passthrough
LIB_API ni_logan_retcode_t ni_logan_decoder_session_send_flush(ni_logan_session_context_t *p_ctx)
Sends a flush command to the decoder ni_logan_device_session_open()
struct _ni_logan_dec_win ni_logan_dec_win_t
@ LOGAN_PIC_TYPE_FORCE_IDR
struct _ni_logan_region_of_interest ni_region_of_interest_t
LIB_API ni_logan_retcode_t ni_logan_encoder_gop_params_set_value(ni_logan_encoder_params_t *p_params, const char *name, const char *value)
Set gop parameter value referenced by name in encoder parameters structure.
LIB_API void ni_logan_frame_wipe_aux_data(ni_logan_frame_t *frame)
Free and remove all auxiliary data from the frame.
LIB_API void ni_logan_frame_free_aux_data(ni_logan_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.
LIB_API ni_logan_retcode_t ni_logan_uploader_p2p_test_send(ni_logan_session_context_t *p_upl_ctx, uint8_t *p_data, uint32_t len, ni_logan_frame_t *p_hwframe)
Special P2P test API call. Copies YUV data from the software frame to the hardware P2P frame on the Q...
LIB_API ni_logan_retcode_t ni_logan_packet_buffer_free(ni_logan_packet_t *ppacket)
Free packet buffer that was previously allocated with either ni_logan_packet_buffer_alloc.
struct _ni_logan_buf_t ni_logan_buf_t
LIB_API const char *const g_logan_xcoder_log_names[NI_LOGAN_XCODER_LOG_NAMES_ARRAY_LEN]
#define NI_LOGAN_MAX_SEI_DATA
LIB_API ni_logan_retcode_t ni_logan_encoder_set_input_frame_format(ni_logan_session_context_t *p_enc_ctx, ni_logan_encoder_params_t *p_enc_params, int width, int height, int bit_depth, int src_endian)
Set the incoming frame format for the encoder.
struct _ni_logan_packet ni_logan_packet_t
LIB_API ni_logan_retcode_t ni_logan_frame_buffer_alloc_v4(ni_logan_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 width,...
LIB_API ni_logan_retcode_t ni_logan_device_session_flush(ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
Sends a flush command to the device ni_logan_device_session_open() If device_type is NI_LOGAN_DEVICE_...
LIB_API void ni_logan_device_session_context_free(ni_logan_session_context_t *p_ctx)
Frees previously allocated session context.
enum _ni_logan_frame_aux_data_type ni_aux_data_type_t
struct _ni_logan_hw_capability ni_logan_hw_capability_t
hardware capability type
LIB_API int ni_logan_get_num_reorder_of_gop_structure(ni_logan_encoder_params_t *p_params)
Get GOP's max number of reorder frames.
struct _ni_logan_content_light_level_info ni_logan_content_light_level_info_t
payload format of HDR SEI content light level info
LIB_API ni_device_handle_t ni_logan_device_open(const char *dev, uint32_t *p_max_io_size_out)
Opens device and returnes device device_handle if successful.
LIB_API void ni_logan_device_session_context_init(ni_logan_session_context_t *p_ctx)
Initialize already allocated session context to a known state.
LIB_API int ni_logan_device_session_write(ni_logan_session_context_t *p_ctx, ni_logan_session_data_io_t *p_data, ni_logan_device_type_t device_type)
Sends data the device If device_type is NI_LOGAN_DEVICE_TYPE_DECODER sends data packet to decoder If ...
#define NI_LOGAN_XCODER_PRESET_NAMES_ARRAY_LEN
LIB_API ni_logan_retcode_t is_logan_fw_rev_higher(ni_logan_session_context_t *p_ctx, int fw_api_fla, int fw_api_ver)
Check if logan firmware version is higher than expected api flavor and version.
struct _ni_logan_dec_h264_vui_param ni_logan_dec_h264_vui_param_t
decoded payload format of H.264 VUI
LIB_API ni_logan_retcode_t ni_logan_packet_buffer_alloc(ni_logan_packet_t *ppacket, int packet_size)
Allocate memory for the packet buffer based on provided packet size.
#define NI_HDR10P_SEI_HDR_HEVC_LEN
struct _ni_logan_sei_user_data_entry ni_logan_sei_user_data_entry_t
LIB_API int ni_logan_device_session_hwup(ni_logan_session_context_t *p_ctx, ni_logan_session_data_io_t *p_src_data, ni_logan_hwframe_surface_t *hwdesc)
Writes data and reads back hw descriptor from decoder output buffer.
LIB_API ni_logan_retcode_t ni_logan_device_alloc_frame(ni_logan_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_logan_device_type_t device_type)
Allocate a frame on the device based on provided parameters.
#define NI_LOGAN_MAX_GOP_NUM
_ni_logan_session_run_state
Session running state type.
@ LOGAN_SESSION_RUN_STATE_RESETTING
@ LOGAN_SESSION_RUN_STATE_QUEUED_FRAME_DRAINING
@ LOGAN_SESSION_RUN_STATE_SEQ_CHANGE_DRAINING
@ LOGAN_SESSION_RUN_STATE_NORMAL
LIB_API ni_logan_retcode_t ni_logan_decoder_params_set_value(ni_logan_decoder_params_t *p_params, const char *name, char *value)
Set value referenced by name in decoder parameters structure.
struct _ni_logan_long_term_ref ni_long_term_ref_t
LIB_API ni_logan_retcode_t ni_logan_frame_buffer_alloc_hwenc(ni_logan_frame_t *pframe, int video_width, int video_height, int extra_len)
Allocate memory for the frame buffer based on provided parameters taking into account pic line size a...
enum _ni_logan_codec_format ni_logan_codec_format_t
This is an enumeration for supported codec formats.
#define NI_MAX_NUM_AUX_DATA_PER_FRAME
LIB_API ni_logan_retcode_t ni_logan_device_capability_query(ni_device_handle_t device_handle, ni_logan_device_capability_t *p_cap)
Queries device and returns device capability structure.
struct _ni_logan_decoder_input_params ni_logan_decoder_input_params_t
struct _ni_logan_queue_buffer_pool_t ni_logan_queue_buffer_pool_t
LIB_API int ni_logan_device_session_init_framepool(ni_logan_session_context_t *p_ctx, uint32_t pool_size, uint32_t p2p_pool)
Sends frame pool setup info to device.
_ni_logan_codec_format
This is an enumeration for supported codec formats.
@ NI_LOGAN_CODEC_FORMAT_H265
@ NI_LOGAN_CODEC_FORMAT_H264
@ NI_LOGAN_PIX_FMT_YUV420P
@ NI_LOGAN_PIX_FMT_YUV420P10BE
@ NI_LOGAN_PIX_FMT_YUV420P10LE
@ NI_LOGAN_PIX_FMT_YUVJ420P
LIB_API ni_logan_retcode_t ni_logan_encoder_params_check(ni_logan_encoder_params_t *p_params, ni_logan_codec_format_t codec)
Validate relationship of some params in encoder parameters structure.
struct _ni_logan_device_capability ni_logan_device_capability_t
device capability type
struct _ni_logan_buf_pool_t ni_logan_buf_pool_t
struct _ni_logan_thread_arg_struct_t ni_logan_thread_arg_struct_t
enum _ni_logan_custom_sei_location ni_logan_custom_sei_location_t
This is an enumeration for illustrating the custom SEI locations.
LIB_API ni_logan_retcode_t ni_logan_device_session_close(ni_logan_session_context_t *p_ctx, int eos_recieved, ni_logan_device_type_t device_type)
Closes device session that was previously opened by calling ni_logan_device_session_open() If device_...
#define NI_LOGAN_XCODER_LOG_NAMES_ARRAY_LEN
LIB_API const char *const g_logan_xcoder_preset_names[NI_LOGAN_XCODER_PRESET_NAMES_ARRAY_LEN]
struct ni_logan_rc_min_max_qp ni_logan_rc_min_max_qp
#define NI_CC_SEI_HDR_HEVC_LEN
uint32_t initial_cpb_removal_delay_length_minus1
uint32_t au_cpb_removal_delay_minus1
uint32_t dpb_output_delay_length_minus1
uint32_t au_cpb_removal_delay_length_minus1
ni_logan_custom_sei_t ni_custom_sei[NI_LOGAN_MAX_CUSTOM_SEI_CNT]
ni_logan_buf_t * p_free_head
ni_logan_buf_t * p_free_tail
ni_logan_buf_t * p_used_head
ni_logan_buf_t * p_used_tail
uint32_t number_of_buffers
struct _ni_logan_buf_pool_t * pool
struct _ni_logan_buf_t * p_next
struct _ni_logan_buf_t * p_previous_buffer
struct _ni_logan_buf_t * p_prev
struct _ni_logan_buf_t * p_next_buffer
payload format of HDR SEI content light level info
uint16_t max_content_light_level
uint16_t max_pic_average_light_level
ni_logan_gop_params_t pic_param[NI_LOGAN_MAX_GOP_NUM]
custom sei payload passthrough
ni_logan_custom_sei_location_t custom_sei_loc
uint8_t custom_sei_data[NI_LOGAN_MAX_CUSTOM_SEI_SZ]
decoded payload format of H.264 VUI
int8_t max_num_reorder_frames
uint8_t overscan_appropriate_flag
int8_t chroma_sample_loc_type_bottom_field
uint8_t vui_timing_info_present_flag
int8_t log2_max_mv_length_horizontal
uint8_t vcl_hrd_parameters_present_flag
uint32_t vui_num_units_in_tick
uint8_t motion_vectors_over_pic_boundaries_flag
int8_t max_bits_per_mincu_denom
int8_t max_dec_frame_buffering
uint8_t aspect_ratio_info_present_flag
uint8_t low_delay_hrd_flag
uint8_t pic_struct_present_flag
int8_t chroma_sample_loc_type_top_field
uint8_t video_full_range_flag
int8_t max_bytes_per_pic_denom
uint8_t overscan_info_present_flag
int8_t log2_max_mv_length_vertical
uint8_t bitstream_restriction_flag
uint8_t chroma_loc_info_present_flag
uint8_t transfer_characteristics
uint8_t fixed_frame_rate_flag
uint8_t colour_description_present_flag
uint8_t nal_hrd_parameters_present_flag
uint8_t matrix_coefficients
uint8_t video_signal_type_present_flag
decoded payload format of H.265 VUI
uint8_t vui_poc_proportional_to_timing_flag
uint8_t restricted_ref_pic_lists_flag
uint8_t overscan_appropriate_flag
int8_t chroma_sample_loc_type_bottom_field
uint8_t vui_timing_info_present_flag
uint8_t default_display_window_flag
ni_logan_dec_win_t def_disp_win
int8_t log2_max_mv_length_horizontal
uint32_t vui_num_units_in_tick
uint8_t motion_vectors_over_pic_boundaries_flag
int8_t max_bits_per_mincu_denom
uint8_t aspect_ratio_info_present_flag
uint8_t vui_hrd_parameters_present_flag
int8_t chroma_sample_loc_type_top_field
uint8_t neutral_chroma_indication_flag
uint8_t video_full_range_flag
int8_t max_bytes_per_pic_denom
uint8_t overscan_info_present_flag
uint8_t tiles_fixed_structure_flag
int8_t log2_max_mv_length_vertical
uint8_t bitstream_restriction_flag
int16_t vui_num_ticks_poc_diff_one_minus1
uint8_t chroma_loc_info_present_flag
int8_t min_spatial_segmentation_idc
uint8_t transfer_characteristics
uint8_t colour_description_present_flag
uint8_t frame_field_info_present_flag
uint8_t matrix_coefficients
uint8_t video_signal_type_present_flag
decoded payload format of HDR SEI mastering display colour volume
uint32_t min_display_mastering_luminance
uint32_t max_display_mastering_luminance
uint32_t display_primaries_y[3]
uint32_t display_primaries_x[3]
ni_logan_decoder_input_params_t dec_input_params
uint8_t h265_encoders_cnt
uint8_t h264_encoders_cnt
uint8_t fw_commit_time[26]
uint8_t fw_commit_hash[41]
uint8_t fw_branch_name[256]
uint8_t h265_decoders_cnt
uint8_t h264_decoders_cnt
ni_logan_hw_capability_t xcoder_devices[NI_LOGAN_MAX_DEVICES_PER_HW_INSTANCE]
encoded payload format of HDR SEI mastering display colour volume
uint32_t min_display_mastering_luminance
uint32_t max_display_mastering_luminance
uint16_t display_primaries[3][2]
This is a data structure for encoding parameters that have changed.
int32_t crfPbRatioFraction
uint8_t vuiRbsp[NI_LOGAN_MAX_VUI_SIZE]
int32_t crfIpRatioFraction
uint32_t vuiDataSizeBytes
int force_pic_qp_demo_mode
ni_logan_encoder_input_params_t enc_input_params
uint8_t ui8VuiRbsp[NI_LOGAN_MAX_VUI_SIZE]
uint32_t ui32minIntraRefreshCycle
uint32_t ui32VuiDataSizeBytes
int use_low_delay_poc_type
uint32_t ui32VuiDataSizeBits
int color_transfer_characteristic
ni_logan_frame_t * p_first_frame
int enable_vui_info_passthru
uint32_t pos_num_units_in_tick
uint8_t ui8LastVuiRbsp[NI_LOGAN_MAX_VUI_SIZE]
int video_full_range_flag
uint32_t number_of_buffers
uint32_t number_of_buffers_used
unsigned int sei_hdr_mastering_display_color_vol_offset
uint32_t video_orig_height
unsigned int sei_hdr_content_light_level_info_offset
uint8_t preferred_characteristics_data_len
uint32_t vui_num_units_in_tick
uint8_t separate_metadata
unsigned int sei_hdr_plus_len
uint32_t data_len[NI_LOGAN_MAX_NUM_DATA_POINTERS]
unsigned int sei_hdr_plus_offset
unsigned int extra_data_len
uint32_t video_orig_width
unsigned int sei_total_len
unsigned int sei_cc_offset
unsigned int sei_user_data_unreg_len
ni_logan_pic_type_t ni_logan_pict_type
uint8_t use_cur_src_as_long_term_pic
ni_logan_codec_format_t src_codec
unsigned int sei_hdr_content_light_level_info_len
ni_aux_data_t * aux_data[NI_MAX_NUM_AUX_DATA_PER_FRAME]
void * p_data[NI_LOGAN_MAX_NUM_DATA_POINTERS]
unsigned int sei_hdr_mastering_display_color_vol_len
int video_full_range_flag
unsigned int sei_user_data_unreg_offset
uint8_t use_long_term_ref
unsigned int sei_alt_transfer_characteristics_len
unsigned int sei_alt_transfer_characteristics_offset
uint16_t min_video_height
uint16_t max_video_height
uint8_t max_number_of_contexts
int32_t device_handle_ext
ni_logan_context_query_t context_status[NI_LOGAN_MAX_CONTEXTS_PER_HW_INSTANCE]
uint32_t fw_video_mem_usage
uint8_t use_cur_src_as_long_term_pic
uint8_t use_long_term_ref
ni_logan_all_custom_sei_t * p_all_custom_sei
ni_logan_queue_node_t * p_used_head
ni_logan_queue_node_t * p_used_tail
ni_logan_queue_node_t * p_free_tail
ni_logan_queue_node_t * p_free_head
uint32_t number_of_buffers
struct _ni_logan_queue_node_t * p_previous_buffer
struct _ni_logan_queue_node_t * p_next_buffer
time_t checkout_timestamp
struct _ni_logan_queue_node_t * p_next
struct _ni_logan_queue_node_t * p_prev
uint8_t itu_t_t35_hdr10p_sei_hdr_hevc[NI_HDR10P_SEI_HDR_HEVC_LEN]
ni_logan_encoder_change_params_t * enc_change_params
int64_t pts_offsets[NI_LOGAN_FIFO_SZ]
ni_logan_load_query_t load_query
uint32_t count_frame_num_in_sec
uint8_t ui8_light_level_data[NI_LOGAN_LIGHT_LEVEL_DATA_SZ]
ni_event_handle_t thread_event_handle
uint16_t decoder_reorder_delay
uint8_t ui8_mdcv_max_min_lum_data[NI_LOGAN_MDCV_LUM_DATA_SZ]
uint64_t prev_read_frame_time
uint32_t set_high_priority
uint32_t keep_alive_timeout
uint8_t buf_lone_sei[NI_LOGAN_MAX_SEI_DATA]
uint32_t active_bit_depth
uint64_t codec_total_ticks
int mdcv_max_min_lum_data_len
ni_logan_enc_avc_roi_custom_map_t * avc_roi_map
ni_logan_serial_num_t d_serial_number
uint8_t preferred_characteristics_data
uint32_t ui32timing_scale
ni_device_handle_t sender_handle
ni_device_handle_t device_handle
int sei_hdr_content_light_level_info_len
uint64_t pkt_offsets_index_min[NI_LOGAN_FIFO_SZ]
uint32_t fps_change_detect_count
ni_logan_lat_meas_q_t * frame_time_q
int pts_correction_num_faulty_dts
int sei_hdr_mastering_display_color_vol_len
ni_device_handle_t auto_dl_handle
uint64_t pkt_offsets_index[NI_LOGAN_FIFO_SZ]
uint8_t sei_trailer[NI_CC_SEI_TRAILER_LEN]
int64_t enc_pts_list[NI_LOGAN_FIFO_SZ]
ni_logan_thread_arg_struct_t * keep_alive_thread_args
uint64_t codec_start_time
uint32_t prev_fps
Params used in VFR mode Start///.
int flags_array[NI_LOGAN_FIFO_SZ]
uint8_t itu_t_t35_cc_sei_hdr_hevc[NI_CC_SEI_HDR_HEVC_LEN]
ni_logan_session_run_state_t session_run_state
void * p_master_display_meta_data
ni_pthread_t keep_alive_thread
uint8_t itu_t_t35_cc_sei_hdr_h264[NI_CC_SEI_HDR_H264_LEN]
ni_event_handle_t event_handle
char blk_xcoder_name[LOGAN_MAX_CHAR_IN_DEVICE_NAME]
ni_device_handle_t blk_io_handle
ni_logan_enc_hevc_roi_custom_map_t * hevc_roi_map
ni_logan_queue_buffer_pool_t * buffer_pool
uint64_t force_frame_pkt_num
int64_t pts_correction_last_dts
uint32_t max_nvme_io_size
uint8_t composite_temperature
char stream_dir_name[128]
uint64_t frame_pkt_offset
Params used in VFR mode Done///.
void * p_dec_packet_inf_buf
uint32_t ui32num_unit_in_tick
ni_logan_buf_pool_t * dec_fme_buf_pool
int64_t pts_correction_last_pts
uint32_t last_change_framenum
int64_t force_frame_pts_table[NI_LOGAN_MAX_FORCE_FRAME_TABLE_SIZE]
uint64_t session_timestamp
uint8_t itu_t_t35_hdr10p_sei_hdr_h264[NI_HDR10P_SEI_HDR_H264_LEN]
int64_t last_dts_interval
char dev_xcoder[LOGAN_MAX_CHAR_IN_DEVICE_NAME]
uint32_t template_config_id
uint64_t decoder_drop_frame_num
ni_logan_instance_status_info_t session_stats
ni_region_of_interest_t * av_rois
uint32_t active_video_width
uint32_t active_video_height
ni_logan_all_custom_sei_t * pkt_custom_sei[NI_LOGAN_FIFO_SZ]
int pts_correction_num_faulty_pts
uint8_t * hevc_sub_ctu_roi_buf
char dev_xcoder_name[LOGAN_MAX_CHAR_IN_DEVICE_NAME]
ni_hrd_params_t hrd_params
uint32_t passed_time_in_timebase_unit
ni_logan_serial_num_t e_serial_number
uint32_t required_buf_size
union _ni_logan_session_data_io::@4 data
ni_event_handle_t thread_event_handle
uint32_t keep_alive_timeout
ni_device_handle_t device_handle
uint64_t session_timestamp
encoder AVC ROI custom map (1 MB = 8bits)
struct _ni_logan_enc_avc_roi_custom_map::@2 field
encoder HEVC ROI custom map (1 CTU = 64bits)
struct _ni_logan_enc_hevc_roi_custom_map::@1 field