An in-pixel histogramming TDC based on octonary search and 4-tap phase detection for SPAD-based flash LiDAR Sensor