Block with encoder motion compensation - how to deal with block noise in the frame of reference?

I don’t own any way of compressing the video, but am currently working on a project where I compress afterimages with H.264

My question is more general for video encoders. As I understand it (as Wikipedia explains this), the motion block compensated encoder divides the current frame into several disjoint blocks, for each block it checks in the frame of reference, when the current block arrives, it calculates the difference between the desired block and the block with motion compensation, then it somehow encodes this remainder.

Wikipedia says: “The main drawback of block motion compensation is that it introduces gaps at the block boundaries (blocking artifacts). These artifacts appear in the form of sharp horizontal and vertical edges that are easily detected by the human eye and produce (large coefficients in the high-frequency sub-bands) in the Fourier-related transform used to transform the encoding of residual frames. "

So, since the reference frame already contains block artifacts (since it was encoded), and then these block artifacts are shifted to the current block and the residual is calculated, then the high frequencies generated by block artifacts at the boundaries of the shifted block will also be displayed as gaps in the remainder . And interrupts are generally bad for compression.

Is a motion compensated block encoder arranged with this block artifact before the remainder is compressed? since he knows exactly how the block was shifted, he knows where the boundaries of the blocks are, and can do something with them before or during the coding of the remainder, removing / ignoring unnecessary high frequencies in this place. If something like this is done in a codec such as H.264, can someone explain the basic concept of how the encoder does it, give some terminology and so on? How to deal encoder with block artifacts in the frame of reference?

+6
source share
1 answer

@Mat: This is a good question and, most likely, an open area for research in video coding. The short answer is that, to my knowledge, video encoders are clearly not doing anything today to deal with the effect of block artifacts on motion estimation.

It is possible that in cases of fast movement in areas with low detail, if there are noticeable artifacts of the blocks, the motion vectors can sometimes be multiples of the block size :) or, in other words, the motion estimate finds the blocks in the previous frame, and not the detail of the original image. This is probably quite rare; it requires both fast movement and an uncompromising image area and obviously insufficient bitrate. Perhaps you can build synthetic video sequences that demonstrate this. Is there any way that knowing the boundaries of blocks can help is unclear; if the edges of the blocks introduce the high-frequency components in the remnants of the next frame, then we should spend the bits on erasing / correcting those artificially introduced components, do we know that they came from the block artifact or not ... and even then, the bits spent may be the best a solution than using a different reference area / motion vector / block type.

However, modern codecs, such as H.264 and VP8, have a filter for filtering blocking in the queue , in other words, the decoded frame is released earlier, which is used as a reference, which reduces block noise and, therefore, probably minimizes the impact of the problem that you correctly identified.

0
source

Source: https://habr.com/ru/post/915873/


All Articles