In a sense, this blocking effect is kind of "unavoidable", in particular when the source is grainy and the encoder can't reproduce the grain because of too low bitrate. And the necessary bitrate for grain reproduction is quite high. for a short explanation (or a try of, at least;)). Shortly: with those rather low bitrates that we got used to by the modern compression schemes, grain just can't be dealt with properly. That's why in h.264 the scheme of adding parametric grain was included: Coding grain "directly" is too expensive.