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 7DF05425E8 for ; Wed, 5 Jan 2022 13:59:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D18CC68ACF5; Wed, 5 Jan 2022 15:59:54 +0200 (EET) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 729CF6806A3 for ; Wed, 5 Jan 2022 15:59:48 +0200 (EET) Received: by mail-ed1-f45.google.com with SMTP id z9so92449860edm.10 for ; Wed, 05 Jan 2022 05:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=AE+wTsvAksmTm+dIjNLATO7PYtJ30BxZq7XTr45R2bU=; b=X7clM5tbS3SJ3VkPIQsVwOSRqmEjMgHa9Mn9yz2UZDF+X/MqImBymMWoHOfXgu0zzf nesG+0d+CD0BJYcwzPxAndxasiNCAMeW4raXHVdgELg3+Fbsgct0ky4CkOBWDdks4n0J zy3fYdcUbik2C259dTK7cRQxAZKoL5u/C15+gt/c65C+x0AvY0kpQ2EoivIqE0nEd5IM Qhwp7bOnqVmGYBqz/d2h+HDCk9gkeck41Rop5Bwl0CVk8WPnkUldxX+TmpFoJhub9mj5 clxorSx+LYQoRJd0XHj/xq7qR8JaRtVLtnXZeQecoFY7wxtNSlHmwuQLVFigwK/Oo4TY t4Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=AE+wTsvAksmTm+dIjNLATO7PYtJ30BxZq7XTr45R2bU=; b=apFRyh8SnT7K10KW4kMU53FsoUnK2soWDXiLZCveET1dGXoFJ/RAqVlyAUGehc/pOl s+emBwJjixgbbbpA7sDo0N4ibaF6Kxt53vVKpimOzkyFZJK6su3o0k8TTv6nsGaz8dbP tdJmxGA4zEmJadkvJa3Izog1Nz8wuN4kMQgaUzhyJ5kSxLj1JbWgAAqbvGYq9O5MlhKo hfRo0zUDzH3Vkv4OHGDqY64l3ue8BD8KTThR/gMxDTcHG7+Pr2drnUwIB2hw986xJTc7 kBsaNTGY/wTPN4RR12m7YEUunN3n7yg36yjBc+7hOYBIvwjOx8W9kgQcKuL9X63VQ097 1O5Q== X-Gm-Message-State: AOAM532BoSa1GRA0Xj7YWtCnIY9B6glwWvBhmD9q9OCm4U395Upo7dH2 GkjCjQnhmX2GYdN9/r09AoDZ928wYdGjHMbH X-Google-Smtp-Source: ABdhPJyZUEQQvlhpJPmem2qo4GwMt6VfMo4Sio0TO3Ai/WAirRinioWHAfF53oebGLwX98krION0PQ== X-Received: by 2002:a17:907:2bc4:: with SMTP id gv4mr44019283ejc.646.1641391187797; Wed, 05 Jan 2022 05:59:47 -0800 (PST) Received: from vimacbookpro.vimeows.com ([2001:b07:a11:213c:a483:2d11:35e9:a6d6]) by smtp.gmail.com with ESMTPSA id 18sm3470585ejw.187.2022.01.05.05.59.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jan 2022 05:59:47 -0800 (PST) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Wed, 5 Jan 2022 14:59:41 +0100 Message-Id: <20220105135941.85715-1-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [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: 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index 363df8034b..c4ecf8a675 100644 --- a/libavfilter/vf_tonemap.c +++ b/libavfilter/vf_tonemap.c @@ -120,11 +120,11 @@ 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 */ -- 2.34.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".