On 02/25, Steve Borho wrote: > On 02/25, Mario *LigH* Rohkr??mer wrote: > > Only while compiling for x86-64 with HIGH_BIT_DEPTH: > > > > +---- > > h:/MSYS/home/Entwicklung/x265/source/encoder/slicetype.cpp: In > > member function 'void > > x265::LookaheadTLD::lowresIntraEstimate(x265::Lowres&)': > > h:/MSYS/home/Entwicklung/x265/source/encoder/slicetype.cpp:262:135: > > warning: iteration 17u invokes undefined behavior > > [-Waggressive-loop-optimizations] > > neighbours[1][i] = (neighbours[0][i - > > 1] + (neighbours[0][i] << 1) + neighbours[0][i + > > 1] + 2) >> 2; > > > > ^ > > cc1plus.exe: note: containing loop > > This looks like a valid warning, reviewing the intra sample code for > lookahead now.
The loop bounds are 1..15 so I do not understand why the compiler is complaining about iteration 17u. If I double the size of the neighbors buffer, it complains about iteration 33u, which is just silly. I think gcc is just confused about the outer loops. http://stackoverflow.com/questions/24296571/why-does-this-loop-produce-warning-iteration-3u-invokes-undefined-behavior-an interestingly, GCC 4.9 does not generate this warning, so I am not sure what the best course of action here. Is GCC 4.8 warning about a bug in the code their (broken) aggressive loop optimizations are generating, or is the warning simply bogus? -- Steve Borho _______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
