From patchwork Tue May 15 21:30:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 8981 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a2e:2205:0:0:0:0:0 with SMTP id i5-v6csp1516527lji; Tue, 15 May 2018 14:30:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr21Lo9MjSuyoSRHZkreb8XYdXoLD79PQiv9n3Ab95s/zdpmv7TuD4BJhtqVfDhroFAvz7z X-Received: by 2002:a1c:ef0c:: with SMTP id n12-v6mr9584719wmh.123.1526419850202; Tue, 15 May 2018 14:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526419850; cv=none; d=google.com; s=arc-20160816; b=ZpkB2llKQz8h0mQVdf3ypAnCgYarQkLv+d2fssfoot3p3rqNy2VKlg900pXC/MXjTY CiMevfIStWt+cPMWZ/NKZvvKBS/kx18U+QDZ+kY2hBqZY5iD9bSfYGaRok1mTCSDuZg2 jVsrOTquoWyg19gz2r+B/YgyuEBncRCkgThXeyaYriM+LjiBLBypHynk/qWEsmtoRwLI 5ge+aVOh6Cn8IBizF5UhfLskSnToo0Hs3Pxfr5qSutC/3ZTONcK5ls9nNb+Nma5b8JJP t6pvVWkpYAfLi02azagnPUwsjOVeysPDQuSJ3JyZ2F0v7pW9b6bKhOJP2Ngz4rNL/Sak u5ZA== 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:delivered-to :arc-authentication-results; bh=6kOsLUp4IGQEVHXkxL5WEJF/8a5C7lyaCQkNT6Q/FfY=; b=fnH2ywAaE7B5H4MIVw0RLBg1CAXd1Q7BzoI3sppdC0qM3Wu+wAgVSpjPQaBK0bDx1v YWBER5HuOdKcD6e/+r4JVuZVnkvHTCtws9pQG4lcUgApmCRnx1dSA28fuiU9Up36FdiU 6wkHF3mcgyMW4EWgevhsNNrtn9kNIltwJXMdT6bAHEeSVHBKxt9iLsP0FmCYcPZEa7da kPK/51IsXP2v/OEmAWOhlvbjBUQHcZWB/Gri+dQcO7VO2O+iRXRreh88y2KaABQ1LgRg 5oRncsvi7I0b2F1UF+Vdh7Cf2xcKzR7ZxZC6aFJDxVJXD+JNqep27knaXas+p15kpRE9 MkPg== ARC-Authentication-Results: i=1; mx.google.com; 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 35-v6si791890wrq.378.2018.05.15.14.30.49; Tue, 15 May 2018 14:30:50 -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; 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 D88F56805BD; Wed, 16 May 2018 00:30:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1452E680113 for ; Wed, 16 May 2018 00:30:04 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 7666EE1168; Tue, 15 May 2018 23:30:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A3u2SWvIoI7K; Tue, 15 May 2018 23:30:41 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 5190BE1108; Tue, 15 May 2018 23:30:41 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 15 May 2018 23:30:37 +0200 Message-Id: <20180515213037.27039-1-cus@passwd.hu> X-Mailer: git-send-email 2.13.6 Subject: [FFmpeg-devel] [PATCH] avcodec/xwddec: fix palette alpha 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavcodec/xwddec.c | 2 +- tests/ref/lavf/xwd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 8b0845fc01..592c98dd4e 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -227,7 +227,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, blue = bytestream2_get_byteu(&gb); bytestream2_skipu(&gb, 3); // skip bitmask flag and padding - dst[i] = red << 16 | green << 8 | blue; + dst[i] = 0xFFU << 24 | red << 16 | green << 8 | blue; } } diff --git a/tests/ref/lavf/xwd b/tests/ref/lavf/xwd index 3d638211cb..b263ce6991 100644 --- a/tests/ref/lavf/xwd +++ b/tests/ref/lavf/xwd @@ -11,10 +11,10 @@ c0866e9e710fce735423594a93bee604 *./tests/data/images/xwd/02.xwd ./tests/data/images/xwd/%02d.xwd CRC=0x14555d6e 202863 ./tests/data/images/xwd/02.xwd c6f3cb7c45f7238474a89d2ad61a1caf *./tests/data/images/xwd/02.xwd -./tests/data/images/xwd/%02d.xwd CRC=0xfaafb59b +./tests/data/images/xwd/%02d.xwd CRC=0xf217a95e 104559 ./tests/data/images/xwd/02.xwd fe1af954966a40c2cd35fc27094ff823 *./tests/data/images/xwd/02.xwd -./tests/data/images/xwd/%02d.xwd CRC=0xd69c3a09 +./tests/data/images/xwd/%02d.xwd CRC=0xce042dcc 104559 ./tests/data/images/xwd/02.xwd 85e9b8b814a1dea71d143aac2e487037 *./tests/data/images/xwd/02.xwd ./tests/data/images/xwd/%02d.xwd CRC=0x0ff205be