Encoding method, apparatus and storage medium for string encoding technique

文档序号:882753 发布日期:2021-03-19 浏览:2次 中文

阅读说明:本技术 串编码技术的编码方法、设备及存储介质 (Encoding method, apparatus and storage medium for string encoding technique ) 是由 方诚 江东 陈秀丽 林聚财 殷俊 于 2020-11-24 设计创作,主要内容包括:本申请公开基于串编码技术的编码方法、设备及存储介质。其中,基于串编码技术的编码方法包括:根据预测模式句法元素判断当前模式是否为预定模式;若是,则利用预测运动矢量候选列表中的预测运动信息,计算出代价值最小的最佳预测运动信息,利用所述最佳预测运动信息对像素串的运动信息进行编码;若否,则利用最佳运动信息在预测运动矢量候选列表中的索引和矢量残差,对所述像素串的运动信息进行编码。通过在预测模式句法元素代表预定模式时,引入新的SP模式,无需再同时编码最佳预测运动信息的index和矢量残差SVD,仅需利用所述最佳预测运动信息编码像素串,有效减少编码比特数,提高视频编码压缩率。(The application discloses a coding method, a device and a storage medium based on a string coding technology. The encoding method based on the string encoding technology comprises the following steps: judging whether the current mode is a preset mode or not according to the syntax element of the prediction mode; if so, calculating the optimal predicted motion information with the minimum cost value by using the predicted motion information in the predicted motion vector candidate list, and encoding the motion information of the pixel string by using the optimal predicted motion information; and if not, encoding the motion information of the pixel string by using the index of the optimal motion information in the predicted motion vector candidate list and the vector residual error. By introducing a new SP mode when the syntax element of the prediction mode represents a preset mode, the index and the vector residual SVD of the optimal prediction motion information do not need to be coded at the same time, and only the pixel string needs to be coded by using the optimal prediction motion information, so that the coding bit number is effectively reduced, and the video coding compression rate is improved.)

1. A method for encoding based on a string coding technique, the method comprising:

judging whether the current mode is a preset mode or not according to the syntax element of the prediction mode;

if so, calculating the optimal predicted motion information with the minimum cost value by using the predicted motion information in the predicted motion vector candidate list, and encoding the motion information of the pixel string by using the optimal predicted motion information;

and if not, encoding the motion information of the pixel string by using the index of the optimal motion information in the predicted motion vector candidate list and the vector residual error.

2. The method of claim 1, wherein encoding motion information for a string of pixels using the best prediction motion information comprises:

coding the motion information of the pixel string directly by using the index of the optimal predicted motion information in the predicted motion vector candidate list; alternatively, the first and second electrodes may be,

judging whether the optimal prediction motion information is preset motion information or not;

if so, encoding the motion information of the pixel string by using the syntax element corresponding to the preset motion information; or, coding the motion information of the pixel string by directly utilizing the value of the preset motion information;

and if not, encoding the motion information of the pixel string by using the index of the optimal predicted motion information in the predicted motion vector candidate list.

3. The method according to claim 1, characterized in that it comprises:

calculating a cost value of a preset mode;

the predicted-mode syntax element represents a predetermined mode in response to a cost value of the predetermined mode being less than a predetermined value.

4. A method for encoding based on a string coding technique, the method comprising:

judging whether the vector residual is a zero vector according to the vector residual syntax element;

if so, the vector residual is a zero vector, namely the optimal motion information is the same as the predicted motion information, and the motion information of the pixel string is coded by utilizing the index of the predicted motion information in the predicted motion vector candidate list;

if not, the vector residual is a non-zero vector, that is, the optimal motion information is different from the predicted motion information, and the motion information of the pixel string is encoded by using the index of the predicted motion information in the predicted motion vector candidate list and the vector residual.

5. The method of claim 4, further comprising:

acquiring predicted motion information, wherein the predicted motion information comprises motion information of an airspace adjacent block of a current image block, and/or motion information in a historical candidate list, and/or motion information of an airspace non-adjacent block of the current image block, and/or preset fixed motion information;

and constructing a predicted motion vector candidate list by using the predicted motion information, wherein the predicted motion vector candidate list contains the predicted motion information with the quantity below a first preset value, namely the length of the predicted motion vector candidate list is set to be the first preset value.

6. The method of claim 5, wherein said constructing a predicted motion vector candidate list using said predicted motion information comprises:

judging whether the predicted motion information to be added to the predicted motion vector candidate list is repeated with all the predicted motion information already in the predicted motion vector candidate list;

