Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] swscale: don't assign range converters for float
@ 2023-11-13 15:32 Niklas Haas
  2023-11-13 15:32 ` [FFmpeg-devel] [PATCH 2/3] swscale/utils: correctly return from sws_init_single_context Niklas Haas
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Niklas Haas @ 2023-11-13 15:32 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Niklas Haas

From: Niklas Haas <git@haasn.dev>

This logic was incongruent with logic used elsewhere, where floating
point formats are explicitly exempted from range conversion. Fixes an
issue where floating point formats were not going through special
unscaled converters even when it was otherwise possible.
---
 libswscale/swscale.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 46ba68fe6a..a66db22767 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -534,7 +534,8 @@ av_cold void ff_sws_init_range_convert(SwsContext *c)
 {
     c->lumConvertRange = NULL;
     c->chrConvertRange = NULL;
-    if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) {
+    if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat) &&
+        !isFloat(c->srcFormat) && !isFloat(c->dstFormat)) {
         if (c->dstBpc <= 14) {
             if (c->srcRange) {
                 c->lumConvertRange = lumRangeFromJpeg_c;
-- 
2.42.0

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-11  3:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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