From a71053df9131be803d9a359a7232e5193747f351 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sat, 15 Feb 2020 10:07:51 +0100
Subject: [PATCH] lsws/input: Do not change transparency range.

Fixes ticket #8509.
---
 libswscale/input.c                            |   6 +-
 tests/ref/fate/ffmpeg-filter_colorkey         |  20 +-
 tests/ref/fate/filter-overlay-dvdsub-2397     | 180 +++++++++---------
 tests/ref/fate/filter-overlay_gbrap_gbrap     |   2 +-
 tests/ref/fate/filter-overlay_gbrp_gbrap      |   2 +-
 tests/ref/fate/filter-overlay_yuv420_yuva420  |   2 +-
 tests/ref/fate/filter-overlay_yuv422_yuva422  |   2 +-
 tests/ref/fate/filter-overlay_yuv444_yuva444  |   2 +-
 tests/ref/fate/filter-overlay_yuva420_yuva420 |   2 +-
 tests/ref/fate/filter-overlay_yuva422_yuva422 |   2 +-
 tests/ref/fate/filter-overlay_yuva444_yuva444 |   2 +-
 11 files changed, 111 insertions(+), 111 deletions(-)

diff --git a/libswscale/input.c b/libswscale/input.c
index 159f70307d..7d7e6b7f36 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -437,7 +437,7 @@ static void abgrToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1,
     int16_t *dst = (int16_t *)_dst;
     int i;
     for (i=0; i<width; i++) {
-        dst[i]= src[4*i]<<6;
+        dst[i]= src[4*i]<<6 | src[4*i]>>2;
     }
 }
 
@@ -446,7 +446,7 @@ static void rgbaToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1,
     int16_t *dst = (int16_t *)_dst;
     int i;
     for (i=0; i<width; i++) {
-        dst[i]= src[4*i+3]<<6;
+        dst[i]= src[4*i+3]<<6 | src[4*i+3]>>2;
     }
 }
 
@@ -457,7 +457,7 @@ static void palToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1,
     for (i=0; i<width; i++) {
         int d= src[i];
 
-        dst[i]= (pal[d] >> 24)<<6;
+        dst[i]= (pal[d] >> 24)<<6 | pal[d]>>2;
     }
 }
 
diff --git a/tests/ref/fate/ffmpeg-filter_colorkey b/tests/ref/fate/ffmpeg-filter_colorkey
index effc13b12f..490a0f9aa6 100644
--- a/tests/ref/fate/ffmpeg-filter_colorkey
+++ b/tests/ref/fate/ffmpeg-filter_colorkey
@@ -3,13 +3,13 @@
 #codec_id 0: rawvideo
 #dimensions 0: 720x576
 #sar 0: 0/1
-0,          0,          0,        1,   622080, 0x4e30accb
-0,          1,          1,        1,   622080, 0x7d941c14
-0,          2,          2,        1,   622080, 0xf7451c5b
-0,          3,          3,        1,   622080, 0xb2c74319
-0,          4,          4,        1,   622080, 0xc9b80b79
-0,          5,          5,        1,   622080, 0x92ce1194
-0,          6,          6,        1,   622080, 0x43ae99ac
-0,          7,          7,        1,   622080, 0x4ec3a554
-0,          8,          8,        1,   622080, 0x3200250c
-0,          9,          9,        1,   622080, 0x94ebb3f3
+0,          0,          0,        1,   622080, 0x78efb628
+0,          1,          1,        1,   622080, 0x641f2564
+0,          2,          2,        1,   622080, 0x348f25c3
+0,          3,          3,        1,   622080, 0x6afc485a
+0,          4,          4,        1,   622080, 0xe949107f
+0,          5,          5,        1,   622080, 0x171716e5
+0,          6,          6,        1,   622080, 0x2985a01f
+0,          7,          7,        1,   622080, 0xc5ddabd7
+0,          8,          8,        1,   622080, 0xb4dd2b7f
+0,          9,          9,        1,   622080, 0x6e75ba82
diff --git a/tests/ref/fate/filter-overlay-dvdsub-2397 b/tests/ref/fate/filter-overlay-dvdsub-2397
index b86a2184b7..483e5fa4e0 100644
--- a/tests/ref/fate/filter-overlay-dvdsub-2397
+++ b/tests/ref/fate/filter-overlay-dvdsub-2397
@@ -490,368 +490,368 @@
 1,       3877,       3877,       10,     2013, 0x95a39f9c
 1,       3887,       3887,       10,     2013, 0x4f7ea123
 1,       3897,       3897,       10,     2013, 0x9efb9ba1
-0,        117,        117,        1,   518400, 0x949e1e8b
+0,        117,        117,        1,   518400, 0xbf8523da
 1,       3907,       3907,       10,     2013, 0xf395b2cd
 1,       3917,       3917,       10,     2013, 0x261a881e
 1,       3927,       3927,       10,     2013, 0x7f2d9f72
 1,       3937,       3937,       10,     2013, 0x0105b38d
