[x265] [PATCH] Reduce operators on row address compare
Min Chen
chenm003 at 163.com
Fri Jul 1 19:38:40 CEST 2016
# HG changeset patch
# User Min Chen <min.chen at multicorewareinc.com>
# Date 1467393737 18000
# Node ID c3ed095a6e735f2d95fa7571ab16e3d510a4f5d2
# Parent 836a870ba76b46d4c0078289e320db1371fc3403
Reduce operators on row address compare
---
source/common/cudata.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -r 836a870ba76b -r c3ed095a6e73 source/common/cudata.cpp
--- a/source/common/cudata.cpp Fri Jul 01 11:49:57 2016 +0530
+++ b/source/common/cudata.cpp Fri Jul 01 12:22:17 2016 -0500
@@ -68,7 +68,7 @@
inline bool isEqualRow(int addrA, int addrB, int numUnits)
{
// addrA / numUnits == addrB / numUnits
- return ((addrA ^ addrB) & ~(numUnits - 1)) == 0;
+ return ((addrA ^ addrB) < numUnits);
}
/* Check whether 2 addresses point to the same row or column */
@@ -88,7 +88,7 @@
inline bool isZeroRow(int addr, int numUnits)
{
// addr / numUnits == 0
- return (addr & ~(numUnits - 1)) == 0;
+ return (addr < numUnits);
}
/* Check whether one address points to a column whose index is smaller than a given value */
More information about the x265-devel
mailing list