aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-09-05 13:41:00 -0700
committerPhilip Langdale <philipl@overt.org>2022-09-10 12:29:12 -0700
commit366f073c624779af852bacbc9a0a416e27ff96f7 (patch)
tree2df07d3614a3d5cc362abc1150cf1704d8e4b917 /libswscale
parentcaf8d4d256cc21f09570bdcbdbe8dde4406834ca (diff)
downloadffmpeg-366f073c624779af852bacbc9a0a416e27ff96f7.tar.gz
swscale/output: add support for XV36LE
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/output.c29
-rw-r--r--libswscale/utils.c2
-rw-r--r--libswscale/version.h2
3 files changed, 31 insertions, 2 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index da6c026916..228dab462e 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2601,6 +2601,32 @@ yuv2ayuv64le_X_c(SwsContext *c, const int16_t *lumFilter,
}
static void
+yuv2xv36le_X_c(SwsContext *c, const int16_t *lumFilter,
+ const int16_t **lumSrc, int lumFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ const int16_t **chrVSrc, int chrFilterSize,
+ const int16_t **alpSrc, uint8_t *dest, int dstW, int y)
+{
+ int i;
+ for (i = 0; i < dstW; i++) {
+ int Y = 1 << 14, U = 1 << 14, V = 1 << 14;
+ int j;
+
+ for (j = 0; j < lumFilterSize; j++)
+ Y += lumSrc[j][i] * lumFilter[j];
+
+ for (j = 0; j < chrFilterSize; j++) {
+ U += chrUSrc[j][i] * chrFilter[j];
+ V += chrVSrc[j][i] * chrFilter[j];
+ }
+
+ AV_WL16(dest + 8 * i + 2, av_clip_uintp2(Y >> 15, 12) << 4);
+ AV_WL16(dest + 8 * i + 0, av_clip_uintp2(U >> 15, 12) << 4);
+ AV_WL16(dest + 8 * i + 4, av_clip_uintp2(V >> 15, 12) << 4);
+ }
+}
+
+static void
yuv2vuyX_X_c(SwsContext *c, const int16_t *lumFilter,
const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrUSrc,
@@ -3192,5 +3218,8 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
case AV_PIX_FMT_VUYX:
*yuv2packedX = yuv2vuyx_X_c;
break;
+ case AV_PIX_FMT_XV36LE:
+ *yuv2packedX = yuv2xv36le_X_c;
+ break;
}
}
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 599c326754..9166e80002 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -266,7 +266,7 @@ static const FormatEntry format_entries[] = {
[AV_PIX_FMT_RGBAF16BE] = { 1, 0 },
[AV_PIX_FMT_RGBAF16LE] = { 1, 0 },
[AV_PIX_FMT_XV30LE] = { 1, 0 },
- [AV_PIX_FMT_XV36LE] = { 1, 0 },
+ [AV_PIX_FMT_XV36LE] = { 1, 1 },
};
int ff_shuffle_filter_coefficients(SwsContext *c, int *filterPos,
diff --git a/libswscale/version.h b/libswscale/version.h
index 284c13cc23..c35e51138d 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBSWSCALE_VERSION_MINOR 8
-#define LIBSWSCALE_VERSION_MICRO 109
+#define LIBSWSCALE_VERSION_MICRO 110
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
LIBSWSCALE_VERSION_MINOR, \