I am not proficient in any way with video compression, but currently work on a project where i compress residual images using H.264
My question is more of general nature regarding video encoders. As I understand it (as Wikipedia explains it), a block motion compensated encoder divides the current frame into some non-overlapping blocks, for each block it checks in the reference frame where the current block came from, then it calculates the difference of the desired block and the motion-compensated block, then it encodes this residual somehow.
Wikipedia states: "The main disadvantage of block motion compensation is that it introduces discontinuities at the block borders (blocking artifacts). These artifacts appear in the form of sharp horizontal and vertical edges which are easily spotted by the human eye and produce ringing effects (large coefficients in high frequency sub-bands) in the Fourier-related transform used for transform coding of the residual frames."
So, since the reference frame already contains block-artifacts (because it was encoded), and then these block artifacts are shifted into the current block and the residual is calculated, then the high-frequencies created by the block-artifacts at the borders of the shifted block will also show up as discontinuities in the residual. And discontinuities are generally bad for compression.
Does a motion-compensated block encoder somehow deal with this block-artifacts prior to compressing the residual? since it knows exactly how the block was shifted, it knows where the block borders are located and could do something about them before or while encoding the residual, removing/ignoring the unnecessary high frequencies at this place. If something like this is performed in a codec like H.264, can someone explain the mainconcept of how the encoder does this, give some terminology on it and so on? How does the encoder deal with block-artifacts in the reference frame?