Coding a merged block that overlaps a reference block in intra block copy mode
View Patent ↗A coding block processing method includes receiving a bit stream, and determining, according to the bit stream, that a current coding block is coded in intra block copy mode, and that the current coding block overlaps a reference coding block. The method further includes, in response to the determination that the current coding block overlaps the reference coding block, determining that the current coding block is a merged block and partitioning the merged block into plural sub-blocks. The method further includes determining motion information of the plural sub-blocks based on one set of motion information indicated in the bit stream, such that the plural subblocks have the same motion information.
1 . A coding block processing method, comprising:
determining, according to a bit stream, that a current coding block is coded in an intra block copy mode;
determining, according to the bit stream, whether the current coding block overlaps a reference coding block, the current coding block having a height value b_h and a width value b_w, a block vector of the current coding block indicating the reference coding block;
when the current coding block is determined to overlap the reference coding block,
determining that the current coding block is a merged block; and
partitioning, according to a preset basic partitioning unit having a height value part_h and a width value part_w, the merged block into plural sub-blocks; and
determining motion information of the plural sub-blocks based on one set of motion information indicated in the bit stream, such that the plural sub-blocks have the same motion information, wherein
when (i) a y coordinate value of the block vector is less than or equal to −part_h or (ii) an x coordinate value of the block vector is less than or equal to −part_w,
the current coding block is partitioned along only one direction, the only one direction being one of an x coordinate and a y coordinate of the current coding block, and
the current coding block is not partitioned along another one of the x coordinate and the y coordinate of the current coding block.
2 . The method according to claim 1 , wherein the determining, according to the bit stream, whether the current coding block overlaps the reference coding block comprises:
determining, according to the bit stream, the block vector of the current coding block;
obtaining, according to the block vector, first positional information of the reference coding block; and
determining, according to the first positional information and the current coding block, that the current coding block overlaps the reference coding block.
3 . The method according to claim 2 , wherein the determining, according to the first positional information and the current coding block, that the current coding block overlaps the reference coding block comprises:
obtaining second positional information of the current coding block; and
determining that the current coding block overlaps the reference coding block when a horizontal coordinate of a lower right corner in the first positional information is greater than or equal to a horizontal coordinate of an upper left corner in the second positional information, and a vertical coordinate of the lower right corner in the first positional information is greater than or equal to a vertical coordinate of the upper left corner in the second positional information.
4 . The method according to claim 1 , wherein
the partitioning, according to the preset basic partitioning unit, the merged block comprises:
obtaining the preset basic partitioning unit; and
comparing the preset basic partitioning unit with the block vector of the current coding block, and determining, according to a comparison result, a target partitioning unit; and
the partitioning includes partitioning, according to the target partitioning unit, the merged block to obtain the plural sub-blocks, a height of the target partitioning unit being one of b_h and part_h, and a width of the target partitioning unit being one of b_w and part_w.
5 . The method according to claim 4 , wherein
when the y coordinate value of the block vector is less than or equal to −part_h, the current coding block is partitioned along the only one direction that is the y coordinate of the current coding block, the width value b_w of the current coding block is used as the width of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (b_w, part_h); and
when the y coordinate value of the block vector is greater than −part_h, the width value part_w of the preset basic partitioning unit is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, part_h).
6 . The method according to claim 4 , wherein
when the y coordinate value of the block vector is greater than −part_h, the width value part_w of the preset basic partitioning unit is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value b_h of the current coding block is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, b_h).
7 . The method according to claim 4 , wherein
when the x coordinate value of the block vector is less than or equal to −part_w, the current coding block is partitioned along the only one direction that is the x coordinate of the current coding block, the width value part_w of the preset basic partitioning unit is used as a width of the target partitioning unit on the x coordinate of the current coding block, and the height value b_h of the current coding block is used as the height of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, b_h); and
when the x coordinate value of the block vector is greater than −part_w, the width value part_w of the preset basic partitioning unit is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, part_h).
8 . The method according to claim 4 , wherein
when the x coordinate value of the block vector is greater than −part_w, the width value b_w of the current coding block is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (b_w, part_h).
9 . A video decoding method, comprising:
receiving an encoded video bit stream comprising a current image;
determining, according to the encoded video bit stream, that a current coding block is coded in an intra block copy prediction mode;
determining, according to the encoded video bit stream, whether the current coding block overlaps a reference coding block, the current coding block having a height value b_h and a width value b_w, a block vector of the current coding block indicating the reference coding block;
when the current coding block is determined to overlap the reference coding block,
determining that the current coding block is a merged block; and
partitioning, according to a preset basic partitioning unit having a height value part_h and a width value part_w, the merged block into plural sub-blocks;
determining motion information of the plural sub-blocks based on one set of motion information indicated in the encoded video bit stream, such that the plural sub-blocks have same block vector information;
obtaining, according to the block vector information of the plural sub-blocks and the intra block copy prediction mode, a predictive value of the current coding block from the current image; and
determining, according to the predictive value, a reconstructed value of the current coding block, and decoding the reconstructed value to obtain a decoded video bit stream, wherein
when (i) a y coordinate value of the block vector is less than or equal to −part_h or (ii) an x coordinate value of the block vector is less than or equal to −part_w,
the current coding block is partitioned along only one direction, the only one direction being one of an x coordinate and a y coordinate of the current coding block, and
the current coding block is not partitioned along another one of the x coordinate and the y coordinate of the current coding block.
10 . The method according to claim 9 , further comprising:
determining, according to the encoded video bit stream, a sequence header flag; and
the determining, according to the encoded video bit stream, whether the current coding block overlaps the reference coding block comprises:
when a flag value of the sequence header flag is a predetermined value, determining that the current coding block overlaps the reference coding block, wherein the flag value of the sequence header flag indicates that an encoder side performs encoding.
11 . The method according to claim 9 , further comprising:
when the current coding block is the merged block, adjusting a residual coefficient corresponding to the current coding block to 0.
12 . The method according to claim 9 , wherein the determining, according to the encoded video bit stream, whether the current coding block overlaps the reference coding block comprises:
determining, according to the encoded video bit stream, the block vector of the current coding block;
obtaining, according to the block vector, first positional information of the reference coding block; and
determining, according to the first positional information and the current coding block, that the current coding block overlaps the reference coding block.
13 . A coding block processing apparatus, comprising:
processing circuitry configured to
determine, according to a bit stream, that a current coding block is coded in an intra block copy prediction mode;
determine, according to the bit stream, whether the current coding block overlaps a reference coding block, the current coding block having a height value b_h and a width value b_w, a block vector of the current coding block indicating the reference coding block;
when the current coding block is determined to overlap the reference coding block,
determine that the current coding block is a merged block; and
partition, according to a preset basic partitioning unit having a height value part_h and a width value part_w, the merged block into plural sub-blocks; and
determine motion information of the plural sub-blocks based on one set of motion information indicated in the bit stream, such that the plural sub-blocks have the same motion information, wherein
when (i) a y coordinate value of the block vector is less than or equal to −part_h or (ii) an x coordinate value of the block vector is less than or equal to −part_w,
the current coding block is partitioned along only one direction, the only one direction being one of an x coordinate and a y coordinate of the current coding block, and
the current coding block is not partitioned along another one of the x coordinate and the y coordinate of the current coding block.
14 . The apparatus according to claim 13 , wherein the processing circuitry is further configured to:
determine, according to the bit stream, the block vector of the current coding block;
obtain, according to the block vector, first positional information of the reference coding block; and
determine, according to the first positional information and the current coding block, that the current coding block overlaps the reference coding block.
15 . The apparatus according to claim 14 , wherein the processing circuitry is further configured to:
obtain second positional information of the current coding block; and
determine that the current coding block overlaps the reference coding block when a horizontal coordinate of a lower right corner in the first positional information is greater than or equal to a horizontal coordinate of an upper left corner in the second positional information, and a vertical coordinate of the lower right corner in the first positional information is greater than or equal to a vertical coordinate of the upper left corner in the second positional information.
16 . The apparatus according to claim 13 , wherein the processing circuitry is further configured to:
obtain the preset basic partitioning unit;
compare the preset basic partitioning unit with the block vector of the current coding block, and determine, according to a comparison result, a target partitioning unit; and
partition, according to the target partitioning unit, the merged block to obtain the plural sub-blocks, a height of the target partitioning unit being one of b_h and part_h, and a width of the target partitioning unit being one of b_w and part_w.
17 . The apparatus according to claim 16 , wherein
when the y coordinate value of the block vector is less than or equal to −part_h, the current coding block is partitioned along the only one direction that is the y coordinate of the current coding block, the width value b_w of the current coding block is used as a width of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (b_w, part_h); and
when the y coordinate value of the block vector is greater than −part_h, the width value part_w of the preset basic partitioning unit is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value part_h of the preset basic partitioning unit is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, part_h).
18 . The apparatus according to claim 16 , wherein
when the y coordinate value of the block vector is greater than −part_h, the width value part_w of the preset basic partitioning unit is used as the width value of the target partitioning unit on the x coordinate of the current coding block, and the height value b_h of the current coding block is used as the height value of the target partitioning unit on the y coordinate of the current coding block, one or more of the plural sub-blocks having a size of (part_w, b_h).