<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 1:00 PM, Mateusz Brzostek <span dir="ltr"><<a href="mailto:mateusz@msystem.waw.pl" target="_blank">mateusz@msystem.waw.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch fixes issue #329 for MSVC<br>
and if someone wants to compile with GCC for '-std=gnu++11' instead of default gnu++98, there will be no<br>
f:/x265p/source/common/<wbr>ipfilter.cpp:212:36: warning: left shift of negative value [-Wshift-negative-value]<br>
int offset = -IF_INTERNAL_OFFS << shift;<br>
~~~~~~~~~~~~~~~~~~^~~~~~~~<br>
warnings.<br></blockquote><div><br></div><div>Looks ok - pulled in.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
# HG changeset patch<br>
# User Ma0 <<a href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
# Date 1492717375 -7200<br>
# Thu Apr 20 21:42:55 2017 +0200<br>
# Node ID 519968083ab2ea9682d051d88049d0<wbr>03130645c9<br>
# Parent 2c6e6c9c3da72aaddb33565d703191<wbr>8fb5a37097<br>
silence MSVC warning C4334 and GCC warnings for '-std=gnu++11'<br>
<br>
diff -r 2c6e6c9c3da7 -r 519968083ab2 source/common/ipfilter.cpp<br>
--- a/source/common/ipfilter.cpp Thu Apr 20 11:08:02 2017 +0530<br>
+++ b/source/common/ipfilter.cpp Thu Apr 20 21:42:55 2017 +0200<br>
@@ -123,7 +123,7 @@<br>
const int16_t* coeff = (N == 4) ? g_chromaFilter[coeffIdx] : g_lumaFilter[coeffIdx];<br>
int headRoom = IF_INTERNAL_PREC - X265_DEPTH;<br>
int shift = IF_FILTER_PREC - headRoom;<br>
- int offset = -IF_INTERNAL_OFFS << shift;<br>
+ int offset = (unsigned)-IF_INTERNAL_OFFS << shift;<br>
int blkheight = height;<br>
<br>
src -= N / 2 - 1;<br>
@@ -209,7 +209,7 @@<br>
const int16_t* c = (N == 4) ? g_chromaFilter[coeffIdx] : g_lumaFilter[coeffIdx];<br>
int headRoom = IF_INTERNAL_PREC - X265_DEPTH;<br>
int shift = IF_FILTER_PREC - headRoom;<br>
- int offset = -IF_INTERNAL_OFFS << shift;<br>
+ int offset = (unsigned)-IF_INTERNAL_OFFS << shift;<br>
<br>
src -= (N / 2 - 1) * srcStride;<br>
<br>
diff -r 2c6e6c9c3da7 -r 519968083ab2 source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Thu Apr 20 11:08:02 2017 +0530<br>
+++ b/source/encoder/encoder.cpp Thu Apr 20 21:42:55 2017 +0200<br>
@@ -2823,7 +2823,7 @@<br>
analysisFrameData->distortion[<wbr>count] = distortionBuf[d];<br>
analysisFrameData-><wbr>ctuDistortion[ctuCount] += analysisFrameData->distortion[<wbr>count];<br>
count += bytes;<br>
- if ((count % (size_t)NUM_4x4_PARTITIONS) == 0)<br>
+ if ((count % (unsigned)NUM_4x4_PARTITIONS) == 0)<br>
{<br>
analysisFrameData-><wbr>scaledDistortion[ctuCount] = X265_LOG2(X265_MAX(<wbr>analysisFrameData-><wbr>ctuDistortion[ctuCount], 1));<br>
sum += analysisFrameData-><wbr>scaledDistortion[ctuCount];<br>
<br>
<br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
<br></blockquote></div><br></div></div>