diff mbox series

[FFmpeg-devel,v4,2/5] lavfi: Remove libva 1.x support

Message ID 20240505190154.90781-2-sw@jkqxz.net
State New
Headers show
Series [FFmpeg-devel,v4,1/5] configure: Remove libva 1.x support | expand

Checks

Context Check Description
andriy/make_x86 fail Make failed

Commit Message

Mark Thompson May 5, 2024, 7:01 p.m. UTC
libva 2.0 was released in 2017 and the 2.x versions are included in all
supported distributions nowadays.
---
 libavfilter/vaapi_vpp.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c
index 9ef7a289fb..fe14170fee 100644
--- a/libavfilter/vaapi_vpp.c
+++ b/libavfilter/vaapi_vpp.c
@@ -204,12 +204,9 @@  int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
     output_frames->width     = ctx->output_width;
     output_frames->height    = ctx->output_height;
 
-    if (CONFIG_VAAPI_1)
-        output_frames->initial_pool_size = 0;
-    else
-        output_frames->initial_pool_size = 4;
+    output_frames->initial_pool_size = 0;
 
-    err = ff_filter_init_hw_frames(avctx, outlink, 10);
+    err = ff_filter_init_hw_frames(avctx, outlink, 0);
     if (err < 0)
         goto fail;
 
@@ -677,15 +674,12 @@  int ff_vaapi_vpp_render_pictures(AVFilterContext *avctx,
         goto fail_after_render;
     }
 
-    if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks &
-        AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) {
-        for (int i = 0; i < cout && params_ids[i] != VA_INVALID_ID; i++) {
-            vas = vaDestroyBuffer(ctx->hwctx->display, params_ids[i]);
-            if (vas != VA_STATUS_SUCCESS) {
-                av_log(avctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
-                       "%d (%s).\n", vas, vaErrorStr(vas));
-                // And ignore.
-            }
+    for (int i = 0; i < cout && params_ids[i] != VA_INVALID_ID; i++) {
+        vas = vaDestroyBuffer(ctx->hwctx->display, params_ids[i]);
+        if (vas != VA_STATUS_SUCCESS) {
+            av_log(avctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
+                   "%d (%s).\n", vas, vaErrorStr(vas));
+            // And ignore.
         }
     }