[x265] Negative integer shifts

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


The patches have been pushed. Please pull from the latest stable tip and
recompile. Hopefully your concerns should be addressed 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 Wed, Apr 26, 2017 at 11:16 PM, Mario *LigH* Rohkrämer <contact at ligh.de>
wrote:

> Hi.
>
> Ma0 already submitted a patch on April 20th, which handles this issue by
> casting them to unsigned. I guess it was not yet committed.
>
> By the way, Multicoreware prefers patches in plain text in the message
> body for easier review.
>
>
>
> Am 26.04.2017, 16:54 Uhr, schrieb Andrey Semashev <
> andrey.semashev at gmail.com>:
>
> Hi,
>>
>> While compiling 2.4 I'm seeind lots of warnings like this:
>>
>> .../source/common/ipfilter.cpp: In instantiation of ‘void
>> {anonymous}::interp_horiz_ps_c(const pixel*, intptr_t, int16_t*,
>> intptr_t, int, int) [with int N = 8; int width = 4; int height = 4;
>> pixel = unsigned char; intptr_t = long int; int16_t = short int]’:
>> .../source/common/ipfilter.cpp:417:5:   required from here
>> .../source/common/ipfilter.cpp:126:36: warning: left shift of negative
>> value [-Wshift-negative-value]
>>       int offset = -IF_INTERNAL_OFFS << shift;
>>                    ~~~~~~~~~~~~~~~~~~^~~~~~~~
>>
>> Left-shifting negative signed intehers is undefined behavior in C++.
>> I've attached a patch that resolves the warnings. The patch assumes 2's
>> complement signed integers and that the shift does not introduce an
>> arithmetic overflow.
>>
>
>
> --
>
> Fun and success!
> Mario *LigH* Rohkrämer
> mailto:contact at ligh.de
>
> _______________________________________________
> 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/e8967727/attachment.html>


More information about the x265-devel mailing list