diff mbox series

[FFmpeg-devel,v3,3/4] lavfi: Remove libva 1.x support

Message ID 7d3e5c79-127d-4f6e-95b5-a628ef713084@jkqxz.net
State New
Headers show
Series [FFmpeg-devel,v3,1/4] lavu: Remove libva 1.x support | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Mark Thompson April 22, 2024, 9:43 p.m. UTC
libva 2.0 was released in 2017 and the 2.x versions are included in all
supported distributions nowadays.
---
Rebase on the dynamic pool change.


 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.
         }
     }