Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Guo, Yejun" <yejun.guo-at-intel.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] libavfilter/dnn: fix openvino async mode
Date: Fri, 16 Dec 2022 11:02:04 +0000
Message-ID: <PH7PR11MB59572FB42B381A2C0549CFA6F1E69@PH7PR11MB5957.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH7PR11MB58878E868D9EE9845AC141C5DAE69@PH7PR11MB5887.namprd11.prod.outlook.com>



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Saliev, Rafik F
> Sent: Friday, December 16, 2022 6:35 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH v2] libavfilter/dnn: fix openvino async mode
> 
> Bugfix: The OpenVino DNN backend in the 'async' mode sets 'task-
> >inference_done' to 'complete' prior to data copy from OpenVino output
> buffer to task's output frame.
> This order causes task destroy in ff_dnn_get_result_common() prior to model
> output processing.
> 
> Signed-off-by: Rafik Saliev <rafik.f.saliev@intel.com>
> ---
>  libavfilter/dnn/dnn_backend_openvino.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/dnn/dnn_backend_openvino.c
> b/libavfilter/dnn/dnn_backend_openvino.c
> index b494f26f55..b67f288336 100644
> --- a/libavfilter/dnn/dnn_backend_openvino.c
> +++ b/libavfilter/dnn/dnn_backend_openvino.c
> @@ -244,7 +244,6 @@ static void infer_completion_callback(void *args)
>      av_assert0(request->lltask_count >= 1);
>      for (int i = 0; i < request->lltask_count; ++i) {
>          task = request->lltasks[i]->task;
> -        task->inference_done++;
> 
>          switch (ov_model->model->func_type) {
>          case DFT_PROCESS_FRAME:
> @@ -278,6 +277,7 @@ static void infer_completion_callback(void *args)
>              break;
>          }
> 
> +        task->inference_done++;
>          av_freep(&request->lltasks[i]);
>          output.data = (uint8_t *)output.data
>                        + output.width * output.height * output.channels *
> get_datatype_size(output.dt);
> --
LGTM, will push soon, thanks.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2022-12-16 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 10:31 [FFmpeg-devel] [PATCH] libavfilter/dnn/dnn_backend_openvino.c: " Saliev, Rafik F
2022-12-16  6:57 ` Guo, Yejun
2022-12-16 10:34   ` [FFmpeg-devel] [PATCH v2] libavfilter/dnn: " Saliev, Rafik F
2022-12-16 11:02     ` Guo, Yejun [this message]
2022-12-16 10:52   ` [FFmpeg-devel] [PATCH] libavfilter/dnn/dnn_backend_openvino.c: " Saliev, Rafik F
2022-12-16  9:37 [FFmpeg-devel] [PATCH v2] libavfilter/dnn: " Saliev, Rafik F

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH7PR11MB59572FB42B381A2C0549CFA6F1E69@PH7PR11MB5957.namprd11.prod.outlook.com \
    --to=yejun.guo-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git