* [FFmpeg-devel] [PATCH] swscale/format: add missing fmt_shift for gray12/12 msb formats (PR #20849)
@ 2025-11-06 14:58 Niklas Haas via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Niklas Haas via ffmpeg-devel @ 2025-11-06 14:58 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Niklas Haas
PR #20849 opened by Niklas Haas (haasn)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20849
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20849.patch
The MSB YUV formats were added, but the gray formats were not. Seems to have
been an oversight.
Fixes: a5be0ecbfdab24632a10c8a6714844530f76d368
>From c9710dae3c6151a22f0fff60f0a9b4514f6a3b97 Mon Sep 17 00:00:00 2001
From: Niklas Haas <git@haasn.dev>
Date: Thu, 6 Nov 2025 15:56:24 +0100
Subject: [PATCH] swscale/format: add missing fmt_shift for gray12/12 msb
formats
The MSB YUV formats were added, but the gray formats were not. Seems to have
been an oversight.
Fixes: a5be0ecbfdab24632a10c8a6714844530f76d368
---
libswscale/format.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libswscale/format.c b/libswscale/format.c
index e4b9b264e5..c4c4142fc6 100644
--- a/libswscale/format.c
+++ b/libswscale/format.c
@@ -757,6 +757,8 @@ static int fmt_shift(enum AVPixelFormat fmt)
case AV_PIX_FMT_YUV444P10MSBLE:
case AV_PIX_FMT_GBRP10MSBBE:
case AV_PIX_FMT_GBRP10MSBLE:
+ case AV_PIX_FMT_GRAY10MSBBE:
+ case AV_PIX_FMT_GRAY10MSBLE:
return 6;
case AV_PIX_FMT_P012BE:
case AV_PIX_FMT_P012LE:
@@ -776,6 +778,8 @@ static int fmt_shift(enum AVPixelFormat fmt)
case AV_PIX_FMT_YUV444P12MSBLE:
case AV_PIX_FMT_GBRP12MSBBE:
case AV_PIX_FMT_GBRP12MSBLE:
+ case AV_PIX_FMT_GRAY12MSBBE:
+ case AV_PIX_FMT_GRAY12MSBLE:
return 4;
}
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-06 14:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 14:58 [FFmpeg-devel] [PATCH] swscale/format: add missing fmt_shift for gray12/12 msb formats (PR #20849) Niklas Haas via ffmpeg-devel
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