if not, adding the predicted motion information into the predicted motion vector candidate list; alternatively, the first and second electrodes may be,

judging whether the predicted motion information to be added to the predicted motion vector candidate list is repeated with the predicted motion information already located at a predetermined position in the predicted motion vector candidate list;

and if not, adding the predicted motion information into the predicted motion vector candidate list.

7. The method of claim 5, wherein the motion information of the spatial neighboring block of the current image block comprises: motion information of one or more of a lower-left neighboring block of the current block, an upper-right neighboring block of the current block, an upper-left neighboring block of the current block, and an upper-left neighboring block of the current block.

8. The method of claim 5, wherein the motion information of the spatial non-neighboring blocks of the current image block comprises:

motion information of one or more of a lower left neighboring block of the current block, an upper right upper neighboring block of the current block, an upper left neighboring block of the current block, and an upper left neighboring block of the current block.

9. The method of claim 1, wherein the method is used for screen content scenes, natural image scenes, or mixed scenes.

10. An electronic device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the method of any of claims 1 to 9.

11. A computer-readable storage medium, on which program data are stored, which program data, when being executed by a processor, carry out the method of any one of claims 1 to 9.

Technical Field

The present application relates to the field of video coding technologies, and in particular, to a coding method, a coding device, and a storage medium for a string coding technology.

Background

The video image data volume is large, and usually needs to be compressed for video pixel data (RGB, YUV, etc.), the compressed data is called a video code stream, and the video code stream is transmitted to a user end through a wired or wireless network and then decoded for viewing. The whole video coding flow comprises the processes of prediction, transformation, quantization, coding and the like.

The SP technique (string matching prediction technique) is an independent prediction technique, and is used when different regions in an image have the same image content. The consecutive n (n > -1) pixels in the current block are called a string, and there may be several different strings in the current block, each string having its own SV (string vector) pointing to the previously encoded pixel (reference pixel) in the spatial domain. If there are pixels in the current block that cannot be clustered, the pixel values are directly encoded. However, the current SP technology has a problem of low compression rate.

Disclosure of Invention

The application provides an encoding method, an encoding device and a storage medium of a string encoding technology, so as to further improve the compression ratio of sp technology.

In order to solve the technical problem, the application adopts a technical scheme that: a method of encoding based on a string coding technique, the method comprising: judging whether the current mode is a preset mode or not according to the syntax element of the prediction mode; if so, calculating the optimal predicted motion information with the minimum cost value by using the predicted motion information in the predicted motion vector candidate list, and encoding the motion information of the pixel string by using the optimal predicted motion information; and if not, encoding the motion information of the pixel string by using the index of the optimal motion information in the predicted motion vector candidate list and the vector residual error.

According to an embodiment of the present application, the encoding motion information of a pixel string using the best prediction motion information includes: coding the motion information of the pixel string directly by using the index of the optimal predicted motion information in the predicted motion vector candidate list; or, judging whether the optimal prediction motion information is preset motion information or not; if so, encoding the motion information of the pixel string by using the syntax element corresponding to the preset motion information; or, coding the motion information of the pixel string by directly utilizing the value of the preset motion information; and if not, encoding the motion information of the pixel string by using the index of the optimal predicted motion information in the predicted motion vector candidate list.

According to an embodiment of the present application, the method comprises: calculating a cost value of a preset mode; the predicted-mode syntax element represents a predetermined mode in response to a cost value of the predetermined mode being less than a predetermined value.

In order to solve the above technical problem, the present application adopts another technical solution: a method of encoding based on a string coding technique, the method comprising: judging whether the vector residual is a zero vector according to the vector residual syntax element; if so, the vector residual is a zero vector, namely the optimal motion information is the same as the predicted motion information, and the motion information of the pixel string is coded by utilizing the index of the predicted motion information in the predicted motion vector candidate list; if not, the vector residual is a non-zero vector, that is, the optimal motion information is different from the predicted motion information, and the motion information of the pixel string is encoded by using the index of the predicted motion information in the predicted motion vector candidate list and the vector residual.

According to an embodiment of the present application, the method further comprises: acquiring predicted motion information, wherein the predicted motion information comprises motion information of an airspace adjacent block of a current image block, and/or motion information in a historical candidate list, and/or motion information of an airspace non-adjacent block of the current image block, and/or preset fixed motion information; and constructing a predicted motion vector candidate list by using the predicted motion information, wherein the predicted motion vector candidate list contains the predicted motion information with the quantity below a first preset value, namely the length of the predicted motion vector candidate list is set to be the first preset value.

