On Sat, Aug 21, 2021 at 12:56 PM Guo, Yejun <yejun....@intel.com> wrote:
> > > > -----Original Message----- > > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > > Shubhanshu Saxena > > Sent: Saturday, August 21, 2021 3:05 PM > > To: FFmpeg development discussions and patches <ffmpeg- > > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] [PATCH 2/6] libavfilter: Unify Execution > Modes > > in DNN Filters > > > > On Sat, Aug 21, 2021 at 8:41 AM Guo, Yejun <yejun....@intel.com> wrote: > > > > > > > > > > > > -----Original Message----- > > > > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > > > > Shubhanshu Saxena > > > > Sent: 2021年8月20日 22:21 > > > > To: ffmpeg-devel@ffmpeg.org > > > > Cc: Shubhanshu Saxena <shubhanshu....@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....@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@ffmpeg.org > > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > To unsubscribe, visit link above, or email > > > ffmpeg-devel-requ...@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. > > Just add the following change in this patch 2. > > $ git diff > diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c > index 2666abfcdc..11de376753 100644 > --- a/libavfilter/vf_dnn_detect.c > +++ b/libavfilter/vf_dnn_detect.c > @@ -496,7 +496,7 @@ static int dnn_detect_activate_async(AVFilterContext > *filter_ctx) > return 0; > } > > -static int dnn_detect_activate(AVFilterContext *filter_ctx) > +static av_unused int dnn_detect_activate(AVFilterContext *filter_ctx) > { > DnnDetectContext *ctx = filter_ctx->priv; > > diff --git a/libavfilter/vf_dnn_processing.c > b/libavfilter/vf_dnn_processing.c > index 410cc887dc..7435dd4959 100644 > --- a/libavfilter/vf_dnn_processing.c > +++ b/libavfilter/vf_dnn_processing.c > @@ -410,7 +410,7 @@ static int activate_async(AVFilterContext *filter_ctx) > return 0; > } > > -static int activate(AVFilterContext *filter_ctx) > +static av_unused int activate(AVFilterContext *filter_ctx) > { > DnnProcessingContext *ctx = filter_ctx->priv; > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > Got it, thanks. I'll send the v2 of these patches after adding these changes. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".