From 861e9566f67d31ecc11b204dde094fc693a9f981 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 24 Feb 2024 12:35:51 +0100 Subject: [PATCH] video: don't define IMGFMT_VULKAN conditionally We generally try to avoid that due to the #ifdef mess. The equivalent format is defined in ffmpeg 4.4 while our interop code requires a higher version, but that doesn't cause any problems. --- filters/f_auto_filters.c | 2 -- filters/f_hwtransfer.c | 2 -- video/fmt-conversion.c | 2 -- video/img_format.h | 2 -- 4 files changed, 8 deletions(-) diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c index f6d068ada6..43791ed13a 100644 --- a/filters/f_auto_filters.c +++ b/filters/f_auto_filters.c @@ -85,12 +85,10 @@ static void deint_process(struct mp_filter *f) char *args[] = {"mode", "send_field", NULL}; p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_cuda", args); -#if HAVE_VULKAN_INTEROP } else if (img->imgfmt == IMGFMT_VULKAN) { char *args[] = {"mode", "send_field", NULL}; p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_vulkan", args); -#endif } else if (img->imgfmt == IMGFMT_VAAPI) { char *args[] = {"deint", "motion-adaptive", "interlaced-only", "yes", NULL}; diff --git a/filters/f_hwtransfer.c b/filters/f_hwtransfer.c index 26b1daaedc..10655b6411 100644 --- a/filters/f_hwtransfer.c +++ b/filters/f_hwtransfer.c @@ -56,12 +56,10 @@ struct hwmap_pairs { // We cannot discover which pairs of hardware formats need to use hwmap to // convert between the formats, so we need a lookup table. static const struct hwmap_pairs hwmap_pairs[] = { -#if HAVE_VULKAN_INTEROP { .first_fmt = IMGFMT_VAAPI, .second_fmt = IMGFMT_VULKAN, }, -#endif { .first_fmt = IMGFMT_DRMPRIME, .second_fmt = IMGFMT_VAAPI, diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index aa7d857341..39dead4600 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -66,9 +66,7 @@ static const struct { {IMGFMT_CUDA, AV_PIX_FMT_CUDA}, {IMGFMT_P010, AV_PIX_FMT_P010}, {IMGFMT_DRMPRIME, AV_PIX_FMT_DRM_PRIME}, -#if HAVE_VULKAN_INTEROP {IMGFMT_VULKAN, AV_PIX_FMT_VULKAN}, -#endif {0, AV_PIX_FMT_NONE} }; diff --git a/video/img_format.h b/video/img_format.h index e342de65da..975f58ad39 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -313,9 +313,7 @@ enum mp_imgfmt { IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface IMGFMT_VAAPI, IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef -#if HAVE_VULKAN_INTEROP IMGFMT_VULKAN, // VKImage -#endif IMGFMT_DRMPRIME, // AVDRMFrameDescriptor // Generic pass-through of AV_PIX_FMT_*. Used for formats which don't have