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 A42DE42ADB for ; Tue, 11 Jan 2022 17:48:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E59F68AC71; Tue, 11 Jan 2022 19:48:46 +0200 (EET) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62AA96805AE for ; Tue, 11 Jan 2022 19:48:39 +0200 (EET) Received: by mail-wr1-f42.google.com with SMTP id d19so3925097wrb.0 for ; Tue, 11 Jan 2022 09:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Ev0bwaBb4ucrOWMePEYKEzkU32bUErPOnZufEg89Wxk=; b=ComDGn6dUgCVvl8eL/Vq+BOzHCnK5NmCnEBB14ZXP4iesW4JoABeH7B/GaIL2GBldI tjlDPDzRc+LxNgpCnoADTK+060ZsSFfpGuRC3Cg1U68MfWqdWBUTvQ/EQFvZQVVtU4uG 0JS/JAeaPgKMUWUPAzBFkDkEr9Q1HVMfU+1sWNRzfdZWWf/nlEB/spCNwEkAqAQtDbe5 ONVTUd+MBPKhl7NWi9cGFa56AhU6i5atItfio6YYm/Dn/UOGwtXyn0RG2Po9BM7m68Ry bPH53xKP+zCVH31Ihl3pVD/MIXGVPQj1zpyQSubpxVxhrBxfwWKAJFjpUulOT8RON72F Uqug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Ev0bwaBb4ucrOWMePEYKEzkU32bUErPOnZufEg89Wxk=; b=kVDMOJhiR+R38yDvtIBfvR4imnnM/R+sxgY7BtwnXxG+uFduu8k+/mXvZR++knmtqr Shx9VmQ5jhPmNtqg0G2NA1iUO9JmFDADW93xv7+/txOBg5vroJy/63uT8RGsvlwCMAYe Tl9dJejZANgHKG26NoB6gnU4SJw8xeHov67btGBTzXpI5Q3tfni7Y3b2Z1v6qATyfBVr y9w0LX+nTup5AU2WB4SnBsRWxehkepmP5FNkP1dHM8X1ShpU9+P8Lb2GvwRRKYatuipk 6/cezVP9J7yoevfp+QchEzieIWTy7HOQg2ZIC+LBgUjS/apJ9XmPYdUXUNEe9GgNCYYU 8VRA== X-Gm-Message-State: AOAM532VGBK6G5npcxwFU9K4Rqo/G/7ruBNFqA/PX++DYDAaf++Pbq2W ttpaY8ZohiwXkucrJoRlxvP23DM5Q9C5dTbENEQQ5anV12J1rg== X-Google-Smtp-Source: ABdhPJxU+FpTV9uOtCWGD9ImGckZETRzEDQUtJyO4ASgtyiuDFpmFCIVFnBhhk2fgUbwb4bRIdNXU1EBmRqWBarOeXY= X-Received: by 2002:a05:6000:1d89:: with SMTP id bk9mr4650675wrb.561.1641923318509; Tue, 11 Jan 2022 09:48:38 -0800 (PST) MIME-Version: 1.0 References: <20220105135941.85715-1-vittorio.giovara@gmail.com> <20220105151506.74794-1-vittorio.giovara@gmail.com> In-Reply-To: <20220105151506.74794-1-vittorio.giovara@gmail.com> From: Vittorio Giovara Date: Tue, 11 Jan 2022 18:48:27 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: On Wed, Jan 5, 2022 at 4:15 PM Vittorio Giovara wrote: > 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]); > float *r_out = (float *)(out->data[0] + x * desc->comp[0].step + y * > out->linesize[0]); > - float *b_out = (float *)(out->data[1] + x * desc->comp[1].step + y * > out->linesize[1]); > - float *g_out = (float *)(out->data[2] + x * desc->comp[2].step + y * > out->linesize[2]); > + float *g_out = (float *)(out->data[1] + x * desc->comp[1].step + y * > out->linesize[1]); > + float *b_out = (float *)(out->data[2] + x * desc->comp[2].step + y * > out->linesize[2]); > float sig, sig_orig; > > /* load values */ > *r_out = *r_in; > - *b_out = *b_in; > *g_out = *g_in; > + *b_out = *b_in; > > /* desaturate to prevent unnatural colors */ > if (s->desat > 0) { > -- > 2.34.1 > > Pushing soon unless objections. Possibly backporting it to 5.0 too. -- Vittorio _______________________________________________ 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".