-0,        118,        118,        1,   518400, 0xfc6c09aa
+0,        118,        118,        1,   518400, 0x41890ed6
 1,       3952,       3952,       10,     2013, 0x0e5db67e
 1,       3962,       3962,       10,     2013, 0xfc9baf97
-0,        119,        119,        1,   518400, 0x561c2ff5
+0,        119,        119,        1,   518400, 0x588534fc
 1,       3972,       3972,       10,     2013, 0x8e02a1b1
 1,       3982,       3982,       10,     2013, 0x6eecaac8
 1,       3992,       3992,       10,     2013, 0xf5558f0c
 1,       4002,       4002,       10,     2013, 0x512ba99b
-0,        120,        120,        1,   518400, 0xfd62e6bd
+0,        120,        120,        1,   518400, 0x2145ebc1
 1,       4012,       4012,       10,     2013, 0x932b9932
 1,       4022,       4022,       10,     2013, 0xc01ea987
-0,        121,        121,        1,   518400, 0x0427a070
+0,        121,        121,        1,   518400, 0x28bca595
 1,       4038,       4038,       10,     2013, 0x10879cf7
 1,       4048,       4048,       10,     2013, 0x90679338
 1,       4058,       4058,       10,     2013, 0x077d8a9e
 1,       4068,       4068,       10,     2013, 0x969fa57c
-0,        122,        122,        1,   518400, 0x0bf48fff
+0,        122,        122,        1,   518400, 0x77dc951e
 1,       4078,       4078,       10,     2013, 0xe049ab07
 1,       4088,       4088,       10,     2013, 0xf535b3b3
 1,       4098,       4098,       10,     2013, 0xfe76bd37
-0,        123,        123,        1,   518400, 0x354d4700
+0,        123,        123,        1,   518400, 0xe8924c17
 1,       4108,       4108,       10,     2013, 0xde79ad8c
 1,       4123,       4123,       10,     2013, 0xe89b9c47
 1,       4133,       4133,       10,     2013, 0xc570b0f0
-0,        124,        124,        1,   518400, 0x6081c80c
+0,        124,        124,        1,   518400, 0xadb4cccc
 1,       4143,       4143,       10,     2013, 0xee709cd9
 1,       4153,       4153,       10,     2013, 0xcfe5afab
 1,       4163,       4163,       10,     2013, 0x98ff8ce4
-0,        125,        125,        1,   518400, 0x9c6c51c6
+0,        125,        125,        1,   518400, 0x1d7b56ac
 1,       4173,       4173,       10,     2013, 0x9d19b44c
 1,       4183,       4183,       10,     2013, 0x4349917a
 1,       4193,       4193,       10,     2013, 0xbf54a59a
-0,        126,        126,        1,   518400, 0xaacd34d7
+0,        126,        126,        1,   518400, 0xad5739a4
 1,       4208,       4208,       10,     2013, 0xc4a399e0
 1,       4218,       4218,       10,     2013, 0x1bf58ff0
 1,       4228,       4228,       10,     2013, 0x3518ac56
-0,        127,        127,        1,   518400, 0x566bce8e
+0,        127,        127,        1,   518400, 0x2733d35a
 1,       4238,       4238,       10,     2013, 0xcd38c1de
 1,       4248,       4248,       10,     2013, 0xbe7d9c4d
 1,       4258,       4258,       10,     2013, 0xe113a306
 1,       4268,       4268,       10,     2013, 0x083197ea
-0,        128,        128,        1,   518400, 0xb14f68b3
+0,        128,        128,        1,   518400, 0x78e76da2
 1,       4278,       4278,       10,     2013, 0x1929b1eb
 1,       4294,       4294,       10,     2013, 0x5d6ea5af
 1,       4304,       4304,       10,     2013, 0x05519d53
-0,        129,        129,        1,   518400, 0x00545b29
+0,        129,        129,        1,   518400, 0x6c076013
 1,       4314,       4314,       10,     2013, 0x5773b380
 1,       4324,       4324,       10,     2013, 0xaa70a8f5
 1,       4334,       4334,       10,     2013, 0x990db0ec
-0,        130,        130,        1,   518400, 0x984bede5
+0,        130,        130,        1,   518400, 0x7854f2b1
 1,       4344,       4344,       10,     2013, 0x91d3a623
 1,       4354,       4354,       10,     2013, 0xc91f9824
 1,       4364,       4364,       10,     2013, 0x1d058abf
-0,        131,        131,        1,   518400, 0x6b9319c6
+0,        131,        131,        1,   518400, 0xd2ae1ecd
 1,       4379,       4379,       10,     2013, 0x8de1b8d5
 1,       4389,       4389,       10,     2013, 0x7872b06b
 1,       4399,       4399,       10,     2013, 0xa084c203
