From 601a3479466f4f03d27487dfc6fcb9430efb8fc6 Mon Sep 17 00:00:00 2001 From: James Almer Date: Wed, 16 Oct 2024 12:48:25 -0300 Subject: [PATCH] swscale/output: fill the xv30le alpha bits As with other pixel formats, set the undefined alpha bits to opaque. Signed-off-by: James Almer --- libswscale/output.c | 5 +++-- tests/ref/fate/filter-pixfmts-copy | 4 ++-- tests/ref/fate/filter-pixfmts-crop | 4 ++-- tests/ref/fate/filter-pixfmts-field | 4 ++-- tests/ref/fate/filter-pixfmts-fieldorder | 4 ++-- tests/ref/fate/filter-pixfmts-hflip | 4 ++-- tests/ref/fate/filter-pixfmts-il | 4 ++-- tests/ref/fate/filter-pixfmts-null | 4 ++-- tests/ref/fate/filter-pixfmts-scale | 4 ++-- tests/ref/fate/filter-pixfmts-transpose | 4 ++-- tests/ref/fate/filter-pixfmts-vflip | 4 ++-- 11 files changed, 23 insertions(+), 22 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 6d61e886ee..e684feceda 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2648,7 +2648,7 @@ yuv2v30_X_c_template(SwsContext *c, const int16_t *lumFilter, { int i; for (i = 0; i < dstW; i++) { - int Y = 1 << 16, U = 1 << 16, V = 1 << 16; + int Y = 1 << 16, U = 1 << 16, V = 1 << 16, A = 0x3; int j; for (j = 0; j < lumFilterSize; j++) @@ -2665,7 +2665,8 @@ yuv2v30_X_c_template(SwsContext *c, const int16_t *lumFilter, AV_WL32(dest + 4 * i, U << (shift + 0) | Y << (shift + 10) | - (unsigned)V << (shift + 20)); + (unsigned)V << (shift + 20) | + (unsigned)A << (shift ? 0 : 30 /* xv30le = 30, v30xle = 0 */)); } } diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy index c12dcd814e..c506d3de10 100644 --- a/tests/ref/fate/filter-pixfmts-copy +++ b/tests/ref/fate/filter-pixfmts-copy @@ -100,13 +100,13 @@ rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea rgba64le b91e1d77f799eb92241a2d2d28437b15 uyva 8896d7525f12de08818a01a5d5cf84f1 uyvy422 3bcf3c80047592f2211fae3260b1b65d -v30xle 1b74b2ae9d93674380964a2ddcdc803e +v30xle 44503e6d78bc474c1b72c5ceb1779539 vuya 3d5e934651cae1ce334001cb1829ad22 vuyx 0af13a42f9d0932c5a9bb6a8a5d1c5ee vyu444 93912234400a4373b1a6b5c4e4b1a4ef x2bgr10le 550c0d190cf695afa4eaacb644db6b75 x2rgb10le c1e3ac21be04a16bb157b22784524520 -xv30le 718bf036d13f9f1ea8804c2658dd53fa +xv30le 7dfdd664a9792bb06a19a63353828da0 xv36be 502f8a04f496740c0ebf82bce35e6a9d xv36le e08dcbde02f1c28a3554f372ad1278e2 xyz12be a1ef56bf746d71f59669c28e48fc8450 diff --git a/tests/ref/fate/filter-pixfmts-crop b/tests/ref/fate/filter-pixfmts-crop index 3e8355605e..660f3b1842 100644 --- a/tests/ref/fate/filter-pixfmts-crop +++ b/tests/ref/fate/filter-pixfmts-crop @@ -97,13 +97,13 @@ rgba 9488ac85abceaf99a9309eac5a87697e rgba64be 89910046972ab3c68e2a348302cc8ca9 rgba64le fea8ebfc869b52adf353778f29eac7a7 uyva 03f362ac6a39f25286bc6616111b0752 -v30xle 4cd15e59ac7a3cc116e8b09edf90af20 +v30xle ee090c91c28e70b126f6c76a64c39f60 vuya 76578a705ff3a37559653c1289bd03dd vuyx 615241c5406eb556fca0ad8606c23a02 vyu444 5d976b25782ff69e4b3b18453fa1447b x2bgr10le 84de725b85662c362862820dc4a309aa x2rgb10le f4265aca7a67dbfa9354370098ca6f33 -xv30le efebde9ca614024cd7ed95c7c02e9281 +xv30le 7e2350aea136c6fb76dae54e9d3fe1f8 xv36be 888aa586193b6e96dd6b9350503dad99 xv36le 778286003497f92b84d0bd8258d6b85d xyz12be cb4571f9aaa7b59f999ef327276104b7 diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field index 25539c7bb6..3ec9293fbd 100644 --- a/tests/ref/fate/filter-pixfmts-field +++ b/tests/ref/fate/filter-pixfmts-field @@ -100,13 +100,13 @@ rgba64be 23c8c0edaabe3eaec89ce69633fb0048 rgba64le dfdba4de4a7cac9abf08852666c341d3 uyva 147398d2e8d310f915c95863ad192c5e uyvy422 1c49e44ab3f060e85fc4a3a9464f045e -v30xle 337aab325e9bd1247560b22dae767c29 +v30xle 394101c7c80b12e34f4352156a3a74b3 vuya f72bcf29d75cd143d0c565f7cc49119a vuyx 3d02eeab336d0a8106f6fdd91be61073 vyu444 b139fb4ddaef12a7542a68277211efa7 x2bgr10le dbe21538d7cb1744914f6bd46ec09b55 x2rgb10le a18bc4ae5274e0a8cca9137ecd50c677 -xv30le 298f6f14c5bfc18587cd1c3225287a39 +xv30le a8e8bfb66178ad5cbef5c82cedc1d3da xv36be f6b7e1b437aaf1c9d1c69b095779fd4e xv36le ba99f258370f2a56993e8760e6b30194 xyz12be d2fa69ec91d3ed862f2dac3f8e7a3437 diff --git a/tests/ref/fate/filter-pixfmts-fieldorder b/tests/ref/fate/filter-pixfmts-fieldorder index d87a9d8c5e..1e77222b52 100644 --- a/tests/ref/fate/filter-pixfmts-fieldorder +++ b/tests/ref/fate/filter-pixfmts-fieldorder @@ -89,13 +89,13 @@ rgba64be 5598f44514d122b9a57c5c92c20bbc61 rgba64le b34e6e30621ae579519a2d91a96a0acf uyva ccf5dfd33765dda88c4b4afa2ea31305 uyvy422 75de70e31c435dde878002d3f22b238a -v30xle 53fc11848a0a1433761deb62deee087a +v30xle e453b8f0ad09e64e3a0173a4e3c2930d vuya a3891d4168ff208948fd0b3ba0910495 vuyx 9e4480c5fcb7c091ec3e517420764ef3 vyu444 3ddab207d561a3ee5efae09e504207f2 x2bgr10le 86474d84f26c5c51d6f75bf7e1de8da8 x2rgb10le cdf6a9e8a8d081aa768c6ae2e6221676 -xv30le bfd6693b5e995f65b130d963a972c34e +xv30le 8d1921d4a210d8107c20a805cb9a8117 xv36be e99aece2ae4edc6da58067810452afb6 xv36le bcceffc985aaa8414c4b8072aa0889bd xyz12be 15f5cda71de5fef9cec5e75e3833b6bc diff --git a/tests/ref/fate/filter-pixfmts-hflip b/tests/ref/fate/filter-pixfmts-hflip index 682176e68e..a279d22c42 100644 --- a/tests/ref/fate/filter-pixfmts-hflip +++ b/tests/ref/fate/filter-pixfmts-hflip @@ -97,13 +97,13 @@ rgba 51961c723ea6707e0a410cd3f21f15d3 rgba64be c910444019f4cfbf4d995227af55da8d rgba64le 0c810d8b3a6bca10321788e1cb145340 uyva a8391c24037e2a670196b47bf6a2ca57 -v30xle a367069a1da9da215cfca28e4e4e207d +v30xle ea5575ee99f826d7447bcc47fdb6639f vuya 7e530261e7ac4eae4fd616fd7572d0b8 vuyx f1d087284fb1556d76e6def5f94bf273 vyu444 7b72337f92a7223fd115265e2f769276 x2bgr10le 827cc659f29378e00c5a7d2c0ada8f9a x2rgb10le d4a8189b65395a88d0a38a7053f3359f -xv30le 79c6fe0c957d4fdc7bd6d056b13d7ceb +xv30le 7370eadd13a2fc79186443713a639332 xv36be 2abe7272fffa70d1bf836b6235508091 xv36le e478b4b54698beb3ce1b9a2dd691d544 xyz12be 25f90259ff8a226befdaec3dfe82996e diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il index 917515d68f..74d582d442 100644 --- a/tests/ref/fate/filter-pixfmts-il +++ b/tests/ref/fate/filter-pixfmts-il @@ -99,13 +99,13 @@ rgba64be db70d33aa6c06f3e0a1c77bd11284261 rgba64le a8a2daae04374a27219bc1c890204007 uyva d2655e1a1c56bcb48f7c7a6a6270dd93 uyvy422 d6ee3ca43356d08c392382b24b22cda5 -v30xle a1a9719011f9e20a25b10f4702b10d0e +v30xle 40776197aa84a4784d195692fe890c88 vuya b9deab5ba249dd608b709c09255a4932 vuyx 4251d94ee49e6a3cc1c10c09cd331308 vyu444 50e9e24a38afc81541a536d06aab5ebe x2bgr10le 135acaff8318cf9861bb0f7849a9e5e9 x2rgb10le 517fb186f523dc7cdc5c5c6967cfbe94 -xv30le b18e762bfc505cdd51bac3401c019613 +xv30le ccd81ba2ba845917d5d1c9fa2a6e2fc6 xv36be 014de4ca53607cf7c676161063b3a2ac xv36le 102c0e817d375ddd6b2cfbb4262dec95 xyz12be 7c7d54c55f136cbbc50b18029f3be0b3 diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null index c12dcd814e..c506d3de10 100644 --- a/tests/ref/fate/filter-pixfmts-null +++ b/tests/ref/fate/filter-pixfmts-null @@ -100,13 +100,13 @@ rgba64be ae2ae04b5efedca3505f47c4dd6ea6ea rgba64le b91e1d77f799eb92241a2d2d28437b15 uyva 8896d7525f12de08818a01a5d5cf84f1 uyvy422 3bcf3c80047592f2211fae3260b1b65d -v30xle 1b74b2ae9d93674380964a2ddcdc803e +v30xle 44503e6d78bc474c1b72c5ceb1779539 vuya 3d5e934651cae1ce334001cb1829ad22 vuyx 0af13a42f9d0932c5a9bb6a8a5d1c5ee vyu444 93912234400a4373b1a6b5c4e4b1a4ef x2bgr10le 550c0d190cf695afa4eaacb644db6b75 x2rgb10le c1e3ac21be04a16bb157b22784524520 -xv30le 718bf036d13f9f1ea8804c2658dd53fa +xv30le 7dfdd664a9792bb06a19a63353828da0 xv36be 502f8a04f496740c0ebf82bce35e6a9d xv36le e08dcbde02f1c28a3554f372ad1278e2 xyz12be a1ef56bf746d71f59669c28e48fc8450 diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale index 5f264040f0..f0c0d51a2d 100644 --- a/tests/ref/fate/filter-pixfmts-scale +++ b/tests/ref/fate/filter-pixfmts-scale @@ -100,13 +100,13 @@ rgba64be ee73e57923af984b31cc7795d13929da rgba64le 783d2779adfafe3548bdb671ec0de69e uyva 2358038be6dac002a6c736e798a3d91c uyvy422 aeb4ba4f9f003ae21f6d18089198244f -v30xle eb50190ed5800f979c091a6e39275cbe +v30xle 8cba1fdc0ba2c39eb6fb5885dcf628a7 vuya ffa817e283bf6a0b6fba21b07523ccaa vuyx a6ff68f46c6b4b7595ec91b2a497df8e vyu444 d663334119da56e36aca1e8e4eb29a39 x2bgr10le d57b9a99033cc7b65ddd111578f2d385 x2rgb10le d56bdb23fa6a8e12a0b4394987f89935 -xv30le aaee6b4eff276709715fa83073ae87a4 +xv30le a2a351cbf936651b558abfc70a925057 xv36be 59388bd217c05744e702c00a68f0a297 xv36le de9c74e94dc19c828e1572aa283d8aca xyz12be c7ba8345998c0141ddc079cdd29b1a40 diff --git a/tests/ref/fate/filter-pixfmts-transpose b/tests/ref/fate/filter-pixfmts-transpose index fa567bbe05..89c53039ef 100644 --- a/tests/ref/fate/filter-pixfmts-transpose +++ b/tests/ref/fate/filter-pixfmts-transpose @@ -89,13 +89,13 @@ rgba 4d76a9542143752a4ac30f82f88f68f1 rgba64be a60041217f4c0cd796d19d3940a12a41 rgba64le ad47197774858858ae7b0c177dffa459 uyva cb773ee5a9f8964b9c826d55f9f425a3 -v30xle 84548ae5825baa041a96db6bb9c362b0 +v30xle 55147546a787bc72fcb0ca28b1456344 vuya 9ece18a345beb17cd19e09e443eca4bf vuyx 46b5b821d7ee6ddedb3ddafd1e5b007c vyu444 e70a294738165223928fddc9970b8381 x2bgr10le 4aa774b6d8f6d446a64f1f288e5c97eb x2rgb10le 09cb1d98fe17ad8a6d9d3bec97ddc845 -xv30le da27f069e340e756a9bb29f628ed06d1 +xv30le ebe26bf75c64406dea8b8a160c978fd9 xv36be 1b4166ba6cdcfc935763651105121002 xv36le 9202133de91bf64c76ca27d5cd0c816a xyz12be 68e5cba640f6e4ef72dff950e88b5342 diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip index 2851d2b4d1..e0bdad24ad 100644 --- a/tests/ref/fate/filter-pixfmts-vflip +++ b/tests/ref/fate/filter-pixfmts-vflip @@ -100,13 +100,13 @@ rgba64be 17e6273323b5779b5f3f775f150c1011 rgba64le 48f45b10503b7dd140329c3dd0d54c98 uyva d43e89ba3d5c9274e1948eac8630fcc6 uyvy422 3a237e8376264e0cfa78f8a3fdadec8a -v30xle 34771be4875c31f8ffbc06c77fd1a49e +v30xle 15de0d677d900991e41671a57c431ba5 vuya fb849f76e56181e005c31fce75d7038c vuyx ed7de87da324b39090a8961dfd56ca5a vyu444 815de7c57dc8afafb3de908a4a280582 x2bgr10le 795b66a5fc83cd2cf300aae51c230f80 x2rgb10le 262c502230cf3724f8e2cf4737f18a42 -xv30le 2cb6ce5f744b33d53cd39a2ea2ab00f3 +xv30le f61ddeb49ba8fb7c92294ad621cbf896 xv36be 079c30b035dae1a0a9d54753334aad30 xv36le ffe6ab75ebc09134c3451f8f6ef0d501 xyz12be 23fa9fb36d49dce61e284d41b83e0e6b