0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_gpu_next: drop redundant PL_HAVE_LCMS check

This header is installed unconditionally starting with libplacebo
v4.208.0, so we are safe to remove the check.
This commit is contained in:
Niklas Haas 2023-08-18 16:40:44 +02:00
parent ac4c88b7c1
commit f97584cadc

View File

@ -21,13 +21,10 @@
#include <libplacebo/colorspace.h>
#include <libplacebo/renderer.h>
#include <libplacebo/shaders/lut.h>
#include <libplacebo/shaders/icc.h>
#include <libplacebo/utils/libav.h>
#include <libplacebo/utils/frame_queue.h>
#ifdef PL_HAVE_LCMS
#include <libplacebo/shaders/icc.h>
#endif
#include "config.h"
#include "common/common.h"
#include "options/m_config.h"
@ -139,11 +136,9 @@ struct priv {
const struct pl_filter_config *frame_mixer;
enum mp_csp_levels output_levels;
#ifdef PL_HAVE_LCMS
struct pl_icc_params icc;
struct pl_icc_profile icc_profile;
char *icc_path;
#endif
struct user_lut image_lut;
struct user_lut target_lut;
@ -844,7 +839,6 @@ static void apply_target_options(struct priv *p, struct pl_frame *target)
tbits->sample_depth = opts->dither_depth;
}
#ifdef PL_HAVE_LCMS
target->profile = p->icc_profile;
if (opts->icc_opts->icc_use_luma) {
@ -856,7 +850,6 @@ static void apply_target_options(struct priv *p, struct pl_frame *target)
if (!p->icc.max_luma)
p->icc.max_luma = pl_icc_default_params.max_luma;
}
#endif
}
static void apply_crop(struct pl_frame *frame, struct mp_rect crop,
@ -1139,8 +1132,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
static bool update_auto_profile(struct priv *p, int *events)
{
#ifdef PL_HAVE_LCMS
const struct gl_video_opts *opts = p->opts_cache->opts;
if (!opts->icc_opts || !opts->icc_opts->profile_auto || p->icc_path)
return false;
@ -1163,8 +1154,6 @@ static bool update_auto_profile(struct priv *p, int *events)
return true;
}
#endif // PL_HAVE_LCMS
return false;
}
@ -1689,8 +1678,6 @@ static const struct pl_hook *load_hook(struct priv *p, const char *path)
return hook;
}
#ifdef PL_HAVE_LCMS
static stream_t *icc_open_cache(struct priv *p, uint64_t sig, int flags)
{
const struct gl_video_opts *opts = p->opts_cache->opts;
@ -1755,15 +1742,11 @@ static bool icc_load(void *priv, uint64_t sig, uint8_t *cache, size_t size)
return len == size;
}
#endif // PL_HAVE_LCMS
static void update_icc_opts(struct priv *p, const struct mp_icc_opts *opts)
{
if (!opts)
return;
#ifdef PL_HAVE_LCMS
if (!opts->profile_auto && !p->icc_path && p->icc_profile.len) {
// Un-set any auto-loaded profiles if icc-profile-auto was disabled
talloc_free((void *) p->icc_profile.data);
@ -1807,8 +1790,6 @@ static void update_icc_opts(struct priv *p, const struct mp_icc_opts *opts)
// Update cached path
talloc_free(p->icc_path);
p->icc_path = talloc_strdup(p, opts->profile);
#endif // PL_HAVE_LCMS
}
static void update_lut(struct priv *p, struct user_lut *lut)