According to an embodiment of the present application, the constructing a predicted motion vector candidate list using the predicted motion information includes: judging whether the predicted motion information to be added to the predicted motion vector candidate list is repeated with all the predicted motion information already in the predicted motion vector candidate list; if not, adding the predicted motion information into the predicted motion vector candidate list; or, judging whether the predicted motion information to be added to the predicted motion vector candidate list is repeated with the predicted motion information already located at a predetermined position in the predicted motion vector candidate list; and if not, adding the predicted motion information into the predicted motion vector candidate list.

According to an embodiment of the present application, the motion information of the spatial neighboring block of the current image block includes: motion information of one or more of a lower-left neighboring block of the current block, an upper-right neighboring block of the current block, an upper-left neighboring block of the current block, and an upper-left neighboring block of the current block.

According to an embodiment of the present application, the motion information of the spatial non-neighboring blocks of the current image block includes: motion information of one or more of a lower left neighboring block of the current block, an upper right upper neighboring block of the current block, an upper left neighboring block of the current block, and an upper left neighboring block of the current block.

According to an embodiment of the application, the method can be used for a screen content scene, a natural image scene or a mixed scene.

In order to solve the above technical problem, the present application adopts another technical solution: an electronic device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement any of the above methods.

In order to solve the above technical problem, the present application adopts another technical solution: a computer readable storage medium having stored thereon program data which, when executed by a processor, implements any of the methods described above.

The beneficial effect of this application is: when the syntax element of the prediction mode represents a preset mode, a new SP mode is introduced, the index of the optimal prediction motion information and the vector residual SVD do not need to be coded at the same time, and only the index of the optimal prediction motion information needs to be coded, or the syntax element corresponding to the preset motion information is coded, or the value of the motion information is preset, so that the coding bit number is effectively reduced, and the video coding compression rate is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:

FIG. 1 is a flow chart illustrating an embodiment of an encoding method of the present disclosure;

FIG. 2 is a schematic diagram of a CU level motion search range in an embodiment of a method for encoding the present techniques;

FIG. 3 is a diagram illustrating a scanning manner of pixel-level motion search in an embodiment of an encoding method of the present application;

FIG. 4 is a schematic diagram of spatial neighboring block positions in an embodiment of a method for encoding in the present disclosure;

FIG. 5 is a block diagram of spatial non-neighboring block positions in an embodiment of a method for encoding according to the present disclosure;

FIG. 6 is a schematic flow chart diagram illustrating a method for encoding in accordance with another embodiment of the present disclosure;

FIG. 7 is a schematic flow chart diagram illustrating a method for encoding in accordance with yet another embodiment of the present disclosure;

FIG. 8 is a block diagram of an embodiment of a temporal motion vector predictor of the present application;

FIG. 9 is a block diagram of an embodiment of an electronic device of the present application;

FIG. 10 is a block diagram of an embodiment of a computer-readable storage medium of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, fig. 1 is a flowchart illustrating an encoding method of the string encoding technique according to an embodiment of the present application.

An embodiment of the present application provides an encoding method of a string coding technique, including the following steps:

s11: predicted motion information is obtained.

Predicted motion information is obtained. The predicted motion information comprises motion information of a spatial neighboring block of the current image block, and/or motion information in a historical candidate list, and/or motion information of a spatial non-neighboring block of the current image block, and/or preset fixed motion information, and/or motion information obtained by other derivation methods.

The SP technique is briefly introduced below to facilitate understanding of the present invention:

in video coding, the most common color coding methods are YUV, RGB, and the like, and the color coding method adopted in the present invention is YUV. Y represents brightness, i.e., a gray value of an image; u and V (i.e., Cb and Cr) represent chrominance, which is used to describe image color and saturation. Each Y luma block corresponds to one Cb and one Cr chroma block, and each chroma block corresponds to only one luma block. Taking the sample format of 4:2:0 as an example, one block of N × M corresponds to a luminance block size of N × M, the two corresponding chrominance blocks are both (N/2) × (M/2), and the chrominance block is 1/4 sizes of the luminance block.

In video encoding, although image frames are input, when encoding an image frame, it is necessary to divide the image frame into a plurality of LCUs (largest coding units) and then divide each coding unit into CUs (coding units) of different sizes.

The detailed steps of the SP prediction technique are as follows:

