diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-04 04:54:51 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-01-22 14:54:55 +0000 |
commit | 0ac7a40dac2411cf9be429f611b8966560bb3f0c (patch) | |
tree | 7d65768a9dfc21b7080ba4518996dc4d588397cd /player/command.c | |
parent | 66e451f4e6e0d0b259eddfd3673f1aa5ff127726 (diff) | |
download | mpv-0ac7a40dac2411cf9be429f611b8966560bb3f0c.tar.bz2 mpv-0ac7a40dac2411cf9be429f611b8966560bb3f0c.tar.xz |
csputils: replace mp_alpha_type with pl_alpha_mode
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/player/command.c b/player/command.c index d9f5dbc969..dc6b12a91c 100644 --- a/player/command.c +++ b/player/command.c @@ -2307,11 +2307,11 @@ static int property_imgparams(const struct mp_image_params *p, int action, void for (int i = 0; i < desc.num_planes; i++) bpp += desc.bpp[i] >> (desc.xs[i] + desc.ys[i]); - enum mp_alpha_type alpha = p->alpha; - // Alpha type is not supported by FFmpeg, so MP_ALPHA_AUTO may mean alpha + enum pl_alpha_mode alpha = p->repr.alpha; + // Alpha type is not supported by FFmpeg, so PL_ALPHA_UNKNOWN may mean alpha // is of an unknown type, or simply not present. Normalize to AUTO=no alpha. - if (!!(desc.flags & MP_IMGFLAG_ALPHA) != (alpha != MP_ALPHA_AUTO)) - alpha = (desc.flags & MP_IMGFLAG_ALPHA) ? MP_ALPHA_STRAIGHT : MP_ALPHA_AUTO; + if (!!(desc.flags & MP_IMGFLAG_ALPHA) != (alpha != PL_ALPHA_UNKNOWN)) + alpha = (desc.flags & MP_IMGFLAG_ALPHA) ? PL_ALPHA_INDEPENDENT : PL_ALPHA_UNKNOWN; const struct pl_hdr_metadata *hdr = &p->color.hdr; bool has_cie_y = pl_hdr_metadata_contains(hdr, PL_HDR_METADATA_CIE_Y); @@ -2357,9 +2357,9 @@ static int property_imgparams(const struct mp_image_params *p, int action, void SUB_PROP_STR(m_opt_choice_str(mp_stereo3d_names, p->stereo3d))}, {"rotate", SUB_PROP_INT(p->rotate)}, {"alpha", - SUB_PROP_STR(m_opt_choice_str(mp_alpha_names, alpha)), + SUB_PROP_STR(m_opt_choice_str(pl_alpha_names, alpha)), // avoid using "auto" for "no", so just make it unavailable - .unavailable = alpha == MP_ALPHA_AUTO}, + .unavailable = alpha == PL_ALPHA_UNKNOWN}, {"min-luma", SUB_PROP_FLOAT(hdr->min_luma), .unavailable = !has_hdr10}, {"max-luma", SUB_PROP_FLOAT(hdr->max_luma), .unavailable = !has_hdr10}, {"max-cll", SUB_PROP_FLOAT(hdr->max_cll), .unavailable = !has_hdr10}, |