From patchwork Tue Oct 24 08:02:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz X-Patchwork-Id: 5672 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp345690jah; Tue, 24 Oct 2017 01:02:42 -0700 (PDT) X-Google-Smtp-Source: ABhQp+THyGL47JLqbhEt6F9nvo36MZOf2/fqA12KOtt5sDnjp2Ak0uIr+NTpqjr6Ctb8QQYrHoty X-Received: by 10.223.195.147 with SMTP id p19mr13431167wrf.176.1508832162406; Tue, 24 Oct 2017 01:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508832162; cv=none; d=google.com; s=arc-20160816; b=HyBZGQvlHqRyEQ7fEs/65dEg7nCAPye9xYaqdtvziozcI0xFOAKhIf3fyzZoS6id5a QIuU5exdrEB/I1Tavu+PE2k5HA69o5gYEZqZy7zjwNEcot6B2Swwl65huWNuFsj74N45 OIthlEO59b+rZp36D5NQHFy7O8D3g+E/VEybyt+QC8+FyFObNdrqAVttoi7KaL0bxEl3 T1V46ogupF41NGQAOJt1IiRShjHBZqFsmc9XDcwDGxkHdj0rP4R2Kmuy7AWOzUfJ0yp5 qbnNqDjwBuN3b7guiHyRwqw8obufwRRpwZTkPKwdQS3yygQ7GNR/kpxdtznoBlrmr/Fg 1/1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=Eb1jQtiSYjODg8gXGIgatzHHRI0uTvc1yWPzoX7LjYY=; b=IV3f6gcH0hzphoBaIiNxslMIZoQH7dWVKERtciNU1QnDJxlfCBFsfhSTuyahbv07ES y2XA6YeiuNwX/0vMdR71nxLv39JEjphKg0Vomoj61FfRhYa0UXxkhOBzzzxdyngBnCir ANSQriAL9Voo1cpkkqz7t6Uinm9wPKzu5quXW8t/wsXqm0F/GbOIvMet7PVAweDgFAfW vb6aBGBdWAGImgA/7J3SE/BsOlQj/F4hzb4V0HUKeLosKrld9GSRKa789xT710KHSeXo hyAD0Xa0XrPAgPOtBSHp8lHuVSm+WoNK2Usq6F6lGvi6cw42R+pt8WFcVsYL4G/1Bpve XrHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@poczta.onet.pl header.s=2011 header.b=s3/kFsfp; 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 t3si6908796wrg.88.2017.10.24.01.02.41; Tue, 24 Oct 2017 01:02:42 -0700 (PDT) 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=@poczta.onet.pl header.s=2011 header.b=s3/kFsfp; 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 D5D5C68A272; Tue, 24 Oct 2017 11:02:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpo67.poczta.onet.pl (smtpo67.poczta.onet.pl [141.105.16.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 85EAB68A143 for ; Tue, 24 Oct 2017 11:02:26 +0300 (EEST) Received: from localhost.localdomain (afgl227.neoplus.adsl.tpnet.pl [95.49.167.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mateuszb@poczta.onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 3yLm2q6LtLz18VVns; Tue, 24 Oct 2017 10:02:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.onet.pl; s=2011; t=1508832148; bh=03/5qPjwcy9o+0zQXEKu4pPcL7LDmCMVmBGNZGSNZMg=; h=From:To:Cc:Subject:Date:From; b=s3/kFsfpfmTPeE/y40v1B0MW1HO2KVXkBwLCHfzqGV3koXRxQNiXPCZGvod2ttJhe uJsqUTGXNBeCuDWvWxbZF0p+4jBsHmT6Ta2PBzf8mlOjltI5/sLtIStuouY23+tmQl 8xNtM9MIXrnQNcz9WNYKYolF30qnkrK8lnqOT1AY= From: Mateusz To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Oct 2017 10:02:16 +0200 Message-Id: <20171024080217.2868-1-mateuszb@poczta.onet.pl> X-Mailer: git-send-email 2.14.2.windows.3 Subject: [FFmpeg-devel] [PATCH 1/2] swscale: fix dithers table for DITHER_COPY macro X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Mateusz Brzostek MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The Bayer matrix 8x8 used in DITHER_COPY macro is table dithers[5]. Remaining dithers[] matrixes are generated from this matrix by downshift or upshift. This patch fixes dithers[6] and dithers[7] matrixes -- they were too dark. Signed-off-by: Mateusz Brzostek --- libswscale/swscale_unscaled.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 5d81cd5af9..6ffde1ec59 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -90,15 +90,6 @@ DECLARE_ALIGNED(8, static const uint8_t, dithers)[8][8][8]={ { 48, 0, 60, 12, 51, 3, 63, 15,}, { 24, 40, 20, 36, 27, 43, 23, 39,}, { 56, 8, 52, 4, 59, 11, 55, 7,}, -},{ - { 18, 34, 30, 46, 17, 33, 29, 45,}, - { 50, 2, 62, 14, 49, 1, 61, 13,}, - { 26, 42, 22, 38, 25, 41, 21, 37,}, - { 58, 10, 54, 6, 57, 9, 53, 5,}, - { 16, 32, 28, 44, 19, 35, 31, 47,}, - { 48, 0, 60, 12, 51, 3, 63, 15,}, - { 24, 40, 20, 36, 27, 43, 23, 39,}, - { 56, 8, 52, 4, 59, 11, 55, 7,}, },{ { 36, 68, 60, 92, 34, 66, 58, 90,}, { 100, 4,124, 28, 98, 2,122, 26,}, @@ -108,6 +99,15 @@ DECLARE_ALIGNED(8, static const uint8_t, dithers)[8][8][8]={ { 96, 0,120, 24,102, 6,126, 30,}, { 48, 80, 40, 72, 54, 86, 46, 78,}, { 112, 16,104, 8,118, 22,110, 14,}, +},{ + { 72,136,120,184, 68,132,116,180,}, + { 200, 8,248, 56,196, 4,244, 52,}, + { 104,168, 88,152,100,164, 84,148,}, + { 232, 40,216, 24,228, 36,212, 20,}, + { 64,128,112,176, 76,140,124,188,}, + { 192, 0,240, 48,204, 12,252, 60,}, + { 96,160, 80,144,108,172, 92,156,}, + { 224, 32,208, 16,236, 44,220, 28,}, }};