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 2339F482BD for ; Wed, 22 Nov 2023 13:17:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C34068CE3F; Wed, 22 Nov 2023 15:16:57 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 667ED68C8C8 for ; Wed, 22 Nov 2023 15:16:50 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 45C0340005 for ; Wed, 22 Nov 2023 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1700659009; 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=3SKBWc2MdYSAtiJxmQ5f6Fj3QgniXBQRm9p/LZFKTRk=; b=bX4QueUQG/dQeufOrx10kttKAq+rQfWHLpx2BNDskr9UvLg+BQcKgepk/Q2pmfif2soMkF O6H/wkSg+ISXuE6BfYh+9/GXfFPtCvehJygHx12Yw/zI5Dyx78cwxCklNzo4XvwQWvCMFZ c6lGXOBmN1Zddk4Spor/yb4AFPsvWGzqmqKStZeX8PZV7JczJEGYfWvY45i+qpKUnfQotZ d3lAXLxtdqZN1gmqSsRvmfQgFGjvQH2cu8Lk1hsOefN9v5gZJ3P2qsIv5E0B490bH7XQHH 6B+4MhJmYsPIliwariY2K1BSu53N5CTnyNCZ0KrkbbY/fhENgLHH5MuyDQp/0w== Date: Wed, 22 Nov 2023 14:16:48 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231122131648.GE3543730@pb2> References: <20231113153234.8812-1-ffmpeg@haasn.xyz> <20231113153234.8812-2-ffmpeg@haasn.xyz> <20231113183008.GK3543730@pb2> <20231114141437.GB16959@haasn.xyz> <20231114225250.GM3543730@pb2> <20231122134505.GD14800@haasn.xyz> MIME-Version: 1.0 In-Reply-To: <20231122134505.GD14800@haasn.xyz> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/3] swscale/utils: correctly return from sws_init_single_context 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="===============1699148356651098778==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1699148356651098778== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3giYADmQuHkHIWUa" Content-Disposition: inline --3giYADmQuHkHIWUa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi On Wed, Nov 22, 2023 at 01:45:05PM +0100, Niklas Haas wrote: > On Tue, 14 Nov 2023 23:52:50 +0100 Michael Niedermayer wrote: > > would this result in overall cleaner code or do you see some problems > > with this ? > >=20 > > Given the messi-ness that the always setting results in i would maybe > > suggest to explore this and see if this is cleaner. > >=20 > > Its conceptually not wrong that if parameters change that init should > > be redone. >=20 > I gave this a try, but doing it internally is very tricky for a number > of reasons ok > and does not present obvious advantages over requiring the > user to free+reinit if they wish to change range. So, the best long-term > solution here would be to simply remove srcRange/dstRange from the > signature of sws_setColorspaceDetails. this doesnt feel right logic should be: 1. alloc struct 2. set all details for everything 3. init 4+ use n free or some API with convert between 2 frames and have a automatically cached and managed context where all details are either in the metadata of the frames itself or given = to the function The whole idea of adjusting some details which could affect the required codepath without init is fishy unless everything can be adjusted that way and its the normal way of initing things So IMHO first lets figure out how this should be in the long run (moving to a clean API and clean implemenattion) and then find out how to move towards that in small steps that achieves teh short term goals quickly I dont like trying to achieve the short term goal with messy code and the long term unrelated. Because i have to maintain this and so i will not agree to something that moves us away from a clean long term result That said, if you must change the API, change the API, that i do not mind thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin --3giYADmQuHkHIWUa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZV3/PAAKCRBhHseHBAsP q2xSAJ9pQZdopFclAK/c3B6RVmhrE/jaxQCdH9OtRnxwRT03T7vJpS7Wyat//Xo= =oRJv -----END PGP SIGNATURE----- --3giYADmQuHkHIWUa-- --===============1699148356651098778== 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". --===============1699148356651098778==--