(1) application conditions of SP technique

The SP technique can be used only for luminance blocks whose width and height are 4 or more and 32 or less. And for some small blocks, if the small blocks are further divided to generate chrominance blocks with the side length less than 4, the chrominance block parts of the small blocks are not further divided, and the small blocks do not adopt an SP mode but adopt a traditional intra prediction mode.

In addition, the pixel-level string prediction method also has the following normative limitations:

the reference pixel positions define areas of a left LCU and a current LCU, the LCUs are divided averagely according to the size of a 64 x 64 area, and all pixels of one reference string are from the same 64 x 64 area;

the reference pixel cannot belong to the current string;

the number of strings allowed per CU (including the number of strings of matched pixels plus the number of unmatched pixels) must not be greater than 1/4 for the number of pixels within the current CU block;

the number of pixels per string must be a multiple of 4.

(2) Construction of a predicted motion vector candidate list

In the AVS3 prior art, motion information in the history candidate list HBVP is usually used to construct the prediction motion vector candidate list, and the motion information valid in the HBVP list is filled into the prediction motion vector candidate list in a reverse order. Stored in the history candidate list HBVP is motion information of blocks that have been historically encoded and encoded using IBC (intra block copy) or string coding prediction techniques (SP techniques), including BV/SV (block vector/string vector) and related information. In the motion estimation process, when the motion information SV in the predicted motion vector candidate list is utilized, if the BV is traversed, the BV can be converted into the SV.

(3) Motion estimation

The purpose of motion estimation is to find the best motion vector for the current block, which is obtained by both CU-level motion search and pixel-level motion search. And (4) carrying out CU level motion search, and carrying out pixel level motion search if a matching block is not found.

1. CU-LEVEL MOTION SEARCH

[a] A motion search starting SV is selected from the SVP candidate list.

And traversing all the SVs in the SVP candidate list, and predicting by adopting the SVs. Firstly, whether a matched block corresponding to each SV meets the normative limitation of an SP prediction method is checked.

And calculating cost of the SV meeting the condition, and selecting the SV with the minimum cost as the initial search SV. If there is no SV satisfying the condition, (0,0) is used as the starting SV.

[b] A search range is set.

The search range is set to the horizontal-vertical direction [ -M, M ] range of the point pointed to by the start SV, and then updated to-min (vertical coordinate, M, of the point pointed to by SV) on the upper side; the left side update is-min (horizontal coordinate of the point pointed to by SV, M); the lower side is updated to min (image high-vertical coordinate of the point pointed to by SV-current block high, M); the right side is updated to min (image block-vertical coordinate of the point pointed by SV-current block width, M); wherein M may be 32 or 64.

[c] The cost of the start SV is calculated, the start SV is taken as the best SV, and the index of the best SV in the SVP list is recorded.

[d] The search ranges are the coded blocks directly above, directly to the left, directly below and directly to the right of the starting SV pointing position, the search directions are from far to near, as shown in FIG. 2, the search step is integer pixel, the search cannot exceed the search range in [ b ], and all pixels in the search block need to meet the specification limit of the SP prediction method. By comparing cost, the best SV of the current block is updated, and the index of the best SV in the SVP list is recorded.

2. Pixel level motion search

In the AVS3 technique, the current scanning mode is a horizontal bow scan mode, and as shown in fig. 3, the pixel-level prediction uses motion vector offsets when the motion information of (0, -1), (-1, 0) and the predicted block and the pixel HASH value are equal, and after performing motion compensation respectively, rate-distortion cost is compared, and the motion information with the minimum cost is the optimal motion information SV.

And traversing all SVPs in all the predicted motion vector candidate lists, calculating the sum of the bit numbers of the index of the SVP and the SVD (optimal SV-SVP), and comparing the bit numbers, wherein the bit number with the minimum bit number is the optimal SVP of the pixel string.

In this process, if the best SV is (0, -1), the SV is expressed by a flag.

The purpose of motion estimation is to find the best motion vector for the current block, which is obtained by both CU-level motion search and pixel-level motion search. And (4) carrying out CU level motion search, and carrying out pixel level motion search if a matching block is not found.

In the present embodiment, an improvement is made to the construction of the predicted motion vector candidate list, and predicted motion information is first acquired. The predicted motion information comprises motion information of a spatial neighboring block of the current image block, and/or motion information in a historical candidate list, and/or motion information of a spatial non-neighboring block of the current image block, and/or preset fixed motion information, and/or motion information obtained by other derivation methods.

