CPC H04N 19/105 (2014.11) [H04N 19/119 (2014.11); H04N 19/176 (2014.11)] | 19 Claims |
1. A video image coding method, comprising:
dividing an image frame to be coded into a plurality of sub-blocks, and assigning coordinates to each sub-block;
calculating a hash value corresponding to an i-th sub-block according to a content of the i-th sub-block;
performing a search in a first hash table by using the hash value corresponding to the i-th sub-block, so as to obtain coordinates corresponding to a first reference block, wherein a hash value corresponding to the first reference block is the same as the hash value corresponding to the i-th sub-block;
determining whether the coordinates of the first reference block are valid according to coordinates of the i-th sub-block;
in response to the coordinates of the first reference block being valid, acquiring a content of the first reference block according to the coordinates of the first reference block, and comparing the content of the first reference block with the content of the i-th sub-block;
in response to the content of the first reference block being consistent with the content of the i-th sub-block, performing Intra Block Copy (IBC) coding on the i-th sub-block;
replacing the coordinates corresponding to the first reference block in the first hash table with the coordinates corresponding to the i-th sub-block;
calculating a coordinate difference between the coordinates of the first reference block and the coordinates of the i-th sub-block; and
updating the second hash table to add the coordinate difference and the coordinates of the i-th sub-block;
wherein the i-th sub-block is any one of the plurality of sub-blocks;
wherein determining whether the coordinates of the first reference block are valid according to coordinates of the i-th sub-block further comprises:
determining whether a coordinate difference is within a preset range, wherein the coordinate difference is the difference between the horizontal and vertical coordinates of the first reference block and the horizontal and vertical coordinates of the i-th sub-block; and
when the coordinate difference is within the preset range, determining that the first reference block is valid.
|