[x265] [PATCH 2 of 2] c_model: correct weight_sp round parameters check

Min Chen chenm003 at 163.com
Wed Feb 4 10:39:04 CET 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1423042733 -28800
# Node ID 99ee88871fa8f6a859a4ae69892d0aa11da98397
# Parent  f6757591ed230847367957b95d07156e98a49714
c_model: correct weight_sp round parameters check
---
 source/common/pixel.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r f6757591ed23 -r 99ee88871fa8 source/common/pixel.cpp
--- a/source/common/pixel.cpp	Wed Feb 04 17:38:48 2015 +0800
+++ b/source/common/pixel.cpp	Wed Feb 04 17:38:53 2015 +0800
@@ -527,7 +527,7 @@
     X265_CHECK(!((w0 << 6) > 32767), "w0 using more than 16 bits, asm output will mismatch\n");
     X265_CHECK(!(round > 32767), "round using more than 16 bits, asm output will mismatch\n");
     X265_CHECK((shift >= correction), "shift must be include factor correction, please update ASM ABI\n");
-    X265_CHECK(!(round & ((1 << correction) - 1)), "round must be include factor correction, please update ASM ABI\n");
+    X265_CHECK(!(round & ((1 << (correction - 1)) - 1)), "round must be include factor correction, please update ASM ABI\n");
 
     for (y = 0; y <= height - 1; y++)
     {



More information about the x265-devel mailing list