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

Nicolas Morey-Chaisemartin nmorey at kalray.eu
Mon Aug 18 13:34:49 CEST 2014


I actually need the multiplication if we want to handle LowRes divider which are not a power of 2
I might have an older version of the file (we work in a git import so not always up-to-date)

Nicolas

On 07/24/2014 07:09 AM, Steve Borho wrote:
> 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




More information about the x265-devel mailing list