In my opinion, overengineered.
Using one of the quadrature input signals as interrupt/clock, simply sampling the other input at this point will give you direction information.
The first input will give you relative position and speed.
I disagree. Many years ago I tried using one of the input signals as interrupt and the results were poor at best. The literature on the subject agrees. This paragraph is from "
Linear Position Sensors: Theory and Application", by David S. Nyce ISBN 0-471-23326-9, John Wiley & Sons, Inc. Section 10.7: Quadrature, Page 157:
"Modern circuits that read the A quad B signals from a position transducer do not actually wait for a transition to occur and then count that transition. Instead, its more common to monitor the states of A and B continuously at a higher sampling rate than the transitions are expected to occur. With this (state, rather than transition) information and, usually, a microcontroller, smoother operation can be obtained with less likelihood of error."The problem can be then easily visualized and solved with a finite state machine diagram as shown in the attached pictured and coded using your favorite programming language.