avutil/common: Fix undefined behavior in av_clip_uintp2_c()