summaryrefslogtreecommitdiffstats
path: root/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2019-10-09 22:08:11 +0800
committerPedro Arthur <bygrandao@gmail.com>2019-10-15 18:56:25 -0300
commit3fd5ac7e92049b4f31026acdb53a762289f71448 (patch)
tree49916c1eca3e45d745c85a10da232c0d981fb3dd /libavfilter/dnn/dnn_backend_native_layer_conv2d.c
parentb78dc27bba2cc612643df7e9c84addc142273e71 (diff)
downloadffmpeg-streaming-3fd5ac7e92049b4f31026acdb53a762289f71448.zip
ffmpeg-streaming-3fd5ac7e92049b4f31026acdb53a762289f71448.tar.gz
avfilter/dnn: unify the layer execution function in native mode
Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Diffstat (limited to 'libavfilter/dnn/dnn_backend_native_layer_conv2d.c')
-rw-r--r--libavfilter/dnn/dnn_backend_native_layer_conv2d.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
index b13b431..594187f 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
@@ -23,7 +23,8 @@
#define CLAMP_TO_EDGE(x, w) ((x) < 0 ? 0 : ((x) >= (w) ? (w - 1) : (x)))
-int convolve(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const ConvolutionalParams *conv_params)
+int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters)
{
float *output;
int32_t input_operand_index = input_operand_indexes[0];
@@ -32,6 +33,7 @@ int convolve(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t
int width = operands[input_operand_index].dims[2];
int channel = operands[input_operand_index].dims[3];
const float *input = operands[input_operand_index].data;
+ const ConvolutionalParams *conv_params = (const ConvolutionalParams *)parameters;
int radius = conv_params->kernel_size >> 1;
int src_linesize = width * conv_params->input_num;
OpenPOWER on IntegriCloud