Also, your description of AO is not quite right. AO actually takes shading of the pixels around the pixel which is being rendered, and uses that data to create smoother lighting. More info about AO in this awesome video about AO.
https://www.youtube.com/watch?v=hbWV58AH9eg