|
libxcoder
5.3.1
|
Go to the source code of this file.
Data Structures | |
| struct | _ni_pix_fmt_name |
| struct | _ni_gc620_pix_fmt |
| struct | _ni_hwframe_ref_t |
| struct | _ni_test_frame_list |
| struct | _ni_pts_queue |
| struct | _ni_demo_context |
| struct | uploader_param |
Macros | |
| #define | FILE_NAME_LEN 256 |
| #define | MAX_INPUT_FILES 3 |
| #define | MAX_OUTPUT_FILES 4 |
| #define | NI_TEST_RETCODE_FAILURE -1 |
| #define | NI_TEST_RETCODE_SUCCESS 0 |
| #define | NI_TEST_RETCODE_END_OF_STREAM 1 |
| #define | NI_TEST_RETCODE_EAGAIN 2 |
| #define | NI_TEST_RETCODE_NEXT_INPUT 3 |
| #define | NI_TEST_RETCODE_SEQ_CHANGE_DONE 4 |
| #define | NI_ALIGN(x, a) (((x)+(a)-1)&~((a)-1)) |
| #define | MAX_YUV_FRAME_SIZE (7680 * 4320 * 3) |
| #define | MAX_LOG2_MAX_FRAME_NUM (12 + 4) |
| #define | MIN_LOG2_MAX_FRAME_NUM 4 |
| #define | EXTENDED_SAR 255 |
| #define | QP_MAX_NUM (51 + 6 * 6) |
| #define | NI_MAX_BUFFERED_FRAME 45 |
| #define | HEVC_MAX_SUB_LAYERS 7 |
| #define | HEVC_MAX_SHORT_TERM_REF_PIC_SETS 64 |
| #define | HEVC_MAX_LONG_TERM_REF_PICS 32 |
| #define | HEVC_MAX_SPS_COUNT 16 |
| #define | HEVC_MAX_REFS 16 |
| #define | HEVC_MAX_LOG2_CTB_SIZE 6 |
| #define | NI_MAX_PTS_QUEUE_SIZE 1024 |
Typedefs | |
| typedef struct _ni_pix_fmt_name | ni_pix_fmt_name_t |
| typedef struct _ni_gc620_pix_fmt | ni_gc620_pix_fmt_t |
| typedef struct _ni_hwframe_ref_t | ni_hwframe_ref_t |
| typedef struct _ni_test_frame_list | ni_test_frame_list_t |
| typedef struct _ni_pts_queue | ni_pts_queue |
| typedef struct _ni_demo_context | ni_demo_context_t |
| typedef struct uploader_param | uploader_param_t |
Enumerations | |
| enum | ni_sw_pix_fmt_t { NI_SW_PIX_FMT_NONE = -1, NI_SW_PIX_FMT_YUV444P, NI_SW_PIX_FMT_YUV444P10LE } |
Functions | |
| void | print_version (void) |
| int | is_ni_enc_pix_fmt (ni_pix_fmt_t pix_fmt) |
| ni_pix_fmt_t | ni_pixel_format_search (const char *name) |
| const char * | ni_pixel_format_name (ni_pix_fmt_t pix_fmt) |
| int | ni_to_gc620_pix_fmt (ni_pix_fmt_t pix_fmt) |
| ni_pix_fmt_t | gc620_to_ni_pix_fmt (int pix_fmt) |
| ni_pixel_planar_format | get_pixel_planar (ni_pix_fmt_t pix_fmt) |
| bool | frame_list_is_empty (ni_test_frame_list_t *list) |
| bool | frame_list_is_full (ni_test_frame_list_t *list) |
| bool | uploader_frame_list_full (ni_test_frame_list_t *list, ni_pix_fmt_t pix_fmt) |
| int | frame_list_length (ni_test_frame_list_t *list) |
| int | frame_list_enqueue (ni_test_frame_list_t *list) |
| int | frame_list_drain (ni_test_frame_list_t *list) |
| void | hwframe_list_release (ni_test_frame_list_t *list) |
| uint64_t | get_total_file_size (FILE *fp) |
| int | read_and_cache_file (ni_demo_context_t *ctx, char *filename) |
| void | reset_data_buf_pos (ni_demo_context_t *p_ctx) |
| void | rewind_data_buf_pos_by (ni_demo_context_t *p_ctx, uint64_t nb_bytes) |
| int | frame_read_buffer_size (int w, int h, ni_pix_fmt_t pix_fmt, ni_sw_pix_fmt_t sw_pix_fmt) |
| uint32_t | read_next_chunk_from_file (ni_demo_context_t *p_ctx, FILE *pfs, uint8_t *p_dst, uint32_t to_read) |
| int | read_yuv_from_file (ni_demo_context_t *p_ctx, FILE *pfs, void *yuv_buf, int width, int height, ni_pix_fmt_t pix_fmt, ni_sw_pix_fmt_t sw_pix_fmt, int *eos, ni_session_run_state_t run_state) |
| int | convert_yuv_444p_to_420p (ni_session_data_io_t *p_frame, void *yuv_buf, int width, int height, ni_sw_pix_fmt_t sw_pix_fmt, int mode, ni_codec_format_t codec_format) |
| int | write_rawvideo_data (FILE *p_file, int input_aligned_width, int input_aligned_height, int output_width, int output_height, int format, ni_frame_t *p_out_frame) |
| Write hwdl data to files. More... | |
| int | scan_and_clean_hwdescriptors (void) |
| void | ni_hw_frame_ref (const niFrameSurface1_t *p_surface) |
| void | ni_hw_frame_unref (uint16_t hwframe_index) |
| int | hwdl_frame (ni_session_context_t *p_ctx, ni_session_data_io_t *p_session_data, ni_frame_t *p_src_frame, int output_format) |
| Download hw frames by HwDesc. More... | |
| int | upload_send_data_get_desc (ni_demo_context_t *p_ctx, ni_session_context_t *p_upl_ctx, ni_session_data_io_t *p_swin_data, ni_session_data_io_t *p_in_data, int input_video_width, int input_video_height, void *yuv_buf) |
| Read from input file, upload to encoder, retrieve HW descriptor. More... | |
| int | uploader_open_session (ni_session_context_t *p_upl_ctx, int iXcoderGUID, int width, int height, ni_pix_fmt_t pix_fmt, int is_p2p, int pool_size) |
| Uploader session open. More... | |
| niFrameSurface1_t * | hwupload_frame (ni_demo_context_t *p_ctx, ni_session_context_t *p_upl_ctx, ni_session_context_t *p_sca_ctx, ni_session_data_io_t *p_sw_data, ni_session_data_io_t *p_hw_data, ni_session_data_io_t *p_scale_data, ni_pix_fmt_t pix_fmt, int width, int height, FILE *pfs, void *yuv_buf, int *eos) |
| #define EXTENDED_SAR 255 |
Definition at line 65 of file ni_generic_utils.h.
| #define FILE_NAME_LEN 256 |
Definition at line 46 of file ni_generic_utils.h.
| #define HEVC_MAX_LOG2_CTB_SIZE 6 |
Definition at line 74 of file ni_generic_utils.h.
| #define HEVC_MAX_LONG_TERM_REF_PICS 32 |
Definition at line 71 of file ni_generic_utils.h.
| #define HEVC_MAX_REFS 16 |
Definition at line 73 of file ni_generic_utils.h.
| #define HEVC_MAX_SHORT_TERM_REF_PIC_SETS 64 |
Definition at line 70 of file ni_generic_utils.h.
| #define HEVC_MAX_SPS_COUNT 16 |
Definition at line 72 of file ni_generic_utils.h.
| #define HEVC_MAX_SUB_LAYERS 7 |
Definition at line 69 of file ni_generic_utils.h.
| #define MAX_INPUT_FILES 3 |
Definition at line 47 of file ni_generic_utils.h.
| #define MAX_LOG2_MAX_FRAME_NUM (12 + 4) |
Definition at line 63 of file ni_generic_utils.h.
| #define MAX_OUTPUT_FILES 4 |
Definition at line 48 of file ni_generic_utils.h.
| #define MAX_YUV_FRAME_SIZE (7680 * 4320 * 3) |
Definition at line 60 of file ni_generic_utils.h.
| #define MIN_LOG2_MAX_FRAME_NUM 4 |
Definition at line 64 of file ni_generic_utils.h.
| #define NI_ALIGN | ( | x, | |
| a | |||
| ) | (((x)+(a)-1)&~((a)-1)) |
Definition at line 57 of file ni_generic_utils.h.
| #define NI_MAX_BUFFERED_FRAME 45 |
Definition at line 67 of file ni_generic_utils.h.
| #define NI_MAX_PTS_QUEUE_SIZE 1024 |
Definition at line 77 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_EAGAIN 2 |
Definition at line 53 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_END_OF_STREAM 1 |
Definition at line 52 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_FAILURE -1 |
Definition at line 50 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_NEXT_INPUT 3 |
Definition at line 54 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_SEQ_CHANGE_DONE 4 |
Definition at line 55 of file ni_generic_utils.h.
| #define NI_TEST_RETCODE_SUCCESS 0 |
Definition at line 51 of file ni_generic_utils.h.
| #define QP_MAX_NUM (51 + 6 * 6) |
Definition at line 66 of file ni_generic_utils.h.
| typedef struct _ni_demo_context ni_demo_context_t |
| typedef struct _ni_gc620_pix_fmt ni_gc620_pix_fmt_t |
| typedef struct _ni_hwframe_ref_t ni_hwframe_ref_t |
| typedef struct _ni_pix_fmt_name ni_pix_fmt_name_t |
| typedef struct _ni_pts_queue ni_pts_queue |
| typedef struct _ni_test_frame_list ni_test_frame_list_t |
| typedef struct uploader_param uploader_param_t |
| enum ni_sw_pix_fmt_t |
| Enumerator | |
|---|---|
| NI_SW_PIX_FMT_NONE | |
| NI_SW_PIX_FMT_YUV444P | |
| NI_SW_PIX_FMT_YUV444P10LE | |
Definition at line 79 of file ni_generic_utils.h.
| int convert_yuv_444p_to_420p | ( | ni_session_data_io_t * | p_frame, |
| void * | yuv_buf, | ||
| int | width, | ||
| int | height, | ||
| ni_sw_pix_fmt_t | sw_pix_fmt, | ||
| int | mode, | ||
| ni_codec_format_t | codec_format | ||
| ) |
Definition at line 447 of file ni_generic_utils.c.
| int frame_list_drain | ( | ni_test_frame_list_t * | list | ) |
Definition at line 218 of file ni_generic_utils.c.
| int frame_list_enqueue | ( | ni_test_frame_list_t * | list | ) |
Definition at line 208 of file ni_generic_utils.c.
| bool frame_list_is_empty | ( | ni_test_frame_list_t * | list | ) |
Definition at line 174 of file ni_generic_utils.c.
| bool frame_list_is_full | ( | ni_test_frame_list_t * | list | ) |
Definition at line 179 of file ni_generic_utils.c.
| int frame_list_length | ( | ni_test_frame_list_t * | list | ) |
Definition at line 202 of file ni_generic_utils.c.
| int frame_read_buffer_size | ( | int | w, |
| int | h, | ||
| ni_pix_fmt_t | pix_fmt, | ||
| ni_sw_pix_fmt_t | sw_pix_fmt | ||
| ) |
Definition at line 334 of file ni_generic_utils.c.
| ni_pix_fmt_t gc620_to_ni_pix_fmt | ( | int | pix_fmt | ) |
Definition at line 130 of file ni_generic_utils.c.
| ni_pixel_planar_format get_pixel_planar | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 145 of file ni_generic_utils.c.
| uint64_t get_total_file_size | ( | FILE * | fp | ) |
Definition at line 249 of file ni_generic_utils.c.
| int hwdl_frame | ( | ni_session_context_t * | p_ctx, |
| ni_session_data_io_t * | p_session_data, | ||
| ni_frame_t * | p_src_frame, | ||
| int | output_format | ||
| ) |
| void hwframe_list_release | ( | ni_test_frame_list_t * | list | ) |
Definition at line 230 of file ni_generic_utils.c.
| niFrameSurface1_t* hwupload_frame | ( | ni_demo_context_t * | p_ctx, |
| ni_session_context_t * | p_upl_ctx, | ||
| ni_session_context_t * | p_sca_ctx, | ||
| ni_session_data_io_t * | p_sw_data, | ||
| ni_session_data_io_t * | p_hw_data, | ||
| ni_session_data_io_t * | p_scale_data, | ||
| ni_pix_fmt_t | pix_fmt, | ||
| int | width, | ||
| int | height, | ||
| FILE * | pfs, | ||
| void * | yuv_buf, | ||
| int * | eos | ||
| ) |
Definition at line 936 of file ni_generic_utils.c.
| int is_ni_enc_pix_fmt | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 77 of file ni_generic_utils.c.
| void ni_hw_frame_ref | ( | const niFrameSurface1_t * | p_surface | ) |
Definition at line 657 of file ni_generic_utils.c.
| void ni_hw_frame_unref | ( | uint16_t | hwframe_index | ) |
Definition at line 678 of file ni_generic_utils.c.
| const char* ni_pixel_format_name | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 100 of file ni_generic_utils.c.
| ni_pix_fmt_t ni_pixel_format_search | ( | const char * | name | ) |
Definition at line 85 of file ni_generic_utils.c.
| int ni_to_gc620_pix_fmt | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 115 of file ni_generic_utils.c.
| void print_version | ( | void | ) |
Definition at line 66 of file ni_generic_utils.c.
| int read_and_cache_file | ( | ni_demo_context_t * | ctx, |
| char * | filename | ||
| ) |
Definition at line 258 of file ni_generic_utils.c.
| uint32_t read_next_chunk_from_file | ( | ni_demo_context_t * | p_ctx, |
| FILE * | pfs, | ||
| uint8_t * | p_dst, | ||
| uint32_t | to_read | ||
| ) |
Definition at line 374 of file ni_generic_utils.c.
| int read_yuv_from_file | ( | ni_demo_context_t * | p_ctx, |
| FILE * | pfs, | ||
| void * | yuv_buf, | ||
| int | width, | ||
| int | height, | ||
| ni_pix_fmt_t | pix_fmt, | ||
| ni_sw_pix_fmt_t | sw_pix_fmt, | ||
| int * | eos, | ||
| ni_session_run_state_t | run_state | ||
| ) |
Definition at line 412 of file ni_generic_utils.c.
| void reset_data_buf_pos | ( | ni_demo_context_t * | p_ctx | ) |
Definition at line 315 of file ni_generic_utils.c.
| void rewind_data_buf_pos_by | ( | ni_demo_context_t * | p_ctx, |
| uint64_t | nb_bytes | ||
| ) |
Definition at line 321 of file ni_generic_utils.c.
| int scan_and_clean_hwdescriptors | ( | void | ) |
Definition at line 634 of file ni_generic_utils.c.
| int upload_send_data_get_desc | ( | ni_demo_context_t * | p_ctx, |
| ni_session_context_t * | p_upl_ctx, | ||
| ni_session_data_io_t * | p_swin_data, | ||
| ni_session_data_io_t * | p_in_data, | ||
| int | input_video_width, | ||
| int | input_video_height, | ||
| void * | yuv_buf | ||
| ) |
Read from input file, upload to encoder, retrieve HW descriptor.
Definition at line 741 of file ni_generic_utils.c.
| bool uploader_frame_list_full | ( | ni_test_frame_list_t * | list, |
| ni_pix_fmt_t | pix_fmt | ||
| ) |
Definition at line 184 of file ni_generic_utils.c.
| int uploader_open_session | ( | ni_session_context_t * | p_upl_ctx, |
| int | iXcoderGUID, | ||
| int | width, | ||
| int | height, | ||
| ni_pix_fmt_t | pix_fmt, | ||
| int | is_p2p, | ||
| int | pool_size | ||
| ) |
| int write_rawvideo_data | ( | FILE * | p_file, |
| int | input_aligned_width, | ||
| int | input_aligned_height, | ||
| int | output_width, | ||
| int | output_height, | ||
| int | format, | ||
| ni_frame_t * | p_out_frame | ||
| ) |