CN112565760B - Encoding method, apparatus and storage medium for string encoding technique - Google Patents

Encoding method, apparatus and storage medium for string encoding technique Download PDF

Info

Publication number
CN112565760B
CN112565760B CN202011419495.3A CN202011419495A CN112565760B CN 112565760 B CN112565760 B CN 112565760B CN 202011419495 A CN202011419495 A CN 202011419495A CN 112565760 B CN112565760 B CN 112565760B
Authority
CN
China
Prior art keywords
string
current
vector
ordinate
abscissa
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011419495.3A
Other languages
Chinese (zh)
Other versions
CN112565760A (en
Inventor
江东
方诚
陈秀丽
林聚财
殷俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202011419495.3A priority Critical patent/CN112565760B/en
Publication of CN112565760A publication Critical patent/CN112565760A/en
Priority to PCT/CN2021/135831 priority patent/WO2022117113A1/en
Priority to EP21900135.1A priority patent/EP4241447A4/en
Application granted granted Critical
Publication of CN112565760B publication Critical patent/CN112565760B/en
Priority to US18/328,758 priority patent/US20230319287A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors

Abstract

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: responding to the type of the current string as a CU level string; acquiring the abscissa and the ordinate of the current string, and judging whether the ordinate of the current string is less than one and the abscissa of the current string is equal to zero or not; if not, judging whether the ordinate of the string vector of the current string is nonzero; if the ordinate of the string vector is zero, the difference between the absolute value of the abscissa of the encoded string vector and a second preset value; and responding to the fact that the length of the current string is smaller than the width of the current CU block, wherein the second preset value is the length of the current string, responding to the fact that the length of the current string is larger than or equal to the width of the current CU block, the second preset value is the sum of the first preset value and one, and the first preset value is smaller than or equal to the absolute value of the abscissa of the string vector and the width of the current CU block. The method carries out string vector encoding optimization on the CU-level strings, can reduce the number of encoding bits under the condition of unchanged distortion, and further improves the compression ratio of SP prediction.

Description

Encoding method, apparatus and storage medium for string encoding technique
Technical Field
The present application relates to the field of video coding technologies, and in particular, to a coding method, a coding apparatus, and a storage medium for a string coding technology.
Background
The video image data volume is large, and usually, video pixel data (RGB, YUV, etc.) needs to be compressed, 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 process 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 type of the current string is a CU-level string; responding to the type of the current string as a CU level string; acquiring the abscissa and the ordinate of the current string, and judging whether the ordinate of the current string is less than one and the abscissa of the current string is equal to zero; if not, judging whether the ordinate of the string vector of the current string is nonzero; if the ordinate of the string vector is zero, encoding the difference value between the absolute value of the abscissa of the string vector and a second preset value; and responding to the fact that the length of the current string is smaller than the width of the current CU block, wherein the second preset value is the length of the current string, responding to the fact that the length of the current string is larger than or equal to the width of the current CU block, the second preset value is the sum of the first preset value and one, and the first preset value is smaller than or equal to the absolute value of the abscissa of the string vector and the width of the current CU block.
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: acquiring a string vector of a current string; responsive to a string vector of the current string being located in a list of historical candidate motion vectors; and performing bit calculation of the string vector of the current string by using the index of the string vector of the current string in the historical candidate motion vector list.
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: candidate motion vectors are obtained, including intra-frame motion vectors of spatial neighboring blocks of the current block, intra-frame motion vectors in a final historical candidate list, intra-frame motion vectors in a temporary historical candidate list, intra-frame motion vectors of spatial non-neighboring blocks of the current block, and preset fixed intra-frame motion vectors.
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: the method optimizes the string vector coding of the CU-level strings, improves the coding mode of the string vectors, and can reduce the number of coded bits under the condition of unchanged distortion, thereby improving the compression ratio of SP prediction.
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 diagram illustrating a partitioning manner of an LCU into CUs in an embodiment of an encoding method of the present disclosure;
FIG. 2 is a schematic diagram of CU level motion search 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 diagram illustrating a matching string selection method according to an embodiment of a coding method of the present application;
FIG. 5 is a flow chart illustrating an embodiment of an encoding method of the present disclosure;
FIG. 6 is a flow diagram illustrating a method for encoding according to yet another embodiment of the present disclosure;
FIG. 7 is a flow chart illustrating the determination of a current string type in another embodiment of the encoding method of the present disclosure;
FIG. 8 is a flow chart illustrating a method for encoding CU level strings in yet another embodiment of a method for encoding the string encoding techniques of the present application;
FIG. 9 is a flow chart of a method for encoding a normal string in yet another embodiment of the method for encoding the string encoding technique of the present application;
FIG. 10 is a diagram illustrating a conventional string vector encoding method according to an embodiment of the present invention in yet another embodiment of a method for encoding a string coding technique;
FIG. 11 is a diagram illustrating a conventional string vector encoding method according to another embodiment of the present invention;
FIG. 12 is a flow diagram illustrating an encoding method of a further embodiment of the present string encoding technique;
FIG. 13 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 14 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 described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
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 chroma, which functions 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, two corresponding chrominance blocks both have a size of (N/2) × (M/2), and a 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 the areas of the left LCU and the current LCU, the LCU is divided averagely according to the size of 64 x 64 areas, 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 predictive motion vector candidate list
In the prior art of AVS3, motion information in the history candidate list HBVP is usually used to construct a 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 historical candidate list HBVP is motion information for 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, it can be converted into SV if it is traversed to BV.
When a frame starts, the candidate list is empty, and when each CU completes prediction and determines to adopt IBC mode or SP mode, its IBC or SP related information is inserted into the HBVP list on a first-in-first-out basis.
Since there are many different partitioning manners for an LCU, and the HBVP of a CU is different for different partitioning manners. In general, the HBVP list refers to a list in the best partition of the LCU, also referred to as n _ list. Then two temporary HBVP lists, b _ list and p _ list, are also needed for comparison in different partitions. b _ list stores BV/SV of the previously coded CU block at the same partition depth; the p _ list stores the BV/SV of the encoded CU block at the last partition depth.
For example, as shown in fig. 1, B0, B1, B2 and the current block are at the same partition depth, and P0, P1, P2 and P3 are at the last partition depth, and prediction is currently performed on the P3 block in a certain partition mode. Then B _ list stores BV/SV of B0, B1, B2 and P _ list stores BV/SV of P0, P1, P2.
(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 search range is set.
As shown in fig. 2, the search direction is horizontally left and vertically upward for the upper left corner of the current block (e.g., a red dot in the following figure), the upper side of the vertical direction cannot exceed the upper boundary of the current LCU, and the left side boundary cannot exceed the left boundary of the left neighboring LCU of the current LCU.
In addition to searching CU-level matching strings in both of the above search directions, the block pointed to by the motion vector in the HBVP list needs to be taken as a matching block to perform cost calculation.
[b] Selection of matching blocks
For the brightness block, in the searching range, searching the block with the same size as the current block for matching, wherein the searching block needs to be satisfied as an encoded block, the searching is performed in the vertical direction and the horizontal direction, the current block and the searching block are calculated in an SAD mode, 8 minimum SADs are selected at most, and an SAD list and a difference value list of coordinates of the upper left corner of the searching block corresponding to the SAD and the upper left corner of the current block are recorded in a mode that the SAD is from small to large.
For the chroma block, if a difference list of the coordinates of the upper left corner of the searched brightness block and the upper left corner of the current block exists and the SAD corresponding to the first difference in the list is less than or equal to 32, traversing the SAD list and the difference list of the coordinates of the upper left corner of the searched block corresponding to the SAD and the upper left corner of the current block, recalculating the total SAD of the three components, and selecting the corresponding difference in the difference list corresponding to the minimum SAD as the difference between the current block and the matched block; otherwise, the first difference value of the coordinate difference value list of the upper left corner of the search block corresponding to the brightness SAD and the upper left corner of the current block is used as the coordinate difference value of the current block and the matching block.
[c] Obtaining a reconstructed block
And then calculating rdcost (rate distortion cost) of the current block and the reconstructed block by using SSE, wherein bits in the rdcost are bits consumed by the coordinate difference value of the current block and the matching block.
[d] Information to be saved
If the rdcost is smaller than that of the previous best mode, the matching flag in the mode, the coordinate difference value of the current block and the matching block, and the number of matched pixels need to be saved.
2. Pixel level motion search
[a] Pixel scanning mode
As shown in fig. 3, the current scanning mode is a horizontal arcuate scanning mode.
[b] Constructing motion search string motion vector candidates
In the horizontal direction scanning, the motion search candidate is placed in the vertical direction first, the motion vector corresponds to (0, -1), then in the horizontal direction, the motion vector corresponds to (-1, 0), then the historical motion vector (7 at most) is placed, finally all the reconstructed pixels and the motion vector of the current pixel (the motion vector corresponding to the last reconstructed pixel is placed in the front, the motion vector corresponding to the earliest reconstructed pixel is placed in the back) which are equal to the HASH value of the current pixel and are in the search range are placed, and the search range does not exceed the current LCU and the left adjacent LCU.
[c] Selection of matching strings
Each motion search candidate is traversed for the luminance component, with the scan mode determined. When the current motion search candidate is operated, matching operation needs to be performed on the current pixel point and subsequent continuous pixel points by using the current motion search candidate. Setting a threshold, wherein the threshold is related to QP, the larger the threshold, and if the difference between several consecutive original pixel values and the original pixel value of the corresponding reference pixel is smaller than the threshold, recording the number of consecutive pixels under the motion search candidate (i.e. the string length), as shown in fig. 4, since the position of the reference pixel is limited in the prior art cannot be within the current string, the string length is at most 1 for the motion vector of (-1, 0).
The selection process of the best motion search candidate is to be followed:
I. and carrying out rough selection once according to the comparison of the string lengths. If (string length in current motion search) > (length-1 in previous best motion search), then the current motion search is selected and the total cost of the current string is calculated. Otherwise, the current motion search is directly eliminated.
II. And performing fine selection according to the string length and cost. And if one of the following three conditions is satisfied, taking the current motion search as the optimal motion search:
i. if (string length under current motion search) > (length under previous best motion search);
ii. If (string length under current motion search ═ length under previous best motion search) & (current string length is not 0) & (current string cost < string cost under previous best motion search);
if (the string length under the current motion search is-1 under the previous best motion search) & & (the current string length is not 0) & & (average cost of each pixel in the current string < average cost of each pixel in the previous best motion search next string);
note that during the search, the reference pixel cannot go beyond the image boundary and is an encoded pixel. For the chroma components, the best motion search candidate is used directly without participating in the motion search candidate traversal.
And if the current pixel does not find a matched pixel, directly coding the current pixel value.
[d] Obtaining a reconstructed block
There may be multiple strings and non-strings of pixels in the current block, for which the reconstructed value is the pixel value (i.e., the prediction value) of its matching string, and for which the reconstructed value is the original pixel value. Then the rdcost of the current block and the reconstructed block is calculated using SSE.
[e] Information to be saved
If the rdcost is less than the rdcost in the previous best mode, the matching flag in the mode, the coordinate difference value of each pixel string in the current block and the corresponding matching string, and the number of pixels in each matching string need to be saved.
3. Motion compensation
The reconstructed value in this mode is the reference value, so that no transform quantization operation is required.
4. Syntax element
There is no pixel residual information in the SP mode, but it is necessary to transfer a string matching mode flag, a flag whether a matching string is found, a string length, a string motion vector (or an index under the history candidate list), or unmatched pixel value information to represent all information required for the motion search of the current block.
Referring to fig. 5, an embodiment of the present application provides an encoding method of a string coding technique, including the following steps:
s101: candidate motion vectors are obtained.
Candidate motion vectors are obtained, including intra motion vectors (BV/SV) of spatial neighboring blocks of the current block, intra motion vectors (BV/SV) in the final historical candidate list, intra motion vectors (BV/SV) in the temporary historical candidate list, intra motion vectors (BV/SV) of spatial non-neighboring blocks of the current block, and a preset anchor intra motion vector.
In the method, the candidate motion vector is obtained by first obtaining a candidate motion vector, wherein the obtained candidate motion vector comprises an intra motion vector (BV/SV) of a spatial neighboring block of a current block, an intra motion vector (BV/SV) in a final historical candidate list, an intra motion vector (BV/SV) in a temporary historical candidate list, an intra motion vector (BV/SV) of a spatial non-neighboring block of the current block, and a preset fixed intra motion vector (BV/SV), and/or an intra motion vector obtained by other derivation methods.
S102: a predicted motion vector candidate list is constructed using the candidate motion vectors, the predicted motion vector candidate list being used to predict a string vector of the current string.
And constructing a predicted motion vector candidate list by using the obtained candidate motion vectors, wherein the predicted motion vector candidate list is used for predicting the string vector of the current string. The method for acquiring the candidate motion vectors has diversified modes, and more candidate motion vectors are added at the encoding end in the process of selecting the string vectors of the current string, so that more accurate string vectors of the current string can be acquired more easily, and the compression rate of SP prediction is further improved.
Further, the obtained candidate motion vector may be added to the predicted motion vector candidate list by performing a full or partial duplication check. Part of duplication checking is to check the candidate motion vector to be added and the predicted motion vector at a preset position in the predicted motion vector candidate list, but not to check all duplication checking, so that the operation and time consumption of duplication checking can be reduced, the repetition rate can be reduced to a certain extent, and the compression rate of the SP technology is improved as a whole. The predetermined position may be actually adjusted according to the manner of obtaining the predicted motion vector.
The following is described in connection with the division of the current string into a CU-level string, which is a string formed of all pixels within a CU block, and a normal string, which is a string formed of some pixels within a CU block:
in a specific embodiment, the current string is a CU-level string, and when the CU-level string is predicted in the prior art, only the motion vector in the final history candidate list n _ list is used as a candidate in the candidate motion vectors, but the motion vectors in the temporary history candidate lists p _ list and b _ list are not added as candidates, so that the motion vectors in the temporary history candidate lists p _ list and b _ list are added as candidates in the prediction of the CU-level string in the specific embodiment, which is beneficial to improving the prediction accuracy and further improving the compression ratio of SP prediction.
In yet another specific embodiment, the current string is an ordinary string, and when the ordinary string is predicted in the prior art, only the motion vectors in the temporary history candidate lists p _ list and b _ list are used as candidates in the candidate motion vectors, but the motion vector in the final history candidate list n _ list is not added as a candidate, so that the motion vector in the final history candidate list n _ list is added as a candidate when the ordinary string is predicted in the present embodiment, which is beneficial to improving the prediction accuracy, and further improving the compression rate of SP prediction.
Referring to fig. 6, another embodiment of the present application provides an encoding method based on a string coding technique, including the following steps:
s201: a string vector for the current string is obtained.
And selecting a string vector of the current string.
S202: the string vector responsive to the current string is located in the list of historical candidate motion vectors.
And selecting the string vector of the current string, and if the selected string vector of the current string is in the historical candidate motion vector list.
S203: bit calculation of the string vector of the current string is performed using the index of the string vector of the current string in the list of historical candidate motion vectors.
In the prior art, during bit estimation of a CU-level string, if a string vector of a current string is in a history candidate motion vector list, bit calculation is still performed by using a method for calculating bits of the string vector of the current string. In the method, if the string vector of the current string is in the historical candidate motion vector list, the bit calculation of the string vector of the current string is carried out by using the index of the string vector of the current string in the historical candidate motion vector list, thereby effectively reducing the coding bit number and improving the video coding compression ratio.
In the same way as the normal string, if the string vector of the current string is in the history candidate motion vector list, the bit calculation of the string vector of the current string is performed by using the index of the string vector of the current string in the history candidate motion vector list.
The method aligns the bit calculation mode of the CU level string with the bit calculation mode of the common string, so that the video coding compression rate is improved. The method can be combined with the method for increasing the motion vector candidates, a historical candidate motion vector list in the method is a constructed predicted motion vector candidate list, and if the string vector of the current string is in the predicted motion vector candidate list, the bit calculation of the string vector of the current string is carried out by utilizing the index of the string vector of the current string in the predicted motion vector candidate list, so that the prediction precision is improved, and the compression rate of SP prediction is further improved.
Further, the method also comprises the following steps:
and calculating rate distortion cost, namely calculating the sum of the rate distortion cost, the product of the preset coefficient and the bit value of the string vector of the current string and the distortion value. In the prior art, the calculation method of the rate distortion cost Rdcost of the CU level string is that Rdcost is bit + distortion, a coefficient lambda factor is not introduced, and the calculation of the Rdcost is inaccurate.
Further, the method also comprises the following steps:
in the comparison process of selecting the optimal string vector, calculating the bit length of the optimal string vector by using a first preset value; and the first preset value is less than or equal to the absolute value of the abscissa of the string vector of the current string and the width of the current CU block.
And calculating the bit length of the optimal string vector by using a first preset value in the information coding transmission process of the optimal string vector.
The method is mainly used in the optimal string information coding mode of the ordinary string, the first preset value offset1 is used for calculating the bit length when the optimal string information of the ordinary string is coded and transmitted in the prior art, but the first preset value offset1 is not used for calculating the bit length of the ordinary string in the mode selection process, and the front bit calculation mode and the rear bit calculation mode are not aligned, so that the front judgment standard and the rear judgment standard are inconsistent, and the accuracy is low. In the method, in the comparison process of selecting the optimal string vector and the information coding transmission process of the optimal string vector, the bit length of the optimal string vector is calculated by utilizing the first preset value, and the front bit calculation mode and the rear bit calculation mode are aligned, so that the accuracy is high.
It should be noted that the first default value offset1 represents a constant that can be subtracted from the abscissa of the string vector, which is obtained at the decoding end, and it is ensured that the subtracted value is greater than or equal to 0. For example, if the vertical coordinate of the row where the current string start point is located is an odd number, the value of the initial offset1 is the horizontal coordinate value of the string start point (the coordinate of the upper left corner of CU is (0,0)) +1, otherwise, the value of the initial offset1 is the string start horizontal coordinate value + the string length. And finally, comparing the value of the initial offset1 with the width of the current CU block, wherein when the value of the initial offset1 is larger than the width of the current CU block, the value of the first preset value offset1 is set as the width-1 of the current CU block, otherwise, the value of the first preset value offset1 is set as the initial offset 1-1.
The method 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.
Referring to fig. 7 to 11, another embodiment of the present application provides a coding method based on a string coding technique, including:
s31: and judging whether the type of the current string is a CU level string.
Determining whether the type of the current string is a CU-level string comprises:
judging the type of the current string according to whether the length of the current string is equal to the number of all pixels in the current CU block;
and if the length of the current string is equal to the number of all pixels in the current CU block, the type of the current string is a CU-level string, and otherwise, the current string is a common string.
And setting a preset type syntax element IscModeiSCuStringFlag during coding to indicate whether the current string is a CU-level string or a common string, wherein if the IscModeiSCuStringFlag is equal to 1, the current string is the CU-level string, and if the IscModeiSCuStringFlag is equal to 0, the current string is the common string.
It should be noted that the syntax element is a flag for indicating some parameters configured by the encoding end or the encoding techniques and methods 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 by a computer in a specific encoding manner. 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. When encoding, the value corresponding to the SPCuFlag needs to be encoded into the code stream and transmitted to the decoding end. The decoding end can know whether the SP technology is adopted by the encoding end 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 operations.
S32: and in response to the fact that the type of the current string is the CU-level string, encoding the current string in a CU-level string encoding mode.
S33: and responding to the type of the current string which is not the CU-level string, wherein the current string is a common string, and the current string is coded in a common string coding mode.
Further, as shown in fig. 8, the CU-level string is encoded as follows:
s301: in response to the type of the current string being a CU level string.
S302: and acquiring the abscissa and the ordinate of the string vector, and judging whether the ordinate of the string vector is less than one and whether the abscissa of the string vector is equal to zero.
S303: if so, the value of the ordinate of the string vector is incremented by one.
The value of the ordinate of the string vector is incremented by one, and used as a judgment and calculation of the ordinate of the string vector, and it is judged whether or not the ordinate of the string vector is non-zero.
S304: if not, judging whether the ordinate of the string vector of the current string is nonzero or not.
And judging whether the ordinate of the string vector of the current string is nonzero or not. A syntax element flag may be encoded before the decision to indicate whether SV _ Y is non-zero.
S305: and if the ordinate of the string vector is zero, encoding the difference between the absolute value of the abscissa of the string vector and the second preset value.
If the ordinate SV _ Y of the string vector is zero, the absolute value of the abscissa SV _ X of the encoded string vector is different from the second preset value offset2 by | SV _ X | -offset 2.
If the length of the current string is smaller than the width of the current CU block, the second preset value offset2 is the length of the current string; if the length of the current string is greater than or equal to the width of the current CU block, the second preset value offset2 is the first preset value offset1 plus one, and the first preset value offset1 is less than or equal to the absolute value of the abscissa SV _ X of the string vector and the width of the current CU block.
In the prior art, if the ordinate of the string vector of the CU-level string is zero, | SV _ X | -1 needs to be encoded, and the encoded value is greater than the encoded value in the current method; in addition, in the prior art, it is further required to further determine that the ordinate of the current string start position is an odd number, and if the ordinate is an odd number, the positive and negative of SV _ X are also required to be encoded, that is, one FLAG is encoded to indicate whether SV _ X is greater than 0. The coding method in the method can reduce the coding bit number and improve the video compression rate.
It should be noted that the offset1 represents a constant that can be subtracted from the SV abscissa and is obtained at the decoding end, and it is ensured that the subtracted value is greater than or equal to 0. For example, if the vertical coordinate of the row where the current string start point is located is an odd number, the value of offset1 is +1, which is the horizontal coordinate value of the string start point (the coordinate of the upper left corner of the current CU block is (0,0)) +1, otherwise, the value of offset1 is + the string length, which is the horizontal coordinate value of the string start point. When the last value of offset1 is larger than the width of the current CU block, the value of offset1 is set to-1 of the width of the current CU block, otherwise the value of offset1 is set to offset 1-1.
offset2 is also a constant that the decoding side can obtain. For example, when the string length is less than the width of a CU, the value of offset2 is the length of the string; otherwise, the value of offset2 is equal to offset1+ 1. In other embodiments, the value of offset2 may be further expanded, but must be available to the decoding end, thereby reducing the number of coded bits and improving the video compression rate.
S306: and if the ordinate of the string vector is nonzero, judging whether the ordinate of the string vector is greater than zero.
And if the vertical coordinate SV _ Y of the string vector is not zero, judging whether the vertical coordinate SV _ Y of the string vector is larger than zero or not. Determining whether the ordinate SV _ Y of the string vector is greater than zero may indicate whether SV _ Y is greater than zero by encoding a syntax element.
S307: if the ordinate of the string vector is greater than zero, the ordinate of the encoded string vector is positive, the absolute value of the ordinate of the encoded string vector minus one, and the absolute value of the abscissa of the encoded string vector plus one.
If the ordinate SV _ Y of the string vector is greater than zero, the ordinate of the encoded string vector is positive, the value | SV _ Y | -1 of subtracting one from the absolute value of the ordinate of the encoded string vector, and the difference | SV _ Y | -offset1-1 of adding one from the absolute value of the abscissa of the encoded string vector to the first preset value.
It should be noted that encoding the ordinate of the string vector as positive includes encoding a syntax element whose value indicates whether the ordinate of the string vector is greater than zero.
S308: and if the ordinate of the string vector is less than zero, judging whether the abscissa of the string vector is nonzero.
And if the vertical coordinate SV _ Y of the string vector is less than zero, judging whether the horizontal coordinate SV _ X of the string vector is nonzero. Determining whether the abscissa SV _ X of the string vector is non-zero may indicate whether SV _ X is non-zero by encoding a syntax element.
S309: if the abscissa of the string vector is zero, the ordinate of the encoded string vector is negative and the abscissa is zero, and the difference between the absolute value of the ordinate and the width of the current CU block is encoded.
If the abscissa SV _ X of the string vector is zero, the ordinate of the encoded string vector is negative and the abscissa is zero, and a value | SV _ Y | - (height-1) is encoded in which the difference between the absolute value of the ordinate and the width of the current CU block is increased by one. The coding method in the method can reduce the coding bit number and improve the video compression ratio.
It should be noted that, the encoding string vector with negative ordinate and zero abscissa includes:
encoding a syntax element indicating whether the ordinate of the string vector is greater than zero;
a syntax element is encoded that indicates whether the abscissa of the string vector is zero.
S310: and if the abscissa of the string vector is not zero, judging whether the abscissa of the string vector is larger than zero.
If the abscissa SV _ X of the string vector is nonzero, it is determined whether the abscissa SV _ X of the string vector is greater than zero. Determining whether the abscissa SV _ X of the string vector is greater than zero may indicate whether SV _ X is greater than zero by encoding a syntax element.
S311: if the abscissa of the string vector is greater than zero, the ordinate of the encoded string vector is negative and the abscissa is positive, the difference between the absolute value of the ordinate of the encoded string vector and the width of the current CU block, and the value of the absolute value of the abscissa of the encoded string vector minus one.
If the abscissa SV _ X of the string vector is greater than zero, the ordinate of the encoded string vector is negative and the abscissa is positive, the difference | SV _ Y | -height between the absolute value of the ordinate of the encoded string vector and the width of the current CU block, and the value | SV _ X | -1 of the absolute value of the abscissa of the encoded string vector minus one.
Note that the case where the ordinate of the code string vector is negative and the abscissa thereof is positive includes:
encoding a syntax element indicating whether the ordinate of the string vector is greater than zero, the value of the syntax element indicating that the ordinate is negative in this embodiment;
a syntax element is encoded indicating whether the abscissa of the string vector is greater than zero, and the value of the syntax element in this embodiment indicates that the abscissa is positive.
S312: if the abscissa of the string vector is less than zero, the ordinate of the encoded string vector is negative and the abscissa is negative, the absolute value of the ordinate of the encoded string vector is subtracted by one, and the absolute value of the abscissa of the string vector of the encoded current string is subtracted by one.
If the abscissa SV _ X of the string vector is less than zero, the ordinate of the encoded string vector is negative and the abscissa is negative, the absolute value of the ordinate of the encoded string vector minus one value | SV _ Y | -1, and the absolute value of the abscissa of the string vector encoding the current string minus one value | SV _ X | -1.
It should be noted that the encoding string vector with negative ordinate and negative abscissa includes:
encoding a syntax element indicating whether the ordinate of the string vector is greater than zero, the value of the syntax element indicating that the ordinate is negative in this embodiment;
a syntax element is encoded indicating whether the abscissa of the string vector is greater than zero, and the value of the syntax element in this embodiment indicates that the abscissa is negative.
The method also comprises the following steps:
responding to the current string crossing rows, namely the vertical coordinate of the pixel in the current string has two or more different values; there is no need to encode and transmit the syntax element corresponding to the unit base vector.
The method carries out string vector encoding optimization on the CU-level strings, improves the encoding mode of the string vectors, and can reduce the number of encoding bits under the condition of unchanged distortion, thereby improving the compression ratio of SP prediction.
Further, as shown in fig. 9, the encoding method of the normal string is as follows:
s313: in response to the type of the current string being a normal string.
S314: and acquiring the abscissa and the ordinate of the string vector, and judging whether the ordinate of the string vector is less than one and whether the abscissa of the string vector is equal to zero.
S315: if so, the value of the ordinate of the string vector is incremented by one.
And increasing the value of the ordinate of the string vector by one, using the value as the judgment and calculation of the ordinate of the string vector, and judging whether the ordinate of the string vector is nonzero.
S316: if not, judging whether the ordinate of the string vector of the current string is nonzero.
And judging whether the ordinate of the string vector of the current string is nonzero or not. A syntax element flag may be encoded before the decision to indicate whether SV _ Y is non-zero.
S317: if the ordinate of the string vector is zero, then it is determined whether the index of the row in which the start position of the current string is located is an odd number.
If the vertical coordinate SV _ Y of the string vector is zero, whether the index of the row where the start position of the current string is located is an odd number is judged.
S318: and if the index of the line where the starting position of the current string is not an odd number, the ordinate of the coding string vector is zero, and the absolute value of the abscissa of the coding string vector is different from the second preset value.
If the index of the row where the start position of the current string is located is not an odd number, the ordinate of the encoded string vector is zero, and the absolute value of the abscissa SV _ X of the encoded string vector is different from the second preset value offset2 by | SV _ X | -offset 2.
If the length of the current string is smaller than the width of the current CU block, the second preset value offset2 is the length of the current string; if the length of the current string is greater than or equal to the width of the current CU block, the second predetermined value offset2 is the first predetermined value offset1 plus one, and the first predetermined value offset1 is less than or equal to the absolute value of the abscissa SV _ X of the string vector and the width of the current CU block.
In the prior art, if the ordinate of the string vector of the common string is zero, the | SV _ X | -1 needs to be encoded, and the encoded value is greater than the encoded value in the current method; in addition, in the prior art, it is further required to further determine that the ordinate of the current string start position is an odd number, and if the ordinate is an odd number, the positive and negative of SV _ X are also required to be encoded, that is, one FLAG is encoded to indicate whether SV _ X is greater than 0. The coding method in the method can reduce the coding bit number and improve the video compression ratio.
It should be noted that offset1 represents a constant that can be subtracted from the horizontal axis of SV and is obtained at the decoding end, and the subtracted value is guaranteed to be greater than or equal to 0. For example, if the vertical coordinate of the row where the current string start point is located is an odd number, the value of offset1 is the horizontal coordinate value of the string start point (the coordinate of the upper left corner of the current CU block is (0,0)) +1, otherwise, the value of offset1 is the string start horizontal coordinate value + the string length. The value of offset1 is set to the width-1 of the current CU block when the last value of offset1 is greater than the width of the current CU block, otherwise the value of offset1 is set to offset 1-1.
offset2 is also a constant that the decoding side can obtain. For example, when the string length is smaller than the width of a CU, the value of offset2 is the length of the string; otherwise, the value of offset2 is equal to offset1+ 1. In other embodiments, the value of offset2 may be further expanded, but must be available to the decoding end, thereby reducing the number of coded bits and improving the video compression rate.
S319: if the index of the row where the start position of the current string is located is odd, the ordinate of the encoded string vector is zero, the abscissa of the encoded string vector is positive, and the absolute value of the abscissa of the string vector is reduced by one.
If the index of the row where the start position of the current string is located is odd, the ordinate of the encoded string vector is zero, the abscissa of the encoded string vector is positive, and the absolute value of the abscissa of the string vector is minus one | SV _ X | -1.
It should be noted that encoding the abscissa of the string vector as positive includes encoding a syntax element whose value indicates whether the abscissa of the string vector is greater than zero.
S320: and if the vertical coordinate of the string vector is not zero, judging whether the vertical coordinate of the string vector is larger than zero.
And if the vertical coordinate of the string vector is not zero, judging whether the vertical coordinate of the string vector is larger than zero. Determining whether the ordinate SV _ Y of the string vector is greater than zero may indicate whether SV _ Y is non-zero by encoding a syntax element.
S321: if the ordinate of the string vector is greater than zero, the ordinate of the encoded string vector is positive, and the absolute value of the ordinate of the encoded string vector is reduced by a value of one, and the absolute value of the abscissa of the encoded string vector is increased by a difference value of one from the first preset value.
If the ordinate SV _ Y of the string vector is greater than zero, the ordinate of the encoded string vector is positive and the value | SV _ Y | -1 of the absolute value of the ordinate of the encoded string vector minus one is encoded, and the difference | SV _ X | -offset1-1 of the absolute value of the abscissa of the encoded string vector from the first preset value plus one is encoded.
It should be noted that encoding the ordinate of the string vector as positive includes encoding a syntax element whose value indicates whether the ordinate of the string vector is greater than zero.
S322: and if the ordinate of the string vector is less than zero, judging whether the abscissa of the string vector is nonzero.
And if the ordinate of the string vector is less than zero, judging whether the abscissa of the string vector is nonzero. Determining whether the abscissa SV _ X of the string vector is non-zero may indicate whether SV _ X is non-zero by encoding a syntax element.
S323: if the abscissa of the string vector is non-zero, the ordinate of the encoded string vector is positive and the negativity of the abscissa, and the absolute value of the ordinate of the encoded string vector minus one and the absolute value of the abscissa of the encoded string vector minus one are encoded.
If the abscissa of the string vector is nonzero, the ordinate of the encoded string vector is positive and negative with respect to the abscissa, and the absolute value of the ordinate of the encoded string vector minus one | SV _ Y | 1 and the absolute value of the abscissa of the encoded string vector minus one | SV _ X | 1 are encoded.
It should be noted that encoding the ordinate of the string vector as positive includes encoding a syntax element whose value indicates whether the ordinate of the string vector is greater than zero. Encoding the positivity or negativity of the abscissa and ordinate of the string vector includes encoding a syntax element whose value indicates whether the abscissa of the string vector is greater than zero.
The method carries out string vector coding optimization on the common string, improves the coding mode of the string vector, and can reduce the number of coded bits under the condition of unchanged distortion, thereby improving the compression ratio of SP prediction.
The following is described in connection with two embodiments:
as shown in fig. 10, fig. 10 illustrates strings in an 8 × 8 CU. The vertical coordinate of the row where the string is located is 4, the row is an even number, the initial coordinate is (2,4), and the length of the string is 4. SV for the string is (-5,0), then the value of offset2 is equal to the string length, i.e., 4, according to the above rule.
As shown in fig. 11, fig. 11 illustrates strings in an 8 × 8 CU. The ordinate of the row in which the string is located is 4, which is an even number of rows, the start coordinate is (2,4), and the length of the string is 8. SV for the string is (-8,0), then the value of offset2 is equal to the CU width, i.e., 8, according to the above rule.
Specifically, in the AVS3 standard, in one embodiment, the syntax elements of the method are as follows:
Figure BDA0002819338890000181
Figure BDA0002819338890000191
Figure BDA0002819338890000201
Figure BDA0002819338890000211
Figure BDA0002819338890000221
the parameter iscmodeiscuscustingflag indicates whether the current string is a CU-level string or a normal string, and 1 indicates CU-level string and 0 indicates normal string.
The meaning of the parameter SvOffset _ mvy0 is identical to that of the above offset2, and the meaning of SvOffset is identical to that of the offset 1.
The method 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).
Referring to fig. 12, another embodiment of the present application provides a coding method of a string coding technique, including the following steps:
s401: and responding to the fact that the abscissa of the string vector of the current cross-row string is less than or equal to zero and greater than the negative width, and the ordinate of the string vector is less than or equal to negative one.
S402: intra-string reference is allowed for the current cross-row string.
When the current cross-row string crosses a row, the string vector of the current cross-row string is (x, y), wherein-width < x is less than or equal to 0, and when y is less than or equal to-1, the current cross-row string is allowed to carry out string internal reference. This can greatly increase the length of the string and reduce the coding consumption.
The specific implementation of the coding and decoding of the internal reference string is as follows:
when encoding, the string vector SV and the string length are encoded according to a normal encoding flow, but when decoding, in order to be beneficial to hardware implementation of a decoding end and facilitate parallel operation, the string needs to be split, and the splitting rule is that every y lines are split into one string. For example, if SV is (0, -2), the original string has 5 rows, and is divided into three strings of 2 rows, and 1 row.
Referring to fig. 13, another embodiment of the present application provides an electronic device 40, which includes a memory 41 and a processor 42 coupled to each other, where the processor 42 is configured to execute program instructions stored in the memory 41 to implement the encoding method based on the string coding technique according to any of the embodiments. In one particular implementation scenario, the electronic device 40 may include, but is not limited to: a microcomputer, a server, and the electronic device 40 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 42 is configured to control itself and the memory 41 to implement the encoding based on the string encoding technique of any of the above embodiments. Processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The Processor 42 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 42 may be commonly implemented by an integrated circuit chip.
Referring to fig. 14, a computer-readable storage medium 50 is provided according to another embodiment of the present application, and stored with program data 51, where the program data 51 is executed by a processor to implement the encoding method based on the string encoding technique according to any of the above embodiments.
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 may be implemented in the form of hardware, or may also be implemented in the 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 50. 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 50 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 50 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.

Claims (15)

1. A method for encoding based on a string coding technique, the method comprising:
judging whether the type of the current string is a CU-level string;
responding to the type of the current string as a CU level string;
acquiring the abscissa and the ordinate of the current string, and judging whether the ordinate of the current string is less than one and the abscissa of the current string is equal to zero;
if not, judging whether the ordinate of the string vector of the current string is nonzero;
if the ordinate of the string vector is zero, the difference value between the absolute value of the abscissa of the string vector and a second preset value is coded; and responding to the fact that the length of the current string is smaller than the width of the current CU block, wherein the second preset value is the length of the current string, responding to the fact that the length of the current string is larger than or equal to the width of the current CU block, the second preset value is the sum of the first preset value and one, and the first preset value is smaller than or equal to the absolute value of the abscissa of the string vector and the width of the current CU block.
2. The method according to claim 1, characterized in that it comprises:
and if the ordinate of the string vector is less than one and the abscissa of the string vector is equal to zero, increasing one by the value of the ordinate of the string vector for judgment and calculation of the ordinate of the string vector, and judging whether the ordinate of the string vector is nonzero.
3. The method according to claim 1, characterized in that it comprises:
if the vertical coordinate of the string vector is nonzero, judging whether the vertical coordinate of the string vector is larger than zero;
if the ordinate of the string vector is larger than zero, the ordinate of the encoded string vector is positive, the absolute value of the ordinate of the encoded string vector is reduced by one, and the absolute value of the abscissa of the encoded string vector is increased by one from the first preset value;
if the ordinate of the string vector is smaller than zero, judging whether the abscissa of the string vector is nonzero;
if the abscissa of the run vector is zero, encoding the ordinate of the run vector as negative and the abscissa as zero, and encoding a value obtained by adding one to the difference between the absolute value of the ordinate and the width of the current CU block.
4. The method of claim 3, wherein the method comprises:
if the abscissa of the string vector is nonzero, judging whether the abscissa of the string vector is larger than zero;
if the abscissa of the string vector is greater than zero, encoding that the ordinate of the string vector is negative and the abscissa is positive, encoding a difference between an absolute value of the ordinate of the string vector and the width of the current CU block, and encoding a value obtained by subtracting one from the absolute value of the abscissa of the string vector;
if the abscissa of the string vector is less than zero, encoding the ordinate of the string vector as negative and the abscissa as negative, encoding a value of subtracting one from the absolute value of the ordinate of the string vector, and encoding a value of subtracting one from the absolute value of the abscissa of the string vector of the current string.
5. The method according to claim 1, characterized in that it comprises:
judging whether the type of the current string is a CU-level string;
responding to the type of the current string which is not a CU-level string, wherein the type of the current string is a common string;
acquiring the abscissa and the ordinate of the current string, and judging whether the ordinate of the current string is less than one and the abscissa of the current string is equal to zero;
if not, judging whether the ordinate of the string vector of the current string is nonzero;
if the vertical coordinate of the string vector is zero, judging whether the index of the line where the starting position of the current string is located is an odd number;
if the index of the line where the starting position of the current string is not an odd number, encoding the difference value between the absolute value of the abscissa of the string vector and a second preset value; if the length of the current string is smaller than the width of the current CU block, the second preset value is the length of the current string, if the length of the current string is larger than or equal to the width of the current CU block, the second preset value is the sum of the first preset value and one, and the first preset value is smaller than the abscissa of the string vector of the current string and the width of the current CU block.
6. The method of claim 1, wherein the method comprises:
in response to the current string crossing a row, i.e., the ordinate of a pixel within the current string has two or more different values; there is no need to encode and transmit the syntax element corresponding to the unit base vector.
7. The method as recited in claim 1, wherein said responding that the type of the current string is a CU-level string comprises:
judging the type of the current string according to whether the length of the current string is equal to the number of all pixels in the current CU block;
if the length of the current string is equal to the number of all pixels in the current CU block, the type of the current string is a CU level string.
8. The method of claim 1, wherein the method comprises:
acquiring a string vector of a current string;
in response to the string vector of the current string being in a list of historical candidate motion vectors;
and performing bit calculation of the string vector of the current string by using the index of the string vector of the current string in the historical candidate motion vector list.
9. The method of claim 8, wherein the method comprises:
and calculating a rate distortion cost, wherein the rate distortion cost is the sum of the product of a preset coefficient and the bit value of the string vector of the current string and the distortion value.
10. The method of claim 8, wherein the method comprises:
in the comparison process of selecting the optimal string vector, calculating the bit length of the optimal string vector by using a first preset value; wherein the first preset value is smaller than the abscissa of the string vector of the current string and the width of the current CU block;
and in the information coding and transmission process of the optimal string vector, calculating the bit length of the optimal string vector by using the first preset value.
11. The method of claim 1, wherein the method comprises:
obtaining candidate motion vectors, wherein the candidate motion vectors comprise intra-frame motion vectors of spatial adjacent blocks of a current block, intra-frame motion vectors in a final historical candidate list, intra-frame motion vectors in a temporary historical candidate list, intra-frame motion vectors of spatial non-adjacent blocks of the current block, and preset fixed intra-frame motion vectors;
and constructing a predicted motion vector candidate list by using the candidate motion vector, wherein the candidate motion vector is used for predicting the string vector of the current string.
12. The method of claim 11, wherein the method is used for screen content scenes, natural image scenes, or hybrid scenes.
13. The method of claim 1, wherein the method comprises:
responding that the abscissa of a string vector of a current cross-row string is less than or equal to zero and greater than a negative width, and the ordinate of the string vector is less than or equal to negative one;
allowing the current cross-row string to be referenced intra-string.
14. 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 13.
15. 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 13.
CN202011419495.3A 2020-12-06 2020-12-06 Encoding method, apparatus and storage medium for string encoding technique Active CN112565760B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202011419495.3A CN112565760B (en) 2020-12-06 2020-12-06 Encoding method, apparatus and storage medium for string encoding technique
PCT/CN2021/135831 WO2022117113A1 (en) 2020-12-06 2021-12-06 Systems and methods for video encoding
EP21900135.1A EP4241447A4 (en) 2020-12-06 2021-12-06 Systems and methods for video encoding
US18/328,758 US20230319287A1 (en) 2020-12-06 2023-06-04 Systems and methods for video encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011419495.3A CN112565760B (en) 2020-12-06 2020-12-06 Encoding method, apparatus and storage medium for string encoding technique

Publications (2)

Publication Number Publication Date
CN112565760A CN112565760A (en) 2021-03-26
CN112565760B true CN112565760B (en) 2022-07-15

Family

ID=75059365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011419495.3A Active CN112565760B (en) 2020-12-06 2020-12-06 Encoding method, apparatus and storage medium for string encoding technique

Country Status (1)

Country Link
CN (1) CN112565760B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022117113A1 (en) * 2020-12-06 2022-06-09 Zhejiang Dahua Technology Co., Ltd. Systems and methods for video encoding

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130050904A (en) * 2011-11-08 2013-05-16 삼성전자주식회사 Method and apparatus for arithmetic encoding of video, and method and apparatus for arithmetic decoding of video
CN104378644A (en) * 2013-08-16 2015-02-25 上海天荷电子信息有限公司 Fixed-width variable-length pixel sample value string matching strengthened image compression method and device
CN106797473A (en) * 2014-10-01 2017-05-31 株式会社Kt Method and apparatus for processing vision signal
CN107483961A (en) * 2016-06-08 2017-12-15 上海天荷电子信息有限公司 Predict and go here and there position encoded data compression method and device using arcuate scanning string
CN110087090A (en) * 2019-05-20 2019-08-02 绍兴文理学院 Using data encoding, the coding/decoding method of mixing String matching and intra prediction
CN111586416A (en) * 2020-06-02 2020-08-25 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device
CN111866512A (en) * 2020-07-29 2020-10-30 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797468B (en) * 2014-10-06 2018-10-30 华为技术有限公司 Efficient video coding (HEVC) screen content encodes improved pallet mode in (SCC)

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130050904A (en) * 2011-11-08 2013-05-16 삼성전자주식회사 Method and apparatus for arithmetic encoding of video, and method and apparatus for arithmetic decoding of video
CN104378644A (en) * 2013-08-16 2015-02-25 上海天荷电子信息有限公司 Fixed-width variable-length pixel sample value string matching strengthened image compression method and device
CN106797473A (en) * 2014-10-01 2017-05-31 株式会社Kt Method and apparatus for processing vision signal
CN107483961A (en) * 2016-06-08 2017-12-15 上海天荷电子信息有限公司 Predict and go here and there position encoded data compression method and device using arcuate scanning string
CN110087090A (en) * 2019-05-20 2019-08-02 绍兴文理学院 Using data encoding, the coding/decoding method of mixing String matching and intra prediction
CN111586416A (en) * 2020-06-02 2020-08-25 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device
CN111866512A (en) * 2020-07-29 2020-10-30 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium

Also Published As

Publication number Publication date
CN112565760A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US11553185B2 (en) Method and apparatus for processing a video signal
CN110290388B (en) Intra-frame prediction method, video encoding method, computer device and storage device
CN112218092B (en) Encoding method, apparatus and storage medium for string encoding technique
CN105100814B (en) Image coding and decoding method and device
US9984504B2 (en) System and method for improving video encoding using content information
CN112073719B (en) String matching prediction method, device and system and computer readable storage medium
CN112055208A (en) Video coding method, video coding equipment and storage device
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
Fu et al. Efficient depth intra frame coding in 3D-HEVC by corner points
US20050259747A1 (en) Context adaptive binary arithmetic code decoder for decoding macroblock adaptive field/frame coded video data
CN112565760B (en) Encoding method, apparatus and storage medium for string encoding technique
CN110213576B (en) Video encoding method, video encoding device, electronic device, and storage medium
CN111447452A (en) Data coding method and system
CN111770334B (en) Data encoding method and device, and data decoding method and device
CN113382249B (en) Image/video encoding method, apparatus, system, and computer-readable storage medium
CN113099229B (en) Block division method, inter-frame prediction method, video coding method and related device
CN113365080B (en) Encoding and decoding method, device and storage medium for string coding technology
CN112565768A (en) Inter-frame prediction method, encoding and decoding system and computer readable storage medium
CN108668170B (en) Image information processing method and device, and storage medium
CN108668169B (en) Image information processing method and device, and storage medium
CN113347437B (en) Encoding method, encoder, decoder and storage medium based on string prediction
CN114584773A (en) Image compression device, method, electronic device, and computer-readable storage medium
CN110166774B (en) Intra-frame prediction method, video encoding method, video processing apparatus, and storage medium
CN112532974A (en) Encoding method, apparatus and storage medium for string encoding technique
US6829390B2 (en) Method and apparatus for transmitting image updates employing high compression encoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant