X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libswscale%2Fyuv2rgb.c;h=c2c9090a3692f2572e1d0518f40f002d66e72527;hb=6ffdc262b0d821e0dda6c83b1593256c06424625;hp=36182a5ea97fc973d28334b77044a06fad392bf9;hpb=9a9ceb8776264c799ff9669ed7e287a5daaab564;p=ffmpeg diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 36182a5ea97..c2c9090a369 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -615,7 +615,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int uint8_t *y_table; uint16_t *y_table16; uint32_t *y_table32; - int i, base, rbase, gbase, bbase, abase, needAlpha; + int i, base, rbase, gbase, bbase, av_uninit(abase), needAlpha; const int yoffs = fullRange ? 384 : 326; int64_t crv = inv_table[0]; @@ -790,8 +790,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int y_table32 = c->yuvTable; yb = -(384<<16) - oy; for (i = 0; i < 1024; i++) { - uint8_t yval = av_clip_uint8((yb + 0x8000) >> 16); - y_table32[i ] = (yval << rbase) + (needAlpha ? 0 : (255 << abase)); + unsigned yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table32[i ] = (yval << rbase) + (needAlpha ? 0 : (255u << abase)); y_table32[i+1024] = yval << gbase; y_table32[i+2048] = yval << bbase; yb += cy;