-0,        132,        132,        1,   518400, 0x1582ae8c
+0,        132,        132,        1,   518400, 0xf5eab38d
 1,       4409,       4409,       10,     2013, 0xff90ae8d
 1,       4419,       4419,       10,     2013, 0x61dead8e
 1,       4429,       4429,       10,     2013, 0xee76b284
-0,        133,        133,        1,   518400, 0xece339b6
+0,        133,        133,        1,   518400, 0x994d3e9c
 1,       4439,       4439,       10,     2013, 0xe888af7f
 1,       4449,       4449,       10,     2013, 0x5d57b115
 1,       4464,       4464,       10,     2013, 0xcdbfb1d0
-0,        134,        134,        1,   518400, 0x74946b8b
+0,        134,        134,        1,   518400, 0x95ab705a
 1,       4474,       4474,       10,     2013, 0x2e28a952
 1,       4484,       4484,       10,     2013, 0x4795a994
 1,       4494,       4494,       10,     2013, 0x7e7ea304
 1,       4504,       4504,       10,     2013, 0x9502c1e1
-0,        135,        135,        1,   518400, 0x5dffc0d6
+0,        135,        135,        1,   518400, 0x3c83c5ce
 1,       4514,       4514,       10,     2013, 0xf7c78ab2
 1,       4524,       4524,       10,     2013, 0x24049816
 1,       4534,       4534,       10,     2013, 0x52089dcf
-0,        136,        136,        1,   518400, 0x3f85c053
+0,        136,        136,        1,   518400, 0xfa22c508
 1,       4550,       4550,       10,     2013, 0x2150a0b1
 1,       4560,       4560,       10,     2013, 0x3c2e9b93
 1,       4570,       4570,       10,     2013, 0x491f932b
-0,        137,        137,        1,   518400, 0x7124125d
+0,        137,        137,        1,   518400, 0xddda1712
 1,       4580,       4580,       10,     2013, 0x31359cf8
 1,       4590,       4590,       10,     2013, 0x1b00ac3f
 1,       4600,       4600,       10,     2013, 0x8d7ab3cb
-0,        138,        138,        1,   518400, 0x46b736d5
+0,        138,        138,        1,   518400, 0x985a3b93
 1,       4610,       4610,       10,     2013, 0xb2c2a4de
 1,       4620,       4620,       10,     2013, 0x80a4abf2
 1,       4635,       4635,       10,     2013, 0x0701a4ee
-0,        139,        139,        1,   518400, 0x7bcac123
+0,        139,        139,        1,   518400, 0xea63c5e7
 1,       4645,       4645,       10,     2013, 0xdc1ba5bc
 1,       4655,       4655,       10,     2013, 0x6083a8a4
 1,       4665,       4665,       10,     2013, 0x6226ad45
-0,        140,        140,        1,   518400, 0x79899382
+0,        140,        140,        1,   518400, 0xef64983d
 1,       4675,       4675,       10,     2013, 0x2732a205
 1,       4685,       4685,       10,     2013, 0x0f62a0d3
 1,       4695,       4695,       10,     2013, 0xc1799249
-0,        141,        141,        1,   518400, 0x4a56acef
+0,        141,        141,        1,   518400, 0x747bb193
 1,       4705,       4705,       10,     2013, 0xbccfa9c8
 1,       4720,       4720,       10,     2013, 0xded096e7
 1,       4730,       4730,       10,     2013, 0x7f0daf43
-0,        142,        142,        1,   518400, 0xb0a983e5
+0,        142,        142,        1,   518400, 0xb8748862
 1,       4740,       4740,       10,     2013, 0xc47ea682
 1,       4750,       4750,       10,     2013, 0x5a72b07a
 1,       4760,       4760,       10,     2013, 0x386faa8c
 1,       4770,       4770,       10,     2013, 0xf9919a91
-0,        143,        143,        1,   518400, 0xb49255cc
+0,        143,        143,        1,   518400, 0xaab55a5f
 1,       4780,       4780,       10,     2013, 0x4908897e
 1,       4790,       4790,       10,     2013, 0x4882b594
-0,        144,        144,        1,   518400, 0x48808663
+0,        144,        144,        1,   518400, 0x7b468add
 1,       4806,       4806,       10,     2013, 0x113e98d1
 1,       4816,       4816,       10,     2013, 0x5098b30d
 1,       4826,       4826,       10,     2013, 0x0ef7b857
 1,       4836,       4836,       10,     2013, 0x216ea176
-0,        145,        145,        1,   518400, 0xf5be828c
+0,        145,        145,        1,   518400, 0xf2078707
 1,       4846,       4846,       10,     2013, 0xf906944a
 1,       4856,       4856,       10,     2013, 0xee9b92fb
 1,       4866,       4866,       10,     2013, 0xd6029209
