|
file | vpu_usr.h |
| TI VPU resource manager library API delcarations.
|
|
|
void * | vpu_codec_open (void) |
| vpu_codec_open More...
|
|
void | vpu_codec_close (void *hdl) |
| vpu_codec_close More...
|
|
int32_t | vpu_get_product_info (void *hdl, uint32_t coreIdx, VpuAttr *vpuHwInfo) |
| vpu_get_product_info More...
|
|
int32_t | vpu_enc_init (void *hdl, tivpu_enc_config_t *config) |
| vpu_enc_init More...
|
|
int32_t | vpu_enc_buf_prepare (void *hdl, vpu_buffer_t *bufs, int nbuf, vpu_buf_dir buf_dir) |
| vpu_enc_buf_prepare More...
|
|
int32_t | vpu_encode_frame (void *hdl, unsigned long ip_buf, unsigned long op_buf, unsigned long op_first_buf, uint8_t is_eos, vpu_enc_status_t *enc_status) |
| vpu_encode_frame More...
|
|
int32_t | vpu_enc_get_buf_info (void *hdl, uint32_t *nbuffers, uint32_t *max_size) |
| vpu_enc_get_buf_info More...
|
|
int32_t | vpu_enc_start_streaming (void *hdl) |
| vpu_enc_start_streaming More...
|
|
int32_t | vpu_enc_stop_streaming (void *hdl) |
| vpu_enc_stop_streaming More...
|
|
int32_t | vpu_enc_deinit (void *hdl) |
| vpu_enc_deinit More...
|
|
int32_t | vpu_dec_init (void *hdl, tivpu_dec_config_t *config) |
| vpu_dec_init More...
|
|
int32_t | vpu_dec_start_streaming (void *hdl) |
|
int32_t | vpu_dec_stop_streaming (void *hdl) |
|
int32_t | vpu_dec_deinit (void *hdl) |
|
int32_t | vpu_dec_close (void *hdl) |
|
int32_t | vpu_dec_buf_prepare (void *hdl, vpu_buffer_t *bufs, int nbuf, vpu_buf_dir buf_dir) |
| vpu_dec_buf_prepare More...
|
|
int32_t | vpu_decode_frame (void *hdl, unsigned long ip_buf, unsigned long op_buf, uint8_t is_eos, uint32_t in_filled_len, vpu_dec_status_t *dec_status) |
| vpu_decode_frame More...
|
|
This is the main header with all the function declarations for the usr lib.
◆ vpu_buf_dir
vpu_buf_dir enumeration. Identifies if it is an input of an output buffer
Enumerator |
---|
TIVPU_BUFDIR_OUTPUT | |
TIVPU_BUFDIR_INPUT | |
◆ vpu_codec_open()
void* vpu_codec_open |
( |
void |
| ) |
|
vpu_codec_open
Open a vpu codec instance.
- Parameters
-
- Returns
- valid vpu codec handle, NULL otherwise
◆ vpu_codec_close()
void vpu_codec_close |
( |
void * |
hdl | ) |
|
vpu_codec_close
Closes the vpu codec instance identified by the hdl.
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
- Returns
- void
◆ vpu_get_product_info()
int32_t vpu_get_product_info |
( |
void * |
hdl, |
|
|
uint32_t |
coreIdx, |
|
|
VpuAttr * |
vpuHwInfo |
|
) |
| |
vpu_get_product_info
Get the vpu specific info in a VpuAttr structure
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | uint32_t The coreIdx for which the product info is being requested. |
[IN] | VpuAttr * Address to the VpuAttr structure. This will be updated by the resource manager if the API succeeds. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_init()
int32_t vpu_enc_init |
( |
void * |
hdl, |
|
|
tivpu_enc_config_t * |
config |
|
) |
| |
vpu_enc_init
Initialize the encoder with a specific tivpu_enc_config_t
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | tivpu_enc_config_t Structure to configure the codec as an encoder. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_buf_prepare()
int32_t vpu_enc_buf_prepare |
( |
void * |
hdl, |
|
|
vpu_buffer_t * |
bufs, |
|
|
int |
nbuf, |
|
|
vpu_buf_dir |
buf_dir |
|
) |
| |
vpu_enc_buf_prepare
Prime the encoder with the input/output buffers information
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | vpu_buffer_t * A pointer to an array of vpu_buffer_t structure. |
[IN] | int The number of buffers in the vpu_buffer_t array |
[IN] | vpu_buf_dir Input or output buffers being passed. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_encode_frame()
int32_t vpu_encode_frame |
( |
void * |
hdl, |
|
|
unsigned long |
ip_buf, |
|
|
unsigned long |
op_buf, |
|
|
unsigned long |
op_first_buf, |
|
|
uint8_t |
is_eos, |
|
|
vpu_enc_status_t * |
enc_status |
|
) |
| |
vpu_encode_frame
Encode a single frame worth of raw video
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | unsigned long Address to the raw video data. |
[IN] | unsigned long Address to the location where encoded data will be stored (temporarily) by the VPU hardware. |
[IN] | unsigned long Address (can be NULL) to the first output buffer. |
[IN] | uint8_t Flag to indicate if the input is EOS, true if it is end-of-stream;. |
[OUT] | vpu_enc_status_t * Pointer to the vpu_enc_status_t struct. Updated by the vpulib once the encode is done. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_get_buf_info()
int32_t vpu_enc_get_buf_info |
( |
void * |
hdl, |
|
|
uint32_t * |
nbuffers, |
|
|
uint32_t * |
max_size |
|
) |
| |
vpu_enc_get_buf_info
Get the minimum required buffer spec for the output buffers. This is based on the input stream.
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[OUT] | uint32_t * Address to the location where the lib would write the number of buffers needed. |
[OUT] | uint32_t * Address to the location where the lib would write the size of a buffer. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_start_streaming()
int32_t vpu_enc_start_streaming |
( |
void * |
hdl | ) |
|
vpu_enc_start_streaming
Mark the codec instance as ready to encode
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_stop_streaming()
int32_t vpu_enc_stop_streaming |
( |
void * |
hdl | ) |
|
vpu_enc_stop_streaming
Mark the codec to stop encoding
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_enc_deinit()
int32_t vpu_enc_deinit |
( |
void * |
hdl | ) |
|
vpu_enc_deinit
De-init the codec instance identified by the void * codec handle
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_dec_init()
int32_t vpu_dec_init |
( |
void * |
hdl, |
|
|
tivpu_dec_config_t * |
config |
|
) |
| |
vpu_dec_init
Initialize the decoder with a specific tivpu_dec_config_t
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | tivpu_dec_config_t Structure to configure the codec as an decoder. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_dec_start_streaming()
int32_t vpu_dec_start_streaming |
( |
void * |
hdl | ) |
|
◆ vpu_dec_stop_streaming()
int32_t vpu_dec_stop_streaming |
( |
void * |
hdl | ) |
|
◆ vpu_dec_deinit()
int32_t vpu_dec_deinit |
( |
void * |
hdl | ) |
|
◆ vpu_dec_close()
int32_t vpu_dec_close |
( |
void * |
hdl | ) |
|
◆ vpu_dec_buf_prepare()
int32_t vpu_dec_buf_prepare |
( |
void * |
hdl, |
|
|
vpu_buffer_t * |
bufs, |
|
|
int |
nbuf, |
|
|
vpu_buf_dir |
buf_dir |
|
) |
| |
vpu_dec_buf_prepare
Prime the decoder with the input/output buffers information
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | vpu_buffer_t * A pointer to an array of vpu_buffer_t structure. |
[IN] | int The number of buffers in the vpu_buffer_t array |
[IN] | vpu_buf_dir Input or output buffers being passed. |
- Returns
- status of the API call. 0 for success, error otherwise.
◆ vpu_decode_frame()
int32_t vpu_decode_frame |
( |
void * |
hdl, |
|
|
unsigned long |
ip_buf, |
|
|
unsigned long |
op_buf, |
|
|
uint8_t |
is_eos, |
|
|
uint32_t |
in_filled_len, |
|
|
vpu_dec_status_t * |
dec_status |
|
) |
| |
vpu_decode_frame
Decode bitstream to provide a single fram worth of output raw video.
- Parameters
-
[IN] | void * Address returned by the corresponding open call. |
[IN] | unsigned long Address to the bitstream buffer. |
[IN] | unsigned long Address to the location where decoded YUV data will be stored (temporarily) by the VPU hardware. |
[IN] | uint8_t Flag to indicate if the input is EOS, true if it is end-of-stream;. |
[IN] | uint32_t The amount of valid bitstream data available in the input buffer for the decoder to process |
[OUT] | vpu_dec_status_t * Pointer to the vpu_dec_status_t struct. Updated by the vpulib once the decode is done. |
- Returns
- status of the API call. 0 for success, error otherwise.