The method for acquiring the predicted motion information in the embodiment is diversified, in most cases, the correlation between the motion information of the spatial neighboring block of the current image block and the current image block is larger, and in few cases, the correlation between the motion information acquired in other manners is larger, so that when the predicted motion information is acquired here, only the motion information in the historical candidate list is selected.

S12: a predicted motion vector candidate list is constructed using the predicted motion information.

And constructing a predicted motion vector candidate list by using the obtained predicted motion information, wherein the number of the predicted motion information contained in the predicted motion vector candidate list is below a first preset value, namely the length of the predicted motion vector candidate list is set to be the first preset value, and the number of the predicted motion information contained in the predicted motion vector candidate list is less than or equal to the first preset value. The first predetermined value is equal to or greater than zero. The predicted motion information with higher correlation degree is added into the predicted motion vector candidate list, which is helpful for improving the compression rate of encoding.

And the obtained predicted motion information needs to be subjected to complete duplicate checking or partial duplicate checking and then is added into a predicted motion vector candidate list one by one.

Specifically, if all duplicate checking is required, constructing a predicted motion vector candidate list by using the predicted motion information includes:

judging whether the predicted motion information to be added into the predicted motion vector candidate list is repeated with all the predicted motion information already in the predicted motion vector candidate list;

if not, adding the motion information into a predicted motion vector candidate list as an SVP;

if repeated, not added.

In this case, the repetition rate of the prediction motion vector candidate list can be reduced by performing the repetition check on all the prediction motion information to be added to the prediction motion vector candidate list, thereby reducing the number of coded bits, but at the same time, the operation and the time consumption are increased by performing the repetition check on all the prediction motion information.

Therefore, we further propose a partial duplicate checking method, specifically, the construction of the predicted motion vector candidate list using the predicted motion information comprises:

judging whether the predicted motion information to be added into the predicted motion vector candidate list is repeated with the predicted motion information which is already positioned at a preset position in the predicted motion vector candidate list;

if not, adding the predicted motion information into a predicted motion vector candidate list;

if repeated, not added.

By searching for duplicate prediction motion information to be added and prediction motion information of a preset position in a prediction motion vector candidate list, but not all duplicate prediction information, the operation and time consumption of duplicate prediction can be reduced, the repetition rate can be reduced to a certain extent, and the compression rate of the SP technology is improved integrally. The predetermined position may be actually adjusted according to the acquisition manner of the predicted motion information.

The following is described in connection with several embodiments:

in one embodiment:

in the process of constructing the predicted motion vector candidate list, motion information of spatial neighboring blocks is added firstly, then motion information in the historical candidate list is added, a first preset value is set to be 12, and the motion information is added in a full duplication checking mode, and if the motion information is repeated, the motion information is not added.

As shown in fig. 4, 5 spatial neighboring blocks may be set in the spatial neighboring block position, and the motion information of the spatial neighboring block of the current image block includes: the adding sequence of the motion information in the lower left adjacent block F of the current block, the upper right adjacent block G of the current block, the upper right adjacent block C of the current block, the upper left adjacent block a of the current block, and the upper left adjacent block D of the current block may be set to F- > G- > C- > a- > D, in other embodiments, any number of the 5 spatial adjacent blocks may be set, or spatial adjacent blocks at other positions may be included, and the sequence may be added in other sequences.

In yet another embodiment:

in the process of constructing the predicted motion vector candidate list, motion information of spatial neighboring blocks is added firstly, then motion information in a historical candidate list is added, a first preset value is set to be 12, and a partial duplicate checking mode is adopted for adding:

spatial neighboring block position with continued reference to fig. 4, 5 spatial neighboring blocks may be set, and the motion information of the spatial neighboring block of the current image block includes: motion information in a lower left adjacent block F of the current block, an upper right adjacent block G of the current block, an upper right adjacent block C of the current block, an upper left adjacent block a of the current block, and an upper left adjacent block D of the current block may be added in sequence of F- > G- > C- > a- > D, in other embodiments, any number of the 5 spatial adjacent blocks may be set, or spatial adjacent blocks at other positions may be included, the sequence may be added in other sequences, and a partial duplication checking formula is as follows:

first, when motion information of spatial neighboring blocks to be added is added, only sequential neighboring repetition check: checking the duplicate of G and F, checking the duplicate of C and G, checking the duplicate of A and C, and checking the duplicate of D and A;