-0,        146,        146,        1,   518400, 0xb6688ea3
+0,        146,        146,        1,   518400, 0x6a2d931e
 1,       4876,       4876,       10,     2013, 0x2256a12e
 1,       4891,       4891,       10,     2013, 0x89de8e4a
 1,       4901,       4901,       10,     2013, 0x0bf0a584
-0,        147,        147,        1,   518400, 0x9eb2bfd1
+0,        147,        147,        1,   518400, 0xbbe3c417
 1,       4911,       4911,       10,     2013, 0x6a5ebd58
 1,       4921,       4921,       10,     2013, 0x3edd9aa4
 1,       4931,       4931,       10,     2013, 0xbd66ac26
-0,        148,        148,        1,   518400, 0xab3bdfb5
+0,        148,        148,        1,   518400, 0x6294e449
 1,       4941,       4941,       10,     2013, 0x313896ea
 1,       4951,       4951,       10,     2013, 0x6b83a6a0
 1,       4961,       4961,       10,     2013, 0x9aafb109
-0,        149,        149,        1,   518400, 0xe65f1d81
+0,        149,        149,        1,   518400, 0xa05721e7
 1,       4976,       4976,       10,     2013, 0x5192a85a
 1,       4986,       4986,       10,     2013, 0x1f919f79
 1,       4996,       4996,       10,     2013, 0xc0799c40
-0,        150,        150,        1,   518400, 0x61ca8d13
+0,        150,        150,        1,   518400, 0x37749183
 1,       5006,       5006,       10,     2013, 0x2988bcd8
 1,       5016,       5016,       10,     2013, 0x1482913a
 1,       5026,       5026,       10,     2013, 0x74da9a94
 1,       5036,       5036,       10,     2013, 0x763eb709
-0,        151,        151,        1,   518400, 0xbdd0d82f
+0,        151,        151,        1,   518400, 0xf9d9dca0
 1,       5046,       5046,       10,     2013, 0x1285b405
 1,       5062,       5062,       10,     2013, 0xb6ab9dfc
-0,        152,        152,        1,   518400, 0xab1acaad
+0,        152,        152,        1,   518400, 0x5f8ccf08
 1,       5072,       5072,       10,     2013, 0xe4c8bf19
 1,       5082,       5082,       10,     2013, 0xabbbade8
 1,       5092,       5092,       10,     2013, 0xf8b69d89
 1,       5102,       5102,       10,     2013, 0xce04a866
-0,        153,        153,        1,   518400, 0x1889f31c
+0,        153,        153,        1,   518400, 0x7303f77b
 1,       5112,       5112,       10,     2013, 0x07528abf
 1,       5122,       5122,       10,     2013, 0x74fb98bf
 1,       5132,       5132,       10,     2013, 0x579fb1c9
-0,        154,        154,        1,   518400, 0x02484cce
+0,        154,        154,        1,   518400, 0x22b0513f
 1,       5147,       5147,       10,     2013, 0x7ddea2ed
 1,       5157,       5157,       10,     2013, 0x296caa2c
 1,       5167,       5167,       10,     2013, 0x346d9c4f
-0,        155,        155,        1,   518400, 0x59998165
+0,        155,        155,        1,   518400, 0x330485d2
 1,       5177,       5177,       10,     2013, 0x3e1fba15
 1,       5187,       5187,       10,     2013, 0x48a2908f
 1,       5197,       5197,       10,     2013, 0xc1938d09
-0,        156,        156,        1,   518400, 0x0f3dd671
+0,        156,        156,        1,   518400, 0x7f83daea
 1,       5207,       5207,       10,     2013, 0x0e96a060
 1,       5217,       5217,       10,     2013, 0x7b6a9e06
 1,       5232,       5232,       10,     2013, 0x5b779d28
-0,        157,        157,        1,   518400, 0x378bee63
+0,        157,        157,        1,   518400, 0xee19f2df
 1,       5242,       5242,       10,     2013, 0xf600aca1
 1,       5252,       5252,       10,     2013, 0x3a6c9e68
 1,       5262,       5262,       10,     2013, 0x0c8dc1b0
-0,        158,        158,        1,   518400, 0x0d8e17d2
+0,        158,        158,        1,   518400, 0xb71b1c77
 1,       5272,       5272,       10,     2013, 0x26beb245
 1,       5282,       5282,       10,     2013, 0x2bc09557
 1,       5292,       5292,       10,     2013, 0x27fc8845
 1,       5302,       5302,       10,     2013, 0x1025aa47
-0,        159,        159,        1,   518400, 0x61f113bf
+0,        159,        159,        1,   518400, 0xbffc1856
 1,       5318,       5318,       10,     2013, 0xc2e69baa
 1,       5328,       5328,       10,     2013, 0xdb249b92
 1,       5338,       5338,       10,     2013, 0x6ccda29e
