diff mbox series

[FFmpeg-devel,2/6] swscale/input: add Y216LE input support

Message ID 20241022124847.14314-2-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/6] avutil/pixfmt: add Y216 pixel format | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

James Almer Oct. 22, 2024, 12:48 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libswscale/input.c | 7 +++++++
 libswscale/utils.c | 1 +
 2 files changed, 8 insertions(+)

Comments

Michael Niedermayer Oct. 23, 2024, 3:24 p.m. UTC | #1
On Tue, Oct 22, 2024 at 09:48:43AM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libswscale/input.c | 7 +++++++
>  libswscale/utils.c | 1 +
>  2 files changed, 8 insertions(+)

LGTM

thx

[...]
diff mbox series

Patch

diff --git a/libswscale/input.c b/libswscale/input.c
index bb5e31a428..40629831db 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -601,6 +601,7 @@  static void yvy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
 
 y21xle_wrapper(10, 6)
 y21xle_wrapper(12, 4)
+y21xle_wrapper(16, 0)
 
 static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused1, const uint8_t *unused2, int width,
                        uint32_t *unused, void *opq)
@@ -1757,6 +1758,9 @@  av_cold void ff_sws_init_input_funcs(SwsContext *c,
     case AV_PIX_FMT_Y212LE:
         *chrToYV12 = y212le_UV_c;
         break;
+    case AV_PIX_FMT_Y216LE:
+        *chrToYV12 = y216le_UV_c;
+        break;
     case AV_PIX_FMT_RGBF32LE:
         *chrToYV12 = rgbf32le_to_uv_c;
         break;
@@ -2287,6 +2291,9 @@  av_cold void ff_sws_init_input_funcs(SwsContext *c,
     case AV_PIX_FMT_Y212LE:
         *lumToYV12 = y212le_Y_c;
         break;
+    case AV_PIX_FMT_Y216LE:
+        *lumToYV12 = y216le_Y_c;
+        break;
     case AV_PIX_FMT_X2RGB10LE:
         *lumToYV12 = rgb30leToY_c;
         break;
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 9b23df4dbb..25ed05afee 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -248,6 +248,7 @@  static const FormatEntry format_entries[] = {
     [AV_PIX_FMT_NV42]        = { 1, 1 },
     [AV_PIX_FMT_Y210LE]      = { 1, 1 },
     [AV_PIX_FMT_Y212LE]      = { 1, 1 },
+    [AV_PIX_FMT_Y216LE]      = { 1, 0 },
     [AV_PIX_FMT_X2RGB10LE]   = { 1, 1 },
     [AV_PIX_FMT_X2BGR10LE]   = { 1, 1 },
     [AV_PIX_FMT_P210BE]      = { 1, 1 },