1. A TSM (Transform Skip Mode) rate-distortion optimizing method comprising: calculating a cost of each intra-prediction mode with respect to a block to be encoded using a sum of absolute values of differences between original pixels and reference pixels; selecting candidate modes among the intra-prediction modes according to the cost; calculating a TSM-based rate-distortion cost according to the candidate modes; and comparing rate-distortion costs of the candidate modes and deciding a mode to be used for intra-prediction of the block