-0,        160,        160,        1,   518400, 0x44ec211a
+0,        160,        160,        1,   518400, 0xabc125aa
 1,       5348,       5348,       10,     2013, 0xeaf6a1cf
 1,       5358,       5358,       10,     2013, 0x509ba397
 1,       5368,       5368,       10,     2013, 0xfaf8a2df
-0,        161,        161,        1,   518400, 0xcb036306
+0,        161,        161,        1,   518400, 0x5ee467f8
 1,       5378,       5378,       10,     2013, 0x41388f28
 1,       5388,       5388,       10,     2013, 0xfe5eab39
 1,       5403,       5403,       10,     2013, 0xd5ffa066
-0,        162,        162,        1,   518400, 0x7f1dec7d
+0,        162,        162,        1,   518400, 0x6c2cf168
 1,       5413,       5413,       10,     2013, 0x6813a30a
 1,       5423,       5423,       10,     2013, 0x9be89718
 1,       5433,       5433,       10,     2013, 0xaec3a27b
-0,        163,        163,        1,   518400, 0x8b8c6640
+0,        163,        163,        1,   518400, 0x63996b26
 1,       5446,       5446,       10,     2013, 0x579a983e
 1,       5456,       5456,       10,     2013, 0x98cea21f
 1,       5466,       5466,       10,     2013, 0xca77a58a
-0,        164,        164,        1,   518400, 0xea04737c
+0,        164,        164,        1,   518400, 0xb34d789a
 1,       5476,       5476,       10,     2013, 0xcbc3b1ee
 1,       5486,       5486,       10,     2013, 0xf3bb8f07
 1,       5496,       5496,       10,     2013, 0x6aeebd92
-0,        165,        165,        1,   518400, 0xe779fe0c
+0,        165,        165,        1,   518400, 0xf49c030f
 1,       5506,       5506,       10,     2013, 0xe955a449
 1,       5516,       5516,       10,     2013, 0x9436aa5b
 1,       5531,       5531,       10,     2013, 0x4f0a8f9f
-0,        166,        166,        1,   518400, 0xcd78bf13
+0,        166,        166,        1,   518400, 0x092dc41a
 1,       5541,       5541,       10,     2013, 0x3551b22d
 1,       5551,       5551,       10,     2013, 0x0959a3d4
 1,       5561,       5561,       10,     2013, 0x2ed5a11b
 1,       5571,       5571,       10,     2013, 0x8f52a5c3
-0,        167,        167,        1,   518400, 0x45b0c048
+0,        167,        167,        1,   518400, 0x4134c577
 1,       5581,       5581,       10,     2013, 0x6552978d
 1,       5591,       5591,       10,     2013, 0x7dcca0c1
 1,       5601,       5601,       10,     2013, 0xbcd4a3c9
-0,        168,        168,        1,   518400, 0x9783dcd8
+0,        168,        168,        1,   518400, 0x261de1ed
 1,       5616,       5616,       10,     2013, 0xfe41a8d8
 1,       5626,       5626,       10,     2013, 0xc85aae14
 1,       5636,       5636,       10,     2013, 0x1185b346
-0,        169,        169,        1,   518400, 0xbcd1514c
+0,        169,        169,        1,   518400, 0xcbc8566a
 1,       5646,       5646,       10,     2013, 0xf7429a0d
 1,       5656,       5656,       10,     2013, 0x48c2a160
 1,       5666,       5666,       10,     2013, 0x9d85a85d
-0,        170,        170,        1,   518400, 0xf229575f
+0,        170,        170,        1,   518400, 0x407a5c76
 1,       5676,       5676,       10,     2013, 0xbbe89fe9
 1,       5686,       5686,       10,     2013, 0xea429fe2
 1,       5702,       5702,       10,     2013, 0x221ca1d4
-0,        171,        171,        1,   518400, 0x576e365e
+0,        171,        171,        1,   518400, 0x1ed73bb2
 1,       5712,       5712,       10,     2013, 0x394b925b
 1,       5722,       5722,       10,     2013, 0x556dc26f
 1,       5732,       5732,       10,     2013, 0xce21a5e1
-0,        172,        172,        1,   518400, 0xa2d2d87b
+0,        172,        172,        1,   518400, 0x8467ddb5
 1,       5742,       5742,       10,     2013, 0xbc87c0a8
 1,       5752,       5752,       10,     2013, 0xbac4ac07
 1,       5762,       5762,       10,     2013, 0xdeefa4aa
 1,       5772,       5772,       10,     2013, 0x1f15b362
-0,        173,        173,        1,   518400, 0x3804d74a
+0,        173,        173,        1,   518400, 0x0523dc73
 1,       5787,       5787,       10,     2013, 0x6406b7b2
 1,       5797,       5797,       10,     2013, 0x8030a03d
