diff options
author | Niklas Haas <git@haasn.dev> | 2023-07-17 16:03:44 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-08-18 16:39:57 +0200 |
commit | 6a28e0fa3b844b19b715a4704bc6c8f07359914f (patch) | |
tree | 44ffadcb06857121989a275831f81a56137bcbfe /video | |
parent | b8e6b03d3b677b8249a3342fb5dcaaee296b3887 (diff) | |
download | mpv-6a28e0fa3b844b19b715a4704bc6c8f07359914f.tar.bz2 mpv-6a28e0fa3b844b19b715a4704bc6c8f07359914f.tar.xz |
libplacebo: drop PL_API_VER compatibility paths
Diffstat (limited to 'video')
-rw-r--r-- | video/out/placebo/utils.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/video/out/placebo/utils.c b/video/out/placebo/utils.c index 4e6cd44004..1209b72121 100644 --- a/video/out/placebo/utils.c +++ b/video/out/placebo/utils.c @@ -1,9 +1,7 @@ #include "common/common.h" #include "utils.h" -#if PL_API_VER >= 251 #include <libplacebo/utils/dolbyvision.h> -#endif static const int pl_log_to_msg_lev[PL_LOG_ALL+1] = { [PL_LOG_FATAL] = MSGL_FATAL, @@ -87,13 +85,8 @@ enum pl_color_primaries mp_prim_to_pl(enum mp_csp_prim prim) case MP_CSP_PRIM_S_GAMUT: return PL_COLOR_PRIM_S_GAMUT; case MP_CSP_PRIM_EBU_3213: return PL_COLOR_PRIM_EBU_3213; case MP_CSP_PRIM_FILM_C: return PL_COLOR_PRIM_FILM_C; -#if PL_API_VER >= 230 case MP_CSP_PRIM_ACES_AP0: return PL_COLOR_PRIM_ACES_AP0; case MP_CSP_PRIM_ACES_AP1: return PL_COLOR_PRIM_ACES_AP1; -#else - case MP_CSP_PRIM_ACES_AP0: - case MP_CSP_PRIM_ACES_AP1: return PL_COLOR_PRIM_UNKNOWN; -#endif case MP_CSP_PRIM_COUNT: return PL_COLOR_PRIM_COUNT; } @@ -119,10 +112,8 @@ enum mp_csp_prim mp_prim_from_pl(enum pl_color_primaries prim) case PL_COLOR_PRIM_S_GAMUT: return MP_CSP_PRIM_S_GAMUT; case PL_COLOR_PRIM_EBU_3213: return MP_CSP_PRIM_EBU_3213; case PL_COLOR_PRIM_FILM_C: return MP_CSP_PRIM_FILM_C; -#if PL_API_VER >= 230 case PL_COLOR_PRIM_ACES_AP0: return MP_CSP_PRIM_ACES_AP0; case PL_COLOR_PRIM_ACES_AP1: return MP_CSP_PRIM_ACES_AP1; -#endif case PL_COLOR_PRIM_COUNT: return MP_CSP_PRIM_COUNT; } @@ -148,11 +139,7 @@ enum pl_color_transfer mp_trc_to_pl(enum mp_csp_trc trc) case MP_CSP_TRC_V_LOG: return PL_COLOR_TRC_V_LOG; case MP_CSP_TRC_S_LOG1: return PL_COLOR_TRC_S_LOG1; case MP_CSP_TRC_S_LOG2: return PL_COLOR_TRC_S_LOG2; -#if PL_API_VER >= 240 case MP_CSP_TRC_ST428: return PL_COLOR_TRC_ST428; -#else - case MP_CSP_TRC_ST428: return PL_COLOR_TRC_UNKNOWN; -#endif case MP_CSP_TRC_COUNT: return PL_COLOR_TRC_COUNT; } @@ -178,9 +165,7 @@ enum mp_csp_trc mp_trc_from_pl(enum pl_color_transfer trc) case PL_COLOR_TRC_V_LOG: return MP_CSP_TRC_V_LOG; case PL_COLOR_TRC_S_LOG1: return MP_CSP_TRC_S_LOG1; case PL_COLOR_TRC_S_LOG2: return MP_CSP_TRC_S_LOG2; -#if PL_API_VER >= 240 case PL_COLOR_TRC_ST428: return MP_CSP_TRC_ST428; -#endif case PL_COLOR_TRC_COUNT: return MP_CSP_TRC_COUNT; } @@ -264,25 +249,11 @@ void mp_map_dovi_metadata_to_pl(struct mp_image *mpi, if (header->disable_residual_flag) { // Only automatically map DoVi RPUs that don't require an EL struct pl_dovi_metadata *dovi = talloc_ptrtype(mpi, dovi); - -#if PL_API_VER >= 250 pl_frame_map_avdovi_metadata(frame, dovi, metadata); -#else // back-compat fallback for older libplacebo - const AVDOVIColorMetadata *color = av_dovi_get_color(metadata); - pl_map_dovi_metadata(dovi, metadata); - frame->repr.dovi = dovi; - frame->repr.sys = PL_COLOR_SYSTEM_DOLBYVISION; - frame->color.primaries = PL_COLOR_PRIM_BT_2020; - frame->color.transfer = PL_COLOR_TRC_PQ; - frame->color.hdr.min_luma = - pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NITS, color->source_min_pq / 4095.0f); - frame->color.hdr.max_luma = - pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NITS, color->source_max_pq / 4095.0f); -#endif } } -#if PL_API_VER >= 251 && defined(PL_HAVE_LIBDOVI) +#if defined(PL_HAVE_LIBDOVI) if (mpi->dovi_buf) pl_hdr_metadata_from_dovi_rpu(&frame->color.hdr, mpi->dovi_buf->data, mpi->dovi_buf->size); |