Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void VP8YUVInit(void) {
- ....
- for (i = 0; i < 256; ++i) {
- VP8kVToR[i] = (89858 * (i - 128) + YUV_HALF) >> YUV_FIX;
- VP8kUToG[i] = -22014 * (i - 128) + YUV_HALF;
- VP8kVToG[i] = -45773 * (i - 128);
- VP8kUToB[i] = (113618 * (i - 128) + YUV_HALF) >> YUV_FIX;
- }
- ....
- }
- This suspicious code was found in WebP project by PVS-Studio static code analyzer.
- Warning message is:
- V610 Unspecified behavior. Check the shift operator '>>. The left operand is negative ('(89858 * (i - 128) + YUV_HALF)' = [-11469056..11444734]). yuv.c 40
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement