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 D55C24E940 for ; Thu, 12 Jun 2025 12:08:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 8188268C069; Thu, 12 Jun 2025 15:08:29 +0300 (EEST) Received: from relay16.mail.gandi.net (relay16.mail.gandi.net [217.70.178.236]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id ECD93687CCC for ; Thu, 12 Jun 2025 15:08:22 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1AA9F44989 for ; Thu, 12 Jun 2025 12:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1749730102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MDqD5uyezm9C9YbiVLHpqkONrNWpY0l5kb1luwFLEjk=; b=fIkRs/0TtENblXLZcKaOVCz/0y1wKjIt8sy5a3gWEh9HXhzh4YQAdgxRO9uzkKxY25Y74o sO2nNish2Hq7nfhUVXWYXY4Y77cINPaM5ParB4Rmy8jt9dAVQC+j6aaT3OssTopIqEFGuD GQikF37PJ2oUulSVdK7KwfEtU+YD346TQ2NSCCufBVViCIhbJTpUuwgaD0TxI/6enKEuDb 1LAXnTBmDl5oE+mvy4aje4+OHxnVxzuLGWrpF4nS1e1RSvXNkLytgr7hooc5e2/JD+IvIY Xvhrm9JipHUntxNHfv9iic6NAXuDrFLPAEVUsR8yyYDSb4Ib/UGUFz4F+7XD9g== Date: Thu, 12 Jun 2025 14:08:21 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250612120821.GA29660@pb2> References: <01F29F47-C4D1-4AD3-90A9-6C41C12567C8@gmail.com> MIME-Version: 1.0 In-Reply-To: <01F29F47-C4D1-4AD3-90A9-6C41C12567C8@gmail.com> X-GND-State: clean X-GND-Score: -90 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdduhedtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdluddtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepffeltdefveefffehueeuhfdtjeeileeufedtiedtgfehteegffeffeetkefftdfhnecuffhomhgrihhnpehffhhmphgvghdrohhrghenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg Subject: Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_perspective: factor the interpolation code out so that it's usable by other filters 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="===============1234284825019381969==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1234284825019381969== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o+QWqI7TxYjdKDX/" Content-Disposition: inline --o+QWqI7TxYjdKDX/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 12, 2025 at 11:38:59AM +0200, Quentin RENARD wrote: > As mentioned here (https://ffmpeg.org/pipermail/ffmpeg-devel/2025-June/34= 4593.html), this is the first step of a 2 steps patch: move the interpolati= on code out of the vf_perspective filter so that we can use it in a new zoo= mpan filter and apply scale/crop floating point precision there. >=20 > Signed-off-by: Quentin Renard > --- > libavfilter/Makefile | 2 +- > libavfilter/perspective.c | 404 +++++++++++++++++++++++++++++++++++ > libavfilter/perspective.h | 67 ++++++ > libavfilter/vf_perspective.c | 372 +++----------------------------- > 4 files changed, 497 insertions(+), 348 deletions(-) > create mode 100644 libavfilter/perspective.c > create mode 100644 libavfilter/perspective.h >=20 > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 97f8f17272..7c6dfcf4bf 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -426,7 +426,7 @@ OBJS-$(CONFIG_PAD_OPENCL_FILTER) +=3D vf_= pad_opencl.o opencl.o opencl/ > OBJS-$(CONFIG_PALETTEGEN_FILTER) +=3D vf_palettegen.o palett= e.o > OBJS-$(CONFIG_PALETTEUSE_FILTER) +=3D vf_paletteuse.o frames= ync.o palette.o > OBJS-$(CONFIG_PERMS_FILTER) +=3D f_perms.o > -OBJS-$(CONFIG_PERSPECTIVE_FILTER) +=3D vf_perspective.o > +OBJS-$(CONFIG_PERSPECTIVE_FILTER) +=3D vf_perspective.o persp= ective.o > OBJS-$(CONFIG_PHASE_FILTER) +=3D vf_phase.o > OBJS-$(CONFIG_PHOTOSENSITIVITY_FILTER) +=3D vf_photosensitivity.o > OBJS-$(CONFIG_PIXDESCTEST_FILTER) +=3D vf_pixdesctest.o > diff --git a/libavfilter/perspective.c b/libavfilter/perspective.c > new file mode 100644 > index 0000000000..ab200f8532 > --- /dev/null > +++ b/libavfilter/perspective.c [...] > +static int perspective_resample_cubic(AVFilterContext *ctx, void *arg, > + int job, int nb_jobs) > +{ [...] > +static int perspective_resample_linear(AVFilterContext *ctx, void *arg, > + int job, int nb_jobs) > +{ [...] > +static int calc_luts(PerspectiveResampleContext *s, int w, int h, double= ref[4][2]) > +{ [...] > diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c > index 58510f6f13..f5766eed7a 100644 > --- a/libavfilter/vf_perspective.c > +++ b/libavfilter/vf_perspective.c [...] > -static int calc_persp_luts(AVFilterContext *ctx, AVFilterLink *inlink) [...] > -static int resample_cubic(AVFilterContext *ctx, void *arg, > - int job, int nb_jobs) > -{ [...] > -static int resample_linear(AVFilterContext *ctx, void *arg, > - int job, int nb_jobs) > -{ please keep the functions in the same order so that a diff between new libavfilter/perspective.c and old libavfilter/vf_perspective.c is easy readable thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. --o+QWqI7TxYjdKDX/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaErDLAAKCRBhHseHBAsP q7IoAJ0dyiOmunWZLOo+iDIDHBHKXv9F8QCfWZ4hsAKpc23UmtA9ivptCkJOSBA= =X2iD -----END PGP SIGNATURE----- --o+QWqI7TxYjdKDX/-- --===============1234284825019381969== 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". --===============1234284825019381969==--