At the top of the second page, Schwingkpof said that it might be possible to go to rates above 1MHz.
It seems like it would be enough for my project. What do you think about that ?
I think the Due has proved difficult to master, and there is not the level of knowledge and support as there is for the 8 bit products. In fact, I think the Due has been dropped from the product line. I understand what was posted in your link, but I have not actually seen the clock cycle benchmarks on the processor operations required to enter and exit from an interrupt, independent of what is done within the interrupt handler. I think that even with the difference between 84MHz and 16MHz it will be difficult to get to 1MHz encoder counts with software.
I would recommend pursuing a hardware quadrature decoder as pointed at by Crossroads if you are going to be in a very fast quadrature encoder counting situation.
dlloyd has suggested a very interesting solution where at low speeds you work with interval times between pulses, and transition to pulse counts at higher speeds. You might also consider counting on 1 of the four available transitions at higher speeds, and change to the 4X algorithm at slower speeds if you are using the high resolution encoder.
What is the data and its format that you need to pass on the CAN bus? How frequently do you need to update it? Do you actually need the positive and negative counts from the encoder, and if so, how frequent/fast are the reversals. EDIT: I see from your post that you do.
Another alternative for fast counting might be to feed the encoder pulses into the external clock source of a Timer1. You can read TCNT1 every 20 ms and can read over 3 MHz without coding for overflow counts.