diff options
author | James Almer <[email protected]> | 2025-03-06 13:57:03 -0300 |
---|---|---|
committer | James Almer <[email protected]> | 2025-03-13 15:00:05 -0300 |
commit | 228713ef5dc74b86dea91f55c3743fb075d86399 (patch) | |
tree | b3ddc845e7fae1580e3b06c9afd097bdf708e6db /libswscale/input.c | |
parent | 154c00514d889d27ae84a1001e00f9032fdc1c54 (diff) |
swscale/input: add support for UYYVYY411
Signed-off-by: James Almer <[email protected]>
Diffstat (limited to 'libswscale/input.c')
-rw-r--r-- | libswscale/input.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libswscale/input.c b/libswscale/input.c index 9633df5d19..cab8de6d3f 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -904,6 +904,23 @@ static void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con av_assert1(src1 == src2); } +static void uyyvyyToY_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, + int width, uint32_t *unused, void *opq) +{ + for (int i = 0; i < width; i++) + dst[i] = src[3 * (i >> 1) + 1 + (i & 1)]; +} + +static void uyyvyyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, + const uint8_t *src2, int width, uint32_t *unused, void *opq) +{ + for (int i = 0; i < width; i++) { + dstU[i] = src1[6 * i + 0]; + dstV[i] = src1[6 * i + 3]; + } + av_assert1(src1 == src2); +} + static av_always_inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2, const uint8_t *src, int width) { @@ -1714,6 +1731,9 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c, case AV_PIX_FMT_UYVY422: *chrToYV12 = uyvyToUV_c; break; + case AV_PIX_FMT_UYYVYY411: + *chrToYV12 = uyyvyyToUV_c; + break; case AV_PIX_FMT_VYU444: *chrToYV12 = vyuToUV_c; break; @@ -2351,6 +2371,9 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c, case AV_PIX_FMT_UYVY422: *lumToYV12 = uyvyToY_c; break; + case AV_PIX_FMT_UYYVYY411: + *lumToYV12 = uyyvyyToY_c; + break; case AV_PIX_FMT_VYU444: *lumToYV12 = vyuToY_c; break; |