-0,        174,        174,        1,   518400, 0xf05de372
+0,        174,        174,        1,   518400, 0x81f5e895
 1,       5807,       5807,       10,     2013, 0x0373a5b1
 1,       5817,       5817,       10,     2013, 0x34ef93da
 1,       5827,       5827,       10,     2013, 0x94c198fe
 1,       5837,       5837,       10,     2013, 0xfefcabad
-0,        175,        175,        1,   518400, 0x21035b4f
+0,        175,        175,        1,   518400, 0xfc74608d
 1,       5847,       5847,       10,     2013, 0x8755b3ec
 1,       5857,       5857,       10,     2013, 0xe436a6fd
 1,       5872,       5872,       10,     2013, 0x9cf5a11e
-0,        176,        176,        1,   518400, 0x6e97d583
+0,        176,        176,        1,   518400, 0xc4e0dae0
 1,       5882,       5882,       10,     2013, 0x03b8a98c
 1,       5892,       5892,       10,     2013, 0x6216a138
 1,       5902,       5902,       10,     2013, 0xd87b9f12
-0,        177,        177,        1,   518400, 0x197879a9
+0,        177,        177,        1,   518400, 0x98367f5b
 1,       5912,       5912,       10,     2013, 0x4ce99653
 1,       5922,       5922,       10,     2013, 0x6c2ea9e2
 1,       5932,       5932,       10,     2013, 0x918cae4c
-0,        178,        178,        1,   518400, 0x787780ee
+0,        178,        178,        1,   518400, 0x0f1a869d
 1,       5942,       5942,       10,     2013, 0xd19fa5f2
 1,       5958,       5958,       10,     2013, 0x0bdda7c6
 1,       5968,       5968,       10,     2013, 0x0f9ab0ca
-0,        179,        179,        1,   518400, 0x13fcc74d
+0,        179,        179,        1,   518400, 0x45b6ccf2
 1,       5978,       5978,       10,     2013, 0x410a92b1
 1,       5988,       5988,       10,     2013, 0xcfbe9d1c
 1,       5998,       5998,       10,     2013, 0x59ed9d15
-0,        180,        180,        1,   518400, 0x9bd1c5da
+0,        180,        180,        1,   518400, 0x5f9ccb77
 1,       6008,       6008,       10,     2013, 0x4e129e27
 1,       6018,       6018,       10,     2013, 0x7bb9ac0a
 1,       6028,       6028,       10,     2013, 0x826ca82b
-0,        181,        181,        1,   518400, 0x8e21e4ba
+0,        181,        181,        1,   518400, 0x5f15ea31
 1,       6043,       6043,       10,     2013, 0x9ad5a74b
 1,       6053,       6053,       10,     2013, 0x6c5f969a
 1,       6063,       6063,       10,     2013, 0x8479a0e5
-0,        182,        182,        1,   518400, 0x5fe59996
+0,        182,        182,        1,   518400, 0x86369f27
 1,       6073,       6073,       10,     2013, 0x165298ef
 1,       6083,       6083,       10,     2013, 0xdcadb4a1
 1,       6093,       6093,       10,     2013, 0xa90e987c
 1,       6103,       6103,       10,     2013, 0x1ac5b510
-0,        183,        183,        1,   518400, 0x308af432
+0,        183,        183,        1,   518400, 0x2e27f9fa
 1,       6113,       6113,       10,     2013, 0x66728d85
 1,       6128,       6128,       10,     2013, 0xe4859fc5
 1,       6138,       6138,       10,     2013, 0x9901786e
-0,        184,        184,        1,   518400, 0xc05a9eb1
+0,        184,        184,        1,   518400, 0xc029a44d
 1,       6148,       6148,       10,     2013, 0x6aebb406
 1,       6158,       6158,       10,     2013, 0x7d13a2cc
 1,       6168,       6168,       10,     2013, 0x99b7a8cc
-0,        185,        185,        1,   518400, 0xb9a02e51
+0,        185,        185,        1,   518400, 0xebee33b0
 1,       6178,       6178,       10,     2013, 0x80b8a624
 1,       6188,       6188,       10,     2013, 0xbb6aa271
 1,       6198,       6198,       10,     2013, 0x17af9e4a
-0,        186,        186,        1,   518400, 0xbd9543aa
+0,        186,        186,        1,   518400, 0x19e5494f
 1,       6214,       6214,       10,     2013, 0xfaf0a8f1
 1,       6224,       6224,       10,     2013, 0xd6849b93
 1,       6234,       6234,       10,     2013, 0xe9829669
-0,        187,        187,        1,   518400, 0x0a0cb795
+0,        187,        187,        1,   518400, 0xf697bd7c
 1,       6244,       6244,       10,     2013, 0x7ec98944
 1,       6254,       6254,       10,     2013, 0x2b2099a4
 1,       6264,       6264,       10,     2013, 0x1033a82f
