From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7BC1E40292 for ; Sun, 22 May 2022 11:49:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D9B7368B493; Sun, 22 May 2022 14:49:01 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 17F5C68B2A1 for ; Sun, 22 May 2022 14:48:55 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 19A0240724; Sun, 22 May 2022 13:48:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1653220134; bh=DVY+ztuDGJ/Io4wdMKa/6igRmK3phsGhpwvlVDXB3sc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i7eb8PMQQZHSTZebxbCJ02G6KlaUHQXH96mOGv72sWk8Qr3UuRp5qu5Y37DQk8Kcu od2dhCjvfrKHMX77GAGnrDAsQKibGD5s615X/EZj9rRckvrWU2lGJnhvIWgCRUAmga mC/0lhek0HsXA+Pur312q5BEn7bzRkuQz9Q7nbgA= Date: Sun, 22 May 2022 13:48:53 +0200 Message-ID: <20220522134853.GB9721@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20220522053144.3707803-1-leo.izen@gmail.com> References: <20220522053144.3707803-1-leo.izen@gmail.com> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH v2 0/1] [WIP] avutil/csp changes 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: Leo Izen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Would it make sense to regroup the structs like this? typedef struct AVCIExy { AVRational x, y; } AVCIExy; struct AVPrimaryCoefficients { AVCIExy r, g, b; AVCIExy wp; }; typedef AVCIExy AVWhitepointCoefficients; /* optional */ On Sun, 22 May 2022 01:31:43 -0400 Leo Izen wrote: > Changes in v2: > - increase precision for AVR() macro to 100k, at haasn's request > - add #define AVUTIL_CSP_DENOM 100000 > - add 0.5 to the AVR macro definition to get exact values from truncation > > This patch is a work in progress example for swapping these > structs from doubles to AVRationals. > > There's two main discussions here to be had > - Is this API to be exposed as avpriv_ or av_? > - Should these structs use AVRational or double values? > > I don't believe a consensus has been reached on this yet, but I've attached > an AVRational version of it so we can see the pros/cons. > > Leo Izen (1): > avutil/csp: create public API for colorspace structs > > libavfilter/colorspace.c | 143 ++++++++---------------------------- > libavfilter/colorspace.h | 31 +------- > libavfilter/fflcms2.c | 25 ++++--- > libavfilter/fflcms2.h | 4 +- > libavfilter/vf_colorspace.c | 37 +++++----- > libavfilter/vf_iccdetect.c | 5 +- > libavfilter/vf_tonemap.c | 17 +---- > libavutil/Makefile | 2 + > libavutil/csp.c | 121 ++++++++++++++++++++++++++++++ > libavutil/csp.h | 51 +++++++++++++ > libavutil/version.h | 4 +- > 11 files changed, 252 insertions(+), 188 deletions(-) > create mode 100644 libavutil/csp.c > create mode 100644 libavutil/csp.h > > -- > 2.36.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".