summaryrefslogtreecommitdiff
path: root/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
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/dnn/dnn_backend_native_layer_mathunary.c
parentdfad5794fb4f246f6b137da8160dd070482bb9cc (diff)
lavfi/dnn/dnn_backend_native_layer_mathunary: add exp support
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
Diffstat (limited to 'libavfilter/dnn/dnn_backend_native_layer_mathunary.c')
-rw-r--r--libavfilter/dnn/dnn_backend_native_layer_mathunary.c4
1 files changed, 4 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;