and the second method comprises the following steps: g and F, C and G, A and C, D and A, wherein D and A are not repeated, and D is then repeated with the first weight of the list (predicted motion vector candidate list);

and the third is that: checking the duplicate of G and F, checking the duplicate of C and G, checking the duplicate of A and C, checking the duplicate of D and A, and simultaneously checking the duplicate of D and F and/or G;

and fourthly: d and A, F checking the duplicate;

the above lists only a few duplicate checking modes, which are not exhaustive, and other duplicate checking modes can be adopted according to actual situations.

It should be noted that, when the motion information in the history candidate list is added, duplicate checking is not required between the motion information in the history candidate list, because the motion information in the history candidate list is already subjected to duplicate checking, when the motion information in the history candidate list is added, all duplicate checking of the motion information of the spatial neighboring blocks can be set; or when the motion information in the historical candidate list is added, the motion information which is not in the spatial adjacent block can be set to check the duplication; or the maximum number of the first two duplicate checks of the motion information of the spatial adjacent blocks can be set when the motion information in the historical candidate list is added; or the motion information in the historical candidate list is only checked with the first motion information of the spatial neighboring blocks added into the predicted motion vector candidate list.

In yet another embodiment:

in the process of constructing the predicted motion vector candidate list, motion information of spatial neighboring blocks is added first, if the number of the spatial neighboring blocks is less than 5, motion information of non-neighboring blocks in a spatial domain is considered, the motion information in the historical candidate list is added after the number of the spatial neighboring blocks is 5, the first preset value is set to be 12, and the motion information can be added in a full duplicate checking mode or a partial duplicate checking mode (the duplicate checking mode can refer to the two embodiments, and is not described here again).

As shown in fig. 5, the motion information of the spatial non-neighboring blocks of the current image block includes: lower left adjacent block F of current block1Of the current blockUpper and right upper adjacent blocks G1The upper, right, upper and right adjacent blocks C of the current block1The upper left adjacent block A of the current block1Upper left adjacent block D of the upper left of the current block1The motion information in (1). The order of addition can be set to F1->G1->C1->A1->D1In other embodiments, any number of the 5 spatial non-adjacent blocks may be set, or spatial non-adjacent blocks at other positions may be included, and the order may be added in other orders.

Referring to fig. 6, fig. 6 is a flowchart illustrating an encoding method according to another embodiment of the present disclosure. Another embodiment of the present invention provides an encoding method based on a string coding technique, including the following steps:

s21: and judging whether the vector residual is a zero vector according to the vector residual syntax element.

A syntax element is a flag that indicates some parameters configured by the encoding end or the encoding technique and method used, etc. At the encoding end, the syntax element needs to be encoded, that is, the value of the syntax element is converted into a string of characters consisting of "0" and "1" which can be read and understood by a computer by using a specific encoding mode. And encoding the syntax element into the code stream and transmitting the code stream to a decoding end. The decoding end can know the coding information of the coding end and adopt corresponding operation by analyzing the meaning represented by the syntactic element read by the coded characters. For example, one syntax element SPCuFlag represents whether or not the current CU employs the SP technique (string matching prediction technique), and the SP technique is employed when SPCuFlag is 1 and is not employed when SPCuFlag is 0. During encoding, the value corresponding to the SPCuFlag needs to be encoded into a code stream and transmitted to a decoding end. The decoding end can know whether the encoding end adopts the SP technology or not by analyzing the value corresponding to the SPCuFlag, and if the SP technology is adopted, the decoding end can decode through SP related operation.

Through statistical analysis and experimental verification, after a predicted motion vector candidate list is constructed in an SP prediction technology mode, the situation that the optimal motion information SV of a plurality of pixel strings is in the candidate list exists in the existing SP prediction technology, at the moment, the motion information SV still needs to be expressed by two parts of index and vector residual SVD in the list, the number of coding bits is large, and the compression rate of coding is low.

In this embodiment, therefore, a vector residual syntax element is used to represent the vector residual.

In one embodiment, the vector residual syntax element includes isc _ mode _ is _ merge _ flag, and determining whether the vector residual is a zero vector according to the vector residual syntax element includes:

it is determined whether isc _ mode _ is _ cu _ string _ flag is 1.

S22: if so, the vector residual is a zero vector, and the motion information of the pixel string is coded by using the index of the predicted motion information in the predicted motion vector candidate list.

