i had the same problem for almost a year. same codes and rough idle sometimes.
the cause:
i had accually sucked water in the intake from a large puddle and hydro locked the motor. i spent a hole day pumping water out the cylinders. when i finally got it to run i had a bad cylinder but ater a few days of driving it like that it kinda clered up. (my prelude is the self healing kind)lol. compression check showed one of the cyilders running 30 psi lower than the rest. a leakdown test showed a small leak through an exhaust valve. so i still drove it cause the idle wasnt too bad. kinda felt like i had a cam.
fix:
well i had done many oil changes on this car and because of the mileage 130k i alway used 10w30. and its staring to get hot down here in the desert. so i decided to try a thicker oil, 20w50. and once i started the engine i immeditely noticed the engine was running smoother. i drove it for 2 days and the light went out. 2 weeks later the light hasnt come on. everyonce in a while i get a little rough idle but not as bad as it was.
next:
adjust the valves