The present invention relates to an encoding device and a decoding device including a CNN-based loop filter. An encoding apparatus according to an embodiment includes: a filtering section that generates filtering information by performing filtering on a residual image equivalent to a difference between an original image and a predicted image; an inverse filter unit that generates inverse filter information by performing inverse filtering on the filter information; a prediction unit that generates the prediction image based on the original image and reconstruction information; a loop filter based on CNN, inputting the inverse filtering information and the predicted image, and outputting the reconstruction information; and an encoding unit that performs encoding based on the filter information and the prediction image information.