Good question. And one I've been comtemplating recently.
If you want to decode Sony SIRC 12, 15, and 20 bit codes and you use the CCP "capture" mode timers then how would you know if you're decoding a 12, 15 or 20 bit code? In other words, how would you know when to stop waiting for a new edge interrupt?
It almost seems better to use CCP "compare" interrupts at computed intervals to sample and filter the 2400/550 "start" bit, the 550/550 "0" bit, or the 1100/550 "1" bit and simply clock in 20 bits, though the last several bits may be null for 12 and 15 bit codes.
Is there a better way to come up with a small simple reliable interrupt driven background decoder task?