libxcoder  5.2.0
ni_av_codec.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_av_codec.h
24  *
25  * \brief Audio/video related utility definitions
26  ******************************************************************************/
27 
28 #pragma once
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include "ni_device_api.h"
35 
36 // libxcoder API related definitions
37 
38 #define NI_NUM_PIXEL_ASPECT_RATIO 17
39 #define NI_NAL_VPS_BIT (0x01)
40 #define NI_NAL_SPS_BIT (0x01 << 1)
41 #define NI_NAL_PPS_BIT (0x01 << 2)
42 #define NI_GENERATE_ALL_NAL_HEADER_BIT (0x01 << 3)
43 static const ni_rational_t
44  ni_h264_pixel_aspect_list[NI_NUM_PIXEL_ASPECT_RATIO] = {
45  {0, 1}, {1, 1}, {12, 11}, {10, 11}, {16, 11}, {40, 33},
46  {24, 11}, {20, 11}, {32, 11}, {80, 33}, {18, 11}, {15, 11},
47  {64, 33}, {160, 99}, {4, 3}, {3, 2}, {2, 1},
48 };
49 
50 #define NI_SEI_TYPE_PPU_RECONFIG 206
51 typedef enum _ni_h264_sei_type_t
52 {
53  NI_H264_SEI_TYPE_BUFFERING_PERIOD = 0, // buffering period (H.264, D.1.1)
54  NI_H264_SEI_TYPE_PIC_TIMING = 1, // picture timing
55  NI_H264_SEI_TYPE_PAN_SCAN_RECT = 2, // pan-scan rectangle
56  NI_H264_SEI_TYPE_FILLER_PAYLOAD = 3, // filler data
58  4, // registered user data as specified by Rec. ITU-T T.35
59  NI_H264_SEI_TYPE_USER_DATA_UNREGISTERED = 5, // unregistered user data
61  6, // recovery point (frame # to decoder sync)
62  NI_H264_SEI_TYPE_FRAME_PACKING = 45, // frame packing arrangement
63  NI_H264_SEI_TYPE_DISPLAY_ORIENTATION = 47, // display orientation
64  NI_H264_SEI_TYPE_GREEN_METADATA = 56, // GreenMPEG information
66  137, // mastering display properties
67  NI_H264_SEI_TYPE_ALTERNATIVE_TRANSFER = 147, // alternative transfer
69 
72 {
91 
94 typedef enum _ni_color_primaries
95 {
102  NI_COL_PRI_BT470BG = 5,
114  NI_COL_PRI_JEDEC_P22 = 22,
118 
122 {
124  NI_COL_TRC_BT709 = 1, //< also ITU-R BT1361
128  4, //< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
129  NI_COL_TRC_GAMMA28 = 5, //< also ITU-R BT470BG
131  6, //< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
133  NI_COL_TRC_LINEAR = 8, //< "Linear transfer characteristics"
135  9, //< "Logarithmic transfer characteristic (100:1 range)"
137  10, //< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
138  NI_COL_TRC_IEC61966_2_4 = 11, //< IEC 61966-2-4
139  NI_COL_TRC_BT1361_ECG = 12, //< ITU-R BT1361 Extended Colour Gamut
140  NI_COL_TRC_IEC61966_2_1 = 13, //< IEC 61966-2-1 (sRGB or sYCC)
141  NI_COL_TRC_BT2020_10 = 14, //< ITU-R BT2020 for 10-bit system
142  NI_COL_TRC_BT2020_12 = 15, //< ITU-R BT2020 for 12-bit system
144  16, //< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
146  NI_COL_TRC_SMPTE428 = 17, //< SMPTE ST 428-1
149  18, //< ARIB STD-B67, known as "Hybrid log-gamma"
150  NI_COL_TRC_NB //< Not part of ABI
152 
155 typedef enum _ni_color_space
156 {
158  0, //< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
160  1, //< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
164  4, //< FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
166  5, //< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
168  6, //< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
169  NI_COL_SPC_SMPTE240M = 7, //< functionally identical to above
171  8, //< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
173  NI_COL_SPC_BT2020_NCL = 9, //< ITU-R BT2020 non-constant luminance system
174  NI_COL_SPC_BT2020_CL = 10, //< ITU-R BT2020 constant luminance system
175  NI_COL_SPC_SMPTE2085 = 11, //< SMPTE 2085, Y'D'zD'x
177  12, //< Chromaticity-derived non-constant luminance system
179  13, //< Chromaticity-derived constant luminance system
180  NI_COL_SPC_ICTCP = 14, //< ITU-R BT.2100-0, ICtCp
181  NI_COL_SPC_NB //< Not part of ABI
183 
185 typedef struct _ni_hrd_params
186 {
194 
195 // struct describing HDR10 mastering display metadata
197 {
198  // CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
200 
201  // CIE 1931 xy chromaticity coords of white point.
203 
204  // Min luminance of mastering display (cd/m^2).
206 
207  // Max luminance of mastering display (cd/m^2).
209 
210  // Flag indicating whether the display primaries (and white point) are set.
212 
213  // Flag indicating whether the luminance (min_ and max_) have been set.
216 
217 #define MASTERING_DISP_CHROMA_DEN 50000 //denominator value to have 0.00002 units
218 #define MASTERING_DISP_LUMA_DEN 10000 //denominator value to have 0.0001 units
219 
220 // struct describing HDR10 Content light level
222 {
223  // Max content light level (cd/m^2).
224  uint16_t max_cll;
225 
226  // Max average light level per frame (cd/m^2).
227  uint16_t max_fall;
229 
230 // struct and enum for HDR10+
231 // Option for overlapping elliptical pixel selectors in an image.
233 {
237 
238 // struct that represents the percentile at a specific percentage in
239 // a distribution.
241 {
242  // The percentage value corresponding to a specific percentile linearized
243  // RGB value in the processing window in the scene. The value shall be in
244  // the range of 0 to 100, inclusive.
245  uint8_t percentage;
246 
247  // The linearized maxRGB value at a specific percentile in the processing
248  // window in the scene. The value shall be in the range of 0 to 1, inclusive
249  // and in multiples of 0.00001.
252 
253 // struct describing color transform parameters at a processing window in a
254 // dynamic metadata for SMPTE 2094-40.
256 {
257  // The relative x coordinate of the top left pixel of the processing
258  // window. The value shall be in the range of 0 and 1, inclusive and
259  // in multiples of 1/(width of Picture - 1). The value 1 corresponds
260  // to the absolute coordinate of width of Picture - 1. The value for
261  // first processing window shall be 0.
263 
264  // The relative y coordinate of the top left pixel of the processing
265  // window. The value shall be in the range of 0 and 1, inclusive and
266  // in multiples of 1/(height of Picture - 1). The value 1 corresponds
267  // to the absolute coordinate of height of Picture - 1. The value for
268  // first processing window shall be 0.
270 
271  // The relative x coordinate of the bottom right pixel of the processing
272  // window. The value shall be in the range of 0 and 1, inclusive and
273  // in multiples of 1/(width of Picture - 1). The value 1 corresponds
274  // to the absolute coordinate of width of Picture - 1. The value for
275  // first processing window shall be 1.
277 
278  // The relative y coordinate of the bottom right pixel of the processing
279  // window. The value shall be in the range of 0 and 1, inclusive and
280  // in multiples of 1/(height of Picture - 1). The value 1 corresponds
281  // to the absolute coordinate of height of Picture - 1. The value for
282  // first processing window shall be 1.
284 
285  // The x coordinate of the center position of the concentric internal and
286  // external ellipses of the elliptical pixel selector in the processing
287  // window. The value shall be in the range of 0 to (width of Picture - 1),
288  // inclusive and in multiples of 1 pixel.
290 
291  // The y coordinate of the center position of the concentric internal and
292  // external ellipses of the elliptical pixel selector in the processing
293  // window. The value shall be in the range of 0 to (height of Picture - 1),
294  // inclusive and in multiples of 1 pixel.
296 
297  // The clockwise rotation angle in degree of arc with respect to the
298  // positive direction of the x-axis of the concentric internal and external
299  // ellipses of the elliptical pixel selector in the processing window. The
300  // value shall be in the range of 0 to 180, inclusive and in multiples of
301  // 1.
302  uint8_t rotation_angle;
303 
304  // The semi-major axis value of the internal ellipse of the elliptical
305  // pixel selector in amount of pixels in the processing window. The value
306  // shall be in the range of 1 to 65535, inclusive and in multiples of 1
307  // pixel.
309 
310  // The semi-major axis value of the external ellipse of the elliptical
311  // pixel selector in amount of pixels in the processing window. The value
312  // shall not be less than semimajor_axis_internal_ellipse of the current
313  // processing window. The value shall be in the range of 1 to 65535,
314  // inclusive and in multiples of 1 pixel.
316 
317  // The semi-minor axis value of the external ellipse of the elliptical
318  // pixel selector in amount of pixels in the processing window. The value
319  // shall be in the range of 1 to 65535, inclusive and in multiples of 1
320  // pixel.
322 
323  // Overlap process option indicates one of the two methods of combining
324  // rendered pixels in the processing window in an image with at least one
325  // elliptical pixel selector. For overlapping elliptical pixel selectors
326  // in an image, overlap_process_option shall have the same value.
328 
329  // The maximum of the color components of linearized RGB values in the
330  // processing window in the scene. The values should be in the range of 0
331  // to 1, inclusive and in multiples of 0.00001. maxscl[ 0 ], maxscl[ 1 ],
332  // and maxscl[ 2 ] are corresponding to R, G, B color components
333  // respectively.
335 
336  // The average of linearized maxRGB values in the processing window in the
337  // scene. The value should be in the range of 0 to 1, inclusive and in
338  // multiples of 0.00001.
340 
341  // The number of linearized maxRGB values at given percentiles in the
342  // processing window in the scene. The maximum value shall be 15.
344 
345  // The linearized maxRGB values at given percentiles in the
346  // processing window in the scene.
348 
349  // The fraction of selected pixels in the image that contains the brightest
350  // pixel in the scene. The value shall be in the range of 0 to 1, inclusive
351  // and in multiples of 0.001.
353 
354  // This flag indicates that the metadata for the tone mapping function in
355  // the processing window is present (for value of 1).
357 
358  // The x coordinate of the separation point between the linear part and the
359  // curved part of the tone mapping function. The value shall be in the
360  // range of 0 to 1, excluding 0 and in multiples of 1/4095.
362 
363  // The y coordinate of the separation point between the linear part and the
364  // curved part of the tone mapping function. The value shall be in the
365  // range of 0 to 1, excluding 0 and in multiples of 1/4095.
367 
368  // The number of the intermediate anchor parameters of the tone mapping
369  // function in the processing window. The maximum value shall be 15.
371 
372  // The intermediate anchor parameters of the tone mapping function in the
373  // processing window in the scene. The values should be in the range of 0
374  // to 1, inclusive and in multiples of 1/1023.
376 
377  // This flag shall be equal to 0 in bitstreams conforming to this version
378  // of this Specification. Other values are reserved for future use.
380 
381  // The color saturation gain in the processing window in the scene. The
382  // value shall be in the range of 0 to 63/8, inclusive and in multiples of
383  // 1/8. The default value shall be 1.
386 
387 // struct representing dynamic metadata for color volume transform -
388 // application 4 of SMPTE 2094-40:2016 standard.
389 typedef struct _ni_dynamic_hdr_plus
390 {
391  // Country code by Rec. ITU-T T.35 Annex A. The value shall be 0xB5.
393 
394  // Application version in the application defining document in ST-2094
395  // suite. The value shall be set to 0.
397 
398  // The number of processing windows. The value shall be in the range
399  // of 1 to 3, inclusive.
400  uint8_t num_windows;
401 
402  // The color transform parameters for every processing window.
404 
405  // The nominal maximum display luminance of the targeted system display,
406  // in units of 0.0001 candelas per square metre. The value shall be in
407  // the range of 0 to 10000, inclusive.
409 
410  // This flag shall be equal to 0 in bit streams conforming to this version
411  // of this Specification. The value 1 is reserved for future use.
413 
414  // The number of rows in the targeted system_display_actual_peak_luminance
415  // array. The value shall be in the range of 2 to 25, inclusive.
417 
418  // The number of columns in the
419  // targeted_system_display_actual_peak_luminance array. The value shall be
420  // in the range of 2 to 25, inclusive.
422 
423  // The normalized actual peak luminance of the targeted system display. The
424  // values should be in the range of 0 to 1, inclusive and in multiples of
425  // 1/15.
427 
428  // This flag shall be equal to 0 in bitstreams conforming to this version
429  // of this Specification. The value 1 is reserved for future use.
431 
432  // The number of rows in the mastering_display_actual_peak_luminance array.
433  // The value shall be in the range of 2 to 25, inclusive.
435 
436  // The number of columns in the mastering_display_actual_peak_luminance
437  // array. The value shall be in the range of 2 to 25, inclusive.
439 
440  // The normalized actual peak luminance of the mastering display used for
441  // mastering the image essence. The values should be in the range of 0 to
442  // 1, inclusive and in multiples of 1/15.
445 
446 // All the fields in the following struct follow the same names and definition
447 // as set out by the H264/H265 specifications
448 typedef struct _ni_timecode
449 {
451  uint8_t counting_type;
455  uint16_t n_frames;
456  uint8_t seconds_flag; // ignored when full_timestamp_flag is set
457  uint8_t seconds_value;
458  uint8_t minutes_flag; // ignored when full_timestamp_flag is set
459  uint8_t minutes_value;
460  uint8_t hours_flag; // ignored when full_timestamp_flag is set
461  uint8_t hours_value;
464 } ni_timecode_t;
465 
466 // This is for decoder to reset the ppu value
467 // ppu_set_enable & (0x1 << idx) is which ppu[idx] enabled
468 // for examle, ppu_set_enable is 3, so ppu0 amd ppu1 is enabled
469 // 0x03 & (0x01 << 0) is not 0 and 0x03 &(0x01 << 1) is not 0
470 // 0: all ppu disabled. 1: ppu0 enabled. 2: ppu1 enabled
471 // 3: ppu0 ppu1 enabled. 4: ppu2 enabled. 5: ppu0 ppu2 enabled
472 // 6: ppu1 ppu enabled. 7: all ppu enabled others: disabled
473 typedef struct _ni_ppu_config{
474  uint8_t ppu_set_enable;
478 
479 /*!*****************************************************************************
480  * \brief Whether SEI should be sent together with this frame to encoder
481  *
482  * \param[in] p_enc_ctx encoder session context
483  * \param[in] pic_type frame type
484  * \param[in] p_param encoder parameters
485  *
486  * \return 1 if yes, 0 otherwise
487  ******************************************************************************/
489  ni_pic_type_t pic_type,
490  ni_xcoder_params_t *p_param);
491 
492 /*!*****************************************************************************
493  * \brief Retrieve auxiliary data (close caption, various SEI) associated with
494  * this frame that is returned by decoder, convert them to appropriate
495  * format and save them in the frame's auxiliary data storage for
496  * future use by encoding. Usually they would be sent together with
497  * this frame to encoder at encoding.
498  *
499  * \param[in/out] frame that is returned by decoder
500  *
501  * \return NONE
502  ******************************************************************************/
504 
505 /*!*****************************************************************************
506  * \brief Prepare auxiliary data that should be sent together with this frame
507  * to encoder based on the auxiliary data of the decoded frame.
508  *
509  * \param[in/out] p_enc_ctx encoder session context whose various SEI type
510  * header can be updated as the result of this function
511  * \param[out] p_enc_frame frame to be sent to encoder
512  * \param[in] p_dec_frame frame that is returned by decoder
513  * \param[in] codec_format H.264 or H.265
514  * \param[in] should_send_sei_with_frame if need to send a certain type of
515  * SEI with this frame
516  * \param[out] mdcv_data SEI for HDR mastering display color volume info
517  * \param[out] cll_data SEI for HDR content light level info
518  * \param[out] cc_data SEI for close caption
519  * \param[out] udu_data SEI for User data unregistered
520  * \param[out] hdrp_data SEI for HDR10+
521  *
522  * \return NONE
523  ******************************************************************************/
524 LIB_API void
525 ni_enc_prep_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame,
526  ni_frame_t *p_dec_frame, ni_codec_format_t codec_format,
527  int should_send_sei_with_frame, uint8_t *mdcv_data,
528  uint8_t *cll_data, uint8_t *cc_data, uint8_t *udu_data,
529  uint8_t *hdrp_data);
530 
531 /*!*****************************************************************************
532  * \brief Copy auxiliary data that should be sent together with this frame
533  * to encoder.
534  *
535  * \param[in] p_enc_ctx encoder session context
536  * \param[out] p_enc_frame frame to be sent to encoder
537  * \param[in] p_dec_frame frame returned by decoder
538  * \param[in] codec_format H.264 or H.265
539  * \param[in] mdcv_data SEI for HDR mastering display color volume info
540  * \param[in] cll_data SEI for HDR content light level info
541  * \param[in] cc_data SEI for close caption
542  * \param[in] udu_data SEI for User data unregistered
543  * \param[in] hdrp_data SEI for HDR10+
544  * \param[in] is_hwframe, must be 0 (sw frame) or 1 (hw frame)
545  * \param[in] is_semiplanar, must be 1 (semiplanar frame) or 0 (not)
546  *
547  * \return NONE
548  ******************************************************************************/
549 LIB_API void
550 ni_enc_copy_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame,
551  ni_frame_t *p_dec_frame, ni_codec_format_t codec_format,
552  const uint8_t *mdcv_data, const uint8_t *cll_data,
553  const uint8_t *cc_data, const uint8_t *udu_data,
554  const uint8_t *hdrp_data, int is_hwframe,
555  int is_semiplanar);
556 
557 /*!*****************************************************************************
558  * \brief Insert timecode data into picture timing SEI (H264) or time code SEI (H265)
559  *
560  * \note This function must be callled after all other aux data has been processed by
561  * ni_enc_prep_aux_data and ni_enc_copy_aux_data. Otherwise the timecode SEI data
562  * might be overwritten
563  *
564  * \param[in] p_enc_ctx encoder session context
565  * \param[out] p_enc_frame frame to be sent to encoder
566  * \param[in] p_timecode the timecode data to be written along with the frame
567  *
568  * \return NI_RETCODE_SUCCESS on success, NI_RETCODE_FAILURE on failure
569  ******************************************************************************/
570 LIB_API int ni_enc_insert_timecode(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame,
571  ni_timecode_t *p_timecode);
572 
573 /*!*****************************************************************************
574  * \brief Send an input data frame to the encoder with YUV data given in
575  * the inputs.
576  *
577  * For ideal performance memory should be 4k aligned. If it is not 4K aligned
578  * then a temporary 4k aligned memory will be used to copy data to and from
579  * when writing and reading. This will negatively impact performance.
580  *
581  * Any metadata to be sent with the frame should be attached to p_enc_frame
582  * as aux data (e.g. using ni_frame_new_aux_data()).
583  *
584  * \param[in] p_ctx Encoder session context
585  * \param[in] p_enc_frame Struct holding information about the frame
586  * to be sent to the encoder
587  * \param[in] p_yuv_buffer Caller allocated buffer holding YUV data
588  * for the frame
589  *
590  * \return On success
591  * Total number of bytes written
592  * On failure
593  * NI_RETCODE_INVALID_PARAM
594  * NI_RETCODE_ERROR_MEM_ALOC
595  * NI_RETCODE_ERROR_NVME_CMD_FAILED
596  * NI_RETCODE_ERROR_INVALID_SESSION
597  *****************************************************************************/
599  ni_frame_t *p_enc_frame,
600  uint8_t *p_yuv_buffer);
601 
602 /*!******************************************************************************
603  * \brief Extract custom sei payload data from pkt_data,
604  * and save it to ni_packet_t
605  *
606  * \param uint8_t *pkt_data - FFmpeg AVPacket data
607  * \param int pkt_size - packet size
608  * \param long index - pkt data index of custom sei first byte after SEI type
609  * \param ni_packet_t *p_packet - libxcoder internal packet
610  * \param uint8_t sei_type - type of SEI
611  * \param int vcl_found - whether got vcl in the pkt data, 1 means got
612  *
613  * \return - 0 on success, non-0 on failure
614  ********************************************************************************/
615 LIB_API int ni_extract_custom_sei(uint8_t *pkt_data, int pkt_size, long index,
616  ni_packet_t *p_packet, uint8_t sei_type, int vcl_found);
617 
618 /*!******************************************************************************
619  * \brief Decode parse packet
620  *
621  * \param[in] p_session_ctx Pointer to a caller allocated
622  * ni_session_context_t struct
623  * \param[in] p_param Pointer to a caller allocated
624  * ni_xcoder_params_t struct
625  * \param[in] *data FFmpeg AVPacket data
626  * \param[in] size packet size
627  * \param[in] p_packet Pointer to a caller allocated
628  * ni_packet_t struct
629  * \param[in] low_delay FFmpeg lowdelay
630  * \param[in] codec_format enum ni_codec_format_t
631  * \param[in] pkt_nal_bitmap pkt_nal_bitmap
632  * \param[in] custom_sei_type custom_sei_type
633  * \param[in] *svct_skip_next_packet svct_skip_next_packet int*
634  * \param[in] *is_lone_sei_pkt is_lone_sei_pkt int*
635  *
636  * \return - 0 on success, non-0 on failure
637  ********************************************************************************/
639  ni_xcoder_params_t *p_param, uint8_t *data, int size,
640  ni_packet_t *p_packet, int low_delay, int codec_format,
641  int pkt_nal_bitmap, int custom_sei_type,
642  int *svct_skip_next_packet, int *is_lone_sei_pkt);
643 
644 /*!******************************************************************************
645  * \brief Expand frame form src frame
646  *
647  * \param[in] dst Pointer to a caller allocated ni_frame_t struct
648  * \param[in] src Pointer to a caller allocated ni_frame_t struct
649  * \param[in] dst_stride int dst_stride[]
650  * \param[in] raw_width frame width
651  * \param[in] raw_height frame height
652  * \param[in] ni_fmt ni_pix_fmt_t type for ni pix_fmt
653  * \param[in] nb_planes int nb_planes
654  *
655  * \return - 0 on success, NI_RETCODE_FAILURE on failure
656  ********************************************************************************/
657 LIB_API int ni_expand_frame(ni_frame_t *dst, ni_frame_t *src, int dst_stride[],
658  int raw_width, int raw_height, int ni_fmt, int nb_planes);
659 
660 /*!******************************************************************************
661  * \brief Reset decoder ppu resolution
662  *
663  * \param[in] p_session_ctx Pointer to a caller allocated
664  * ni_session_context_t struct
665  * \param[in] p_param Pointer to a caller allocated
666  * ni_xcoder_params_t struct
667  * \param[in] ppu_config Pointer to a caller allocated
668  * ni_ppu_config_t struct
669  *
670  * \return - 0 on success, NI_RETCODE_FAILURE on failure
671  ********************************************************************************/
673  ni_xcoder_params_t *p_param, ni_ppu_config_t *ppu_config);
674 #ifdef __cplusplus
675 }
676 #endif
_ni_ppu_config
Definition: ni_av_codec.h:473
NI_HDR_PLUS_OVERLAP_PROCESS_WEIGHTED_AVERAGING
@ NI_HDR_PLUS_OVERLAP_PROCESS_WEIGHTED_AVERAGING
Definition: ni_av_codec.h:234
NI_COL_PRI_SMPTE431
@ NI_COL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: ni_av_codec.h:112
_ni_hdr_plus_color_transform_params::center_of_ellipse_y
uint16_t center_of_ellipse_y
Definition: ni_av_codec.h:295
NI_COL_TRC_BT2020_12
@ NI_COL_TRC_BT2020_12
Definition: ni_av_codec.h:142
_ni_mastering_display_metadata::max_luminance
ni_rational_t max_luminance
Definition: ni_av_codec.h:208
NI_COL_TRC_BT1361_ECG
@ NI_COL_TRC_BT1361_ECG
Definition: ni_av_codec.h:139
NI_H264_SEI_PIC_STRUCT_BOTTOM_FIELD
@ NI_H264_SEI_PIC_STRUCT_BOTTOM_FIELD
bottom field
Definition: ni_av_codec.h:75
_ni_hrd_params::au_cpb_removal_delay_minus1
uint32_t au_cpb_removal_delay_minus1
Definition: ni_av_codec.h:192
_ni_timecode::nuit_field_based_flag
uint8_t nuit_field_based_flag
Definition: ni_av_codec.h:450
_ni_timecode::seconds_flag
uint8_t seconds_flag
Definition: ni_av_codec.h:456
_ni_dynamic_hdr_plus::mastering_display_actual_peak_luminance
ni_rational_t mastering_display_actual_peak_luminance[25][25]
Definition: ni_av_codec.h:443
_ni_timecode::discontinuity_flag
uint8_t discontinuity_flag
Definition: ni_av_codec.h:453
ni_timecode_t
struct _ni_timecode ni_timecode_t
_ni_dynamic_hdr_plus::targeted_system_display_actual_peak_luminance
ni_rational_t targeted_system_display_actual_peak_luminance[25][25]
Definition: ni_av_codec.h:426
NI_COL_SPC_SMPTE170M
@ NI_COL_SPC_SMPTE170M
Definition: ni_av_codec.h:167
_ni_timecode::minutes_flag
uint8_t minutes_flag
Definition: ni_av_codec.h:458
NI_COL_TRC_SMPTE2084
@ NI_COL_TRC_SMPTE2084
Definition: ni_av_codec.h:143
_ni_dynamic_hdr_plus::targeted_system_display_maximum_luminance
ni_rational_t targeted_system_display_maximum_luminance
Definition: ni_av_codec.h:408
NI_COL_TRC_SMPTEST428_1
@ NI_COL_TRC_SMPTEST428_1
Definition: ni_av_codec.h:147
_ni_hdr_plus_color_transform_params::fraction_bright_pixels
ni_rational_t fraction_bright_pixels
Definition: ni_av_codec.h:352
_ni_timecode::cnt_dropped_flag
uint8_t cnt_dropped_flag
Definition: ni_av_codec.h:454
NI_COL_TRC_SMPTE170M
@ NI_COL_TRC_SMPTE170M
Definition: ni_av_codec.h:130
NI_COL_TRC_LOG
@ NI_COL_TRC_LOG
Definition: ni_av_codec.h:134
_ni_hdr_plus_color_transform_params::maxscl
ni_rational_t maxscl[3]
Definition: ni_av_codec.h:334
NI_COL_PRI_BT709
@ NI_COL_PRI_BT709
Definition: ni_av_codec.h:97
NI_H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP
@ NI_H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP
Definition: ni_av_codec.h:80
_ni_hdr_plus_color_transform_params::distribution_maxrgb
ni_hdr_plus_percentile_t distribution_maxrgb[15]
Definition: ni_av_codec.h:347
_ni_dynamic_hdr_plus::num_windows
uint8_t num_windows
Definition: ni_av_codec.h:400
NI_H264_SEI_TYPE_PAN_SCAN_RECT
@ NI_H264_SEI_TYPE_PAN_SCAN_RECT
Definition: ni_av_codec.h:55
NI_H264_SEI_PIC_STRUCT_BOTTOM_TOP
@ NI_H264_SEI_PIC_STRUCT_BOTTOM_TOP
Definition: ni_av_codec.h:78
cll_data
uint8_t cll_data[NI_MAX_SEI_DATA]
Definition: ni_quadra_enc_api.c:1546
ni_enc_prep_aux_data
LIB_API void ni_enc_prep_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, int should_send_sei_with_frame, uint8_t *mdcv_data, uint8_t *cll_data, uint8_t *cc_data, uint8_t *udu_data, uint8_t *hdrp_data)
Prepare auxiliary data that should be sent together with this frame to encoder based on the auxiliary...
Definition: ni_av_codec.c:858
_ni_dynamic_hdr_plus::itu_t_t35_country_code
uint8_t itu_t_t35_country_code
Definition: ni_av_codec.h:392
_ni_timecode::full_timestamp_flag
uint8_t full_timestamp_flag
Definition: ni_av_codec.h:452
_ni_mastering_display_metadata::has_primaries
int has_primaries
Definition: ni_av_codec.h:211
_ni_mastering_display_metadata::min_luminance
ni_rational_t min_luminance
Definition: ni_av_codec.h:205
NI_COL_PRI_BT2020
@ NI_COL_PRI_BT2020
ITU-R BT2020.
Definition: ni_av_codec.h:109
_ni_content_light_level::max_fall
uint16_t max_fall
Definition: ni_av_codec.h:227
ni_enc_copy_aux_data
LIB_API void ni_enc_copy_aux_data(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_frame_t *p_dec_frame, ni_codec_format_t codec_format, const uint8_t *mdcv_data, const uint8_t *cll_data, const uint8_t *cc_data, const uint8_t *udu_data, const uint8_t *hdrp_data, int is_hwframe, int is_semiplanar)
Copy auxiliary data that should be sent together with this frame to encoder.
Definition: ni_av_codec.c:2267
_ni_dynamic_hdr_plus
Definition: ni_av_codec.h:389
ni_color_space_t
enum _ni_color_space ni_color_space_t
_ni_timecode::hours_value
uint8_t hours_value
Definition: ni_av_codec.h:461
ni_hdr_plus_percentile_t
struct _ni_hdr_plus_percentile ni_hdr_plus_percentile_t
_ni_hdr_plus_color_transform_params::rotation_angle
uint8_t rotation_angle
Definition: ni_av_codec.h:302
_ni_color_transfer_characteristic
_ni_color_transfer_characteristic
Definition: ni_av_codec.h:121
_ni_hdr_plus_color_transform_params::center_of_ellipse_x
uint16_t center_of_ellipse_x
Definition: ni_av_codec.h:289
NI_COL_TRC_LINEAR
@ NI_COL_TRC_LINEAR
Definition: ni_av_codec.h:133
ni_dec_retrieve_aux_data
LIB_API void ni_dec_retrieve_aux_data(ni_frame_t *frame)
Retrieve auxiliary data (close caption, various SEI) associated with this frame that is returned by d...
Definition: ni_av_codec.c:237
NI_COL_PRI_SMPTE432
@ NI_COL_PRI_SMPTE432
Definition: ni_av_codec.h:113
_ni_hdr_plus_color_transform_params::color_saturation_weight
ni_rational_t color_saturation_weight
Definition: ni_av_codec.h:384
NI_COL_SPC_YCGCO
@ NI_COL_SPC_YCGCO
Definition: ni_av_codec.h:170
_ni_hrd_params::au_cpb_removal_delay_length_minus1
uint32_t au_cpb_removal_delay_length_minus1
Definition: ni_av_codec.h:187
NI_H264_SEI_PIC_STRUCT_FRAME
@ NI_H264_SEI_PIC_STRUCT_FRAME
frame
Definition: ni_av_codec.h:73
ni_pic_type_t
ni_pic_type_t
Definition: ni_device_api.h:382
_ni_color_primaries
_ni_color_primaries
Definition: ni_av_codec.h:94
_ni_hdr_plus_percentile
Definition: ni_av_codec.h:240
NI_COL_SPC_NB
@ NI_COL_SPC_NB
Definition: ni_av_codec.h:181
_ni_timecode::time_offset_length
uint8_t time_offset_length
Definition: ni_av_codec.h:462
ni_ppu_config_t
struct _ni_ppu_config ni_ppu_config_t
_ni_mastering_display_metadata
Definition: ni_av_codec.h:196
_ni_content_light_level
Definition: ni_av_codec.h:221
ni_dynamic_hdr_plus_t
struct _ni_dynamic_hdr_plus ni_dynamic_hdr_plus_t
NI_COL_PRI_SMPTE240M
@ NI_COL_PRI_SMPTE240M
functionally identical to above
Definition: ni_av_codec.h:107
NI_H264_SEI_TYPE_USER_DATA_UNREGISTERED
@ NI_H264_SEI_TYPE_USER_DATA_UNREGISTERED
Definition: ni_av_codec.h:59
NI_H264_SEI_TYPE_GREEN_METADATA
@ NI_H264_SEI_TYPE_GREEN_METADATA
Definition: ni_av_codec.h:64
_ni_hdr_plus_color_transform_params::window_lower_right_corner_x
ni_rational_t window_lower_right_corner_x
Definition: ni_av_codec.h:276
_ni_hrd_params
Definition: ni_av_codec.h:185
NI_COL_PRI_BT470M
@ NI_COL_PRI_BT470M
Definition: ni_av_codec.h:101
ni_dec_packet_parse
LIB_API int ni_dec_packet_parse(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, uint8_t *data, int size, ni_packet_t *p_packet, int low_delay, int codec_format, int pkt_nal_bitmap, int custom_sei_type, int *svct_skip_next_packet, int *is_lone_sei_pkt)
Decode parse packet.
Definition: ni_av_codec.c:3065
_ni_ppu_config::ppu_w
uint16_t ppu_w[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_av_codec.h:475
NI_COL_TRC_GAMMA28
@ NI_COL_TRC_GAMMA28
Definition: ni_av_codec.h:129
_ni_content_light_level::max_cll
uint16_t max_cll
Definition: ni_av_codec.h:224
ni_hdr_plus_overlap_process_option_t
enum _ni_hdr_plus_overlap_process_option ni_hdr_plus_overlap_process_option_t
NI_H264_SEI_TYPE_FRAME_PACKING
@ NI_H264_SEI_TYPE_FRAME_PACKING
Definition: ni_av_codec.h:62
NI_H264_SEI_TYPE_USER_DATA_REGISTERED
@ NI_H264_SEI_TYPE_USER_DATA_REGISTERED
Definition: ni_av_codec.h:57
NI_COL_SPC_BT2020_NCL
@ NI_COL_SPC_BT2020_NCL
Definition: ni_av_codec.h:173
NI_COL_SPC_BT2020_CL
@ NI_COL_SPC_BT2020_CL
Definition: ni_av_codec.h:174
_ni_hdr_plus_color_transform_params::window_upper_left_corner_y
ni_rational_t window_upper_left_corner_y
Definition: ni_av_codec.h:269
ni_h264_sei_pic_struct_t
enum _ni_h264_sei_pic_struct_t ni_h264_sei_pic_struct_t
NI_H264_SEI_PIC_STRUCT_FRAME_TRIPLING
@ NI_H264_SEI_PIC_STRUCT_FRAME_TRIPLING
frame tripling
Definition: ni_av_codec.h:89
udu_data
uint8_t udu_data[NI_MAX_SEI_DATA]
Definition: ni_quadra_enc_api.c:1548
_ni_rational
Definition: ni_device_api.h:598
_ni_timecode::time_offset_value
uint32_t time_offset_value
Definition: ni_av_codec.h:463
NI_COL_SPC_YCOCG
@ NI_COL_SPC_YCOCG
Definition: ni_av_codec.h:172
_ni_hdr_plus_percentile::percentile
ni_rational_t percentile
Definition: ni_av_codec.h:250
_ni_ppu_config::ppu_set_enable
uint8_t ppu_set_enable
Definition: ni_av_codec.h:474
_ni_timecode::hours_flag
uint8_t hours_flag
Definition: ni_av_codec.h:460
ni_color_primaries_t
enum _ni_color_primaries ni_color_primaries_t
NI_COL_TRC_NB
@ NI_COL_TRC_NB
Definition: ni_av_codec.h:150
NI_COL_TRC_GAMMA22
@ NI_COL_TRC_GAMMA22
Definition: ni_av_codec.h:127
_ni_hdr_plus_percentile::percentage
uint8_t percentage
Definition: ni_av_codec.h:245
NI_COL_SPC_FCC
@ NI_COL_SPC_FCC
Definition: ni_av_codec.h:163
NI_COL_SPC_SMPTE2085
@ NI_COL_SPC_SMPTE2085
Definition: ni_av_codec.h:175
ni_hrd_params_t
struct _ni_hrd_params ni_hrd_params_t
_ni_dynamic_hdr_plus::mastering_display_actual_peak_luminance_flag
uint8_t mastering_display_actual_peak_luminance_flag
Definition: ni_av_codec.h:430
NI_COL_SPC_CHROMA_DERIVED_NCL
@ NI_COL_SPC_CHROMA_DERIVED_NCL
Definition: ni_av_codec.h:176
NI_NUM_PIXEL_ASPECT_RATIO
#define NI_NUM_PIXEL_ASPECT_RATIO
Definition: ni_av_codec.h:38
_ni_mastering_display_metadata::has_luminance
int has_luminance
Definition: ni_av_codec.h:214
_ni_hdr_plus_color_transform_params::color_saturation_mapping_flag
uint8_t color_saturation_mapping_flag
Definition: ni_av_codec.h:379
_ni_h264_sei_pic_struct_t
_ni_h264_sei_pic_struct_t
Definition: ni_av_codec.h:71
_ni_hrd_params::dpb_output_delay_length_minus1
uint32_t dpb_output_delay_length_minus1
Definition: ni_av_codec.h:188
cc_data
uint8_t cc_data[NI_MAX_SEI_DATA]
Definition: ni_quadra_enc_api.c:1547
NI_COL_PRI_RESERVED
@ NI_COL_PRI_RESERVED
Definition: ni_av_codec.h:100
NI_COL_TRC_SMPTE240M
@ NI_COL_TRC_SMPTE240M
Definition: ni_av_codec.h:132
NI_COL_PRI_BT470BG
@ NI_COL_PRI_BT470BG
Definition: ni_av_codec.h:103
NI_COL_TRC_LOG_SQRT
@ NI_COL_TRC_LOG_SQRT
Definition: ni_av_codec.h:136
ni_enc_insert_timecode
LIB_API int ni_enc_insert_timecode(ni_session_context_t *p_enc_ctx, ni_frame_t *p_enc_frame, ni_timecode_t *p_timecode)
Insert timecode data into picture timing SEI (H264) or time code SEI (H265)
Definition: ni_av_codec.c:2453
ni_content_light_level_t
struct _ni_content_light_level ni_content_light_level_t
NI_COL_TRC_RESERVED
@ NI_COL_TRC_RESERVED
Definition: ni_av_codec.h:126
NI_COL_PRI_NB
@ NI_COL_PRI_NB
Not part of ABI.
Definition: ni_av_codec.h:116
NI_H264_SEI_PIC_STRUCT_TOP_BOTTOM
@ NI_H264_SEI_PIC_STRUCT_TOP_BOTTOM
Definition: ni_av_codec.h:76
_ni_hrd_params::bit_rate_unscale
int64_t bit_rate_unscale
Definition: ni_av_codec.h:190
NI_COL_SPC_CHROMA_DERIVED_CL
@ NI_COL_SPC_CHROMA_DERIVED_CL
Definition: ni_av_codec.h:178
NI_H264_SEI_PIC_STRUCT_FRAME_DOUBLING
@ NI_H264_SEI_PIC_STRUCT_FRAME_DOUBLING
frame doubling
Definition: ni_av_codec.h:88
_ni_packet
Definition: ni_device_api.h:2825
NI_H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM
@ NI_H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM
Definition: ni_av_codec.h:84
_ni_hdr_plus_color_transform_params::window_lower_right_corner_y
ni_rational_t window_lower_right_corner_y
Definition: ni_av_codec.h:283
_ni_hrd_params::cpb_size_unscale
int64_t cpb_size_unscale
Definition: ni_av_codec.h:191
NI_H264_SEI_TYPE_RECOVERY_POINT
@ NI_H264_SEI_TYPE_RECOVERY_POINT
Definition: ni_av_codec.h:60
ni_expand_frame
LIB_API int ni_expand_frame(ni_frame_t *dst, ni_frame_t *src, int dst_stride[], int raw_width, int raw_height, int ni_fmt, int nb_planes)
Expand frame form src frame.
Definition: ni_av_codec.c:3289
_ni_dynamic_hdr_plus::params
ni_hdr_plus_color_transform_params_t params[3]
Definition: ni_av_codec.h:403
NI_COL_TRC_UNSPECIFIED
@ NI_COL_TRC_UNSPECIFIED
Definition: ni_av_codec.h:125
_ni_session_context
Definition: ni_device_api.h:1408
NI_COL_SPC_RESERVED
@ NI_COL_SPC_RESERVED
Definition: ni_av_codec.h:162
_ni_timecode::n_frames
uint16_t n_frames
Definition: ni_av_codec.h:455
NI_COL_TRC_IEC61966_2_4
@ NI_COL_TRC_IEC61966_2_4
Definition: ni_av_codec.h:138
_ni_frame
Definition: ni_device_api.h:2601
_ni_timecode::minutes_value
uint8_t minutes_value
Definition: ni_av_codec.h:459
NI_HDR_PLUS_OVERLAP_PROCESS_LAYERING
@ NI_HDR_PLUS_OVERLAP_PROCESS_LAYERING
Definition: ni_av_codec.h:235
_ni_hrd_params::initial_cpb_removal_delay_length_minus1
uint32_t initial_cpb_removal_delay_length_minus1
Definition: ni_av_codec.h:189
NI_COL_SPC_ICTCP
@ NI_COL_SPC_ICTCP
Definition: ni_av_codec.h:180
_ni_xcoder_params
Definition: ni_device_api.h:2713
NI_COL_PRI_FILM
@ NI_COL_PRI_FILM
colour filters using Illuminant C
Definition: ni_av_codec.h:108
NI_COL_TRC_SMPTEST2084
@ NI_COL_TRC_SMPTEST2084
Definition: ni_av_codec.h:145
NI_COL_PRI_UNSPECIFIED
@ NI_COL_PRI_UNSPECIFIED
Definition: ni_av_codec.h:99
_ni_dynamic_hdr_plus::targeted_system_display_actual_peak_luminance_flag
uint8_t targeted_system_display_actual_peak_luminance_flag
Definition: ni_av_codec.h:412
NI_COL_TRC_IEC61966_2_1
@ NI_COL_TRC_IEC61966_2_1
Definition: ni_av_codec.h:140
NI_MAX_NUM_OF_DECODER_OUTPUTS
#define NI_MAX_NUM_OF_DECODER_OUTPUTS
Definition: ni_defs.h:243
NI_COL_PRI_SMPTE170M
@ NI_COL_PRI_SMPTE170M
Definition: ni_av_codec.h:105
mdcv_data
uint8_t mdcv_data[NI_MAX_SEI_DATA]
Definition: ni_quadra_enc_api.c:1545
_ni_timecode::seconds_value
uint8_t seconds_value
Definition: ni_av_codec.h:457
_ni_hdr_plus_color_transform_params::semimajor_axis_external_ellipse
uint16_t semimajor_axis_external_ellipse
Definition: ni_av_codec.h:315
ni_reconfig_ppu_output
LIB_API int ni_reconfig_ppu_output(ni_session_context_t *p_session_ctx, ni_xcoder_params_t *p_param, ni_ppu_config_t *ppu_config)
Reset decoder ppu resolution.
Definition: ni_av_codec.c:3485
NI_COL_SPC_RGB
@ NI_COL_SPC_RGB
Definition: ni_av_codec.h:157
NI_H264_SEI_TYPE_BUFFERING_PERIOD
@ NI_H264_SEI_TYPE_BUFFERING_PERIOD
Definition: ni_av_codec.h:53
_ni_hdr_plus_color_transform_params
Definition: ni_av_codec.h:255
NI_H264_SEI_TYPE_PIC_TIMING
@ NI_H264_SEI_TYPE_PIC_TIMING
Definition: ni_av_codec.h:54
_ni_timecode
Definition: ni_av_codec.h:448
_ni_color_space
_ni_color_space
Definition: ni_av_codec.h:155
ni_enc_write_from_yuv_buffer
LIB_API int ni_enc_write_from_yuv_buffer(ni_session_context_t *p_ctx, ni_frame_t *p_enc_frame, uint8_t *p_yuv_buffer)
Send an input data frame to the encoder with YUV data given in the inputs.
Definition: ni_av_codec.c:2625
ni_h264_sei_type_t
enum _ni_h264_sei_type_t ni_h264_sei_type_t
NI_COL_SPC_BT470BG
@ NI_COL_SPC_BT470BG
Definition: ni_av_codec.h:165
_ni_hdr_plus_color_transform_params::knee_point_x
ni_rational_t knee_point_x
Definition: ni_av_codec.h:361
_ni_hdr_plus_color_transform_params::num_distribution_maxrgb_percentiles
uint8_t num_distribution_maxrgb_percentiles
Definition: ni_av_codec.h:343
_ni_ppu_config::ppu_h
uint16_t ppu_h[NI_MAX_NUM_OF_DECODER_OUTPUTS]
Definition: ni_av_codec.h:476
_ni_hdr_plus_color_transform_params::knee_point_y
ni_rational_t knee_point_y
Definition: ni_av_codec.h:366
NI_H264_SEI_TYPE_DISPLAY_ORIENTATION
@ NI_H264_SEI_TYPE_DISPLAY_ORIENTATION
Definition: ni_av_codec.h:63
_ni_dynamic_hdr_plus::num_cols_mastering_display_actual_peak_luminance
uint8_t num_cols_mastering_display_actual_peak_luminance
Definition: ni_av_codec.h:438
NI_COL_TRC_RESERVED0
@ NI_COL_TRC_RESERVED0
Definition: ni_av_codec.h:123
NI_COL_TRC_BT709
@ NI_COL_TRC_BT709
Definition: ni_av_codec.h:124
NI_COL_TRC_ARIB_STD_B67
@ NI_COL_TRC_ARIB_STD_B67
Definition: ni_av_codec.h:148
NI_COL_SPC_UNSPECIFIED
@ NI_COL_SPC_UNSPECIFIED
Definition: ni_av_codec.h:161
NI_COL_PRI_SMPTEST428_1
@ NI_COL_PRI_SMPTEST428_1
Definition: ni_av_codec.h:111
ni_color_transfer_characteristic_t
enum _ni_color_transfer_characteristic ni_color_transfer_characteristic_t
NI_COL_PRI_RESERVED0
@ NI_COL_PRI_RESERVED0
Definition: ni_av_codec.h:96
NI_H264_SEI_TYPE_ALTERNATIVE_TRANSFER
@ NI_H264_SEI_TYPE_ALTERNATIVE_TRANSFER
Definition: ni_av_codec.h:67
_ni_timecode::counting_type
uint8_t counting_type
Definition: ni_av_codec.h:451
ni_device_api.h
Public definitions for operating NETINT video processing devices for video processing.
NI_COL_PRI_SMPTE428
@ NI_COL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
Definition: ni_av_codec.h:110
_ni_mastering_display_metadata::white_point
ni_rational_t white_point[2]
Definition: ni_av_codec.h:202
NI_H264_SEI_PIC_STRUCT_TOP_FIELD
@ NI_H264_SEI_PIC_STRUCT_TOP_FIELD
top field
Definition: ni_av_codec.h:74
_ni_dynamic_hdr_plus::num_cols_targeted_system_display_actual_peak_luminance
uint8_t num_cols_targeted_system_display_actual_peak_luminance
Definition: ni_av_codec.h:421
_ni_h264_sei_type_t
_ni_h264_sei_type_t
Definition: ni_av_codec.h:51
NI_COL_TRC_BT2020_10
@ NI_COL_TRC_BT2020_10
Definition: ni_av_codec.h:141
LIB_API
#define LIB_API
Definition: ni_libxcoder_dynamic_loading.h:52
_ni_hdr_plus_color_transform_params::window_upper_left_corner_x
ni_rational_t window_upper_left_corner_x
Definition: ni_av_codec.h:262
_ni_hdr_plus_color_transform_params::tone_mapping_flag
uint8_t tone_mapping_flag
Definition: ni_av_codec.h:356
ni_codec_format_t
enum _ni_codec_format ni_codec_format_t
This is an enumeration for supported codec formats.
ni_should_send_sei_with_frame
LIB_API int ni_should_send_sei_with_frame(ni_session_context_t *p_enc_ctx, ni_pic_type_t pic_type, ni_xcoder_params_t *p_param)
Whether SEI should be sent together with this frame to encoder.
Definition: ni_av_codec.c:186
NI_H264_SEI_TYPE_FILLER_PAYLOAD
@ NI_H264_SEI_TYPE_FILLER_PAYLOAD
Definition: ni_av_codec.h:56
NI_COL_SPC_BT709
@ NI_COL_SPC_BT709
Definition: ni_av_codec.h:159
_ni_dynamic_hdr_plus::num_rows_mastering_display_actual_peak_luminance
uint8_t num_rows_mastering_display_actual_peak_luminance
Definition: ni_av_codec.h:434
_ni_hdr_plus_overlap_process_option
_ni_hdr_plus_overlap_process_option
Definition: ni_av_codec.h:232
_ni_hdr_plus_color_transform_params::semimajor_axis_internal_ellipse
uint16_t semimajor_axis_internal_ellipse
Definition: ni_av_codec.h:308
ni_extract_custom_sei
LIB_API int ni_extract_custom_sei(uint8_t *pkt_data, int pkt_size, long index, ni_packet_t *p_packet, uint8_t sei_type, int vcl_found)
Extract custom sei payload data from pkt_data, and save it to ni_packet_t.
Definition: ni_av_codec.c:2944
ni_mastering_display_metadata_t
struct _ni_mastering_display_metadata ni_mastering_display_metadata_t
_ni_hdr_plus_color_transform_params::num_bezier_curve_anchors
uint8_t num_bezier_curve_anchors
Definition: ni_av_codec.h:370
_ni_hdr_plus_color_transform_params::average_maxrgb
ni_rational_t average_maxrgb
Definition: ni_av_codec.h:339
hdrp_data
uint8_t hdrp_data[NI_MAX_SEI_DATA]
Definition: ni_quadra_enc_api.c:1549
_ni_hdr_plus_color_transform_params::overlap_process_option
ni_hdr_plus_overlap_process_option_t overlap_process_option
Definition: ni_av_codec.h:327
NI_H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME
@ NI_H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME
Definition: ni_av_codec.h:65
_ni_mastering_display_metadata::display_primaries
ni_rational_t display_primaries[3][2]
Definition: ni_av_codec.h:199
_ni_dynamic_hdr_plus::num_rows_targeted_system_display_actual_peak_luminance
uint8_t num_rows_targeted_system_display_actual_peak_luminance
Definition: ni_av_codec.h:416
NI_COL_TRC_SMPTE428
@ NI_COL_TRC_SMPTE428
Definition: ni_av_codec.h:146
_ni_hdr_plus_color_transform_params::bezier_curve_anchors
ni_rational_t bezier_curve_anchors[15]
Definition: ni_av_codec.h:375
ni_hdr_plus_color_transform_params_t
struct _ni_hdr_plus_color_transform_params ni_hdr_plus_color_transform_params_t
NI_COL_PRI_JEDEC_P22
@ NI_COL_PRI_JEDEC_P22
JEDEC P22 phosphors.
Definition: ni_av_codec.h:115
_ni_hdr_plus_color_transform_params::semiminor_axis_external_ellipse
uint16_t semiminor_axis_external_ellipse
Definition: ni_av_codec.h:321
_ni_dynamic_hdr_plus::application_version
uint8_t application_version
Definition: ni_av_codec.h:396
NI_COL_SPC_SMPTE240M
@ NI_COL_SPC_SMPTE240M
Definition: ni_av_codec.h:169