From: Niklas Haas via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Niklas Haas <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] swscale/format: add missing fmt_shift for gray12/12 msb formats (PR #20849)
Date: Thu, 06 Nov 2025 14:58:44 -0000
Message-ID: <176244112540.25.15157799467839627494@2cb04c0e5124> (raw)
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
reply other threads:[~2025-11-06 14:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=176244112540.25.15157799467839627494@2cb04c0e5124 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@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