From patchwork Tue Jul 19 16:56:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 34768 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp1878902pzb; Tue, 19 Jul 2022 09:57:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vRftnUYWFXT2gj9QqfKVJWDxqzgqrZ+HjBsLkpARZX4tNLnnpf1YAzkOmBAIxWqn993M1+ X-Received: by 2002:a17:906:53ca:b0:6fe:ae32:e01e with SMTP id p10-20020a17090653ca00b006feae32e01emr31011293ejo.455.1658249821627; Tue, 19 Jul 2022 09:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658249821; cv=none; d=google.com; s=arc-20160816; b=NSOVxtINgJLN6+o773AeciK5GCYvGNCDoEPK3eR7qu2Ni2cNh412VMf9eGPsOOshMT CZcxsb+hyoG/OtcDudAPWpJoPr77GideXFG0ggtblP95uhTSs9l5XcVKPqXIwb5C5P+J R8yS6kLPIcb7kLKjHsnBTPI0kUytj+fNU9eKGJeF+TB3wZ6oWyLqEM0qC3uJTq+GOKJ9 2VxKtr/HNIj8QwHOmFgrF32wD4EzcC96nMUnBoh0fcEz0lEBhiiD4Pb/2tdEJ1E19D/D OknV/6fDhme/PV5rQXus9UNi1OF7su148CyOXbbDX924aecVCrl/3/Da2mLGuqs27Qcm YUqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=UH5Nu+g0VYg39Qahw4p0aP0mmLKH7HIX5KpggphyB4c=; b=hFnSah2uZfF3VBdTxUZWKuhvLPjq8nq20XcW6RqFFZkWbBcJOlUx3Y1ZqCCW2FD1If xLr8mysH2BIG0jZAp+l2KUlYOIyjZFjuI7k1pwrhHwuaQSc8bHUhAjJEnEKSoHbADvMK EdWXBNVZahnkR7jREStBDUsbtDIIGugpCZE9crWWnazhryJzKz3aaEmVEiGL+rQNLI9/ CV6LeitsHDJpd1esjybf+68Aeosi5FMmcJOC8E/vQRaSENJAnBA1McPZW/pdtWyw9ctF 2c4sJMuei0gUm2dj+yQ/TGy8m2lZmgR7vtTILfNyIS1VwE1exM/cOfZ3drrCVvkiKzXj ScUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=i6I3zYgE; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i1-20020a05640242c100b00418c2b5befdsi23224866edc.479.2022.07.19.09.57.01; Tue, 19 Jul 2022 09:57:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=i6I3zYgE; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F3AE568B6D1; Tue, 19 Jul 2022 19:56:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D228168B67D for ; Tue, 19 Jul 2022 19:56:57 +0300 (EEST) Received: by mail-wm1-f52.google.com with SMTP id x23-20020a05600c179700b003a30e3e7989so7362756wmo.0 for ; Tue, 19 Jul 2022 09:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4xxWaucD2dT5HbaQaRIDeu3H4233RZJlphA0aHBunDs=; b=i6I3zYgEJPM0zclLYprpBV2SQtzWgEgqXv5vmiH3b8b7Ja2/KUQK/4kYby0OBJskzI xvmG7dVDTzYCi2UQ+H64XdSGwBuedGAyHjnjxEJIi1sbS7SzOSORcVbBjo8dJ2t4cjOg RYHZrT0XxdpANtanEQER6HmflczlQ5mtbm3rf1MsFrPrCbjmEcYdTlL4OrOwMO/rs7eX f4p/RODKXrID37Bq6jxcqbFVYm8Bekms//a/lok3OxumXbM4Sd/jXdhmDaREnm8lZHPD +YhwoIqFuZ5DcsLLFOgDXHJgVvI+AO7Ql7+OgzYx/RUm+XSLa/CBdVPvqAw9Xk+FqNNM y9BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4xxWaucD2dT5HbaQaRIDeu3H4233RZJlphA0aHBunDs=; b=D+G9euLETbipmuzadkabjnMTGMJEdmZcgkVpoy4Gg4E9x0zZ5qy7UdAino1Bqra5Z8 zMzLlf47igcRcB66FtvpHDnMDB/BpNIS1okKNcbp0VsQnx49K7q+L4+uuAZpXewQ72cB ZO20sTk/nM/pb69jcacBwR9Txl0Z3UVyGzfZf+ve3lmIPcEeDRMw0JuJS1ijsv2vg92H he3Si9eIMk8Dwa5qyz3JsgCLXFYU2iwAowbjgRRYOl0NzBFLKpCC5+gBR5VJnoOnR91I sfKLoIOGRikQw1GmLtQ1sj/BGOwtah7ILPL8NekjDAJecfp8h7Apt+d0VuX7bDvllb6K c8OQ== X-Gm-Message-State: AJIora9271WSA4eQ5AhcxfANCwQws5Fe6j1mi2OMKcHc8uH2U9pD5rYR UX1lRP0ou4XhZFDdOxLEpkYW/KnkXLGfEA== X-Received: by 2002:a05:600c:1c26:b0:3a3:2251:c3cb with SMTP id j38-20020a05600c1c2600b003a32251c3cbmr235260wms.126.1658249816888; Tue, 19 Jul 2022 09:56:56 -0700 (PDT) Received: from localhost ([2a00:5f00:102:0:ed02:7072:7dbf:2431]) by smtp.gmail.com with UTF8SMTPSA id a7-20020adfeec7000000b0021d7050ace4sm9005835wrp.77.2022.07.19.09.56.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jul 2022 09:56:56 -0700 (PDT) From: Emil Velikov To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Jul 2022 17:56:53 +0100 Message-Id: <20220719165656.640869-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/3] hwcontext_vaapi: dlopen libva-x11 and libva-drm X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Mark Thompson , emil.l.velikov@gmail.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: E/pCBuhqYUVK Greetings everyone, As you may know the libva* set of libraries share an internal ABI between them. In a resent libva commit, the va_fool API was removed. Thus if one is to mix different versions of libva.so and libva-x11.so they will get an error, leading to a crash of the whole stack. The simple solution is to dlopen() the winsys components, like libva-x11 and libva-drm. The changes are pretty minor and allow us to handle most of the issues. Comments and suggestions are welcome, but please me gentle it's my first time hacking on ffmpeg. Thanks Emil Aside: - Please consider backporting it to the stable branches in due time. - My TODO includes to reducing the massive ABI between libva* and backend drivers, which is likely to involve adding a "registration" API. Emil Velikov (3): hwcontext_vaapi: do not link against libva-x11.so hwcontext_vaapi: do not link against libva-drm.so hwcontext_vaapi: #if guard VAAPI_DRM specifics configure | 2 +- libavutil/hwcontext_vaapi.c | 92 +++++++++++++++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 4 deletions(-)