[x265] fix lossless

Satoshi Nakagawa nakagawa424 at oki.com
Sat Aug 23 16:20:43 CEST 2014


# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1408803114 -32400
#      Sat Aug 23 23:11:54 2014 +0900
# Node ID 218b9ddfe148c55afccc2c5a073858692e09f5c6
# Parent  6e6756f94b27c3ef30f6159f1880112a7ff978e3
fix lossless

diff -r 6e6756f94b27 -r 218b9ddfe148 source/common/quant.cpp
--- a/source/common/quant.cpp	Fri Aug 22 15:53:34 2014 -0500
+++ b/source/common/quant.cpp	Sat Aug 23 23:11:54 2014 +0900
@@ -399,7 +399,7 @@
 {
     if (transQuantBypass)
     {
-        primitives.cvt32to16_shr(residual, coeff, stride, 0, 1 << log2TrSize);
+        primitives.cvt32to16_shl[log2TrSize - 2](residual, coeff, stride, 0);
         return;
     }
 
@@ -430,7 +430,7 @@
 #if X265_DEPTH <= 10
         primitives.cvt32to16_shr(residual, m_resiDctCoeff, stride, shift, trSize);
 #else
-        if (shift >= 0)
+        if (shift > 0)
             primitives.cvt32to16_shr(residual, m_resiDctCoeff, stride, shift, trSize);
         else
             primitives.cvt32to16_shl[log2TrSize - 2](residual, m_resiDctCoeff, stride, -shift);


More information about the x265-devel mailing list