mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
swscale/output: add support for XV30LE
This commit is contained in:
parent
366f073c62
commit
68181623e9
14 changed files with 44 additions and 2 deletions
|
|
@ -2600,6 +2600,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,
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue