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 9C794424A9 for ; Wed, 16 Mar 2022 22:01:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0ACC968B11E; Thu, 17 Mar 2022 00:01:28 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 16247680226 for ; Thu, 17 Mar 2022 00:01:21 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 0DE86E65D2 for ; Wed, 16 Mar 2022 23:01:21 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FsH-ePUj98JS for ; Wed, 16 Mar 2022 23:01:19 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 4973EE5302 for ; Wed, 16 Mar 2022 23:01:19 +0100 (CET) Date: Wed, 16 Mar 2022 23:01:19 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <905fd001-1562-816d-332e-4a0d10fcbfab@gmail.com> Message-ID: <90d19382-6ae2-a1a5-719a-87433cb5f5d9@passwd.hu> References: <20220314210603.23870-1-cus@passwd.hu> <20220314210603.23870-4-cus@passwd.hu> <905fd001-1562-816d-332e-4a0d10fcbfab@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_zscale: realign output buffer if needed 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 Wed, 16 Mar 2022, James Almer wrote: > On 3/14/2022 6:06 PM, Marton Balint wrote: >> Output buffer alignment might be different to ZIMG_ALIGNMENT or it may not >> be >> aligned at all if a downstream filter (e.g. vf_pad) intentionally >> misaligns it. > > av_frame_get_buffer() align parameter is used to align linesizes, not > buffers. av_malloc() has a hardcoded alignment defined at compile time based > on configure settings. Good point. > > If what you need is aligned data pointers, you should either use the trick i > used in the libdav1d wrapper, or change av_malloc() in order to use > av_cpu_max_align(). Actually av_cpu_max_align() also depends on compile time, so your trick is the only way to ensure ZIMG alignment as far as I see... Regards, Marton _______________________________________________ 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".