mpeg12enc: factor out check in encode_dc