]> git.sesse.net Git - ffmpeg/commit
libavfilter/dnn: determine dnn output during execute_model instead of set_input_output
authorGuo, Yejun <yejun.guo@intel.com>
Thu, 25 Apr 2019 02:14:17 +0000 (10:14 +0800)
committerPedro Arthur <bygrandao@gmail.com>
Wed, 8 May 2019 15:33:00 +0000 (12:33 -0300)
commite2b92896c4ca609c851ea8c1a1bfd5d0918a5269
tree098a919f164031cbc2011d5167a82cf8281fe70e
parent05f86f05bb5060492dd3ff22c23628e4e4334a1e
libavfilter/dnn: determine dnn output during execute_model instead of set_input_output

Currently, within interface set_input_output, the dims/memory of the tensorflow
dnn model output is determined by executing the model with zero input,
actually, the output dims might vary with different input data for networks
such as object detection models faster-rcnn, ssd and yolo.

This patch moves the logic from set_input_output to execute_model which
is suitable for all the cases. Since interface changed, and so dnn_backend_native
also changes.

In vf_sr.c, it knows it's srcnn or espcn by executing the model with zero input,
so execute_model has to be called in function config_props

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
libavfilter/dnn_backend_native.c
libavfilter/dnn_backend_native.h
libavfilter/dnn_backend_tf.c
libavfilter/dnn_backend_tf.h
libavfilter/dnn_interface.h
libavfilter/vf_sr.c