"to really understand what it is capable of, we need to know how the camera works. One basic point is that HTC One M8 camera is not like a Lytro camera, which simultaneously captures multiple points of focus. Instead, the actual photo taken in imaging terms is pretty conventional. The phone just knows where in the scene objects are so that it can manually blur everything but select items. It’s not really a case of re-focusing, but de-focusing."
"Unlike ‘real’ shallow depth of field effects, the transition between ‘in focus’ and ‘blurred’ is not very smooth, and we noticed some issues with the edges of in-focus objects. Even in high-contrast borders between background and foreground, there was some muddling of the focus. We also saw some areas of images belligerently staying in focus when they were meant to be blurred out. This may have been down to reflections confusing the HTC One M8 camera."
Then, TrustedReviews publishes a more detailed review of the camera blurring capabilities and artifacts:
"With the uFocus mode engaged, we see a distinct defocussing of the background. However, there are several weird inconsistencies. There's a flower to the left of the monster's head that has been judged by the camera's algorithm as being in the foreground (it wasn't), and there's a halo of 'crispiness' around the subject. This is where the M8 hasn't been able to judge the edges of the monster accurately" - see the picture below: