[FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution Modes in DNN Filters

Shubhanshu Saxena shubhanshu.e01 at gmail.com
Sat Aug 21 10:05:25 EEST 2021


On Sat, Aug 21, 2021 at 8:41 AM Guo, Yejun <yejun.guo at intel.com> wrote:

>
>
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > Shubhanshu Saxena
> > Sent: 2021年8月20日 22:21
> > To: ffmpeg-devel at ffmpeg.org
> > Cc: Shubhanshu Saxena <shubhanshu.e01 at gmail.com>
> > Subject: [FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution Modes in
> > DNN Filters
> >
> > This commit unifies the async and sync mode from the DNN filters'
> > perspective. As of this commit, the Native backend only supports
> > synchronous execution mode.
> >
> > Now the user can switch between async and sync mode by using the 'async'
> > option in the backend_configs. The values can be 1 for async and 0 for
> sync
> > mode of execution.
> >
> > This commit affects the following filters:
> > 1. vf_dnn_classify
> > 2. vf_dnn_detect
> > 3. vf_dnn_processing
> > 4. vf_sr
> > 5. vf_derain
> >
> > Signed-off-by: Shubhanshu Saxena <shubhanshu.e01 at gmail.com>
> > ---
> >  libavfilter/dnn/dnn_backend_common.c   |  2 +-
> >  libavfilter/dnn/dnn_backend_common.h   |  5 +-
> >  libavfilter/dnn/dnn_backend_native.c   | 59 +++++++++++++++-
> >  libavfilter/dnn/dnn_backend_native.h   |  6 ++
> >  libavfilter/dnn/dnn_backend_openvino.c | 94 ++++++++++----------------
> > libavfilter/dnn/dnn_backend_openvino.h |  3 +-
> >  libavfilter/dnn/dnn_backend_tf.c       | 35 ++--------
> >  libavfilter/dnn/dnn_backend_tf.h       |  3 +-
> >  libavfilter/dnn/dnn_interface.c        |  8 +--
> >  libavfilter/dnn_filter_common.c        | 23 +------
> >  libavfilter/dnn_filter_common.h        |  3 +-
> >  libavfilter/dnn_interface.h            |  4 +-
> >  libavfilter/vf_derain.c                |  7 ++
> >  libavfilter/vf_dnn_classify.c          |  4 +-
> >  libavfilter/vf_dnn_detect.c            |  8 +--
> >  libavfilter/vf_dnn_processing.c        |  8 +--
> >  libavfilter/vf_sr.c                    |  8 +++
> >  17 files changed, 140 insertions(+), 140 deletions(-)
> >
>
> https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=4638 caught a
> warning:
> CC      libavfilter/vf_dnn_detect.o
> src/libavfilter/vf_dnn_detect.c:499:12: warning: ‘dnn_detect_activate’
> defined but not used [-Wunused-function]
>  static int dnn_detect_activate(AVFilterContext *filter_ctx)
>             ^~~~~~~~~~~~~~~~~~~
> CC      libavfilter/vf_dnn_processing.o
> src/libavfilter/vf_dnn_processing.c:413:12: warning: ‘activate’ defined
> but not used [-Wunused-function]
>  static int activate(AVFilterContext *filter_ctx)
>             ^~~~~~~~
>
> I know it is fixed by the next patch, and the reason to separate these
> patches is for better change tracking.
>
> So, we can add 'av_unused' for these unused functions in this patch.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>

If I understood correctly, we need to rename these unused activate
functions to av_unused in this patch and then in the next patch fix these
as already done. Please correct me if I am wrong.


More information about the ffmpeg-devel mailing list