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 E494342BC8 for ; Wed, 12 Jan 2022 09:51:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6EC0568ADDB; Wed, 12 Jan 2022 11:51:56 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 69E1268018F for ; Wed, 12 Jan 2022 11:51:50 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 18C2D24017C for ; Wed, 12 Jan 2022 10:51:50 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id cvRQR_GILCqm for ; Wed, 12 Jan 2022 10:51:49 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 92412240179 for ; Wed, 12 Jan 2022 10:51:49 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 6E1D716008E; Wed, 12 Jan 2022 10:51:49 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20220105151506.74794-1-vittorio.giovara@gmail.com> References: <20220105135941.85715-1-vittorio.giovara@gmail.com> <20220105151506.74794-1-vittorio.giovara@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Wed, 12 Jan 2022 10:51:49 +0100 Message-ID: <164198110935.2375.9814405413495189335@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] vf_tonemap: Fix order of planes 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 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: Quoting Vittorio Giovara (2022-01-05 16:15:06) > This resulted in a dimmed tonemapping due to bad resulting luma > calculation. > > Found by: Derek Buitenhuis > > Signed-off-by: Vittorio Giovara > --- > libavfilter/vf_tonemap.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c > index 363df8034b..644c9fd9e3 100644 > --- a/libavfilter/vf_tonemap.c > +++ b/libavfilter/vf_tonemap.c > @@ -120,17 +120,17 @@ static void tonemap(TonemapContext *s, AVFrame *out, const AVFrame *in, > const AVPixFmtDescriptor *desc, int x, int y, double peak) > { > const float *r_in = (const float *)(in->data[0] + x * desc->comp[0].step + y * in->linesize[0]); > - const float *b_in = (const float *)(in->data[1] + x * desc->comp[1].step + y * in->linesize[1]); > - const float *g_in = (const float *)(in->data[2] + x * desc->comp[2].step + y * in->linesize[2]); > + const float *g_in = (const float *)(in->data[1] + x * desc->comp[1].step + y * in->linesize[1]); > + const float *b_in = (const float *)(in->data[2] + x * desc->comp[2].step + y * in->linesize[2]); I'm confused by this, the filter seems to use GBR pixel format. -- Anton Khirnov _______________________________________________ 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".