See:

	https://bitbucket.org/multicoreware/x265/issues/422

--- common/pixel.cpp	2018-05-21 08:33:10 UTC
+++ common/pixel.cpp	2018-08-05 21:57:26 UTC
@@ -923,5 +923,5 @@
 {
     for (int i = 0; i < count; i++)
-        dst[i] = (uint16_t)(src[i] * 256.0);
+        dst[i] = (int16_t)(src[i] * 256.0);
 }
 
