A non-transitory computer-readable medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer, cause the computer to carry out a method for encoding or decoding a frame of a video, the method comprising:
- reconstructing the frame of the video to render a reconstructed frame;
- determining a set of filter parameters;
- and
- filtering, in a pixel domain and a frequency domain, a block of the reconstructed frame based on the determined set of filter parameters to obtain a filtered block of the frame,
- wherein the filtering a block of the reconstructed frame comprises performing, for the block of the reconstructed frame:
- determining a group of pixel-domain patches that are similar to the block,
- determining first parameters based on the group of pixel-domain patches,
- determining second parameters based on signaling information of the block,
- performing collaborative filtering of the group of pixel-domain patches in the frequency domain to obtain a group of filtered pixel-domain patches, and
- performing collaborative filtering of the filtered pixel-domain patches in pixel domain along pixel-domain patches with same spatial coordinates from different groups.