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 1FBA2477D6 for ; Wed, 22 Nov 2023 12:45:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D18F068CE3F; Wed, 22 Nov 2023 14:45:13 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BF1868B70F for ; Wed, 22 Nov 2023 14:45:06 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4B6C0406FC for ; Wed, 22 Nov 2023 13:45:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1700657105; bh=U5Pq6c2tL7OcnEpXWCSShD7JCS27HGzoRDmBcuRvb+c=; h=Date:From:To:Subject:In-Reply-To:References:From; b=l1NM+QEo1a5ydPvqSt3U2VaBEmmlS2fplFt0drxM/CIi4IWy9HekfH5ByqPbgHHZ3 6gnRhbDrs9TtHm23gHrxWDiMWr2tgAN61A0JEbJty8KTPyDi1N/rdC1pWuziRRCGoY YBDy2Y6bd8M6+5cU5oYep05cELt6aTw2H5gfAGV0= Date: Wed, 22 Nov 2023 13:45:05 +0100 Message-ID: <20231122134505.GD14800@haasn.xyz> From: Niklas Haas To: FFmpeg development discussions and patches In-Reply-To: <20231114225250.GM3543730@pb2> References: <20231113153234.8812-1-ffmpeg@haasn.xyz> <20231113153234.8812-2-ffmpeg@haasn.xyz> <20231113183008.GK3543730@pb2> <20231114141437.GB16959@haasn.xyz> <20231114225250.GM3543730@pb2> MIME-Version: 1.0 Content-Disposition: inline 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: 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: 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 ? > > Given the messi-ness that the always setting results in i would maybe > suggest to explore this and see if this is cleaner. > > Its conceptually not wrong that if parameters change that init should > be redone. I gave this a try, but doing it internally is very tricky for a number of reasons 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. vf_scale is the only current user of this API inside ffmpeg itself, and after the YUVJ removal series this call is no longer needed at all. (All range setup happens at filter init time with filter range negotiation) I think merging this series as-is represents the best short-term fix to the existing fundamental issues with this design. But if you want to rewrite all of swscale init code to allow graceful re-init on range change, be my guest. _______________________________________________ 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".