diff options
author | wm4 <wm4@nowhere> | 2020-05-20 18:25:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-20 18:38:15 +0200 |
commit | 086953a9da6c96bdd514127adc3ad5fc8a771da5 (patch) | |
tree | 8d9d5ea73c69930eca48a3945a0a396933fb0e87 /test/img_format.c | |
parent | a078d07ea25b35d48b27881003c11781dda7af21 (diff) | |
download | mpv-086953a9da6c96bdd514127adc3ad5fc8a771da5.tar.bz2 mpv-086953a9da6c96bdd514127adc3ad5fc8a771da5.tar.xz |
video: clean up pixel metadata stuff some more
A repeat of the previous useless commits.
Pondered whether to use separate fields or just a flags integer for
color and component types; the latter won for now.
Functions like mp_imgfmt_get_component_type() are now discouraged, and
mp_imgfmt_desc.flags is back for defining all information. Some days ago
I felt like the opposite would be the better design. Fortunately, it
doesn't matter.
With this, I think all image format properties that mpv needs are
exhaustively defined all in one place.
Diffstat (limited to 'test/img_format.c')
-rw-r--r-- | test/img_format.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/img_format.c b/test/img_format.c index f7a7354d1a..8c4a7d45e5 100644 --- a/test/img_format.c +++ b/test/img_format.c @@ -85,15 +85,20 @@ static void run(struct test_ctx *ctx) fprintf(f, " Basic desc: "); #define FLAG(t, c) if (d.flags & (t)) fprintf(f, "[%s]", c); FLAG(MP_IMGFLAG_BYTE_ALIGNED, "ba") + FLAG(MP_IMGFLAG_BYTES, "bb") FLAG(MP_IMGFLAG_ALPHA, "a") FLAG(MP_IMGFLAG_YUV_P, "yuvp") FLAG(MP_IMGFLAG_YUV_NV, "nv") - FLAG(MP_IMGFLAG_YUV, "yuv") - FLAG(MP_IMGFLAG_RGB, "rgb") + FLAG(MP_IMGFLAG_COLOR_YUV, "yuv") + FLAG(MP_IMGFLAG_COLOR_RGB, "rgb") + FLAG(MP_IMGFLAG_COLOR_XYZ, "xyz") + FLAG(MP_IMGFLAG_GRAY, "gray") FLAG(MP_IMGFLAG_LE, "le") FLAG(MP_IMGFLAG_BE, "be") - FLAG(MP_IMGFLAG_PAL, "pal") - FLAG(MP_IMGFLAG_HWACCEL, "hw") + FLAG(MP_IMGFLAG_TYPE_PAL8, "pal") + FLAG(MP_IMGFLAG_TYPE_HW, "hw") + FLAG(MP_IMGFLAG_TYPE_FLOAT, "float") + FLAG(MP_IMGFLAG_TYPE_UINT, "uint") fprintf(f, "\n"); fprintf(f, " planes=%d, chroma=%d:%d align=%d:%d\n", d.num_planes, d.chroma_xs, d.chroma_ys, d.align_x, d.align_y); |