Warning undefined behavior when compile common/quant.cpp for 12bit

Issue #191 resolved
Ma0 created an issue

When compile common/quant.cpp for 12bit with VS 2015 there are warnings:

I:\x265\source\common\quant.cpp(672): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]
  I:\x265\source\common\quant.cpp(189): note: see reference to function template instantiation 'uint32_t x265_12bit::Quant::rdo
  Quant<4>(const x265_12bit::CUData &,int16_t *,x265_12bit::TextType,uint32_t,bool)' being compiled
I:\x265\source\common\quant.cpp(779): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]
I:\x265\source\common\quant.cpp(857): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]
I:\x265\source\common\quant.cpp(940): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]
I:\x265\source\common\quant.cpp(968): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]
I:\x265\source\common\quant.cpp(971): warning C4293: '>>': shift count negative or too big, undefined behavior [I:\x265\build\m
a\12-b\common\common.vcxproj]

Comments (3)

  1. Log in to comment