From patchwork Mon Oct 10 10:54:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 38654 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp299293pzb; Mon, 10 Oct 2022 03:55:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4QGLs3J5IU05O26tvr1VZh4EcwhakZdwC5rmZqrwOvMqgkY18XO6Zu3wuXwrmRKNRiYTF4 X-Received: by 2002:a17:906:d550:b0:78d:a6d4:c18f with SMTP id cr16-20020a170906d55000b0078da6d4c18fmr5615107ejc.113.1665399303952; Mon, 10 Oct 2022 03:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665399303; cv=none; d=google.com; s=arc-20160816; b=kKGdQ4uCW2s+RGS9NUQuJ2+KDJXu9vXBs2WqRgBKVzZsuZgkYMg9jWWu+srV6g2dgX iSI74Y0Kb8pLBv9Pzr2lfSfb0y2+O/3GVd/Sa11hLeDHSEk+DrGzE+rO15kX3E6X3Ij9 ZGc0YDz5KHExS5wIrTw1vW1GRg40yBzsJ4IJcQ/VGpYiIJDdWADh3i8QmboX/d5zV0i6 Uqa/4OTMtjOUwF0A4g1Odb91pwhs3eNgwf0TB/xEB4FySzWyZyIKh9+6m3VYDql7eq/N xvzSryMr8OYWmDw5PuedKpu6gJ6ka6uHnaGjK8xBxb4iM+GyfKMoHFkty2h98DCBbSOR lYYQ== 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:to:mime-version:fcc:date:references :in-reply-to:message-id:from:dkim-signature:delivered-to; bh=1nOzOfaDrI6KT7d4lZiju6venbAry4EuYhozdDTyzs0=; b=0tj0bFgsfkptGwXS0ReIOZsTWrxgWIW4oNfD13xBz8AHPUVbt8LO6AByvvY6XrMRLF ie0fjB9Uiw1pQPEDy+2+J6p/S+tYHkb4/ocb88LaW5j41MT6AVhhTH10qyn3KtrjbAQB O0fbuWiNxGnF9YoKSOjKZLY1bNSpxIVHRT8PvG/PGz45uCkOuFBj1J9V5f0RwNBdfLkU qcelPTCQe9X8MkSmm5ANBXEq+SC7ZZyJCEJeMtFIRNNQv1GZKpMfHwP3aKEny2P+Vlka hW3DDlZIuqwjDhVSos2FDntvvHSAKJG1ebm6wbcS9I8FeimN1l5L5w9zSAxdMgYv/d2G IfCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=AM2fhpv8; 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 e5-20020a170906844500b007882926c091si8894760ejy.768.2022.10.10.03.55.03; Mon, 10 Oct 2022 03:55:03 -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=AM2fhpv8; 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 220E668BCDA; Mon, 10 Oct 2022 13:54:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 503DC68BB94 for ; Mon, 10 Oct 2022 13:54:45 +0300 (EEST) Received: by mail-pg1-f179.google.com with SMTP id bh13so10019423pgb.4 for ; Mon, 10 Oct 2022 03:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=LQlUniyVqWyERteLmBZdYd9ZYLKs4uvTFGh3cb2LVx8=; b=AM2fhpv8rRA0c3KJAUF/RXA86jyxigVUhvDSJ1kE4+9hSRG1BjqCaJK7upQ+8k8jo6 EnKgmQMrb4dNLf4PFXaP5E18sVqQXfEcH76AzgVbciG/yGZCfwxkySp4hnZWNWmc74f0 vRAO0rgVN+ZyuPbeG+UglagOYxzhc/uI11rkMk0Ml8/+AJ7VZfgAr0gQZwCZybe/YEcl XTpcGe6wDRZen3x8ClSEwYpsGCcxLLtSa7Oi5o8G97mY8UHOJwKQkQA5elvSwLNgmir4 0SOCQ/X/K4nHYED9A6VsDWRvUsbEcmLyOqjeIxXiaT0CsV/B/8dDH6Gacdn17s/F/YDg Z5RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LQlUniyVqWyERteLmBZdYd9ZYLKs4uvTFGh3cb2LVx8=; b=GU+eUrH8/rat0LdW9jZ9KLXiXKhE+YqKj+EFzZW9qQ9GCFquviKeQOouQDNCl+Txsp jNd/KPd2uyN8S2GVnPFD9oUE9dCrCbSfjgqpW15xSCCP2v4Zn1Nqh4ro2TQVvvRs0XeT x2Qlc7HnVcuLhcvNGrT/4TROHbZydIYDKwOQZrvknMjE2YZGpLiJ+Ch8qkN6UDnHty8O +guHXRscif4GdBNcALrHTir7CCz4KqsUI7F64moCa2DksolS16MhHUct+bSJ24DPrCNf WXrXoyDUlf6TjQwMdffuY+3X8JvYx0WeW7ClMvWpoIUv0abseUpklde4PYmvThJEhOk/ vGjQ== X-Gm-Message-State: ACrzQf0x1tz2+VCEVPK8ysdKLWQO4ux56Fxp3MTCN6V8lzwjKLedTJJj o6Ff/edw525fc1Mx5L9W3mYHy/7b2V4= X-Received: by 2002:a63:ea4a:0:b0:439:4695:c0f8 with SMTP id l10-20020a63ea4a000000b004394695c0f8mr15921693pgk.440.1665399283483; Mon, 10 Oct 2022 03:54:43 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id z12-20020a1709027e8c00b0017f941ee6e7sm6290841pla.291.2022.10.10.03.54.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2022 03:54:43 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <6ec5e9960b725a21a4b0dad188d4eddd8b3571c5.1665399281.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Mon, 10 Oct 2022 10:54:31 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 01/11] avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT 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: softworkz Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: JHOiD7GKYcew From: softworkz Signed-off-by: softworkz --- libavfilter/vf_overlay_vaapi.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c index 3e6a0de13f..218daf571f 100644 --- a/libavfilter/vf_overlay_vaapi.c +++ b/libavfilter/vf_overlay_vaapi.c @@ -38,34 +38,6 @@ typedef struct OverlayVAAPIContext { float alpha; } OverlayVAAPIContext; -static int overlay_vaapi_query_formats(AVFilterContext *ctx) -{ - int ret; - enum { - MAIN = 0, - OVERLAY = 1, - }; - - static const enum AVPixelFormat pix_fmts[] = { - AV_PIX_FMT_VAAPI, - AV_PIX_FMT_NONE - }; - - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[MAIN]->outcfg.formats); - if (ret < 0) - return ret; - - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[OVERLAY]->outcfg.formats); - if (ret < 0) - return ret; - - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->outputs[0]->incfg.formats); - if (ret < 0) - return ret; - - return 0; -} - static int overlay_vaapi_build_filter_params(AVFilterContext *avctx) { VAAPIVPPContext *vpp_ctx = avctx->priv; @@ -418,6 +390,6 @@ const AVFilter ff_vf_overlay_vaapi = { .activate = &overlay_vaapi_activate, FILTER_INPUTS(overlay_vaapi_inputs), FILTER_OUTPUTS(overlay_vaapi_outputs), - FILTER_QUERY_FUNC(overlay_vaapi_query_formats), + FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VAAPI), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, };