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.
This commit is contained in:
sfan5 2024-02-24 12:35:51 +01:00
parent 09f6f28cc2
commit 861e9566f6
4 changed files with 0 additions and 8 deletions

View File

@ -85,12 +85,10 @@ static void deint_process(struct mp_filter *f)
char *args[] = {"mode", "send_field", NULL}; char *args[] = {"mode", "send_field", NULL};
p->sub.filter = p->sub.filter =
mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_cuda", args); mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_cuda", args);
#if HAVE_VULKAN_INTEROP
} else if (img->imgfmt == IMGFMT_VULKAN) { } else if (img->imgfmt == IMGFMT_VULKAN) {
char *args[] = {"mode", "send_field", NULL}; char *args[] = {"mode", "send_field", NULL};
p->sub.filter = p->sub.filter =
mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_vulkan", args); mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_vulkan", args);
#endif
} else if (img->imgfmt == IMGFMT_VAAPI) { } else if (img->imgfmt == IMGFMT_VAAPI) {
char *args[] = {"deint", "motion-adaptive", char *args[] = {"deint", "motion-adaptive",
"interlaced-only", "yes", NULL}; "interlaced-only", "yes", NULL};

View File

@ -56,12 +56,10 @@ struct hwmap_pairs {
// We cannot discover which pairs of hardware formats need to use hwmap to // We cannot discover which pairs of hardware formats need to use hwmap to
// convert between the formats, so we need a lookup table. // convert between the formats, so we need a lookup table.
static const struct hwmap_pairs hwmap_pairs[] = { static const struct hwmap_pairs hwmap_pairs[] = {
#if HAVE_VULKAN_INTEROP
{ {
.first_fmt = IMGFMT_VAAPI, .first_fmt = IMGFMT_VAAPI,
.second_fmt = IMGFMT_VULKAN, .second_fmt = IMGFMT_VULKAN,
}, },
#endif
{ {
.first_fmt = IMGFMT_DRMPRIME, .first_fmt = IMGFMT_DRMPRIME,
.second_fmt = IMGFMT_VAAPI, .second_fmt = IMGFMT_VAAPI,

View File

@ -66,9 +66,7 @@ static const struct {
{IMGFMT_CUDA, AV_PIX_FMT_CUDA}, {IMGFMT_CUDA, AV_PIX_FMT_CUDA},
{IMGFMT_P010, AV_PIX_FMT_P010}, {IMGFMT_P010, AV_PIX_FMT_P010},
{IMGFMT_DRMPRIME, AV_PIX_FMT_DRM_PRIME}, {IMGFMT_DRMPRIME, AV_PIX_FMT_DRM_PRIME},
#if HAVE_VULKAN_INTEROP
{IMGFMT_VULKAN, AV_PIX_FMT_VULKAN}, {IMGFMT_VULKAN, AV_PIX_FMT_VULKAN},
#endif
{0, AV_PIX_FMT_NONE} {0, AV_PIX_FMT_NONE}
}; };

View File

@ -313,9 +313,7 @@ enum mp_imgfmt {
IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface
IMGFMT_VAAPI, IMGFMT_VAAPI,
IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef
#if HAVE_VULKAN_INTEROP
IMGFMT_VULKAN, // VKImage IMGFMT_VULKAN, // VKImage
#endif
IMGFMT_DRMPRIME, // AVDRMFrameDescriptor IMGFMT_DRMPRIME, // AVDRMFrameDescriptor
// Generic pass-through of AV_PIX_FMT_*. Used for formats which don't have // Generic pass-through of AV_PIX_FMT_*. Used for formats which don't have