-0,        188,        188,        1,   518400, 0xe4bb8a0c
+0,        188,        188,        1,   518400, 0x82569002
 1,       6274,       6274,       10,     2013, 0x5ec88990
 1,       6284,       6284,       10,     2013, 0xd2a19b3d
 1,       6299,       6299,       10,     2013, 0xa377b268
-0,        189,        189,        1,   518400, 0x226fd11e
+0,        189,        189,        1,   518400, 0xfcb6d707
 1,       6309,       6309,       10,     2013, 0xfa859901
 1,       6319,       6319,       10,     2013, 0x1713955a
 1,       6329,       6329,       10,     2013, 0x70aab0da
 1,       6339,       6339,       10,     2013, 0xcdaea422
-0,        190,        190,        1,   518400, 0x76e1604d
+0,        190,        190,        1,   518400, 0x82a9662b
 1,       6349,       6349,       10,     2013, 0x65c3bf80
 1,       6359,       6359,       10,     2013, 0x1d75a55f
 1,       6369,       6369,       10,     2013, 0xa5bea4de
-0,        191,        191,        1,   518400, 0xca06117c
+0,        191,        191,        1,   518400, 0x212e16ee
 1,       6384,       6384,       10,     2013, 0x184db71c
 1,       6394,       6394,       10,     2013, 0x99858ec8
 1,       6404,       6404,       10,     2013, 0xb8f2aee5
-0,        192,        192,        1,   518400, 0xeca14952
+0,        192,        192,        1,   518400, 0x2ca34dca
 1,       6414,       6414,       10,     2013, 0x4435b2ef
 1,       6424,       6424,       10,     2013, 0x8acfa6c7
 1,       6434,       6434,       10,     2013, 0x42b4c01f
-0,        193,        193,        1,   518400, 0x3106dbee
+0,        193,        193,        1,   518400, 0xe9ebe0a5
 1,       6444,       6444,       10,     2013, 0x6e308c13
 1,       6454,       6454,       10,     2013, 0x8227a0f6
 1,       6470,       6470,       10,     2013, 0x6f12a7a2
-0,        194,        194,        1,   518400, 0x57fa6392
+0,        194,        194,        1,   518400, 0x4e6b6917
 1,       6480,       6480,       10,     2013, 0x785392be
 1,       6490,       6490,       10,     2013, 0x81849c2b
 1,       6500,       6500,       10,     2013, 0x5cf2af65
-0,        195,        195,        1,   518400, 0x47651ac8
+0,        195,        195,        1,   518400, 0x7dcf20ab
 1,       6510,       6510,       10,     2013, 0x0c6ca6b4
 1,       6520,       6520,       10,     2013, 0x412fab9f
 1,       6530,       6530,       10,     2013, 0x08e792b4
-0,        196,        196,        1,   518400, 0x3c1ba6a5
+0,        196,        196,        1,   518400, 0xf30fac97
 1,       6540,       6540,       10,     2013, 0x407aace3
 1,       6555,       6555,       10,     2013, 0xd26bac16
 1,       6565,       6565,       10,     2013, 0xac8bb295
-0,        197,        197,        1,   518400, 0xbc3ec05b
+0,        197,        197,        1,   518400, 0xcb9fc692
 1,       6575,       6575,       10,     2013, 0xddd1949c
 1,       6585,       6585,       10,     2013, 0x6b26b868
 1,       6595,       6595,       10,     2013, 0x5eaba587
 1,       6605,       6605,       10,     2013, 0xef0793b9
-0,        198,        198,        1,   518400, 0xd6ae59da
+0,        198,        198,        1,   518400, 0x5d05601e
 1,       6615,       6615,       10,     2013, 0xdef19bd6
 1,       6625,       6625,       10,     2013, 0xca98a635
-0,        199,        199,        1,   518400, 0xc62f0e63
+0,        199,        199,        1,   518400, 0x456c1417
 1,       6640,       6640,       10,     2013, 0x06269a5a
 1,       6650,       6650,       10,     2013, 0x32cb9952
 1,       6660,       6660,       10,     2013, 0xf01fa95a
 1,       6670,       6670,       10,     2013, 0xefab9e55
-0,        200,        200,        1,   518400, 0xae96cc02
+0,        200,        200,        1,   518400, 0x9a0fd1ad
 1,       6680,       6680,       10,     2013, 0x55a3b63a
 1,       6690,       6690,       10,     2013, 0xcd36a553
 1,       6700,       6700,       10,     2013, 0x2ec19877
-0,        201,        201,        1,   518400, 0x2aa0917b
+0,        201,        201,        1,   518400, 0x55db9716
 1,       6710,       6710,       10,     2013, 0xc18b924c
 1,       6726,       6726,       10,     2013, 0xf132b04c
 1,       6736,       6736,       10,     2013, 0x7975a44d
