From patchwork Tue Nov 12 09:50:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 52699 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:6704:20b0:4a6:637d:5226 with SMTP id mp4-n2csp144327vqb; Tue, 12 Nov 2024 02:01:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWlYgH4VJz900YeQal/VR0EiabwPqDTvQYtm/z27ugmRlKrQkNzhM7kwJ6CpYJhZftaA1gR+X2KvbQvxv+OL3oZ@gmail.com X-Google-Smtp-Source: AGHT+IFJprzs0SMU2omd+ZTL0ZWjh3bjFj6FiBdH0wzb2S4lIrllgHe1lEci/QRerXjkEIALXqkl X-Received: by 2002:a17:907:9615:b0:a99:4b56:cf76 with SMTP id a640c23a62f3a-a9eefff1878mr1674170566b.47.1731405675342; Tue, 12 Nov 2024 02:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731405675; cv=none; d=google.com; s=arc-20240605; b=ErainPLmL/QWXKd7vv2JOeQMN6YmCAZcLIo5W9L0mjnEeVg9d76gtOJzXA8uyJIwEf C5x5tYnNzw5X2sgHRgT4HcvnN8/TAlyXugGVzw36NrvpceQITy7WnkyaOz/WMx+eayR1 5qNiCvYzq8xxUxuUKF3V542DWaONFTQ8V/Jl1bY5TSteVxrdn9nutDCkyp/5yxwe0NY1 ARBI5HiXUfJhN4jvpBR1mmRGVbpmt1NEnZD7pVBORIcGJguS9I/+wAUoQMqnMSyXsLC1 c95cKdn39TkXnRRJwsHUqeTEigEu+O+Tb60VpqHHjEIpxGhoTSmc3wWgZUUVXIPs1YC3 1oZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:references:in-reply-to :message-id:date:to:from:delivered-to; bh=iHLvSpAsyUee8cBkvEuF64jntk1EKY7GH0GFUGetjlY=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=QejIBVenLbqJoeTdUsHy2rjYa01p9j+ovWWZjab3PeMGVox5V2uPm4/S6xepJ6WEOr 321WSZT3o2JUqjEoPoh9MwxUUBnT/aWLuScYxQym9wj/VzlDUpXswwWTfgNyW+D2RLQY ZkRYUoRdu8MRirU7js2274DZIA0yO/gs54oxGACuwc+r5rulxb/c7TVzGHIPeFF+sjq2 62yDAnictemnyRYbKWa0vedHXf6oce1nlKHe1Rj7lU1tuyH28JLAAnBuV2AICMk5hJei oEVHVWr7XPIzl5tFlExq2rajR/LdN0fMO1VopW3ogcHhmmhPtLJ94pmCic0eLB3MThFO jGOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5cf03c7c9e9si7908535a12.224.2024.11.12.02.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 02:01:15 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DCDBB68DEBF; Tue, 12 Nov 2024 11:52:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 90D5668DE8B for ; Tue, 12 Nov 2024 11:52:02 +0200 (EET) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with ESMTP id 4D36047EC6; Tue, 12 Nov 2024 10:51:58 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Nov 2024 10:50:41 +0100 Message-ID: <20241112095154.483778-8-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241112095154.483778-1-ffmpeg@haasn.xyz> References: <20241112095154.483778-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v6 07/12] swscale/internal: expose sws_init_single_context() internally 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6swrzb4K94Hn From: Niklas Haas Used by the graph API swscale wrapper, for now. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale_internal.h | 3 +++ libswscale/utils.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 5218ab0921..7c9517975b 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -958,6 +958,9 @@ extern const int32_t ff_yuv2rgb_coeffs[11][4]; extern const AVClass ff_sws_context_class; +int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter, + SwsFilter *dstFilter); + /** * Set c->convert_unscaled to an unscaled converter if one exists for the * specific source and destination formats, bit depths, flags, etc. diff --git a/libswscale/utils.c b/libswscale/utils.c index a01138d11b..1b6f54fc30 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1312,8 +1312,8 @@ static enum AVPixelFormat alphaless_fmt(enum AVPixelFormat fmt) } } -static av_cold int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter, - SwsFilter *dstFilter) +av_cold int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter, + SwsFilter *dstFilter) { int i; int usesVFilter, usesHFilter;