In high efficiency video coding (HEVC), the encoder employs a flexible quad-tree coding structure as well as.a large number of prediction modes. For each size of coding unit (CU), transform unit (TU) and each prediction mode,.the rate distortion opti