FFmpeg
|
#include <torch/torch.h>
#include <torch/script.h>
#include "../internal.h"
#include "dnn_io_proc.h"
#include "dnn_backend_common.h"
#include "libavutil/opt.h"
#include "queue.h"
#include "safe_queue.h"
Go to the source code of this file.
Data Structures | |
struct | THOptions |
struct | THContext |
struct | THModel |
struct | THInferRequest |
struct | THRequestItem |
Macros | |
#define | OFFSET(x) offsetof(THContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
AVFILTER_DEFINE_CLASS (dnn_th) | |
static int | extract_lltask_from_task (TaskItem *task, Queue *lltask_queue) |
static void | th_free_request (THInferRequest *request) |
static void | destroy_request_item (THRequestItem **arg) |
static void | dnn_free_model_th (DNNModel **model) |
static int | get_input_th (void *model, DNNData *input, const char *input_name) |
static void | deleter (void *arg) |
static int | fill_model_input_th (THModel *th_model, THRequestItem *request) |
static int | th_start_inference (void *args) |
static void | infer_completion_callback (void *args) |
static int | execute_model_th (THRequestItem *request, Queue *lltask_queue) |
static int | get_output_th (void *model, const char *input_name, int input_width, int input_height, const char *output_name, int *output_width, int *output_height) |
static THInferRequest * | th_create_inference_request (void) |
static DNNModel * | dnn_load_model_th (const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx) |
static int | dnn_execute_model_th (const DNNModel *model, DNNExecBaseParams *exec_params) |
static DNNAsyncStatusType | dnn_get_result_th (const DNNModel *model, AVFrame **in, AVFrame **out) |
static int | dnn_flush_th (const DNNModel *model) |
Variables | |
static const AVOption | dnn_th_options [] |
const DNNModule | ff_dnn_backend_torch |
DNN Torch backend implementation.
Definition in file dnn_backend_torch.cpp.
#define OFFSET | ( | x | ) | offsetof(THContext, x) |
Definition at line 69 of file dnn_backend_torch.cpp.
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 70 of file dnn_backend_torch.cpp.
AVFILTER_DEFINE_CLASS | ( | dnn_th | ) |
Definition at line 79 of file dnn_backend_torch.cpp.
Referenced by dnn_execute_model_th(), and get_output_th().
|
static |
Definition at line 99 of file dnn_backend_torch.cpp.
Referenced by destroy_request_item(), execute_model_th(), fill_model_input_th(), and infer_completion_callback().
|
inlinestatic |
Definition at line 114 of file dnn_backend_torch.cpp.
Referenced by dnn_free_model_th(), dnn_load_model_th(), execute_model_th(), and infer_completion_callback().
|
static |
Definition at line 128 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th().
Definition at line 160 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th(), and fill_model_input_th().
|
static |
Definition at line 172 of file dnn_backend_torch.cpp.
Referenced by fill_model_input_th().
|
static |
Definition at line 177 of file dnn_backend_torch.cpp.
Referenced by execute_model_th().
|
static |
Definition at line 236 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th(), and execute_model_th().
|
static |
Definition at line 273 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th(), and execute_model_th().
|
static |
Definition at line 328 of file dnn_backend_torch.cpp.
Referenced by dnn_execute_model_th(), dnn_flush_th(), and get_output_th().
|
static |
Definition at line 372 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th().
|
static |
Definition at line 415 of file dnn_backend_torch.cpp.
Referenced by dnn_load_model_th().
|
static |
Definition at line 426 of file dnn_backend_torch.cpp.
|
static |
Definition at line 518 of file dnn_backend_torch.cpp.
|
static |
Definition at line 567 of file dnn_backend_torch.cpp.
Definition at line 573 of file dnn_backend_torch.cpp.
|
static |
Definition at line 71 of file dnn_backend_torch.cpp.
const DNNModule ff_dnn_backend_torch |