# HG changeset patch
# User Min Chen <[email protected]>
# 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 */

_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to