Depth image-based rendering (DIBR) is the process of synthesizing some new "virtual" views from one "real" view and the associated per-pixel depth information. The most important problem in this process is to deal with the newly exposed areas (holes) appearing in the virtual images. One common solution to decrease the number of holes is to pre-process the depth map, before the warping. In this paper, we present a new filtering technique for depth image-based rendering. In order to reduce or completely remove the newly exposed areas an efficient smoothing is necessary for the sharp depth changes near object boundaries. In the meantime it is useless to filter the smooth areas in the depth map. Our solution is based on a weighted Gaussian filter taking into account the distance to the contours. By this way, the geometric distortions and the computation time are reduced compared to a uniform filtering of the depth map. We present some results in the context of creation of stereoscopic views for 3D TV.