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 070E14C796 for ; Fri, 2 Aug 2024 19:06:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AFB268D81A; Fri, 2 Aug 2024 22:06:30 +0300 (EEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2928B68D477 for ; Fri, 2 Aug 2024 22:06:24 +0300 (EEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fd6ed7688cso72166895ad.3 for ; Fri, 02 Aug 2024 12:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722625582; x=1723230382; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=VFB1iH5OV2oFVUTjOKGrFCW6VLX2zXwCmj2gBXXDrWc=; b=YCdxyQzz125BEhxaM9vaKAc5NhnPzMa4FJDq9/9F8ZfN4rSGYCz1Y0h4O2wp5Dgery uLZPCeBINacMhjrjmRbT8HNwGFybBWaV+SLUfG6/YCtVsvF1f9G5/G0eFrRPN8FwyaOi 5CuuYWXENBBrYc5ZfbF0dy0Qa90JeqfWIZlRbzHIn6E1VXnRpZzVNCIdTb4/1PPGr3J5 ip16Z6fF0X5uOS+QByyPed9TxaW6kAD3sEBgP+xgNhRcbn8nk9Eg6nZIcyY+anMrlzuD 1dwxZC/IOHd7gD39ievJe5qIBLNSlLUFpJCt9A65hW+mDAnEYdhEn/Q+wnOVP+09YAMo 97Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722625582; x=1723230382; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VFB1iH5OV2oFVUTjOKGrFCW6VLX2zXwCmj2gBXXDrWc=; b=hzmcwmXcgYj35Fnk3ZuDSUYki6oUKo8SDGz+Qsvwh+C/iHymlhefzhPxYATNYZFXja EvJ3FRYVWDMw1RE/ngQK9yTabi6EfmApjksc/Y2dEpI1SX6Y/bIitLCkjqjn1Xy2ah+s GlVDvzxXiwchwGxgRC4b72J2kLEO8L3FLTyrgclJrNlOKZ80FPhoYoJCwsV3bI3k35IE S3Y13Ni/5nmPWzzpep3Thf6Q+WK5qNV4EUliB1N87F2Js0HxNEcOZGpy5EfRpqGFIYcT azKlEZi2f0jXGzzmkw4aZzFyM8wYcYIrQNSDAghfoAuWEC//rSBYDTqlw57584B52bZE hN6Q== X-Gm-Message-State: AOJu0YwD1OUVzHInXMbNOhXE4j11FhPM7+QW5IOZP5Q6yhhYyeeLMhcM rhNJvmfbc3a1nNQTfLarwds7rAiFewaYEKkhU31bWdwLF8pEG68TuKc/pQ== X-Google-Smtp-Source: AGHT+IHoNyXFbR1GRH9dzHdn/8/9RkNIoD8y8QA7XfKWansjHUdPeTkyialSu4cDTMAIaFHgd/DC1g== X-Received: by 2002:a17:902:da83:b0:1ff:507f:7db2 with SMTP id d9443c01a7336-1ff574e2b8fmr60552795ad.64.1722625581376; Fri, 02 Aug 2024 12:06:21 -0700 (PDT) Received: from [192.168.0.14] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff59058cf7sm20713655ad.181.2024.08.02.12.06.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Aug 2024 12:06:20 -0700 (PDT) Message-ID: Date: Fri, 2 Aug 2024 16:07:12 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20240731125523.63406-1-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20240731125523.63406-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avutil/frame: use the maximum compile time supported alignment for strides 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 7/31/2024 9:55 AM, James Almer wrote: > This puts lavu frame buffer allocator helpers in sync with lavc's decoder frame > buffer allocator's STRIDE_ALIGN define. > > Remove the comment about av_cpu_max_align() while at it as using it is not > ideal when CPU flags can be changed mid process. > > Should fix ticket #11116. > > Signed-off-by: James Almer > --- > libavutil/frame.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavutil/frame.c b/libavutil/frame.c > index 673a9afb3b..5cbfc6a48b 100644 > --- a/libavutil/frame.c > +++ b/libavutil/frame.c > @@ -166,6 +166,8 @@ void av_frame_free(AVFrame **frame) > av_freep(frame); > } > > +#define ALIGN (HAVE_SIMD_ALIGN_64 ? 64 : 32) > + > static int get_video_buffer(AVFrame *frame, int align) > { > const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); > @@ -182,7 +184,7 @@ static int get_video_buffer(AVFrame *frame, int align) > > if (!frame->linesize[0]) { > if (align <= 0) > - align = 32; /* STRIDE_ALIGN. Should be av_cpu_max_align() */ > + align = ALIGN; > > for (int i = 1; i <= align; i += i) { > ret = av_image_fill_linesizes(frame->linesize, frame->format, Will apply. _______________________________________________ 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".