[FFmpeg-devel] [PATCH 4/6] avfilter/vf_pixdesctest: also take into account undefined alpha components
James Almer
jamrial at gmail.com
Sat Oct 19 05:34:46 EEST 2024
Ensure those bits are copied, which will result in the output being the same as
the input, where swscale set them to the equivalent of fully opaque.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavfilter/vf_pixdesctest.c | 2 +-
tests/ref/fate/filter-pixdesc-0bgr | 2 +-
tests/ref/fate/filter-pixdesc-0rgb | 2 +-
tests/ref/fate/filter-pixdesc-bgr0 | 2 +-
tests/ref/fate/filter-pixdesc-rgb0 | 2 +-
tests/ref/fate/filter-pixdesc-v30xle | 2 +-
tests/ref/fate/filter-pixdesc-vuyx | 2 +-
tests/ref/fate/filter-pixdesc-x2bgr10le | 2 +-
tests/ref/fate/filter-pixdesc-x2rgb10le | 2 +-
tests/ref/fate/filter-pixdesc-xv30le | 2 +-
tests/ref/fate/filter-pixdesc-xv36be | 2 +-
tests/ref/fate/filter-pixdesc-xv36le | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index f53f087f21..5e418238b0 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -84,7 +84,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL)
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
- for (c = 0; c < priv->pix_desc->nb_components; c++) {
+ for (c = 0; c < FF_ARRAY_ELEMS(priv->pix_desc->comp); c++) {
const int w1 = c == 1 || c == 2 ? cw : w;
const int h1 = c == 1 || c == 2 ? ch : h;
diff --git a/tests/ref/fate/filter-pixdesc-0bgr b/tests/ref/fate/filter-pixdesc-0bgr
index 7bbb03dc25..9592dc66c8 100644
--- a/tests/ref/fate/filter-pixdesc-0bgr
+++ b/tests/ref/fate/filter-pixdesc-0bgr
@@ -1 +1 @@
-pixdesc-0bgr 89fa866f5532548a67b6e742b4d49e03
+pixdesc-0bgr f8b4f2a30d477709e6f414039c8d9602
diff --git a/tests/ref/fate/filter-pixdesc-0rgb b/tests/ref/fate/filter-pixdesc-0rgb
index e0da275840..ed27ccfe3a 100644
--- a/tests/ref/fate/filter-pixdesc-0rgb
+++ b/tests/ref/fate/filter-pixdesc-0rgb
@@ -1 +1 @@
-pixdesc-0rgb b181e1d3d4ca1e64d55f434e97c9fdba
+pixdesc-0rgb f38dad4f69a806881b4cc3f9953e0a15
diff --git a/tests/ref/fate/filter-pixdesc-bgr0 b/tests/ref/fate/filter-pixdesc-bgr0
index f4a2c1bc14..e060914264 100644
--- a/tests/ref/fate/filter-pixdesc-bgr0
+++ b/tests/ref/fate/filter-pixdesc-bgr0
@@ -1 +1 @@
-pixdesc-bgr0 5bf31ebb28690035b15eb8252c11b630
+pixdesc-bgr0 62400c257204fe1ddf61a7bc3a405531
diff --git a/tests/ref/fate/filter-pixdesc-rgb0 b/tests/ref/fate/filter-pixdesc-rgb0
index dccd9c130f..6e043b1036 100644
--- a/tests/ref/fate/filter-pixdesc-rgb0
+++ b/tests/ref/fate/filter-pixdesc-rgb0
@@ -1 +1 @@
-pixdesc-rgb0 bd816424fbe4d56b22b5b0f9a238e26e
+pixdesc-rgb0 eb2182d10f034e3c791598726744f20e
diff --git a/tests/ref/fate/filter-pixdesc-v30xle b/tests/ref/fate/filter-pixdesc-v30xle
index c9cfeb0888..f7860421cb 100644
--- a/tests/ref/fate/filter-pixdesc-v30xle
+++ b/tests/ref/fate/filter-pixdesc-v30xle
@@ -1 +1 @@
-pixdesc-v30xle 96e7b6248f347559d40a5154d36083e0
+pixdesc-v30xle f0f0ee6ff29b97cdd05034a7f7c19cd5
diff --git a/tests/ref/fate/filter-pixdesc-vuyx b/tests/ref/fate/filter-pixdesc-vuyx
index 99871e05d0..eabad4d4d9 100644
--- a/tests/ref/fate/filter-pixdesc-vuyx
+++ b/tests/ref/fate/filter-pixdesc-vuyx
@@ -1 +1 @@
-pixdesc-vuyx ebc83f9793eb4eddbb0a37fdcb67a33d
+pixdesc-vuyx a27703ac894af1a90df131dc3c590833
diff --git a/tests/ref/fate/filter-pixdesc-x2bgr10le b/tests/ref/fate/filter-pixdesc-x2bgr10le
index 42f615c282..2d63ace190 100644
--- a/tests/ref/fate/filter-pixdesc-x2bgr10le
+++ b/tests/ref/fate/filter-pixdesc-x2bgr10le
@@ -1 +1 @@
-pixdesc-x2bgr10le e9d67bd3d8912529148916d78c18c93a
+pixdesc-x2bgr10le 0ea287ba7ea42330714e7020f2fde7d0
diff --git a/tests/ref/fate/filter-pixdesc-x2rgb10le b/tests/ref/fate/filter-pixdesc-x2rgb10le
index 6fab74137f..aec5ccee9f 100644
--- a/tests/ref/fate/filter-pixdesc-x2rgb10le
+++ b/tests/ref/fate/filter-pixdesc-x2rgb10le
@@ -1 +1 @@
-pixdesc-x2rgb10le b50c6ddaf37214a06251c29798f94d6d
+pixdesc-x2rgb10le d34a932222b55f4041742b95837b272e
diff --git a/tests/ref/fate/filter-pixdesc-xv30le b/tests/ref/fate/filter-pixdesc-xv30le
index 5960dc34eb..b50f55dbb4 100644
--- a/tests/ref/fate/filter-pixdesc-xv30le
+++ b/tests/ref/fate/filter-pixdesc-xv30le
@@ -1 +1 @@
-pixdesc-xv30le 701d821940e3f837864393e1c7878843
+pixdesc-xv30le 4ec53e18ad4e4c188ddc869db5e137a0
diff --git a/tests/ref/fate/filter-pixdesc-xv36be b/tests/ref/fate/filter-pixdesc-xv36be
index 76929c3ea7..75dd99a4ce 100644
--- a/tests/ref/fate/filter-pixdesc-xv36be
+++ b/tests/ref/fate/filter-pixdesc-xv36be
@@ -1 +1 @@
-pixdesc-xv36be 94d17b770b2a519e30952bdeb4e46391
+pixdesc-xv36be eea153c1e290161700b854b34c02edda
diff --git a/tests/ref/fate/filter-pixdesc-xv36le b/tests/ref/fate/filter-pixdesc-xv36le
index 8ba8099423..b1e118454b 100644
--- a/tests/ref/fate/filter-pixdesc-xv36le
+++ b/tests/ref/fate/filter-pixdesc-xv36le
@@ -1 +1 @@
-pixdesc-xv36le 9d00bb58092f8b6d5d6fd71a8aec719a
+pixdesc-xv36le 82b19f66b18a2161a5c051066938506e
--
2.47.0
More information about the ffmpeg-devel
mailing list