mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
swscale/yuv2rgb: Use 64bit for brightness computation
This will not overflow for normal values
Fixes: CID1500280 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bfc22f364d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
98a1c887c3
commit
eb1e40909b
@ -831,7 +831,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
|
||||
cbu = (cbu * contrast * saturation) >> 32;
|
||||
cgu = (cgu * contrast * saturation) >> 32;
|
||||
cgv = (cgv * contrast * saturation) >> 32;
|
||||
oy -= 256 * brightness;
|
||||
oy -= 256LL * brightness;
|
||||
|
||||
c->uOffset = 0x0400040004000400LL;
|
||||
c->vOffset = 0x0400040004000400LL;
|
||||
|
Loading…
Reference in New Issue
Block a user