If you use the 297, you're going to have to add flip-flops to decode the direction and clock from the encoder's quadrature signal.
But you can do it without logic. You wouldn't use the L297 - it would be simpler, just a pair of H drives (or even simpler, a pair of totem-pole drives if you have a bipolar supply).
Encoder line "A" drives coil "A", encoder line "B" drives coil "B". That's it. Two lines, two drivers, two coils. When a line from the encoder is high, the respective coil is driven + and -, when it's low, it's driven - and +.