avcodec/utils: Align dimensions by at least their chroma sub-sampling factors.