Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: softworkz <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: softworkz <softworkz@hotmail.com>
Subject: [FFmpeg-devel] [PATCH 03/11] avfilter/overlay_vaapi: remove double framesync init
Date: Mon, 10 Oct 2022 10:54:33 +0000
Message-ID: <2bd535abb506d1af278e1146de38529c22ed625b.1665399281.git.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.42.ffstaging.FFmpeg.1665399281.ffmpegagent@gmail.com>

From: softworkz <softworkz@hotmail.com>

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libavfilter/vf_overlay_vaapi.c | 31 +++++--------------------------
 1 file changed, 5 insertions(+), 26 deletions(-)

diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c
index cf17426b5d..66e736cce4 100644
--- a/libavfilter/vf_overlay_vaapi.c
+++ b/libavfilter/vf_overlay_vaapi.c
@@ -265,28 +265,6 @@ fail:
     return err;
 }
 
-static int overlay_vaapi_init_framesync(AVFilterContext *avctx)
-{
-    OverlayVAAPIContext *ctx = avctx->priv;
-    int ret, i;
-
-    ctx->fs.on_event = overlay_vaapi_blend;
-    ctx->fs.opaque   = ctx;
-    ret = ff_framesync_init(&ctx->fs, avctx, avctx->nb_inputs);
-    if (ret < 0)
-        return ret;
-
-    for (i = 0; i < avctx->nb_inputs; i++) {
-        FFFrameSyncIn *in = &ctx->fs.in[i];
-        in->before    = EXT_STOP;
-        in->after     = EXT_INFINITY;
-        in->sync      = i ? 1 : 2;
-        in->time_base = avctx->inputs[i]->time_base;
-    }
-
-    return ff_framesync_configure(&ctx->fs);
-}
-
 static int overlay_vaapi_config_output(AVFilterLink *outlink)
 {
     AVFilterContext  *avctx  = outlink->src;
@@ -294,10 +272,7 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
     VAAPIVPPContext *vpp_ctx = avctx->priv;
     int err;
 
-    err = overlay_vaapi_init_framesync(avctx);
-    if (err < 0)
-        return err;
-
+    outlink->time_base = avctx->inputs[0]->time_base;
     vpp_ctx->output_width  = avctx->inputs[0]->w;
     vpp_ctx->output_height = avctx->inputs[0]->h;
 
@@ -313,6 +288,10 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
     if (err < 0)
         return err;
 
+    ctx->fs.on_event  = overlay_vaapi_blend;
+    ctx->fs.opaque    = ctx;
+    ctx->fs.time_base = outlink->time_base;
+
     return ff_framesync_configure(&ctx->fs);
 }
 
-- 
ffmpeg-codebot

_______________________________________________
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".

  parent reply	other threads:[~2022-10-10 10:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 10:54 [FFmpeg-devel] [PATCH 00/11] Fixes and Enhancements for VAAPI Overlay ffmpegagent
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 01/11] avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT softworkz
2022-10-31  5:55   ` Xiang, Haihao
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 02/11] avfilter/overlay_vaapi: build filter params just once softworkz
2022-10-10 10:54 ` softworkz [this message]
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 04/11] avfilter/overlay_vaapi: handle secondary null input softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 05/11] avfilter/overlay_vaapi: reformat options softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 06/11] avfilter/overlay_vaapi: remove redundant .get_buffer assignments softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 07/11] avfilter/overlay_vaapi: add framesync options softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 08/11] avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 09/11] avfilter/overlay_vaapi: enable expressions for overlay parameters softworkz
2022-10-31  5:43   ` Xiang, Haihao
2022-10-31  5:56     ` Soft Works
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 10/11] doc/filters.texi: remove incorrect statement softworkz
2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 11/11] doc/filters.texi: update overlay_vaapi documentation softworkz
2022-10-10 11:08   ` Gyan Doshi
2022-10-10 11:25     ` Soft Works
2022-10-31  6:19 ` [FFmpeg-devel] [PATCH v2 00/11] Fixes and Enhancements for VAAPI Overlay ffmpegagent
2022-10-31  6:19   ` [FFmpeg-devel] [PATCH v2 01/11] avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT softworkz
2022-11-04  2:07     ` Xiang, Haihao
2022-11-07  3:10       ` Xiang, Haihao
2022-10-31  6:19   ` [FFmpeg-devel] [PATCH v2 02/11] avfilter/overlay_vaapi: build filter params just once softworkz
2022-10-31  6:19   ` [FFmpeg-devel] [PATCH v2 03/11] avfilter/overlay_vaapi: remove double framesync init softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 04/11] avfilter/overlay_vaapi: handle secondary null input softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 05/11] avfilter/overlay_vaapi: reformat options softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 06/11] avfilter/overlay_vaapi: remove redundant .get_buffer assignments softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 07/11] avfilter/overlay_vaapi: add framesync options softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 08/11] avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 09/11] avfilter/overlay_vaapi: enable expressions for overlay parameters softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 10/11] doc/filters.texi: remove incorrect statement softworkz
2022-10-31  6:20   ` [FFmpeg-devel] [PATCH v2 11/11] doc/filters.texi: update overlay_vaapi documentation softworkz

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=2bd535abb506d1af278e1146de38529c22ed625b.1665399281.git.ffmpegagent@gmail.com \
    --to=ffmpegagent@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=softworkz@hotmail.com \
    /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