Optimization of encoding process in video compression is an important research problem, especially in the case of modern, sophisticated compression technologies. In this paper, we consider HEVC, for which a novel method for selection of the encoding modes is proposed. By the encoding modes we mean e.g. coding block structure, prediction types and motion vectors. The proposed selection is done basing on noise-reduced version of the input sequence, while the information about the video itself, e.g. transform coefficients, is coded basing on the unaltered input. The proposed method involves encoding of two versions of the input sequence. Further, we show realization proving that the complexity is only negligibly higher than complexity of a single encoding. The proposal has been implemented in HEVC reference software from MPEG and tested experimentally. The results show that the proposal provides up to 1.5% bitrate reduction while preserving the same quality of a decoded video.