[FFmpeg-devel] [PATCH] lavc/vvc: Remove left shifts of negative values
James Almer
jamrial at gmail.com
Tue Jan 23 16:17:57 EET 2024
On 1/20/2024 11:51 AM, post at frankplowman.com wrote:
> From: Frank Plowman <post at frankplowman.com>
>
> 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 OOP was
> changed instead.
>
> Signed-off-by: Frank Plowman <post at frankplowman.com>
> ---
> libavcodec/vvc/vvc_ctu.c | 4 +--
> libavcodec/vvc/vvc_filter.c | 4 +--
> libavcodec/vvc/vvc_inter.c | 24 +++++++--------
> libavcodec/vvc/vvc_inter_template.c | 4 +--
> libavcodec/vvc/vvc_mvs.c | 46 ++++++++++++++---------------
> 5 files changed, 41 insertions(+), 41 deletions(-)
Applied, thanks.
More information about the ffmpeg-devel
mailing list