If the syntax element of vector residual represents that the vector residual is a zero vector, i.e. the vector residual is (0,0), the syntax element of vector residual isc _ mode _ is _ cu _ string _ flag is 1. It means that the best motion information SV is the same as the predicted motion information, i.e. the best motion information SV is within the predicted motion vector candidate list. At this time, the motion information of the pixel string is encoded by using the index of the predicted motion information in the predicted motion vector candidate list, and the vector residual SVD does not need to be encoded, thereby reducing the number of encoding bits and improving the video encoding compression rate.

S23: if not, the vector residual is a non-zero vector, and the motion information of the pixel string is coded by using the index of the predicted motion information in the predicted motion vector candidate list and the vector residual.

If not, namely the syntax element isc _ mode _ is _ cu _ string _ flag of the vector residual is 0, the vector residual is not a zero vector, and the motion information of the pixel string is still encoded by using the index of the predicted motion information in the predicted motion vector candidate list and the vector residual.

It should be noted that, in the expression process of the motion vector, the most common cases of the optimal motion information SV and the predicted motion information are currently the same. The predicted motion vector candidate list in the embodiment can be obtained by adopting the method in the embodiment, the correlation degree of the predicted motion information in the predicted motion vector candidate list is larger, and the probability that the optimal motion information SV is the same as the predicted motion information is further improved.

The method of the present embodiment may be combined with the above-described embodiments or implemented separately to improve the compression rate of the encoding method based on the string encoding technique.

Referring to fig. 7, fig. 7 is a flowchart illustrating an encoding method according to another embodiment of the present disclosure. Another embodiment of the present invention provides an encoding method based on a string coding technique, including the following steps:

s31: and judging whether the current mode is a preset mode or not according to the prediction mode syntax element.

In an embodiment, the prediction mode syntax element includes isc _ mode _ is _ merge _ flag. In other embodiments, other syntax elements may also be employed.

The present application proposes a new SP technique, which can be represented in particular by a prediction mode syntax element isc _ mode _ is _ merge _ flag of 1. In other embodiments, other values may be used.

In one embodiment, determining whether the current mode is the predetermined mode according to the prediction mode syntax element includes: it is determined whether a prediction mode syntax element isc _ mode _ is _ merge _ flag is 1.

S32: if yes, the best prediction motion information with the minimum cost value is calculated by using the prediction motion information in the prediction motion vector candidate list, and the motion information of the pixel string is coded by using the best prediction motion information.

If yes, the syntax element isc _ mode _ is _ merge _ flag of the prediction mode is 1, prediction can be performed by using a predetermined mode, namely a new SP technology, motion search is not performed any more, the best prediction motion information with the minimum cost value in the prediction motion information is calculated by using the prediction motion information in the prediction motion vector candidate list, and the motion information of the pixel string is encoded by using the best prediction motion information.

The motion information of the pixel string may be encoded by using the best prediction motion information in two ways:

first, after the best predicted motion information is selected, the motion information of the pixel string is encoded by directly using the index of the best predicted motion information in the predicted motion vector candidate list. Because the motion search is not carried out any more, the coding rate is improved, and the motion information of the pixel string is coded by directly utilizing the index value of the optimal prediction motion information, the coding bit number is effectively reduced, and the video coding compression rate is improved.

Second, there are a few pre-defined motion information in the predicted motion vector candidate list, and these pre-defined motion information have their own special corresponding syntax elements. Therefore, it is required to first determine whether the optimal predicted motion information is preset motion information, and if the optimal predicted motion information is the preset motion information, encoding the motion information of the pixel string by using a syntax element corresponding to the preset motion information; or, the motion information of the pixel string is directly encoded by using the value of the preset motion information. If the motion information is not the preset motion information, the motion information of the pixel string is coded by directly using the index value of the optimal prediction motion information.

Similarly, the second method does not need to encode the index of the best predicted motion information and the vector residual SVD at the same time, but only needs to encode the index of the best predicted motion information, or preset a syntax element corresponding to the motion information, or preset a value of the motion information. The number of encoding bits is effectively reduced, and the video encoding compression rate is improved.

The default motion information may be (0, -1) in the predicted motion vector candidate list, and of course, may be other predicted motion information.

S34: if not, the index and the vector residual error of the optimal motion information in the predicted motion vector candidate list are utilized to encode the motion information of the pixel string.

If not, the prediction mode syntax element isc _ mode _ is _ merge _ flag is 0, i.e., the prediction mode syntax element does not represent the predetermined mode. The motion information of the pixel string is encoded by directly using the existing mode, without using a new SP technique, and by using the index of the optimal motion information in the predicted motion vector candidate list and the vector residual SVD. Of course, when the vector residual SVD is a zero vector, the motion information of the pixel string may be encoded using only the index of the best motion information in the predicted motion vector candidate list.

