From: Marvin Scholz <epirat07@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Marvin Scholz <epirat07@gmail.com> Subject: [FFmpeg-devel] [PATCH v3 3/4] lavfi/vf_xfade_vulkan: add wipedown transition Date: Wed, 7 Jun 2023 00:23:01 +0200 Message-ID: <20230606222302.21495-3-epirat07@gmail.com> (raw) In-Reply-To: <20230606222302.21495-1-epirat07@gmail.com> --- libavfilter/vf_xfade_vulkan.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libavfilter/vf_xfade_vulkan.c b/libavfilter/vf_xfade_vulkan.c index 0244802e9c..58552ab734 100644 --- a/libavfilter/vf_xfade_vulkan.c +++ b/libavfilter/vf_xfade_vulkan.c @@ -71,6 +71,7 @@ enum XFadeTransitions { WIPELEFT, WIPERIGHT, WIPEUP, + WIPEDOWN, NB_TRANSITIONS, }; @@ -116,11 +117,23 @@ static const char transition_wipeup[] = { C(0, } ) }; +static const char transition_wipedown[] = { + C(0, void transition(int idx, ivec2 pos, float progress) ) + C(0, { ) + C(1, ivec2 size = imageSize(output_images[idx]); ) + C(1, int s = int(size.y * progress); ) + C(1, vec4 a = texture(a_images[idx], pos); ) + C(1, vec4 b = texture(b_images[idx], pos); ) + C(1, imageStore(output_images[idx], pos, pos.y > s ? a : b); ) + C(0, } ) +}; + static const char* transitions_map[NB_TRANSITIONS] = { [FADE] = transition_fade, [WIPELEFT] = transition_wipeleft, [WIPERIGHT] = transition_wiperight, [WIPEUP] = transition_wipeup, + [WIPEDOWN] = transition_wipedown, }; static av_cold int init_vulkan(AVFilterContext *avctx) @@ -467,6 +480,7 @@ static const AVOption xfade_vulkan_options[] = { { "wipeleft", "wipe left transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPELEFT}, 0, 0, FLAGS, "transition" }, { "wiperight", "wipe right transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPERIGHT}, 0, 0, FLAGS, "transition" }, { "wipeup", "wipe up transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEUP}, 0, 0, FLAGS, "transition" }, + { "wipedown", "wipe down transition", 0, AV_OPT_TYPE_CONST, {.i64=WIPEDOWN}, 0, 0, FLAGS, "transition" }, { "duration", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64=1000000}, 0, 60000000, FLAGS }, { "offset", "set cross fade start relative to first input stream", OFFSET(offset), AV_OPT_TYPE_DURATION, {.i64=0}, INT64_MIN, INT64_MAX, FLAGS }, { NULL } -- 2.37.0 (Apple Git-136) _______________________________________________ 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".
next prev parent reply other threads:[~2023-06-06 22:24 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-30 1:33 [FFmpeg-devel] [PATCH] libavfilter: add vf_xfade_vulkan Marvin Scholz 2023-05-30 1:58 ` [FFmpeg-devel] [PATCH v2] " Marvin Scholz 2023-05-30 12:30 ` Niklas Haas 2023-06-06 22:22 ` [FFmpeg-devel] [PATCH v3 1/4] " Marvin Scholz 2023-06-06 22:23 ` [FFmpeg-devel] [PATCH v3 2/4] lavfi/vf_xfade_vulkan: add wipeup transition Marvin Scholz 2023-06-06 22:23 ` Marvin Scholz [this message] 2023-06-06 22:23 ` [FFmpeg-devel] [PATCH v3 4/4] lavfi/vf_xfade_vulkan: add slide transitions Marvin Scholz 2023-05-30 8:05 ` [FFmpeg-devel] [PATCH] libavfilter: add vf_xfade_vulkan Paul B Mahol
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=20230606222302.21495-3-epirat07@gmail.com \ --to=epirat07@gmail.com \ --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