Skip to content

Commit

Permalink
vo_gpu_next: drop redundant PL_HAVE_LCMS check
Browse files Browse the repository at this point in the history
This header is installed unconditionally starting with libplacebo
v4.208.0, so we are safe to remove the check.
  • Loading branch information
haasn committed Aug 18, 2023
1 parent ac4c88b commit f97584c
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions video/out/vo_gpu_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -1163,8 +1154,6 @@ static bool update_auto_profile(struct priv *p, int *events)
return true;
}

#endif // PL_HAVE_LCMS

return false;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f97584c

Please sign in to comment.