mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
swscale/output: add V30X output support
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
57db8e0571
commit
cd04ebe033
@ -2613,12 +2613,14 @@ 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)
|
||||
|
||||
static av_always_inline void
|
||||
yuv2v30_X_c_template(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 shift)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < dstW; i++) {
|
||||
@ -2637,10 +2639,28 @@ yuv2xv30le_X_c(SwsContext *c, const int16_t *lumFilter,
|
||||
U = av_clip_uintp2(U >> 17, 10);
|
||||
V = av_clip_uintp2(V >> 17, 10);
|
||||
|
||||
AV_WL32(dest + 4 * i, U | Y << 10 | V << 20);
|
||||
AV_WL32(dest + 4 * i, U << (shift + 0) |
|
||||
Y << (shift + 10) |
|
||||
(unsigned)V << (shift + 20));
|
||||
}
|
||||
}
|
||||
|
||||
#define V30LE_WRAPPER(name, shift) \
|
||||
static void yuv2 ## name ## _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) \
|
||||
{ \
|
||||
yuv2v30_X_c_template(c, lumFilter, lumSrc, lumFilterSize, \
|
||||
chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
|
||||
alpSrc, dest, dstW, y, shift); \
|
||||
}
|
||||
|
||||
V30LE_WRAPPER(xv30le, 0)
|
||||
V30LE_WRAPPER(v30xle, 2)
|
||||
|
||||
static void
|
||||
yuv2xv36le_X_c(SwsContext *c, const int16_t *lumFilter,
|
||||
const int16_t **lumSrc, int lumFilterSize,
|
||||
@ -3546,6 +3566,9 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
|
||||
*yuv2packed2 = yuv2ya16be_2_c;
|
||||
*yuv2packedX = yuv2ya16be_X_c;
|
||||
break;
|
||||
case AV_PIX_FMT_V30XLE:
|
||||
*yuv2packedX = yuv2v30xle_X_c;
|
||||
break;
|
||||
case AV_PIX_FMT_AYUV64LE:
|
||||
*yuv2packedX = yuv2ayuv64le_X_c;
|
||||
break;
|
||||
|
@ -271,7 +271,7 @@ static const FormatEntry format_entries[] = {
|
||||
[AV_PIX_FMT_AYUV] = { 1, 1 },
|
||||
[AV_PIX_FMT_UYVA] = { 1, 1 },
|
||||
[AV_PIX_FMT_VYU444] = { 1, 1 },
|
||||
[AV_PIX_FMT_V30XLE] = { 1, 0 },
|
||||
[AV_PIX_FMT_V30XLE] = { 1, 1 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
1
tests/ref/fate/filter-pixdesc-v30xle
Normal file
1
tests/ref/fate/filter-pixdesc-v30xle
Normal file
@ -0,0 +1 @@
|
||||
pixdesc-v30xle 39705ee98e5f00ab0e388e25d7ce7419
|
@ -99,6 +99,7 @@ rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea
|
||||
rgba64le b91e1d77f799eb92241a2d2d28437b15
|
||||
uyva affad7282152bcce415bdf228df00ae4
|
||||
uyvy422 3bcf3c80047592f2211fae3260b1b65d
|
||||
v30xle b5ec677137b6f1d9f14a2386a1a7a526
|
||||
vuya 3d5e934651cae1ce334001cb1829ad22
|
||||
vuyx 0af13a42f9d0932c5a9bb6a8a5d1c5ee
|
||||
vyu444 2b2e6df31f5895340f25d6f67572b113
|
||||
|
@ -96,6 +96,7 @@ rgba 9488ac85abceaf99a9309eac5a87697e
|
||||
rgba64be 89910046972ab3c68e2a348302cc8ca9
|
||||
rgba64le fea8ebfc869b52adf353778f29eac7a7
|
||||
uyva caa03b07812dbb6c48b5fb34edf73962
|
||||
v30xle f92c959d672e17a3a27351e671757212
|
||||
vuya 76578a705ff3a37559653c1289bd03dd
|
||||
vuyx 615241c5406eb556fca0ad8606c23a02
|
||||
vyu444 a6067a24e63385242948dbc4c5a4ab5d
|
||||
|
@ -99,6 +99,7 @@ rgba64be 23c8c0edaabe3eaec89ce69633fb0048
|
||||
rgba64le dfdba4de4a7cac9abf08852666c341d3
|
||||
uyva c1c2953840061e3778842051b078a41e
|
||||
uyvy422 1c49e44ab3f060e85fc4a3a9464f045e
|
||||
v30xle 265a463ad722cfaede2fa6cb5e9bf34e
|
||||
vuya f72bcf29d75cd143d0c565f7cc49119a
|
||||
vuyx 3d02eeab336d0a8106f6fdd91be61073
|
||||
vyu444 09fcf24f46ed72d51983d87ad3bed864
|
||||
|
@ -88,6 +88,7 @@ rgba64be 5598f44514d122b9a57c5c92c20bbc61
|
||||
rgba64le b34e6e30621ae579519a2d91a96a0acf
|
||||
uyva fa5df2c0474b2a41dbe2210372b15fcc
|
||||
uyvy422 75de70e31c435dde878002d3f22b238a
|
||||
v30xle 1f04ac91824200d94d7841736c41f728
|
||||
vuya a3891d4168ff208948fd0b3ba0910495
|
||||
vuyx 9e4480c5fcb7c091ec3e517420764ef3
|
||||
vyu444 e2e54e73f81389559a972f4049ab8606
|
||||
|
@ -96,6 +96,7 @@ rgba 51961c723ea6707e0a410cd3f21f15d3
|
||||
rgba64be c910444019f4cfbf4d995227af55da8d
|
||||
rgba64le 0c810d8b3a6bca10321788e1cb145340
|
||||
uyva 9266fd7374abf86f7035e356574586f0
|
||||
v30xle 1c62803a7a7c0c89e5fda3d41cc0a376
|
||||
vuya 7e530261e7ac4eae4fd616fd7572d0b8
|
||||
vuyx f1d087284fb1556d76e6def5f94bf273
|
||||
vyu444 a9377d852b8263e50987593be7b03c7a
|
||||
|
@ -98,6 +98,7 @@ rgba64be db70d33aa6c06f3e0a1c77bd11284261
|
||||
rgba64le a8a2daae04374a27219bc1c890204007
|
||||
uyva f16f848f8283bcd59da6a4d85bc5b0a0
|
||||
uyvy422 d6ee3ca43356d08c392382b24b22cda5
|
||||
v30xle 267a4c668b14157d35399302bb978ac1
|
||||
vuya b9deab5ba249dd608b709c09255a4932
|
||||
vuyx 4251d94ee49e6a3cc1c10c09cd331308
|
||||
vyu444 cd6598487e9f9e2c7165b656c486eade
|
||||
|
@ -99,6 +99,7 @@ rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea
|
||||
rgba64le b91e1d77f799eb92241a2d2d28437b15
|
||||
uyva affad7282152bcce415bdf228df00ae4
|
||||
uyvy422 3bcf3c80047592f2211fae3260b1b65d
|
||||
v30xle b5ec677137b6f1d9f14a2386a1a7a526
|
||||
vuya 3d5e934651cae1ce334001cb1829ad22
|
||||
vuyx 0af13a42f9d0932c5a9bb6a8a5d1c5ee
|
||||
vyu444 2b2e6df31f5895340f25d6f67572b113
|
||||
|
@ -99,6 +99,7 @@ rgba64be ee73e57923af984b31cc7795d13929da
|
||||
rgba64le 783d2779adfafe3548bdb671ec0de69e
|
||||
uyva ee83c7ba25cfc997de70a4e5b3eb398f
|
||||
uyvy422 aeb4ba4f9f003ae21f6d18089198244f
|
||||
v30xle 42be9fac7725274bf54012b073ee0e91
|
||||
vuya ffa817e283bf6a0b6fba21b07523ccaa
|
||||
vuyx a6ff68f46c6b4b7595ec91b2a497df8e
|
||||
vyu444 0e5edaa26029501f05c0693321d60ded
|
||||
|
@ -88,6 +88,7 @@ rgba 4d76a9542143752a4ac30f82f88f68f1
|
||||
rgba64be a60041217f4c0cd796d19d3940a12a41
|
||||
rgba64le ad47197774858858ae7b0c177dffa459
|
||||
uyva 1500c3f52e32b2080be180d2e8196a7b
|
||||
v30xle 8a31095e6eb8e85ab6f030773fa20d03
|
||||
vuya 9ece18a345beb17cd19e09e443eca4bf
|
||||
vuyx 46b5b821d7ee6ddedb3ddafd1e5b007c
|
||||
vyu444 508978bb072eba1bc4636a4abd68dbe2
|
||||
|
@ -99,6 +99,7 @@ rgba64be 17e6273323b5779b5f3f775f150c1011
|
||||
rgba64le 48f45b10503b7dd140329c3dd0d54c98
|
||||
uyva 0d2d0d286d841ea5b35cc06626dcafe4
|
||||
uyvy422 3a237e8376264e0cfa78f8a3fdadec8a
|
||||
v30xle 1b2e25e974fdcd53b396b577725d33cb
|
||||
vuya fb849f76e56181e005c31fce75d7038c
|
||||
vuyx ed7de87da324b39090a8961dfd56ca5a
|
||||
vyu444 5a98e2118b75a3804bb80003cf6fa731
|
||||
|
Loading…
Reference in New Issue
Block a user