Try this state machine based code. It uses two pins for pin-change interrupts. It's nearly unbreakable.
It's really pointless to try to filter an encoder with caps. What are the characteristics of your "noise"? What is the worst case period and rise-time of your bounce? What is the typical frequency of your bounce? No one knows, but somehow they know what capacitor value to use. On top of that, you are also filtering your "real" signal. You're slowing the rise time and shortening the period of the signal you ARE interested in.
This state machine just follows the bounce. You can use a high dollar encoder or a very cheap one that has terrible bounce. The state machine will handle them both without the extra cost more components and a degraded signal.
roto_sm.ino (4.81 KB)