1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

swscale/input: add support for UYYVYY411

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-03-06 13:57:03 -03:00
parent 154c00514d
commit 228713ef5d
3 changed files with 25 additions and 2 deletions

View File

@ -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;

View File

@ -91,7 +91,7 @@ static const FormatEntry format_entries[] = {
[AV_PIX_FMT_YUVJ444P] = { 1, 1 },
[AV_PIX_FMT_YVYU422] = { 1, 1 },
[AV_PIX_FMT_UYVY422] = { 1, 1 },
[AV_PIX_FMT_UYYVYY411] = { 0, 0 },
[AV_PIX_FMT_UYYVYY411] = { 1, 0 },
[AV_PIX_FMT_BGR8] = { 1, 1 },
[AV_PIX_FMT_BGR4] = { 0, 1 },
[AV_PIX_FMT_BGR4_BYTE] = { 1, 1 },

View File

@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBSWSCALE_VERSION_MINOR 13
#define LIBSWSCALE_VERSION_MICRO 101
#define LIBSWSCALE_VERSION_MICRO 102
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
LIBSWSCALE_VERSION_MINOR, \