diff mbox series

[FFmpeg-devel,v2,1/4] lavu: Remove libva 1.x support

Message ID 6708e86a-38e7-4ed7-a202-508b2ec9165f@jkqxz.net
State New
Headers show
Series [FFmpeg-devel,v2,1/4] lavu: Remove libva 1.x support | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Mark Thompson April 3, 2024, 10:08 p.m. UTC
libva 2.0 was released in 2017 and the 2.x versions are included in all
supported distributions nowadays.
---
The other two quirk cases are very old and could probably be removed?  That could then deprecate the quirks system as well.

  libavutil/hwcontext_vaapi.c | 22 ----------------------
  1 file changed, 22 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 56d03aa4cd..84bcb78087 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -372,14 +372,6 @@  static const struct {
      const char *match_string;
      unsigned int quirks;
  } vaapi_driver_quirks_table[] = {
-#if !VA_CHECK_VERSION(1, 0, 0)
-    // The i965 driver did not conform before version 2.0.
-    {
-        "Intel i965 (Quick Sync)",
-        "i965",
-        AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS,
-    },
-#endif
      {
          "Intel iHD",
          "ubit",
@@ -1413,7 +1405,6 @@  fail:
  }
  #endif

-#if VA_CHECK_VERSION(0, 36, 0)
  typedef struct VAAPIDRMImageBufferMapping {
      VAImage      image;
      VABufferInfo buffer_info;
@@ -1573,7 +1564,6 @@  fail:
      av_freep(&mapping);
      return err;
  }
-#endif

  static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
                              const AVFrame *src, int flags)
@@ -1584,10 +1574,7 @@  static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
      if (err != AVERROR(ENOSYS))
          return err;
  #endif
-#if VA_CHECK_VERSION(0, 36, 0)
      return vaapi_map_to_drm_abh(hwfc, dst, src, flags);
-#endif
-    return AVERROR(ENOSYS);
  }

  #endif /* CONFIG_LIBDRM */
@@ -1637,7 +1624,6 @@  static void vaapi_device_free(AVHWDeviceContext *ctx)
      av_freep(&priv);
  }

-#if CONFIG_VAAPI_1
  static void vaapi_device_log_error(void *context, const char *message)
  {
      AVHWDeviceContext *ctx = context;
@@ -1651,7 +1637,6 @@  static void vaapi_device_log_info(void *context, const char *message)

      av_log(ctx, AV_LOG_VERBOSE, "libva: %s", message);
  }
-#endif

  static int vaapi_device_connect(AVHWDeviceContext *ctx,
                                  VADisplay display)
@@ -1660,10 +1645,8 @@  static int vaapi_device_connect(AVHWDeviceContext *ctx,
      int major, minor;
      VAStatus vas;

-#if CONFIG_VAAPI_1
      vaSetErrorCallback(display, &vaapi_device_log_error, ctx);
      vaSetInfoCallback (display, &vaapi_device_log_info,  ctx);
-#endif

      hwctx->display = display;

@@ -1907,7 +1890,6 @@  static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device,

      ent = av_dict_get(opts, "driver", NULL, 0);
      if (ent) {
-#if VA_CHECK_VERSION(0, 38, 0)
          VAStatus vas;
          vas = vaSetDriverName(display, ent->value);
          if (vas != VA_STATUS_SUCCESS) {
@@ -1916,10 +1898,6 @@  static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device,
              vaTerminate(display);
              return AVERROR_EXTERNAL;
          }
-#else
-        av_log(ctx, AV_LOG_WARNING, "Driver name setting is not "
-               "supported with this VAAPI version.\n");
-#endif
      }

      return vaapi_device_connect(ctx, display);