On Tue, 14 Nov 2023 23:52:50 +0100 Michael Niedermayer <mich...@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 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-requ...@ffmpeg.org with subject "unsubscribe".