From patchwork Thu Nov 9 12:19:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44590 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4fa4:b0:181:818d:5e7f with SMTP id gh36csp444409pzb; Thu, 9 Nov 2023 04:26:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG102E0SO5cWt5SdwWi3skGo99KmiH+MhxEwlhan4z7eUQ2fku40/fqs/MQM1IIVQJ6irln X-Received: by 2002:a05:6402:3896:b0:53f:c889:8f89 with SMTP id fd22-20020a056402389600b0053fc8898f89mr2670491edb.36.1699532816223; Thu, 09 Nov 2023 04:26:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699532816; cv=none; d=google.com; s=arc-20160816; b=FFWdnjFoCZwt81YJvgCWrJef4vIWxJ4GJcfKo+98khh6RHeTIkQx6NKA5eeKiTJ/Sw MSb3gfBBcqIWjSO5CD/PtZ3jnOnUJ+PlWnHNHh5wdCj1ozP+3HEUm3gXYXKLm/uq0WSD RduUfWKeFFIQ082oFJFYwxXDdcqKXbwXJ6Q+OYqLBK70d6tT1plxXfYKo5NtrGhTyNKF f2UrU3/LsnFwBrk/RSBR4oG4Mkj2L07VMQja/p0QBQgiRJB4YriurvwCewOzu79qF1Cw PE2D2rAOBsTR18Nz7eSs5cOkSrP2BPnUMiDvqYY2r1KD1mrU4fKwYdSLvTbClvtVpgI1 phug== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=FXrRaGVVAFl12yOhiET+zhhHoWFwQei9DoFi9CMlfBI=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=XdL0NqX8exPTTn2hgCxXGVk0X9uk663OeIAX8qpGRQzHUxOYlVMrBZ4YHiK6AF4OWO QgyY/I5Ifs2cDL5nxCOOsAkjoxnG2rsROsExucVYPe2S0orL9XYTQBaP8jMjLHnute0d 7JfvZUyO54ZtK5bmkS02aYTCbivfdSofuqRGTq6gcADWEQwff+6wXOjC4mEVq/9srIRe RQPTv5dgjGVW59b0/4fwqlYWhhrb780aYOkxH8RmLJprtf9y1b77wtZUW7OvDHZDw4hS T1bQwimRUSw/bJqCNAD+JeLdQXneIjY/zihjMuwL4jqqwt5hZugH9zsvhVJwZmaTchXu 0XVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=TglwkNmn; 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 ESMTP id k29-20020a508add000000b005435820cf9fsi7425932edk.22.2023.11.09.04.26.55; Thu, 09 Nov 2023 04:26:56 -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; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=TglwkNmn; 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 2963E68CC6C; Thu, 9 Nov 2023 14:25:51 +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 2950E68CBCB for ; Thu, 9 Nov 2023 14:25:42 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 1CFDA4BD11; Thu, 9 Nov 2023 13:25:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1699532739; bh=Gj/5Aq3EF4s1bUpMTVeWUBoHbx83SxH1VRcA1nTLQLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TglwkNmnL+LfuJuJomuaqLXF74G6b6Ojan/mHkGeC3rkp+QKruVCLRWXe5IEmJG9b yHUxToW8zBH6kfoTypPewBllOIsZx6McNU7134PeAzirJvi7qbSrhETWCZocofyMQh BeQ3WYxmbe8dGm8J82s6BBaIlNgZFB3w979SCTx4= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Nov 2023 13:19:45 +0100 Message-ID: <20231109122534.124157-14-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109122534.124157-1-ffmpeg@haasn.xyz> References: <20231109122534.124157-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/25] avfilter/buffersink: add color space/range accessors 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: huVGYQ7mA1ds From: Niklas Haas Needed for fftools. --- doc/APIchanges | 3 +++ libavfilter/buffersink.c | 2 ++ libavfilter/buffersink.h | 2 ++ libavfilter/version.h | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index ce3f90a674..97b6de8276 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-11-xx - xxxxxxxxxx - lavf 58.15.100 - buffersink.h + Add av_buffersink_get_colorspace and av_buffersink_get_color_range. + 2023-11-xx - xxxxxxxxxx - lavf 58.14.100 - avfilter.h formats.h Add AVFilterFormatsConfig.color_spaces, AVFilterFormatsConfig.color_ranges, AVFilterLink.colorspace, AVFilterLink.color_range, ff_all_color_spaces, diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index ca2af1bc07..8fb9ba0fa4 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -202,6 +202,8 @@ MAKE_AVFILTERLINK_ACCESSOR(AVRational , frame_rate ) MAKE_AVFILTERLINK_ACCESSOR(int , w ) MAKE_AVFILTERLINK_ACCESSOR(int , h ) MAKE_AVFILTERLINK_ACCESSOR(AVRational , sample_aspect_ratio) +MAKE_AVFILTERLINK_ACCESSOR(enum AVColorSpace, colorspace) +MAKE_AVFILTERLINK_ACCESSOR(enum AVColorRange, color_range) #if FF_API_OLD_CHANNEL_LAYOUT FF_DISABLE_DEPRECATION_WARNINGS diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h index 64e08de53e..a9374b8b4f 100644 --- a/libavfilter/buffersink.h +++ b/libavfilter/buffersink.h @@ -117,6 +117,8 @@ AVRational av_buffersink_get_frame_rate (const AVFilterContext *c int av_buffersink_get_w (const AVFilterContext *ctx); int av_buffersink_get_h (const AVFilterContext *ctx); AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx); +enum AVColorSpace av_buffersink_get_colorspace (const AVFilterContext *ctx); +enum AVColorRange av_buffersink_get_color_range (const AVFilterContext *ctx); int av_buffersink_get_channels (const AVFilterContext *ctx); #if FF_API_OLD_CHANNEL_LAYOUT diff --git a/libavfilter/version.h b/libavfilter/version.h index 7642b670d1..59330858bd 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFILTER_VERSION_MINOR 14 +#define LIBAVFILTER_VERSION_MINOR 15 #define LIBAVFILTER_VERSION_MICRO 100