FFmpeg
libavfilter
dnn
dnn_interface.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Sergey Lavrushkin
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
/**
22
* @file
23
* Implements DNN module initialization with specified backend.
24
*/
25
26
#include "../dnn_interface.h"
27
#include "
libavutil/mem.h
"
28
29
extern
const
DNNModule
ff_dnn_backend_openvino
;
30
extern
const
DNNModule
ff_dnn_backend_tf
;
31
32
const
DNNModule
*
ff_get_dnn_module
(
DNNBackendType
backend_type,
void
*log_ctx)
33
{
34
switch
(backend_type){
35
#if (CONFIG_LIBTENSORFLOW == 1)
36
case
DNN_TF
:
37
return
&
ff_dnn_backend_tf
;
38
#endif
39
#if (CONFIG_LIBOPENVINO == 1)
40
case
DNN_OV
:
41
return
&
ff_dnn_backend_openvino
;
42
#endif
43
default
:
44
av_log
(log_ctx,
AV_LOG_ERROR
,
45
"Module backend_type %d is not supported or enabled.\n"
,
46
backend_type);
47
return
NULL
;
48
}
49
}
ff_dnn_backend_openvino
const DNNModule ff_dnn_backend_openvino
DNN_TF
@ DNN_TF
Definition:
dnn_interface.h:35
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition:
log.h:180
DNN_OV
@ DNN_OV
Definition:
dnn_interface.h:35
NULL
#define NULL
Definition:
coverity.c:32
DNNBackendType
DNNBackendType
Definition:
dnn_interface.h:35
ff_get_dnn_module
const DNNModule * ff_get_dnn_module(DNNBackendType backend_type, void *log_ctx)
Definition:
dnn_interface.c:32
ff_dnn_backend_tf
const DNNModule ff_dnn_backend_tf
Definition:
dnn_backend_tf.c:906
mem.h
av_log
#define av_log(a,...)
Definition:
tableprint_vlc.h:27
DNNModule
Definition:
dnn_interface.h:121
Generated on Thu Apr 18 2024 22:42:22 for FFmpeg by
1.8.17