aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorWenlong Ding <wenlong.ding@intel.com>2021-03-22 16:20:11 +0800
committerGuo, Yejun <yejun.guo@intel.com>2021-03-24 13:53:50 +0800
commitb460595dd7b831a07cdd3e59ad726d99db4ba557 (patch)
tree8363752930243633e2d767bf8ae875ece9a73398 /libavfilter
parentdfad5794fb4f246f6b137da8160dd070482bb9cc (diff)
downloadffmpeg-b460595dd7b831a07cdd3e59ad726d99db4ba557.tar.gz
lavfi/dnn/dnn_backend_native_layer_mathunary: add exp support
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/dnn/dnn_backend_native_layer_mathunary.c4
-rw-r--r--libavfilter/dnn/dnn_backend_native_layer_mathunary.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathunary.c b/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
index 1bb05d02a7..bd28ec67d1 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
@@ -146,6 +146,10 @@ int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_o
for (int i = 0; i < dims_count; ++i)
dst[i] = round(src[i]);
return 0;
+ case DMUO_EXP:
+ for (int i = 0; i < dims_count; ++i)
+ dst[i] = exp(src[i]);
+ return 0;
default:
av_log(ctx, AV_LOG_ERROR, "Unmatch math unary operator\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
index 2199931e6e..151a73200a 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
@@ -46,6 +46,7 @@ typedef enum {
DMUO_CEIL = 13,
DMUO_FLOOR = 14,
DMUO_ROUND = 15,
+ DMUO_EXP = 16,
DMUO_COUNT
} DNNMathUnaryOperation;