]> git.sesse.net Git - ffmpeg/commit
dnn: put DNNModel.set_input and DNNModule.execute_model together
authorGuo, Yejun <yejun.guo@intel.com>
Thu, 10 Sep 2020 14:29:57 +0000 (22:29 +0800)
committerGuo, Yejun <yejun.guo@intel.com>
Mon, 21 Sep 2020 13:26:56 +0000 (21:26 +0800)
commitfce3e3e137843d86411f8868f18e1c3f472de0e5
tree4ad669abc4ea7fc78220f4b24f0455fb17a8234b
parent2003e32f62d94ba75b59d70632c9f2862b383591
dnn: put DNNModel.set_input and DNNModule.execute_model together

suppose we have a detect and classify filter in the future, the
detect filter generates some bounding boxes (BBox) as AVFrame sidedata,
and the classify filter executes DNN model for each BBox. For each
BBox, we need to crop the AVFrame, copy data to DNN model input and do
the model execution. So we have to save the in_frame at DNNModel.set_input
and use it at DNNModule.execute_model, such saving is not feasible
when we support async execute_model.

This patch sets the in_frame as execution_model parameter, and so
all the information are put together within the same function for
each inference. It also makes easy to support BBox async inference.
libavfilter/dnn/dnn_backend_native.c
libavfilter/dnn/dnn_backend_native.h
libavfilter/dnn/dnn_backend_openvino.c
libavfilter/dnn/dnn_backend_openvino.h
libavfilter/dnn/dnn_backend_tf.c
libavfilter/dnn/dnn_backend_tf.h
libavfilter/dnn_interface.h
libavfilter/vf_derain.c
libavfilter/vf_dnn_processing.c
libavfilter/vf_sr.c