To me, this looks like one of those crazy situations that happen once in a blue moon in free societies, in which both sides can be mistaken, and both can be acting reasonably as the situation appears to them.
The officer was mistaken in thinking he was pursuing a perpetrator, rather than a victim. The robbery victim was mistaken in thinking the officer was a threat to his life, rather than a cop trying to make a lawful arrest.
I think they were both right in acting as they did. As for the cop, he just saw a man running across a street shooting a gun. He had no idea who or what the guy was shooting at, and without any further knowledge, it would appear very likely that the shooter was breaking the law, and was a threat to the lives of others. With this limited amount of knowledge, it would certainly be proper for a person who is paid to enforce the law to try to end the threat, and to investigate whether a crime occurred.
As for the robbery victim, after being accosted by a group of armed robbers who he thought were probably chasing him, he saw another vehicle pull up and a guy jump out with a gun, wearing what looked like a police uniform, but who looked a little fishy with tats and whatnot, and it appeared that this man was trying to kidnap him. He certainly could have been reasonably in fear of death or serious bodily injury under these facts, and therefore would be right in acting to end the threat.
Close cases make for bad law. I think this is one of those exceptional cases in which it makes sense to say that both men acted reasonably, though mistakenly, and that neither one should be punished. Unfortunately, in a free society in which everyone has the right to be armed and to protect his own rights, sometimes "stuff" happens. Cases like this are very rare, but they do happen.
However, I do think there is a good chance that this situation could have ended differently if the officer were better trained and prepared. Apparently he had the shooter splayed out on the ground, and had his foot on his back. In this kind of position, if he knew what he was doing, he should have been able to keep the shooter from getting a gun on him. Also, it definitely sounds like he screwed up when trying to fire his gun. It sounds to me like he accidentally ejected his mag, and then in panic, maybe tried to do some sort of tap rack bang thing (though it wouldn't make sense here) and ejected the round he had in the chamber.
As a final thought, I will add that it would be incredibly evil to fail to act when you are under the belief that you will die if you do not act, because you think that following society's rules is more important than preserving your own life.