[x265] [PATCH] silence MSVC warning C4334 and GCC warnings for '-std=gnu++11'

Pradeep Ramachandran pradeep at multicorewareinc.com
Tue May 2 23:10:19 CEST 2017


Forgot to push this sooner; done now.

Pradeep Ramachandran, PhD
Solution Architect at www.multicorewareinc.com/
Adjunct Faculty at www.cse.iitm.ac.in/
pradeeprama.info/
Ph:   +91 99627 82018

On Thu, Apr 20, 2017 at 6:25 PM, Pradeep Ramachandran <
pradeep at multicorewareinc.com> wrote:

>
> On Thu, Apr 20, 2017 at 1:00 PM, Mateusz Brzostek <mateusz at msystem.waw.pl>
> wrote:
>
>> This patch fixes issue #329 for MSVC
>> and if someone wants to compile with GCC for '-std=gnu++11' instead of
>> default gnu++98, there will be no
>> f:/x265p/source/common/ipfilter.cpp:212:36: warning: left shift of
>> negative value [-Wshift-negative-value]
>>      int offset = -IF_INTERNAL_OFFS << shift;
>>                   ~~~~~~~~~~~~~~~~~~^~~~~~~~
>> warnings.
>>
>
> Looks ok - pulled in.
>
>
>>
>> # HG changeset patch
>> # User Ma0 <mateuszb at poczta.onet.pl>
>> # Date 1492717375 -7200
>> #      Thu Apr 20 21:42:55 2017 +0200
>> # Node ID 519968083ab2ea9682d051d88049d003130645c9
>> # Parent  2c6e6c9c3da72aaddb33565d7031918fb5a37097
>> silence MSVC warning C4334 and GCC warnings for '-std=gnu++11'
>>
>> diff -r 2c6e6c9c3da7 -r 519968083ab2 source/common/ipfilter.cpp
>> --- a/source/common/ipfilter.cpp    Thu Apr 20 11:08:02 2017 +0530
>> +++ b/source/common/ipfilter.cpp    Thu Apr 20 21:42:55 2017 +0200
>> @@ -123,7 +123,7 @@
>>      const int16_t* coeff = (N == 4) ? g_chromaFilter[coeffIdx] :
>> g_lumaFilter[coeffIdx];
>>      int headRoom = IF_INTERNAL_PREC - X265_DEPTH;
>>      int shift = IF_FILTER_PREC - headRoom;
>> -    int offset = -IF_INTERNAL_OFFS << shift;
>> +    int offset = (unsigned)-IF_INTERNAL_OFFS << shift;
>>      int blkheight = height;
>>
>>      src -= N / 2 - 1;
>> @@ -209,7 +209,7 @@
>>      const int16_t* c = (N == 4) ? g_chromaFilter[coeffIdx] :
>> g_lumaFilter[coeffIdx];
>>      int headRoom = IF_INTERNAL_PREC - X265_DEPTH;
>>      int shift = IF_FILTER_PREC - headRoom;
>> -    int offset = -IF_INTERNAL_OFFS << shift;
>> +    int offset = (unsigned)-IF_INTERNAL_OFFS << shift;
>>
>>      src -= (N / 2 - 1) * srcStride;
>>
>> diff -r 2c6e6c9c3da7 -r 519968083ab2 source/encoder/encoder.cpp
>> --- a/source/encoder/encoder.cpp    Thu Apr 20 11:08:02 2017 +0530
>> +++ b/source/encoder/encoder.cpp    Thu Apr 20 21:42:55 2017 +0200
>> @@ -2823,7 +2823,7 @@
>>          analysisFrameData->distortion[count] = distortionBuf[d];
>>          analysisFrameData->ctuDistortion[ctuCount] +=
>> analysisFrameData->distortion[count];
>>          count += bytes;
>> -        if ((count % (size_t)NUM_4x4_PARTITIONS) == 0)
>> +        if ((count % (unsigned)NUM_4x4_PARTITIONS) == 0)
>>          {
>>              analysisFrameData->scaledDistortion[ctuCount] =
>> X265_LOG2(X265_MAX(analysisFrameData->ctuDistortion[ctuCount], 1));
>>              sum += analysisFrameData->scaledDistortion[ctuCount];
>>
>>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170502/d478a405/attachment.html>


More information about the x265-devel mailing list