From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 666374FF35 for ; Thu, 3 Jul 2025 22:49:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7C84F68F3A4; Fri, 4 Jul 2025 01:48:57 +0300 (EEST) Received: from btbn.de (btbn.de [144.76.60.213]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 9D2B268F362 for ; Fri, 4 Jul 2025 01:48:50 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 1263A27FFCC8D for ; Fri, 04 Jul 2025 00:48:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1751582928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5o5/P8vqRZFqgR0AR2jvhCLmW+pWeJzOf1hXGF3ffcw=; b=XzJtK6fZtGMewjqKi/rD3jkRLrXPRUwVrH8mCILFmexUi/C/SQWDtTDB/RONpUxvwfpYjC dCSqwmQ6vqxfhzIOSjvQkJnu4zq35WDTLtELJACYfkz1XdkIfrqfts/3LiHSMObK/0qo3V cOFpYHiKRDWRLLo/qrnbNgcKvKxD6abfoUDBJjHmYPm13mObSnIyhj7FTsewSUepSZuAhc KWCP449k795Y4rcCpQcHoeFEmx4KX56clgryzYstTVviZwbGqVLCdsvidy5i9mtGo4ZG+r Ynd6ZQ7iq4yjZp42b13Ik78FsnMR1VUUmemuZhC6lZ23qtw4elpcnurTQocRfA== Message-ID: <29007532-2b55-4018-9f0b-c0f6b70161a5@rothenpieler.org> Date: Fri, 4 Jul 2025 00:48:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20250616233931.192291-1-jestrada.list@gmail.com> <924e11e3-4475-4457-9c65-9f5862be25f0@rothenpieler.org> Content-Language: en-US From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avfilter: add pad_cuda filter 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 03.07.2025 23:05, Jorge Estrada wrote: > ping Completely forgot about this, sorry. Patch does not compile, cause vector_types.h does not exist. If I remove it, it can't find uchar2, which is purely a CUDA side type. Isn't that whole construct around there entirely unneeded? You can always just pass &s->parsed_color[plane] in place of p_fill_val, and it'll always be correct. That re-invented RGB to YUV conversion is also entirely unneccesary. There's macros for that in colorspace.h Also, there's A LOT of use of mixed declarations and code, though I think that is fine nowadays, and the warnings about it have since been disabled. So it's probably fine to leave it as-is. There's also a bit of potential to further generalize and micro-optimize the CUDA kernel and calling it. Primarily moving the one extra division out of the kernel, and doing it in advance for it. (There's also a tiny superfluous section that sets hsub/vsub to the same value again if it's NV12, which I removed). See the second commit for what I mean. I've pushed the necessary fixes and further optimization and generalization to GitHub: https://github.com/BtbN/FFmpeg https://github.com/BtbN/FFmpeg/commit/45e4baa3d82c6e6fffbd6c1ac8389e305a3f9137 https://github.com/BtbN/FFmpeg/commit/14cf522b51e66e65ca60e0447348f2bfbcf631ea Works fine for me like that, if you're fine with those as well, I'll squash them into the main commit and merge it. _______________________________________________ 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".