The deep pixel is represented as 16 bits. The lower 3 bits provide the player index and the remaining 13 bits provide depth, for example. {bit depth} {bit index player}
{0100 1011 1001 0} {010}
so that to find the player index we AND by DepthImageFrame.PlayerIndexBitmask as shown below
(0100 1011 1001 0010) AND (0000 0000 0000 0111) = 0000 0000 0000 0010 = 2 i.e. second player
and in order to find the distance, we shift to the right by 3 bits, which return 13 bits, as shown below 0000 1001 0111 0010 = 2418, i.e. 2418 mm
source share