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 E142242A28 for ; Mon, 11 Apr 2022 20:46:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 28E3D68B2DF; Mon, 11 Apr 2022 23:46:14 +0300 (EEST) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 07F9F68B0A6 for ; Mon, 11 Apr 2022 23:46:06 +0300 (EEST) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 1CFA2100003 for ; Mon, 11 Apr 2022 20:46:05 +0000 (UTC) Date: Mon, 11 Apr 2022 22:46:04 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220411204604.GI2829255@pb2> References: <20220411133148.10292-1-michael@niedermayer.cc> <94526f48-fe7b-aa08-0e97-fc705b51d518@gmail.com> MIME-Version: 1.0 In-Reply-To: <94526f48-fe7b-aa08-0e97-fc705b51d518@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements 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-Type: multipart/mixed; boundary="===============8819443736325160586==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8819443736325160586== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c8ZV/rncGVobu8dM" Content-Disposition: inline --c8ZV/rncGVobu8dM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2022 at 03:01:57PM -0300, James Almer wrote: >=20 >=20 > On 4/11/2022 10:31 AM, Michael Niedermayer wrote: > > Fixes: issues with non trivial linesize > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavfilter/vf_frei0r.c | 40 ++++++++++++++++++++++++++++++++-------- > > 1 file changed, 32 insertions(+), 8 deletions(-) > >=20 > > diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c > > index 9cd0098e73..c9b698897f 100644 > > --- a/libavfilter/vf_frei0r.c > > +++ b/libavfilter/vf_frei0r.c > > @@ -349,18 +349,41 @@ static int query_formats(AVFilterContext *ctx) > > return ff_set_common_formats(ctx, formats); > > } > > +static AVFrame *getframe(AVFilterLink *link) > > +{ > > + int ret; > > + AVFrame *frame =3D av_frame_alloc(); > > + if (!frame) > > + return NULL; > > + > > + frame->width =3D link->w; > > + frame->height =3D link->h; > > + frame->format =3D link->format; > > + ret =3D av_frame_get_buffer(frame, 16); >=20 > Maybe ff_get_video_buffer can be updated to accept an align argument which > would be used instead of av_cpu_max_align() when not 0, so we don't lose = the > benefits of the frame pool it provides? We need a specific alignment and specific linesize. ff_get_video_buffer() is forwarded to the next filter so a change to it feels moderately messy. Each filter using it would have to deal with specific linesize and alignment requirements. Thats for one odd filter What can be done is to work with ff_default_get_video_buffer() maybe and never use the next filters one. Ill send a patch doing that if it pases tests thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "You are 36 times more likely to die in a bathtub than at the hands of a terrorist. Also, you are 2.5 times more likely to become a president and 2 times more likely to become an astronaut, than to die in a terrorist attack." -- Thoughty2 --c8ZV/rncGVobu8dM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYlSTiQAKCRBhHseHBAsP q4pvAJkBuS0l0xyo8r2tsHDsEv1VtIXeRACcC2CedXb3Dvm7DGEdnXcyJtgzn0Y= =LjGX -----END PGP SIGNATURE----- --c8ZV/rncGVobu8dM-- --===============8819443736325160586== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============8819443736325160586==--