Commits

Satoshi Nakagawa  committed ad31cbb

fix lossless

  • Participants
  • Parent commits 2e7d156
  • Branches stable

Comments (0)

Files changed (1)

File source/common/quant.cpp

 {
     if (transQuantBypass)
     {
-        primitives.cvt32to16_shr(residual, coeff, stride, 0, 1 << log2TrSize);
+        primitives.cvt32to16_shl[log2TrSize - 2](residual, coeff, stride, 0);
         return;
     }
 
 #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);