diff mbox

[FFmpeg-devel] avcodec/xwddec: fix palette alpha

Message ID 20180515213037.27039-1-cus@passwd.hu
State Accepted
Commit 50d6b7bd830eddd403c50f1be3e57f1b4a98ed69
Headers show

Commit Message

Marton Balint May 15, 2018, 9:30 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/xwddec.c | 2 +-
 tests/ref/lavf/xwd  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Paul B Mahol May 16, 2018, 8:11 a.m. UTC | #1
On 5/15/18, Marton Balint <cus@passwd.hu> wrote:
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavcodec/xwddec.c | 2 +-
>  tests/ref/lavf/xwd  | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

LGTM
Marton Balint May 16, 2018, 8:52 p.m. UTC | #2
On Wed, 16 May 2018, Paul B Mahol wrote:

> On 5/15/18, Marton Balint <cus@passwd.hu> wrote:
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavcodec/xwddec.c | 2 +-
>>  tests/ref/lavf/xwd  | 4 ++--
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> LGTM

Thanks, applied.

Regards,
Marton
diff mbox

Patch

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