Statistics for Piecewise mapping in HEVC lossless intra-prediction coding