Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libswscale/output.c')
-rw-r--r--libswscale/output.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index 228dab462e..39e2a04609 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2601,6 +2601,34 @@ yuv2ayuv64le_X_c(SwsContext *c, const int16_t *lumFilter,
}
static void
+yuv2xv30le_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 << 16, U = 1 << 16, V = 1 << 16;
+ 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];
+ }
+
+ Y = av_clip_uintp2(Y >> 17, 10);
+ U = av_clip_uintp2(U >> 17, 10);
+ V = av_clip_uintp2(V >> 17, 10);
+
+ AV_WL32(dest + 4 * i, U | Y << 10 | V << 20);
+ }
+}
+
+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,
@@ -3218,6 +3246,9 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
case AV_PIX_FMT_VUYX:
*yuv2packedX = yuv2vuyx_X_c;
break;
+ case AV_PIX_FMT_XV30LE:
+ *yuv2packedX = yuv2xv30le_X_c;
+ break;
case AV_PIX_FMT_XV36LE:
*yuv2packedX = yuv2xv36le_X_c;
break;