From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 2/3] swscale/utils: correctly return from sws_init_single_context Date: Wed, 22 Nov 2023 14:16:48 +0100 Message-ID: <20231122131648.GE3543730@pb2> (raw) In-Reply-To: <20231122134505.GD14800@haasn.xyz> [-- Attachment #1.1: Type: text/plain, Size: 2111 bytes --] 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 <michael@niedermayer.cc> 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 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 [...] -- 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 [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2023-11-22 13:17 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-13 15:32 [FFmpeg-devel] [PATCH 1/3] swscale: don't assign range converters for float Niklas Haas 2023-11-13 15:32 ` [FFmpeg-devel] [PATCH 2/3] swscale/utils: correctly return from sws_init_single_context Niklas Haas 2023-11-13 18:30 ` Michael Niedermayer 2023-11-14 13:14 ` Niklas Haas 2023-11-14 22:52 ` Michael Niedermayer 2023-11-22 12:45 ` Niklas Haas 2023-11-22 13:16 ` Michael Niedermayer [this message] 2023-11-13 15:32 ` [FFmpeg-devel] [PATCH 3/3] swscale/utils: don't early return in yuv alpha blendaway Niklas Haas 2023-11-14 2:27 ` [FFmpeg-devel] [PATCH 1/3] swscale: don't assign range converters for float Chen, Wenbin 2023-11-27 2:10 ` Chen, Wenbin 2023-12-12 7:54 ` Chen, Wenbin 2024-01-10 13:15 ` Niklas Haas 2024-01-11 2:59 ` Chen, Wenbin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231122131648.GE3543730@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git