[FFmpeg-devel] [PATCH V3 1/3] lavfi/dnn: Mark native backend as deprecated
Ting Fu
ting.fu at intel.com
Fri Jan 6 11:01:40 EET 2023
Mark native as deprecated for backed_type option. Modify realted error
message.
Signed-off-by: Ting Fu <ting.fu at intel.com>
---
libavfilter/dnn/dnn_interface.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c
index 554a36b0dc..12d36f7fed 100644
--- a/libavfilter/dnn/dnn_interface.c
+++ b/libavfilter/dnn/dnn_interface.c
@@ -24,7 +24,6 @@
*/
#include "../dnn_interface.h"
-#include "dnn_backend_native.h"
#include "dnn_backend_tf.h"
#include "dnn_backend_openvino.h"
#include "libavutil/mem.h"
@@ -40,12 +39,9 @@ DNNModule *ff_get_dnn_module(DNNBackendType backend_type)
switch(backend_type){
case DNN_NATIVE:
- dnn_module->load_model = &ff_dnn_load_model_native;
- dnn_module->execute_model = &ff_dnn_execute_model_native;
- dnn_module->get_result = &ff_dnn_get_result_native;
- dnn_module->flush = &ff_dnn_flush_native;
- dnn_module->free_model = &ff_dnn_free_model_native;
- break;
+ av_log(NULL, AV_LOG_ERROR, "Native backend is deprecated, please use other supported DNN backends.\n");
+ av_freep(&dnn_module);
+ return NULL;
case DNN_TF:
#if (CONFIG_LIBTENSORFLOW == 1)
dnn_module->load_model = &ff_dnn_load_model_tf;
@@ -71,7 +67,7 @@ DNNModule *ff_get_dnn_module(DNNBackendType backend_type)
#endif
break;
default:
- av_log(NULL, AV_LOG_ERROR, "Module backend_type is not native or tensorflow\n");
+ av_log(NULL, AV_LOG_ERROR, "Module backend_type is not supported or enabled.\n");
av_freep(&dnn_module);
return NULL;
}
--
2.17.1
More information about the ffmpeg-devel
mailing list