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 701DB42A3D for ; Mon, 11 Apr 2022 21:22:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAD4F68B344; Tue, 12 Apr 2022 00:22:44 +0300 (EEST) Received: from vie01a-dmta-at01-1.mx.upcmail.net (vie01a-dmta-at01-1.mx.upcmail.net [62.179.121.145]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0386168AC80 for ; Tue, 12 Apr 2022 00:22:39 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1ne1Ua-004yGQ-5i for ffmpeg-devel@ffmpeg.org; Mon, 11 Apr 2022 23:22:36 +0200 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id e1Sen9ya8SgGFe1Uan3ktG; Mon, 11 Apr 2022 23:22:36 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id e1TMn538COPqFe1TNnh0hh; Mon, 11 Apr 2022 23:21:21 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.4 cv=OcX7sjfY c=1 sm=1 tr=0 ts=62549be0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=pZ2TeP17fcRQPCxlCHUA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 11 Apr 2022 23:21:19 +0200 Message-Id: <20220411212120.15692-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220411212120.15692-1-michael@niedermayer.cc> References: <20220411212120.15692-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfMVLDb6wVviSl9VW8gE1FxaqIFUx8Hv3nRkxSST/ogmVrtdI73fqvsqnz035zchyVjMfqfGBL9d72I2KRu9xb/L8AI5ya9+NHhjvxhVI2bh9FiTL5J3J KGqzdU+xHa/8p5pExxTeAdFWhMbPtByEsc6DDOgh1adwNA6OTSL0Mu9sUEpLNsRZlATvcxpBfZiO8A== Subject: [FFmpeg-devel] [PATCH 3/4] avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment 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 MIME-Version: 1.0 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: Signed-off-by: Michael Niedermayer --- libavfilter/video.c | 8 ++++++-- libavfilter/video.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavfilter/video.c b/libavfilter/video.c index b2f0cdf88a..e9eb110ff4 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -38,13 +38,12 @@ AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h) return ff_get_video_buffer(link->dst->outputs[0], w, h); } -AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) +AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int align) { AVFrame *frame = NULL; int pool_width = 0; int pool_height = 0; int pool_align = 0; - int align = av_cpu_max_align(); enum AVPixelFormat pool_format = AV_PIX_FMT_NONE; if (link->hw_frames_ctx && @@ -94,6 +93,11 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) return frame; } +AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) +{ + return ff_default_get_video_buffer2(link, w, h, av_cpu_max_align()); +} + AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h) { AVFrame *ret = NULL; diff --git a/libavfilter/video.h b/libavfilter/video.h index f448e4ada4..f37bab9d03 100644 --- a/libavfilter/video.h +++ b/libavfilter/video.h @@ -24,6 +24,7 @@ #include "avfilter.h" AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h); +AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int align); AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h); /** -- 2.17.1 _______________________________________________ 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".