Re: [FFmpeg-devel] [PATCH] lavc/vvc: Remove left shifts of negative values

2024-01-23 Thread James Almer
On 1/20/2024 11:51 AM, p...@frankplowman.com wrote: From: Frank Plowman VVC specifies << as arithmetic left shift, i.e. x << y is equivalent to x * pow2(y). C's << on the other hand has UB if x is negative. This patch removes all UB resulting from this, mostly by replacing x << y with x * (1

[FFmpeg-devel] [PATCH] lavc/vvc: Remove left shifts of negative values

2024-01-20 Thread post
From: Frank Plowman VVC specifies << as arithmetic left shift, i.e. x << y is equivalent to x * pow2(y). C's << on the other hand has UB if x is negative. This patch removes all UB resulting from this, mostly by replacing x << y with x * (1 << y), but there are also a couple places where the OO