Use av_clip_uint8 instead of equivalent but unoptimzed code,