diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
commit | 60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch) | |
tree | 1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /test/scale_test.c | |
parent | Adding upstream version 0.37.0. (diff) | |
download | mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.tar.xz mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.zip |
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/scale_test.c')
-rw-r--r-- | test/scale_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/scale_test.c b/test/scale_test.c index f919dca..6e01271 100644 --- a/test/scale_test.c +++ b/test/scale_test.c @@ -10,7 +10,7 @@ static struct mp_image *gen_repack_test_img(int w, int h, int bytes, bool rgb, struct mp_regular_imgfmt planar_desc = { .component_type = MP_COMPONENT_TYPE_UINT, .component_size = bytes, - .forced_csp = rgb ? MP_CSP_RGB : 0, + .forced_csp = rgb ? PL_COLOR_SYSTEM_RGB : 0, .num_planes = alpha ? 4 : 3, .planes = { {1, {rgb ? 2 : 1}}, @@ -60,7 +60,7 @@ static void dump_image(struct scale_test *stest, const char *name, struct image_writer_opts opts = image_writer_opts_defaults; opts.format = AV_CODEC_ID_PNG; - if (!write_image(img, &opts, path, NULL, NULL)) { + if (!write_image(img, &opts, path, NULL, NULL, true)) { printf("Failed to write '%s'.\n", path); abort(); } @@ -101,7 +101,7 @@ static void assert_imgs_equal(struct scale_test *stest, FILE *f, void repack_test_run(struct scale_test *stest) { - char *logname = mp_tprintf(80, "%s.log", stest->test_name); + char *logname = mp_tprintf(80, "../%s.log", stest->test_name); FILE *f = test_open_out(stest->outdir, logname); if (!stest->sws) { @@ -129,7 +129,7 @@ void repack_test_run(struct scale_test *stest) if (!mp_get_regular_imgfmt(&rdesc, ofmt)) continue; } - if (rdesc.num_planes > 1 || rdesc.forced_csp != MP_CSP_RGB) + if (rdesc.num_planes > 1 || rdesc.forced_csp != PL_COLOR_SYSTEM_RGB) continue; struct mp_image *test_img = NULL; |