24#ifndef AVFILTER_DNN_DNN_BACKEND_COMMON_H
25#define AVFILTER_DNN_DNN_BACKEND_COMMON_H
32#define DNN_DEFINE_CLASS_EXT(name, desc, options) \
35 .item_name = av_default_item_name, \
37 .version = LIBAVUTIL_VERSION_INT, \
38 .category = AV_CLASS_CATEGORY_FILTER, \
40#define DNN_DEFINE_CLASS(fname) \
41 DNN_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
85#if HAVE_PTHREAD_CANCEL
int ff_check_exec_params(void *ctx, DNNBackendType backend, DNNFunctionType func_type, DNNExecBaseParams *exec_params)
void ff_dnn_wait_requests(SafeQueue *request_queue, int nireq)
Wait for all inference requests to complete before teardown.
DNNAsyncStatusType ff_dnn_get_result_common(Queue *task_queue, AVFrame **in, AVFrame **out)
Extract input and output frame from the Task Queue after asynchronous inference.
int ff_dnn_async_module_cleanup(DNNAsyncExecModule *async_module)
Join the Async Execution thread and set module pointers to NULL.
int ff_dnn_fill_task(TaskItem *task, DNNExecBaseParams *exec_params, void *backend_model, int async, int do_ioproc)
Fill the Task for Backend Execution.
int ff_dnn_start_inference_async(void *ctx, DNNAsyncExecModule *async_module)
Start asynchronous inference routine for the TensorFlow model on a detached thread.
int ff_dnn_fill_gettingoutput_task(TaskItem *task, DNNExecBaseParams *exec_params, void *backend_model, int input_height, int input_width, void *ctx)
Allocate input and output frames and fill the Task with execution parameters.
DNN inference engine interface.
This structure describes decoded (raw) audio or video data.
Common Async Execution Mechanism for the DNN Backends.
void * args
Argument for the execution functions.
int(* start_inference)(void *request)
Synchronous inference function for the backend with corresponding request item as the argument.
void(* callback)(void *args)
Completion Callback for the backend.
Linear double-ended data structure.
Double-ended queue with mutex locks ensuring data consistency while multithreading.
const char ** output_names
static AVFormatContext * ctx