diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2019-10-21 20:38:10 +0800 |
---|---|---|
committer | Pedro Arthur <bygrandao@gmail.com> | 2019-10-30 11:00:41 -0300 |
commit | e1b45b85963b5aa9d67e23638ef9b045e7fbd875 (patch) | |
tree | 8f42ca165f693649ea2ec8f6f9a8e62c1a505027 /libavfilter/dnn/dnn_backend_native_layer_pad.c | |
parent | dff39ea9f0154ec52b7548b122a4a5332df3c2c6 (diff) |
avfilter/dnn: get the data type of network output from dnn execution result
so, we can make a filter more general to accept different network
models, by adding a data type convertion after getting data from network.
After we add dt field into struct DNNData, it becomes the same as
DNNInputData, so merge them with one struct: DNNData.
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_pad.c')
-rw-r--r-- | libavfilter/dnn/dnn_backend_native_layer_pad.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_backend_native_layer_pad.c b/libavfilter/dnn/dnn_backend_native_layer_pad.c index 8fa35de196..8e5959bdd1 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_pad.c +++ b/libavfilter/dnn/dnn_backend_native_layer_pad.c @@ -105,6 +105,7 @@ int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_ind output_operand->dims[1] = new_height; output_operand->dims[2] = new_width; output_operand->dims[3] = new_channel; + output_operand->data_type = operands[input_operand_index].data_type; output_operand->length = calculate_operand_data_length(output_operand); output_operand->data = av_realloc(output_operand->data, output_operand->length); if (!output_operand->data) |