avoid integer overflow in dnxhd encoder, fixes #1557