[x265] [PATCH] mv: Add *= operator

Nicolas Morey-Chaisemartin nmorey at kalray.eu
Tue Jul 22 11:54:30 CEST 2014


# HG changeset patch
# User Nicolas Morey-Chaisemartin <nmorey at kalray.eu>
# Date 1406020488 -7200
#      Tue Jul 22 11:14:48 2014 +0200
# Node ID 4c9ce4db74d1c9768abc61290bd1bda002b79f4e
# Parent  d303b4d860e9f06396a156726dd518d0f41fe796
mv: Add *= operator

diff --git a/source/common/mv.h b/source/common/mv.h
--- a/source/common/mv.h
+++ b/source/common/mv.h
@@ -53,16 +53,18 @@ public:
      const MV& operator +=(const MV& other)     { x += other.x; y += other.y; return *this; }
  
      const MV& operator -=(const MV& other)     { x -= other.x; y -= other.y; return *this; }
  
      const MV& operator >>=(int i)              { x >>= i; y >>= i; return *this; }
  
      const MV& operator <<=(int i)              { x <<= i; y <<= i; return *this; }
  
+    const MV& operator *=(int i)               { x *= i; y *= i; return *this; }
+
      MV operator >>(int i) const                { return MV(x >> i, y >> i); }
  
      MV operator <<(int i) const                { return MV(x << i, y << i); }
  
      MV operator *(int16_t i) const             { return MV(x * i, y * i); }
  
      const MV operator -(const MV& other) const { return MV(x - other.x, y - other.y); }
  



More information about the x265-devel mailing list