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

Steve Borho steve at borho.org
Thu Jul 24 07:09:45 CEST 2014


On 07/22, Nicolas Morey-Chaisemartin wrote:
> # 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

This fine, but you could use <<= just as easily for your purposes.

But this patch is for a version of mv.h that doesn't exist in our repo.

> 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); }
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list