# HG changeset patch
# User Masaharu Tamura <[email protected]>
# 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");
     }
# HG changeset patch
# User Masaharu Tamura <[email protected]>
# 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");
     }
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to