vl/bitstream: use an int32_t for se encoding.

This seems to fix a bug found with radv and ffmpeg encoding

Fixes: 1782ab4d8b ("util: add a bitstream encoder for video stream headers.")
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31086>
This commit is contained in:
Dave Airlie 2024-09-09 14:44:55 +10:00 committed by Marge Bot
parent a9e1ecf6f0
commit 62320232de

View file

@ -181,7 +181,7 @@ vl_bitstream_exp_golomb_ue(struct vl_bitstream_encoder *enc, uint32_t val)
}
static inline void
vl_bitstream_exp_golomb_se(struct vl_bitstream_encoder *enc, uint32_t val)
vl_bitstream_exp_golomb_se(struct vl_bitstream_encoder *enc, int32_t val)
{
if (val > 0)
vl_bitstream_exp_golomb_ue(enc, (val << 1) - 1);