summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-09 17:57:24 +0200
committerwm4 <wm4@nowhere>2020-05-09 18:02:57 +0200
commit4019c113140ff4841607c84598f2ce5912464f9b (patch)
treea8705fd3a1ed7e8b9311988bc390934f396d5e79 /test
parentd8002f1dde94771952b301f4ebe331c52bc71871 (diff)
downloadmpv-4019c113140ff4841607c84598f2ce5912464f9b.tar.bz2
mpv-4019c113140ff4841607c84598f2ce5912464f9b.tar.xz
video: fix rgb30 component order
Was broken with a zimg wrapper refucktor before the previous commit. In addition, it seems this didn't match the vo_drm format, or the format naming convention. So the order actually changes, and the format is redefined. (The img_format.h comment was probably wrong.) Change vo_gpu to the new format as well, so we can still test it.
Diffstat (limited to 'test')
-rw-r--r--test/ref/repack.txt2
-rw-r--r--test/repack.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/test/ref/repack.txt b/test/ref/repack.txt
index 3946a6eb47..3fc8b954f7 100644
--- a/test/ref/repack.txt
+++ b/test/ref/repack.txt
@@ -87,7 +87,7 @@ pal8 => [un] gbrap | a=1:1
qsv => no
rgb0 => [pa] [un] gbrp | a=1:1 [tu] [tp]
rgb24 => [pa] [un] gbrp | a=1:1
-rgb30 => [pa] [un] gbrp10 | a=1:1
+rgb30 => [pa] [un] gbrp10 | a=1:1 [tu] [tp]
rgb4 => no
rgb444 => [pa] [un] gbrp4 | a=1:1
rgb444 => [pa] [un] gbrp | a=1:1 [expand-8bit]
diff --git a/test/repack.c b/test/repack.c
index ede6046350..1b701fcb4c 100644
--- a/test/repack.c
+++ b/test/repack.c
@@ -24,6 +24,7 @@ struct entry {
#define P8(...) (const uint8_t[]){__VA_ARGS__}
#define P16(...) (const uint16_t[]){__VA_ARGS__}
+#define P32(...) (const uint32_t[]){__VA_ARGS__}
// Warning: only entries that match existing conversions are tested.
static const struct entry repack_tests[] = {
@@ -52,6 +53,8 @@ static const struct entry repack_tests[] = {
{1, 1, -AV_PIX_FMT_RGB48BE, {P16(0x1a1b, 0x2a2b, 0x3a3b)},
-AV_PIX_FMT_GBRP16, {P16(0x2b2a), P16(0x3b3a),
P16(0x1b1a)}},
+ {1, 1, IMGFMT_RGB30, {P32((3 << 20) | (2 << 10) | 1)},
+ -AV_PIX_FMT_GBRP10, {P16(2), P16(1), P16(3)}},
{8, 1, -AV_PIX_FMT_MONOWHITE, {P8(0xAA)},
IMGFMT_Y1, {P8(0, 1, 0, 1, 0, 1, 0, 1)}},
{8, 1, -AV_PIX_FMT_MONOBLACK, {P8(0xAA)},