aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-10 10:01:02 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-10 17:22:26 +0100
commit23261e60014908da7446e9b5bc7401dc30fdecd6 (patch)
treef0e14f97c4671870133ec0aa7afd21334a80cd76
parentbc9a5965c815cf7fd998d8ce14a18b8e861dd9ce (diff)
downloadffmpeg-23261e60014908da7446e9b5bc7401dc30fdecd6.tar.gz
sws/output: fix ordered dither threshold for mono output
This makes sure that white stays white and black black Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswscale/output.c2
-rw-r--r--tests/ref/fate/filter-pixdesc-monob2
-rw-r--r--tests/ref/fate/filter-pixdesc-monow2
-rw-r--r--tests/ref/fate/filter-pixfmts-copy4
-rw-r--r--tests/ref/fate/filter-pixfmts-field4
-rw-r--r--tests/ref/fate/filter-pixfmts-il4
-rw-r--r--tests/ref/fate/filter-pixfmts-null4
-rw-r--r--tests/ref/fate/filter-pixfmts-scale4
-rw-r--r--tests/ref/fate/filter-pixfmts-vflip4
-rw-r--r--tests/ref/lavf/pam4
-rw-r--r--tests/ref/lavf/pbmpipe4
-rw-r--r--tests/ref/lavf/pixfmt4
-rw-r--r--tests/ref/lavf/xbm4
-rw-r--r--tests/ref/lavf/xwd4
-rw-r--r--tests/ref/vsynth/vsynth1-bpp16
-rw-r--r--tests/ref/vsynth/vsynth1-xface8
-rw-r--r--tests/ref/vsynth/vsynth2-bpp16
-rw-r--r--tests/ref/vsynth/vsynth2-xface8
-rw-r--r--tests/ref/vsynth/vsynth3-bpp16
-rw-r--r--tests/ref/vsynth/vsynth3-xface8
-rw-r--r--tests/ref/vsynth/vsynth_lena-bpp16
-rw-r--r--tests/ref/vsynth/vsynth_lena-xface8
22 files changed, 53 insertions, 53 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index 58118141aa..0c763c37bd 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -313,7 +313,7 @@ static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterS
#define accumulate_bit(acc, val) \
acc <<= 1; \
- acc |= (val) >= (128 + 110)
+ acc |= (val) >= 234
#define output_pixel(pos, acc) \
if (target == AV_PIX_FMT_MONOBLACK) { \
pos = acc; \
diff --git a/tests/ref/fate/filter-pixdesc-monob b/tests/ref/fate/filter-pixdesc-monob
index 00df9ef973..63a4b62bd3 100644
--- a/tests/ref/fate/filter-pixdesc-monob
+++ b/tests/ref/fate/filter-pixdesc-monob
@@ -1 +1 @@
-pixdesc-monob e795648f4f5054ca133437570cf5ba5f
+pixdesc-monob e69e4b6e48dd419bb199312727f60a47
diff --git a/tests/ref/fate/filter-pixdesc-monow b/tests/ref/fate/filter-pixdesc-monow
index 429c5b410e..c73f3275a1 100644
--- a/tests/ref/fate/filter-pixdesc-monow
+++ b/tests/ref/fate/filter-pixdesc-monow
@@ -1 +1 @@
-pixdesc-monow e7d8142228a04d9ef3cdc4473ef8a69f
+pixdesc-monow 51a45d1d34b95373fffdd79fc3abf457
diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy
index 7bab4b83ee..5f4b16230b 100644
--- a/tests/ref/fate/filter-pixfmts-copy
+++ b/tests/ref/fate/filter-pixfmts-copy
@@ -31,8 +31,8 @@ gbrp9le bc80da439638c59f1d822037f52739af
gray 188590b1231afd231ea910815aef2b25
gray16be 08d997a3faa25a3db9d6be272d282eef
gray16le df65eb804360795e3e38a2701fa9641a
-monob a6869bab4f6e64fe13dcab13b41775b3
-monow 0404328f1838a6503371478a559ca20d
+monob 8b04f859fee6a0be856be184acd7a0b5
+monow 54d16d2c01abfd72ecdb5e51e283937c
nv12 8e24feb2c544dc26a20047a71e4c27aa
nv21 335d85c9af6110f26ae9e187a82ed2cf
pal8 ff5929f5b42075793b2c34cb441bede5
diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field
index e599571a58..9e04db4f88 100644
--- a/tests/ref/fate/filter-pixfmts-field
+++ b/tests/ref/fate/filter-pixfmts-field
@@ -31,8 +31,8 @@ gbrp9le 1654c79e38dc78fdf106239ed2a7bd4f
gray 57fd8e6e00f6be8752726005974cce1b
gray16be e1700e056de9917744a7ff4ab2ca63fd
gray16le 338de7ac5f7d36d5ad5ac2c8d5bbea68
-monob 599b938a6207de81bd96c902c2511676
-monow 8486b94cd7c498b0effd33cb7e8e63df
+monob 2129cc72a484d7e10a44de9117aa9f80
+monow 03d783611d265cae78293f88ea126ea1
nv12 16f7a46708ef25ebd0b72e47920cc11e
nv21 7294574037cc7f9373ef5695d8ebe809
pal8 0658c18dcd8d052d59dfbe23f5b368d9
diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il
index f61ed587c2..a9a3c7bafd 100644
--- a/tests/ref/fate/filter-pixfmts-il
+++ b/tests/ref/fate/filter-pixfmts-il
@@ -31,8 +31,8 @@ gbrp9le 7e79b4bbb589095c925d65cb7c037d44
gray 52ae18648161ac43144f5c9cd2127786
gray16be 92c3b09f371b610cc1b6a9776034f4d0
gray16le 1db278d23a554e01910cedacc6c02521
-monob ee0012e4df0bf06a09cefb49be68e850
-monow 5e0868812e25cc867cdc78d5252cbb81
+monob faba75df28033ba7ce3d82ff2a99ee68
+monow 6e9cfb8d3a344c5f0c3e1d5e1297e580
nv12 3c3ba9b1b4c4dfff09c26f71b51dd146
nv21 ab586d8781246b5a32d8760a61db9797
rgb0 cfaf68671e43248267d8cd50cae8c13f
diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null
index 7bab4b83ee..5f4b16230b 100644
--- a/tests/ref/fate/filter-pixfmts-null
+++ b/tests/ref/fate/filter-pixfmts-null
@@ -31,8 +31,8 @@ gbrp9le bc80da439638c59f1d822037f52739af
gray 188590b1231afd231ea910815aef2b25
gray16be 08d997a3faa25a3db9d6be272d282eef
gray16le df65eb804360795e3e38a2701fa9641a
-monob a6869bab4f6e64fe13dcab13b41775b3
-monow 0404328f1838a6503371478a559ca20d
+monob 8b04f859fee6a0be856be184acd7a0b5
+monow 54d16d2c01abfd72ecdb5e51e283937c
nv12 8e24feb2c544dc26a20047a71e4c27aa
nv21 335d85c9af6110f26ae9e187a82ed2cf
pal8 ff5929f5b42075793b2c34cb441bede5
diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale
index 1e4503c2a3..241e839bc4 100644
--- a/tests/ref/fate/filter-pixfmts-scale
+++ b/tests/ref/fate/filter-pixfmts-scale
@@ -31,8 +31,8 @@ gbrp9le 0ed709f7828f0be5f828596f0720a82b
gray 221201cc7cfc4964eacd8b3e426fd276
gray16be 32891cb0928b1119d8d43a6e1bef0e2b
gray16le f96cfb5652b090dad52615930f0ce65f
-monob 337d236f59b891b16dd17c5267cf874b
-monow 3cb791057cf735930f97fe67e5125c45
+monob f01cb0b623357387827902d9d0963435
+monow 35c68b86c226d6990b2dcb573a05ff6b
nv12 b118d24a3653fe66e5d9e079033aef79
nv21 c74bb1c10dbbdee8a1f682b194486c4d
pal8 29e10892009b2cfe431815ec3052ed3b
diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip
index 2c35a2382f..c7cc0c7bf1 100644
--- a/tests/ref/fate/filter-pixfmts-vflip
+++ b/tests/ref/fate/filter-pixfmts-vflip
@@ -31,8 +31,8 @@ gbrp9le cff296346d93e430cbc0acfbc91482ab
gray 41811422d5819ed69389357294384c10
gray16be 29f24ba7cb0fc4fd2ae78963d008f6e6
gray16le a37e9c4ea76e8eeddc2af8f600ba2c10
-monob f51f07ba50f4398233106f0e81494170
-monow ee414089983b5be0f76b9d962757d900
+monob 7810c4857822ccfc844d78f5e803269a
+monow 90a947bfcd5f2261e83b577f48ec57b1
nv12 261ebe585ae2aa4e70d39a10c1679294
nv21 2909feacd27bebb080c8e0fa41795269
pal8 450b0155d0f2d5628bf95a442db5f817
diff --git a/tests/ref/lavf/pam b/tests/ref/lavf/pam
index abb29743d0..97893f60c7 100644
--- a/tests/ref/lavf/pam
+++ b/tests/ref/lavf/pam
@@ -13,6 +13,6 @@
032538f0313b4f240b44a5bef115f5bf *./tests/data/images/pam/02.pam
./tests/data/images/pam/%02d.pam CRC=0x5984c023
608321 ./tests/data/images/pam/02.pam
-e8bd9f1830e6a9db201386e96580f869 *./tests/data/images/pam/02.pam
-./tests/data/images/pam/%02d.pam CRC=0x65707c37
+d2f5eb2f959ca3a90c02f1887b6e0c4f *./tests/data/images/pam/02.pam
+./tests/data/images/pam/%02d.pam CRC=0xab19200d
101447 ./tests/data/images/pam/02.pam
diff --git a/tests/ref/lavf/pbmpipe b/tests/ref/lavf/pbmpipe
index d50ed716bc..284f90b16b 100644
--- a/tests/ref/lavf/pbmpipe
+++ b/tests/ref/lavf/pbmpipe
@@ -1,3 +1,3 @@
-8ced96f5b6b7362358199ae993b4ceb7 *./tests/data/lavf/pbmpipe.pbm
+8b974da7f48f9e6d5ae327b4444a71fb *./tests/data/lavf/pbmpipe.pbm
317075 ./tests/data/lavf/pbmpipe.pbm
-./tests/data/lavf/pbmpipe.pbm CRC=0xfae0a1ba
+./tests/data/lavf/pbmpipe.pbm CRC=0xfc010c66
diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt
index 88030875de..ec75d4ce24 100644
--- a/tests/ref/lavf/pixfmt
+++ b/tests/ref/lavf/pixfmt
@@ -28,9 +28,9 @@ efa7c0337cc00c796c6df615223716f1 *./tests/data/pixfmt/rgb565.yuv
304128 ./tests/data/pixfmt/rgb555.yuv
1e080c12bd9755c41ecb8e19b756f406 *./tests/data/pixfmt/gray.yuv
304128 ./tests/data/pixfmt/gray.yuv
-6c719671e39f1bcf67b47eab98fa529b *./tests/data/pixfmt/monow.yuv
+d87cf0c2e7a13cc693fe6ece22461c83 *./tests/data/pixfmt/monow.yuv
304128 ./tests/data/pixfmt/monow.yuv
-6c719671e39f1bcf67b47eab98fa529b *./tests/data/pixfmt/monob.yuv
+d87cf0c2e7a13cc693fe6ece22461c83 *./tests/data/pixfmt/monob.yuv
304128 ./tests/data/pixfmt/monob.yuv
00b85790df5740bab95e2559d81603a7 *./tests/data/pixfmt/yuv440p.yuv
304128 ./tests/data/pixfmt/yuv440p.yuv
diff --git a/tests/ref/lavf/xbm b/tests/ref/lavf/xbm
index 4cc4be6eea..705713b22b 100644
--- a/tests/ref/lavf/xbm
+++ b/tests/ref/lavf/xbm
@@ -1,3 +1,3 @@
-99c20fff5d17b698b4a25282aebc3c51 *./tests/data/images/xbm/02.xbm
-./tests/data/images/xbm/%02d.xbm CRC=0x0f5aa5cb
+0629055fd82366317c651a0af4bb82d7 *./tests/data/images/xbm/02.xbm
+./tests/data/images/xbm/%02d.xbm CRC=0xc9a20204
76411 ./tests/data/images/xbm/02.xbm
diff --git a/tests/ref/lavf/xwd b/tests/ref/lavf/xwd
index 5e593b5d83..3d638211cb 100644
--- a/tests/ref/lavf/xwd
+++ b/tests/ref/lavf/xwd
@@ -19,6 +19,6 @@ fe1af954966a40c2cd35fc27094ff823 *./tests/data/images/xwd/02.xwd
85e9b8b814a1dea71d143aac2e487037 *./tests/data/images/xwd/02.xwd
./tests/data/images/xwd/%02d.xwd CRC=0x0ff205be
101487 ./tests/data/images/xwd/02.xwd
-2131b4c41fe35178b0c7d121223af549 *./tests/data/images/xwd/02.xwd
-./tests/data/images/xwd/%02d.xwd CRC=0x0f5aa5cb
+796e2e309ac0844cfb2f4959816508ee *./tests/data/images/xwd/02.xwd
+./tests/data/images/xwd/%02d.xwd CRC=0xc9a20204
12783 ./tests/data/images/xwd/02.xwd
diff --git a/tests/ref/vsynth/vsynth1-bpp1 b/tests/ref/vsynth/vsynth1-bpp1
index 32dab111ea..0bd1a77892 100644
--- a/tests/ref/vsynth/vsynth1-bpp1
+++ b/tests/ref/vsynth/vsynth1-bpp1
@@ -1,4 +1,4 @@
-3e5e0f4afb3a0350440e86b1ea56cec9 *tests/data/fate/vsynth1-bpp1.avi
+611de0803ff6bd0ef385dde59964a105 *tests/data/fate/vsynth1-bpp1.avi
640452 tests/data/fate/vsynth1-bpp1.avi
-ccef5f5d5b0392f1d01c200499dac657 *tests/data/fate/vsynth1-bpp1.out.rawvideo
-stddev: 97.30 PSNR: 8.37 MAXDIFF: 237 bytes: 7603200/ 7603200
+576b690e8a8921c54d777463b63a8307 *tests/data/fate/vsynth1-bpp1.out.rawvideo
+stddev: 97.41 PSNR: 8.36 MAXDIFF: 238 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-xface b/tests/ref/vsynth/vsynth1-xface
index 3b916c669a..f4d382189b 100644
--- a/tests/ref/vsynth/vsynth1-xface
+++ b/tests/ref/vsynth/vsynth1-xface
@@ -1,4 +1,4 @@
-487c3e53249f7b9f16e04257295998de *tests/data/fate/vsynth1-xface.nut
-19746 tests/data/fate/vsynth1-xface.nut
-42d8261bb538b8789840ac085f7fc4d2 *tests/data/fate/vsynth1-xface.out.rawvideo
-stddev: 103.88 PSNR: 7.80 MAXDIFF: 254 bytes: 7603200/ 7603200
+98a6c85c83454c3209eedbe704a09cb5 *tests/data/fate/vsynth1-xface.nut
+19800 tests/data/fate/vsynth1-xface.nut
+cb1d399fcf818a70e5bc5769934d0094 *tests/data/fate/vsynth1-xface.out.rawvideo
+stddev: 103.97 PSNR: 7.79 MAXDIFF: 254 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-bpp1 b/tests/ref/vsynth/vsynth2-bpp1
index d010bbdb31..d283d6c7b9 100644
--- a/tests/ref/vsynth/vsynth2-bpp1
+++ b/tests/ref/vsynth/vsynth2-bpp1
@@ -1,4 +1,4 @@
-771437c9038b44f4e2d4ff764c1c3821 *tests/data/fate/vsynth2-bpp1.avi
+b51ad49892eb8f8912c5a983718a17bb *tests/data/fate/vsynth2-bpp1.avi
640452 tests/data/fate/vsynth2-bpp1.avi
-ba70b5aebc786e625af6bd7f7ec82717 *tests/data/fate/vsynth2-bpp1.out.rawvideo
-stddev: 81.63 PSNR: 9.89 MAXDIFF: 237 bytes: 7603200/ 7603200
+338fb9039a4564e471bf8179f0c48a95 *tests/data/fate/vsynth2-bpp1.out.rawvideo
+stddev: 80.40 PSNR: 10.02 MAXDIFF: 238 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-xface b/tests/ref/vsynth/vsynth2-xface
index 4544269675..54dc29e821 100644
--- a/tests/ref/vsynth/vsynth2-xface
+++ b/tests/ref/vsynth/vsynth2-xface
@@ -1,4 +1,4 @@
-dc0ff0ba9588dbec10580941529b77a2 *tests/data/fate/vsynth2-xface.nut
-16866 tests/data/fate/vsynth2-xface.nut
-71a54876bc79746cc8c36f3f02aea4ef *tests/data/fate/vsynth2-xface.out.rawvideo
-stddev: 86.58 PSNR: 9.38 MAXDIFF: 250 bytes: 7603200/ 7603200
+c498ec3b58b86b8164cef9d63184fa6d *tests/data/fate/vsynth2-xface.nut
+16423 tests/data/fate/vsynth2-xface.nut
+9106961054b226c360f284272cfd4474 *tests/data/fate/vsynth2-xface.out.rawvideo
+stddev: 85.41 PSNR: 9.50 MAXDIFF: 250 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-bpp1 b/tests/ref/vsynth/vsynth3-bpp1
index f84808a602..5a65728b28 100644
--- a/tests/ref/vsynth/vsynth3-bpp1
+++ b/tests/ref/vsynth/vsynth3-bpp1
@@ -1,4 +1,4 @@
-a5e6d1eff2f6fc3bba31e3bb8753b905 *tests/data/fate/vsynth3-bpp1.avi
+98852649c5201df7d85d0e9b5a5b9f15 *tests/data/fate/vsynth3-bpp1.avi
15352 tests/data/fate/vsynth3-bpp1.avi
-75e8ee0c0b0ada4515455d9f29377a16 *tests/data/fate/vsynth3-bpp1.out.rawvideo
-stddev: 97.70 PSNR: 8.33 MAXDIFF: 248 bytes: 86700/ 86700
+0b1ea21b69d384564dd3a978065443b2 *tests/data/fate/vsynth3-bpp1.out.rawvideo
+stddev: 97.64 PSNR: 8.34 MAXDIFF: 248 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-xface b/tests/ref/vsynth/vsynth3-xface
index f98a5c5e50..b6ef0978e2 100644
--- a/tests/ref/vsynth/vsynth3-xface
+++ b/tests/ref/vsynth/vsynth3-xface
@@ -1,4 +1,4 @@
-f399a6b312d0a2d873b8a3bc761c5eba *tests/data/fate/vsynth3-xface.nut
-15696 tests/data/fate/vsynth3-xface.nut
-eafdc027c9c36f96e71e91a5682a0d2e *tests/data/fate/vsynth3-xface.out.rawvideo
-stddev: 97.22 PSNR: 8.37 MAXDIFF: 236 bytes: 86700/ 86700
+367fa226e570b30935305a22982a54ba *tests/data/fate/vsynth3-xface.nut
+15772 tests/data/fate/vsynth3-xface.nut
+83a8c44631fbc8b185df932679db0e5b *tests/data/fate/vsynth3-xface.out.rawvideo
+stddev: 97.23 PSNR: 8.37 MAXDIFF: 238 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-bpp1 b/tests/ref/vsynth/vsynth_lena-bpp1
index d4570c7429..63ab9e11c4 100644
--- a/tests/ref/vsynth/vsynth_lena-bpp1
+++ b/tests/ref/vsynth/vsynth_lena-bpp1
@@ -1,4 +1,4 @@
-d53d08c755ffde5fca744f0f941bfcb1 *tests/data/fate/vsynth_lena-bpp1.avi
+2859022fac452b59e49a1189c4fbb3ec *tests/data/fate/vsynth_lena-bpp1.avi
640452 tests/data/fate/vsynth_lena-bpp1.avi
-9a66df9009670b0a593d889975246c00 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
-stddev: 96.36 PSNR: 8.45 MAXDIFF: 233 bytes: 7603200/ 7603200
+3be3497f8ca548c9196dcecc5bc7cb2b *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
+stddev: 96.52 PSNR: 8.44 MAXDIFF: 231 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-xface b/tests/ref/vsynth/vsynth_lena-xface
index 61031f98c9..a38fed53cd 100644
--- a/tests/ref/vsynth/vsynth_lena-xface
+++ b/tests/ref/vsynth/vsynth_lena-xface
@@ -1,4 +1,4 @@
-6a1a7b467eeab2795510e7dd1ca528ff *tests/data/fate/vsynth_lena-xface.nut
-17504 tests/data/fate/vsynth_lena-xface.nut
-6d87881d630439d02c7a97f468d67a1c *tests/data/fate/vsynth_lena-xface.out.rawvideo
-stddev: 99.01 PSNR: 8.22 MAXDIFF: 238 bytes: 7603200/ 7603200
+0dd4e19b989cb102ffb06768740d940f *tests/data/fate/vsynth_lena-xface.nut
+17551 tests/data/fate/vsynth_lena-xface.nut
+88ff6155a8b88872e6581d08febdb050 *tests/data/fate/vsynth_lena-xface.out.rawvideo
+stddev: 99.20 PSNR: 8.20 MAXDIFF: 238 bytes: 7603200/ 7603200