summaryrefslogtreecommitdiffstats
path: root/test/repack.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-06-17 16:20:37 +0200
committerwm4 <wm4@nowhere>2020-06-17 19:43:09 +0200
commit1ffa83ea92f6413e5e74e31ccd47ed5ac49efd9f (patch)
tree0acc7c9fe2536f188fdb30842f4e63e6bb73c6ae /test/repack.c
parent6ff20c71ab93139d150a26612e2ef90168f71dfb (diff)
downloadmpv-1ffa83ea92f6413e5e74e31ccd47ed5ac49efd9f.tar.bz2
mpv-1ffa83ea92f6413e5e74e31ccd47ed5ac49efd9f.tar.xz
test: update to new ffmpeg pixfmts
Mainly, X2RGB10BE is added. Add our own unpack test for this format. Also, swscale seems to have added support for GBRPF conversion.
Diffstat (limited to 'test/repack.c')
-rw-r--r--test/repack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/repack.c b/test/repack.c
index f4b5c9c12a..6bdd51a57b 100644
--- a/test/repack.c
+++ b/test/repack.c
@@ -29,6 +29,7 @@ struct entry {
#define P16(...) (const uint16_t[]){__VA_ARGS__}
#define P32(...) (const uint32_t[]){__VA_ARGS__}
#define SW16(v) ((((v) & 0xFF) << 8) | ((v) >> 8))
+#define SW32(v) ((SW16((v) & 0xFFFFu) << 16) | (SW16(((v) | 0u) >> 16)))
// Warning: only entries that match existing conversions are tested.
static const struct entry repack_tests[] = {
@@ -129,6 +130,8 @@ static const struct entry repack_tests[] = {
.flags = REPACK_CREATE_EXPAND_8BIT},
{1, 1, IMGFMT_RGB30, {P32((3 << 20) | (2 << 10) | 1)},
-AV_PIX_FMT_GBRP10, {P16(2), P16(1), P16(3)}},
+ {1, 1, -AV_PIX_FMT_X2RGB10BE, {P32(SW32((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)},