![]() |
libxcoder
5.2.0
|
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_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 |
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_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_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_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 76 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 448 of file ni_generic_utils.c.
int frame_list_drain | ( | ni_test_frame_list_t * | list | ) |
Definition at line 219 of file ni_generic_utils.c.
int frame_list_enqueue | ( | ni_test_frame_list_t * | list | ) |
Definition at line 209 of file ni_generic_utils.c.
bool frame_list_is_empty | ( | ni_test_frame_list_t * | list | ) |
Definition at line 175 of file ni_generic_utils.c.
bool frame_list_is_full | ( | ni_test_frame_list_t * | list | ) |
Definition at line 180 of file ni_generic_utils.c.
int frame_list_length | ( | ni_test_frame_list_t * | list | ) |
Definition at line 203 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 335 of file ni_generic_utils.c.
ni_pix_fmt_t gc620_to_ni_pix_fmt | ( | int | pix_fmt | ) |
Definition at line 132 of file ni_generic_utils.c.
ni_pixel_planar_format get_pixel_planar | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 147 of file ni_generic_utils.c.
uint64_t get_total_file_size | ( | FILE * | fp | ) |
Definition at line 250 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 | ||
) |
Download hw frames by HwDesc.
<br> |
Definition at line 709 of file ni_generic_utils.c.
void hwframe_list_release | ( | ni_test_frame_list_t * | list | ) |
Definition at line 231 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 937 of file ni_generic_utils.c.
int is_ni_enc_pix_fmt | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 81 of file ni_generic_utils.c.
void ni_hw_frame_ref | ( | const niFrameSurface1_t * | p_surface | ) |
Definition at line 658 of file ni_generic_utils.c.
void ni_hw_frame_unref | ( | uint16_t | hwframe_index | ) |
Definition at line 679 of file ni_generic_utils.c.
const char* ni_pixel_format_name | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 102 of file ni_generic_utils.c.
ni_pix_fmt_t ni_pixel_format_search | ( | const char * | name | ) |
Definition at line 87 of file ni_generic_utils.c.
int ni_to_gc620_pix_fmt | ( | ni_pix_fmt_t | pix_fmt | ) |
Definition at line 117 of file ni_generic_utils.c.
void print_version | ( | void | ) |
Definition at line 70 of file ni_generic_utils.c.
int read_and_cache_file | ( | ni_demo_context_t * | ctx, |
char * | filename | ||
) |
Definition at line 259 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 375 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 413 of file ni_generic_utils.c.
void reset_data_buf_pos | ( | ni_demo_context_t * | p_ctx | ) |
Definition at line 316 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 322 of file ni_generic_utils.c.
int scan_and_clean_hwdescriptors | ( | void | ) |
Definition at line 635 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.
<br> |
Definition at line 742 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 185 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 | ||
) |
Uploader session open.
<br> |
Definition at line 894 of file ni_generic_utils.c.
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.
<br> |
Definition at line 510 of file ni_generic_utils.c.