From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5931B40EAF for ; Tue, 6 Jun 2023 22:24:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC42068C34E; Wed, 7 Jun 2023 01:23:45 +0300 (EEST) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F2F3668B9D5 for ; Wed, 7 Jun 2023 01:23:38 +0300 (EEST) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-977e83d536fso363995866b.3 for ; Tue, 06 Jun 2023 15:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686090218; x=1688682218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w23B1qVfFa1DztY1lZ8318lIg6k0FiAwSbweRe4IuJo=; b=R42x9TFTPXga0wAGy9vkwD3mkTlzT/FU3lQTH9zkbR/q+T477fDDnUFKg0j09tzHsn nRPwCmEakTy/Pi7ES+hMZP3j1uziCnEwWcWjJ5ZOJedlg6bMXTjcGz4SBRL8BQt5aWV7 jUkc9qSMeMcrba8RZLj+gXXxYkXxyAp0pdcCfXk2b14gQjYmEEVtROfdJj2kBsWehvaG 5NhyQWeo4lt/JCT0ZjyTalWeRNAq6/R+Znoj+QqMJib516mp1YB1eSzffe6x6sVmgDC3 2bTuM06UNwYrPVEDlmEbJPrdkz9Dip1yHiApc6HlGK3TxrcS1Ln1d27HZejfz5GE4ZYQ WTWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686090218; x=1688682218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w23B1qVfFa1DztY1lZ8318lIg6k0FiAwSbweRe4IuJo=; b=SpefiANnFZ2Vmx+BKZhlpa71+dVz+929VkmsfjNg6N72m16Yxqlyurkq5vfgE8tObm gAFSYjJz8Hw1OajD8zA8+hc1YO4snnhe1YsmwhtDv7VCMkGpsHYod/NgoT0NuVmezDJy 0xJxTUgHRpu6Fva2sUREUpjguH35vbNDugP7aURnoz8YmFrUdbMtDk4KxCYYeTDw77/o d+sLhx3kpKJ7o6FNzHiQZ3EYM7vKTJ1vJrVQqTWnbGUFEiiX/hHBKEWyTeJO/95sQ2hm hfAy8SSVohd/DuDpE9hS8XTvf3eppqLMahiHjsZxcbkqUakFJxpaCx41jwo6llXirD/p A4yw== X-Gm-Message-State: AC+VfDxMh/LeTQKHShC5PRG8VDGO6PgIpl1u6Qx2sN+DAj8j0RJeSwMS cSPoDUZHZwowS8omOyBE7LZrxQd0oEQ= X-Google-Smtp-Source: ACHHUZ75MahX3fE2CaSnIOrtBiJW7Zn2YWcouui0zQARwAoR+lr0IN+viG97jWMQQAPMcXhyXcJiag== X-Received: by 2002:a17:907:6ea1:b0:94f:73db:b390 with SMTP id sh33-20020a1709076ea100b0094f73dbb390mr4334851ejc.65.1686090218112; Tue, 06 Jun 2023 15:23:38 -0700 (PDT) Received: from MBP-von-Marvin.fritz.box (dynamic-2a01-0c22-a967-d100-5963-60a3-e682-252f.c22.pool.telefonica.de. [2a01:c22:a967:d100:5963:60a3:e682:252f]) by smtp.gmail.com with ESMTPSA id f18-20020a170906825200b00965ac1510f8sm6087541ejx.185.2023.06.06.15.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 15:23:37 -0700 (PDT) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Wed, 7 Jun 2023 00:23:01 +0200 Message-Id: <20230606222302.21495-3-epirat07@gmail.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230606222302.21495-1-epirat07@gmail.com> References: <20230530015854.31900-1-epirat07@gmail.com> <20230606222302.21495-1-epirat07@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 3/4] lavfi/vf_xfade_vulkan: add wipedown transition X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marvin Scholz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- 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".