If you can, you could try to implement another algorithm that would fix the problems identified in:
- fix bleeding: Close blurred object has sharp edge on focused second object - #10 by sebavan
- make effect resolution independent: How do I make depth-of-field resolution-independent? (see screenshots) - #2 by Evgeni_Popov
It would require a bit of research to find a suitable algorithm, and then to implement it, though.