[x265] [PATCH] Fix: scaling_list_delta_coef out of range
tamura at pegasys-inc.com
tamura at pegasys-inc.com
Wed May 8 02:29:43 CEST 2019
# HG changeset patch
# User Masaharu Tamura <tamura at pegasys-inc.com>
# Date 1557275282 -32400
# Wed May 08 09:28:02 2019 +0900
# Node ID fa93a9a51f0e04cb61e165b9681742caf3ae9d25
# Parent feec4bdf98663ac4a2561b63e1ccec423c7d26a4
Fix: scaling_list_delta_coef out of range.
diff -r feec4bdf9866 -r fa93a9a51f0e source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp Tue Apr 30 09:41:10 2019 +0530
+++ b/source/encoder/entropy.cpp Wed May 08 09:28:02 2019 +0900
@@ -530,6 +530,10 @@
for (int i = 0; i < coefNum; i++)
{
data = src[scan[i]] - nextCoef;
+ if (data < -128)
+ data += 256;
+ if (data > 127)
+ data -= 256;
nextCoef = (nextCoef + data + 256) % 256;
WRITE_SVLC(data, "scaling_list_delta_coef");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265_trunk.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190508/a6d83bb1/attachment.bin>
More information about the x265-devel
mailing list