It should be noted that whether the prediction mode syntax element in the present embodiment expresses the predetermined mode (whether it is 1) may be determined by comparing cost values of the predetermined mode, and in response to the cost value of the predetermined mode being less than a predetermined value, the prediction mode syntax element represents the predetermined mode. Specifically, the predetermined value is a cost value of the existing SP mode, and it may be compared whether the predetermined mode cost value is smaller than the cost value of the existing SP mode, if smaller, the new SP mode in the embodiment may be used, and if larger, the existing SP mode is still used. Of course, the predetermined value may also be a specific cost value, an empirical value determined through a number of experiments.

The method of this embodiment can be combined with any of the above embodiments, or implemented separately, to improve the compression rate of the encoding method based on the string encoding technique.

The method of the present application can be used for SSC scenes (screen content, mainly computer generated images), natural image scenes, or mixed scenes (SCC + natural images).

The following description is made with reference to a specific embodiment:

in the AVS3 standard technique, the modification of syntax elements using scheme 2 is shown in the following table:

TABLE 1 series of duplicate intra prediction definitions

After some new syntax elements are added, the description of the new prediction mode syntax elements is as follows:

string prediction Merge mode isc _ mode _ is _ Merge _ flag [ i ]

And (4) binary variables. A value of '1' indicates that the string prediction mode of the i-th part of the current coding unit is the Merge mode, using step S33. A value of '0' indicates that the string prediction mode of the i-th part of the current coding unit is the non-Merge mode, using step S34.

Referring to fig. 8, another embodiment of the present application provides an encoding apparatus 40 based on a string coding technique, which includes an obtaining module 41 and a processing module 42, so as to implement the encoding method based on the string coding technique according to the above-mentioned corresponding embodiment.

Specifically, the determination module 41 determines whether the current mode is a predetermined mode according to the prediction mode syntax element; if yes, the processing module 42 calculates the optimal predicted motion information with the minimum cost value by using the predicted motion information in the predicted motion vector candidate list, and encodes the motion information of the pixel string by using the optimal predicted motion information; if not, the processing module 42 encodes the motion information of the pixel string by using the index of the best motion information in the predicted motion vector candidate list and the vector residual. When the preset mode is adopted, the index of the optimal prediction motion information and the vector residual SVD do not need to be coded at the same time, and only the index of the optimal prediction motion information needs to be coded, or the preset motion information is coded corresponding to the syntax element, or the value of the motion information is preset, so that the coding bit number is effectively reduced, and the video coding compression rate is improved.

Or, the judging module 41 judges whether the vector residual is a zero vector according to the vector residual syntax element; if yes, the vector residual is a zero vector, that is, the optimal motion information is the same as the predicted motion information, and the processing module 42 encodes the motion information of the pixel string by using an index of the predicted motion information in the predicted motion vector candidate list; if not, the vector residual is a non-zero vector, that is, the optimal motion information is different from the predicted motion information, and the processing module 42 encodes the motion information of the pixel string by using the index of the predicted motion information in the predicted motion vector candidate list and the vector residual. When the vector residual SVD is a zero vector, the index of the predicted motion information in the predicted motion vector candidate list is used for encoding the motion information of the pixel string, so that the vector residual SVD does not need to be encoded, the encoding bit number is reduced, and the video encoding compression rate is improved.

Referring to fig. 9, another embodiment of the present application provides an electronic device 50, which includes a memory 51 and a processor 52 coupled to each other, where the processor 52 is configured to execute program instructions stored in the memory 51 to implement the encoding method based on the string coding technique according to any of the embodiments. In one particular implementation scenario, electronic device 50 may include, but is not limited to: a microcomputer, a server, and the electronic device 50 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.

In particular, the processor 52 is configured to control itself and the memory 51 to implement the string coding technique-based coding of any of the above embodiments. Processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip having signal processing capabilities. The Processor 52 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 52 may be commonly implemented by an integrated circuit chip.

Referring to fig. 10, another embodiment of the present application provides a computer-readable storage medium 60, on which program data 61 is stored, and when the program data 61 is executed by a processor, the encoding method based on the string encoding technique according to any of the embodiments is implemented.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium 60. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium 60 and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium 60 includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频编码方法、装置、计算机设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类