summaryrefslogtreecommitdiffstats
path: root/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/dnn/dnn_backend_native_layer_depth2space.c')
-rw-r--r--libavfilter/dnn/dnn_backend_native_layer_depth2space.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_backend_native_layer_depth2space.c b/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
index 3720060..174676e 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
@@ -27,6 +27,24 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_depth2space.h"
+int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size)
+{
+ DepthToSpaceParams *params;
+ int dnn_size = 0;
+ params = av_malloc(sizeof(*params));
+ if (!params)
+ return 0;
+
+ params->block_size = (int32_t)avio_rl32(model_file_context);
+ dnn_size += 4;
+ layer->input_operand_indexes[0] = (int32_t)avio_rl32(model_file_context);
+ layer->output_operand_index = (int32_t)avio_rl32(model_file_context);
+ dnn_size += 8;
+ layer->params = params;
+
+ return dnn_size;
+}
+
int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
int32_t output_operand_index, const void *parameters)
{
OpenPOWER on IntegriCloud