-0,        202,        202,        1,   518400, 0xf0d13b48
+0,        202,        202,        1,   518400, 0x1f0d40d6
 1,       6746,       6746,       10,     2013, 0x2aaf94cb
 1,       6756,       6756,       10,     2013, 0x58cfa60f
 1,       6766,       6766,       10,     2013, 0x9757a658
-0,        203,        203,        1,   518400, 0x067f56f8
+0,        203,        203,        1,   518400, 0x73695c82
 1,       6776,       6776,       10,     2013, 0x67ebc0d5
 1,       6786,       6786,       10,     2013, 0x3c50a70e
 1,       6796,       6796,       10,     2013, 0x9c5799c6
-0,        204,        204,        1,   518400, 0x1026025c
+0,        204,        204,        1,   518400, 0xb0f10812
 1,       6811,       6811,       10,     2013, 0x018d85b2
 1,       6821,       6821,       10,     2013, 0x5367a956
-0,        205,        205,        1,   518400, 0x11ee7f7f
-0,        208,        208,        1,   518400, 0x30a6b398
+0,        205,        205,        1,   518400, 0xdec18505
+0,        208,        208,        1,   518400, 0xb147b947
 0,        240,        240,        1,   518400, 0x9d2e3977
diff --git a/tests/ref/fate/filter-overlay_gbrap_gbrap b/tests/ref/fate/filter-overlay_gbrap_gbrap
index 49e14c643c..5048a346ae 100644
--- a/tests/ref/fate/filter-overlay_gbrap_gbrap
+++ b/tests/ref/fate/filter-overlay_gbrap_gbrap
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    65536, 0xbac99946
+0,          0,          0,        1,    65536, 0x821bcb9b
diff --git a/tests/ref/fate/filter-overlay_gbrp_gbrap b/tests/ref/fate/filter-overlay_gbrp_gbrap
index 204c9d0625..99524c3355 100644
--- a/tests/ref/fate/filter-overlay_gbrp_gbrap
+++ b/tests/ref/fate/filter-overlay_gbrp_gbrap
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    49152, 0xa905d586
+0,          0,          0,        1,    49152, 0x738d07ea
diff --git a/tests/ref/fate/filter-overlay_yuv420_yuva420 b/tests/ref/fate/filter-overlay_yuv420_yuva420
index ee0c82e062..dffd135638 100644
--- a/tests/ref/fate/filter-overlay_yuv420_yuva420
+++ b/tests/ref/fate/filter-overlay_yuv420_yuva420
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    24576, 0x1505f000
+0,          0,          0,        1,    24576, 0xf104fedd
diff --git a/tests/ref/fate/filter-overlay_yuv422_yuva422 b/tests/ref/fate/filter-overlay_yuv422_yuva422
index 7d21e1b84a..de0a9d13cf 100644
--- a/tests/ref/fate/filter-overlay_yuv422_yuva422
+++ b/tests/ref/fate/filter-overlay_yuv422_yuva422
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    32768, 0x2d88b114
+0,          0,          0,        1,    32768, 0x180ac096
diff --git a/tests/ref/fate/filter-overlay_yuv444_yuva444 b/tests/ref/fate/filter-overlay_yuv444_yuva444
index e1e5db2d7d..bc57fb5d54 100644
--- a/tests/ref/fate/filter-overlay_yuv444_yuva444
+++ b/tests/ref/fate/filter-overlay_yuv444_yuva444
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    49152, 0x92da3b63
+0,          0,          0,        1,    49152, 0x42ec4c43
diff --git a/tests/ref/fate/filter-overlay_yuva420_yuva420 b/tests/ref/fate/filter-overlay_yuva420_yuva420
index a17cc5c2e5..fac08a16e1 100644
--- a/tests/ref/fate/filter-overlay_yuva420_yuva420
+++ b/tests/ref/fate/filter-overlay_yuva420_yuva420
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    40960, 0x0a1ab3c0
+0,          0,          0,        1,    40960, 0x5de1c29d
diff --git a/tests/ref/fate/filter-overlay_yuva422_yuva422 b/tests/ref/fate/filter-overlay_yuva422_yuva422
index e4d2e3977e..2e65399d17 100644
--- a/tests/ref/fate/filter-overlay_yuva422_yuva422
+++ b/tests/ref/fate/filter-overlay_yuva422_yuva422
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    49152, 0x369974d4
+0,          0,          0,        1,    49152, 0xdb3b8456
diff --git a/tests/ref/fate/filter-overlay_yuva444_yuva444 b/tests/ref/fate/filter-overlay_yuva444_yuva444
index f2d9c56437..794338a665 100644
--- a/tests/ref/fate/filter-overlay_yuva444_yuva444
+++ b/tests/ref/fate/filter-overlay_yuva444_yuva444
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 128x128
 #sar 0: 1/1
-0,          0,          0,        1,    65536, 0xa279ff14
+0,          0,          0,        1,    65536, 0x91d31003
-- 
2.24.1

