A coding and decoding method and device for string prediction based on multiple rotation operations

By performing multiple rotation operations and string prediction encoding on the pixel set in screen video encoding technology, the problem of inefficiency in the prior art when processing multiple rotation characteristics is solved, more efficient encoding and richer string prediction samples are achieved, and encoding efficiency is significantly improved.

CN119031140BActive Publication Date: 2025-06-24SHAOXING UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411458124.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-06-24
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing screen video encoding techniques are less efficient when processing mixed content, especially when processing multiple rotational characteristics in screen images, lack sufficient flexibility, resulting in inefficient encoding.

Method used

By performing multiple rotation operations on the pixel set of the current encoding unit, a pixel set in different directions is generated, and the rotation pixel set is serially predicted and encoded to obtain the string prediction encoding parameters. Then, the rotation operation type and string prediction encoding parameters are entropy encoded, and the results are written to the code stream, providing more flexibility to improve encoding efficiency.

Benefits of technology

Through multiple rotation operations and string prediction coding, the encoding efficiency is significantly improved, and the various rotation characteristics in the screen image can be processed more effectively, providing more string prediction samples types and quantities, and improving encoding flexibility and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031140B_ABST
    Figure CN119031140B_ABST
Patent Text Reader

Abstract

The present invention provides a string prediction encoding and decoding method and apparatus based on multiple rotation operations, relating to the technical field of data compression. The method includes: inputting a pixel set of a current coding unit; performing a rotation operation on the pixel set of the current coding unit; performing string prediction encoding on the rotated pixel set to obtain string prediction encoding parameters; performing entropy encoding on the rotation operation type and the string prediction encoding parameters, where the rotation operation type is determined by calculating the hash hit rate of the pixel sets after different rotation operations; writing the entropy encoding result into the bitstream; determining a reconstructed pixel set of the current coding unit according to the string prediction encoding parameters; and performing a corresponding inverse operation on the reconstructed pixel set to obtain the reconstructed pixel set of the current coding unit after the inverse operation. In the present invention, entropy encoding is performed on the rotation operation type and the string prediction encoding parameters, and the entropy encoding result is written into the bitstream, so that the types and quantities of provided string prediction samples are more abundant, significantly improving the encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data compression, and particularly to a string prediction coding method and device based on multiple rotation operations, a decoding method and device. Background Art

[0002] Screen video, as the video directly captured from the image display unit, is widely used in emerging fields such as remote screen control, cloud teaching, video conferencing, and the metaverse. Its content has significant diversity and hybrid characteristics. Such video not only contains traditional natural videos or images but also integrates computer-generated graphics, icons, text, and menus, etc. Efficient screen video coding technology is the key to achieving low-cost storage and real-time transmission and is also an important field of international competition. Traditional video coding technologies are less efficient in processing such hybrid content. Therefore, researchers and engineers are working on developing new coding tools to improve the coding efficiency of screen videos.

[0003] In existing screen video coding technologies, international standards such as HEVC (High Efficiency Video Coding), VVC (Versatile Video Coding) SCC extension, and AVS (Audio Video Coding Standard) second and third generation standards have optimized the coding of screen hybrid content videos. Among them, the Intra Block Copy (IBC) technology and the Intra String Copy (ISC) technology are the key technologies to improve coding efficiency. The IBC technology performs block-level copying by finding the optimal reference block within the current frame, thereby effectively processing the recurring patterns in the screen image. The ISC technology takes "strings" as the basic unit and can flexibly match pixel strings of various lengths and shapes, improving the adaptability to complex screen content.

[0004] Although the existing coding methods have made certain progress in processing screen videos, there are still deficiencies. The current ordinary string sub-pattern coding mainly includes string prediction search and parameter coding steps, but lacks sufficient flexibility in dealing with various rotation characteristics in screen images. In addition, the existing intra-string copy mode does not perform multiple rotation operations on the string prediction samples of the current coding unit, resulting in a very limited variety and quantity of the provided string prediction samples, and this limitation significantly reduces the coding efficiency. Summary of the Invention

[0005] To solve the technical problem that current general string pattern encoding mainly includes string prediction search and parameter encoding steps, but lacks sufficient flexibility when dealing with various rotation characteristics in screen images; in addition, the existing intra-frame string copy mode does not perform various rotation operations on the string prediction samples of the current coding unit, resulting in a very limited variety and quantity of provided string prediction samples, and this limitation significantly reduces the coding efficiency, the present invention provides a string prediction encoding method and apparatus based on various rotation operations.

[0006] The technical solutions provided by the embodiments of the present invention are as follows:

[0007] First aspect:

[0008] A string prediction encoding method based on various rotation operations provided by an embodiment of the present invention includes:

[0009] S101: Input a pixel set of a current coding unit;

[0010] S102: Perform a rotation operation on the pixel set of the current coding unit;

[0011] S103: Perform string prediction encoding on the rotated pixel set to obtain string prediction encoding parameters;

[0012] S104: Perform entropy encoding on the rotation operation type and the string prediction encoding parameters, where the rotation operation type is determined by calculating the hash hit rate for pixel sets after different rotation operations;

[0013] S105: Write the entropy encoding result into the code stream;

[0014] S106: Determine a reconstructed pixel set of the current coding unit according to the string prediction encoding parameters;

[0015] S107: Perform a corresponding inverse operation on the reconstructed pixel set according to the rotation operation type to obtain a reconstructed pixel set of the current coding unit after the inverse operation.

[0016] Second aspect:

[0017] A string prediction encoding apparatus based on various rotation operations provided by an embodiment of the present invention includes:

[0018] An input module, configured to input a pixel set of a current coding unit;

[0019] A rotation module, configured to perform a rotation operation on the pixel set of the current coding unit;

[0020] A first encoding module, configured to perform string prediction encoding on the rotated pixel set to obtain string prediction encoding parameters;

[0021] A second encoding module, configured to perform entropy encoding on the rotation operation type and the string prediction encoding parameters, where the rotation operation type is determined by calculating the hash hit rate for pixel sets after different rotation operations;

[0022] A writing module, configured to write the entropy encoding result into a bitstream;

[0023] A first determination module, configured to determine a reconstructed pixel set of a current coding unit according to the string prediction encoding parameters;

[0024] A first reconstruction module, configured to perform a corresponding inverse operation on the reconstructed pixel set according to the rotation operation type to obtain a reconstructed pixel set of the current coding unit after the inverse operation.

[0025] A third aspect:

[0026] A string prediction decoding method based on multiple rotation operations provided by an embodiment of the present invention includes:

[0027] S201: Obtain a bitstream;

[0028] S202: Parse the bitstream according to a decoding method corresponding to the entropy encoding, and extract the rotation operation type and the string prediction encoding parameters of the current coding unit, where the rotation operation type is determined by calculating the hash hit rate for pixel sets after different rotation operations;

[0029] S203: Determine a reconstructed pixel set of the current coding unit according to the string prediction encoding parameters;

[0030] S204: Perform an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain a reconstructed pixel set of the current coding unit after the inverse operation.

[0031] A fourth aspect:

[0032] A string prediction decoding device based on multiple rotation operations provided by an embodiment of the present invention includes:

[0033] An obtaining module, configured to obtain a bitstream;

[0034] An extraction module, configured to parse the bitstream according to a decoding method corresponding to the entropy encoding, and extract the rotation operation type and the string prediction encoding parameters of the current coding unit, where the rotation operation type is determined by calculating the hash hit rate for pixel sets after different rotation operations;

[0035] A second determination module, configured to determine a reconstructed pixel set of the current coding unit according to the string prediction encoding parameters;

[0036] A second reconstruction module, configured to perform an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain a reconstructed pixel set after the inverse operation of the current coding unit.

[0037] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:

[0038] (1) In the present invention, by performing a rotation operation on the pixel set of the current coding unit, pixel sets in different directions can be generated, providing more flexibility, so that various rotation characteristics in the screen image can be processed more effectively.

[0039] (2) In the present invention, by performing string prediction coding on the rotated pixel set to obtain string prediction coding parameters, entropy coding is performed on the rotation operation type and the string prediction coding parameters, and the entropy coding result is written into the code stream, so that the types and quantities of the provided string prediction samples are more abundant, and the coding efficiency is significantly improved. Description of the Drawings

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0041] Figure 1 It is a schematic flowchart of a string prediction coding method based on multiple rotation operations provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic structural diagram of a string prediction coding device based on multiple rotation operations provided by an embodiment of the present invention;

[0043] Figure 3 It is a schematic flowchart of a string prediction decoding method based on multiple rotation operations provided by an embodiment of the present invention;

[0044] Figure 4 It is an extended string sample schematic diagram of a current coding unit rotated clockwise by 45 degrees provided by an embodiment of the present invention;

[0045] Figure 5 It is an extended string sample schematic diagram of a current coding unit rotated counterclockwise by 45 degrees provided by an embodiment of the present invention;

[0046] Figure 6 It is a schematic structural diagram of a string prediction decoding device based on multiple rotation operations provided by an embodiment of the present invention. Detailed Embodiments

[0047] The technical solutions in the present invention will be described below with reference to the accompanying drawings.

[0048] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as an "example" in the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of the word "example" is intended to present concepts in a specific manner. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two.

[0049] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0050] Refer to the attached Figure 1 illustrates a schematic flowchart of a string prediction coding method based on multiple rotation operations provided by an embodiment of the present invention.

[0051] The embodiments of the present invention provide a string prediction coding method based on multiple rotation operations. This method can be implemented by a string prediction coding device based on multiple rotation operations. The string prediction coding device based on multiple rotation operations can be a terminal or a server. The processing flow of the string prediction coding method based on multiple rotation operations can include the following steps:

[0052] S101: Input the pixel set of the current coding unit.

[0053] S102: Perform a rotation operation on the pixel set of the current coding unit.

[0054] In a possible implementation manner, the rotation operation specifically includes:

[0055] Rotation about the horizontal central axis.

[0056] Rotation about the vertical central axis.

[0057] Clockwise rotation by 90 degrees.

[0058] Counterclockwise rotation by 90 degrees.

[0059] Rotation by 180 degrees.

[0060] Clockwise rotation by a first preset degree.

[0061] And / or, counterclockwise rotation by a second preset degree.

[0062] The value ranges of the first preset degree and the second preset degree are both (0, 90) degrees.

[0063] Among them, the rotation about the horizontal central axis is specifically:

[0064] The pixels within the coding unit are horizontally rotated with the M-th column located at the center as the central axis.

[0065] When M equals 0, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the j th row and the cuWidth - i - 1 column.

[0066] When M equals 1, for the remaining columns except the middle two columns, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the j th row and the cuWidth - i - 1 column.

[0067] For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the j th row and the cuWidth - i - 1 column.

[0068] Among them, the vertical central axis rotation is specifically as follows:

[0069] The pixels within the coding unit are vertically rotated with the M-th row located at the center as the central axis.

[0070] When M equals 0, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the cuHeight - j - 1 row and the i th column.

[0071] When M equals 1, for the remaining rows except the middle two rows, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the cuHeight - j - 1 row and the i column.

[0072] For M less than cuWidth / 2, for the remaining rows except the middle 2*M rows, the pixel value of the pixel at the j th row and the i th column within the coding unit is swapped with the pixel value of the pixel at the cuHeight - j - 1 row and the i th column.

[0073] Among them, the 90-degree clockwise rotation is specifically as follows:

[0074] The pixel value of the pixel at the i th row and the j th column within the coding unit is equal to the pixel value of the pixel at the cuheight - j - 1 row and the i column.

[0075] Rotating counterclockwise by 90 degrees specifically means:

[0076] The pixel value at the i th row and j th column within the coding unit is equal to the pixel value at the j th row and cuWidth - i - 1 column.

[0077] Rotating by 180 degrees specifically means:

[0078] The pixel value at the j th row and i th column within the coding unit is swapped with the pixel value at the cuHeight - j - 1 row and cuWidth - i - 1 column.

[0079] The specific clockwise rotation by the first preset degree is as follows:

[0080] The pixel values in the clockwise first preset degree direction within the coding unit are sequentially swapped;

[0081] The specific counterclockwise rotation by the second preset degree is as follows:

[0082] The pixel values in the counterclockwise second preset degree direction within the coding unit are sequentially swapped;

[0083] Among them, i represents the column label, and its value range is greater than or equal to 0 and less than cuWidth, where cuWidth represents the width of the coding unit, j represents the row label, and its value range is greater than or equal to 0 and less than cuHeight, where cuHeight represents the height of the coding unit.

[0084] In a possible implementation manner, when the total number of rotation operation types is 2, the two rotation operation types are specifically horizontal central axis rotation and vertical central axis rotation. Or, clockwise rotation by 90 degrees and counterclockwise rotation by 90 degrees;

[0085] When the total number of rotation operation types is 4, the four rotation operation types are specifically horizontal central axis rotation, vertical central axis rotation, clockwise rotation by 90 degrees, and counterclockwise rotation by 90 degrees.

[0086] In a possible implementation manner, the total number of rotation operation types is determined through global or local image content analysis. The specific methods of image content analysis include:

[0087] For the pixel sets after different rotation operations, establish a hash table.

[0088] Statistically analyze the hash table to obtain the hash hit rate.

[0089] Based on the hash hit rate, decide whether to enable or disable the angle rotation operation types, and count the total number of all enabled rotation operation types.

[0090] In a possible implementation, a hash table is established, specifically including:

[0091] Initialize the value range of the hash value.

[0092] Initialize the maximum number of hash chains.

[0093] Empty the nodes of each hash chain.

[0094] Divide the image into multiple blocks.

[0095] Calculate the hash value of each block according to the CRC hash value calculation method.

[0096] Update the hash chain corresponding to the hash value.

[0097] Concatenate the image coordinates where each block is located on the hash chain with the same hash value.

[0098] Among them, the calculation method of the hash hit rate is specifically as follows:

[0099] Calculate the hash value of each of the 4×4 blocks after different types of rotation operations to obtain the hash value of each block.

[0100] For the hash value of each block, count the total number of pixels with the same hash value.

[0101] Calculate the ratio of the total number of pixels with the same hash value to the total number of pixels in the entire image to obtain the hash hit rate.

[0102] S103: Perform string prediction encoding on the rotated pixel set to obtain string prediction encoding parameters.

[0103] S104: Perform entropy encoding on the rotation operation type and the string prediction encoding parameters, and the rotation operation type is determined by calculating the hash hit rate for the pixel sets after different rotation operations.

[0104] In a possible implementation, S104 specifically includes one of the following:

[0105] After encoding the string prediction parameters, encode the rotation operation type.

[0106] After encoding the rotation operation type, encode the string prediction parameters.

[0107] Or, jointly encode the rotation operation type and the string prediction parameters.

[0108] The specific method of encoding the rotation operation type is: fixed-length code, unary code, or truncated unary code.

[0109] In a possible implementation, the joint encoding of the rotation operation type and the string prediction parameter specifically includes one of the following:

[0110] The joint encoding and decoding method with the string type.

[0111] Or, the joint encoding and decoding method with the string vector.

[0112] S105: Write the entropy coding result into the bitstream.

[0113] S106: Determine the set of reconstructed pixels of the current coding unit according to the string prediction coding parameter.

[0114] S107: Perform a corresponding inverse operation on the set of reconstructed pixels according to the rotation operation type to obtain the set of reconstructed pixels after the inverse operation of the current coding unit.

[0115] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:

[0116] (1) In the present invention, by performing a rotation operation on the set of pixels of the current coding unit, pixel sets in different directions can be generated, providing more flexibility, so as to be able to more effectively process various rotation characteristics in the screen image.

[0117] (2) In the present invention, by performing string prediction coding on the rotated set of pixels to obtain string prediction coding parameters, entropy coding is performed on the rotation operation type and the string prediction coding parameters, and the entropy coding result is written into the bitstream, so that the types and quantities of the provided string prediction samples are more abundant, and the coding efficiency is significantly improved.

[0118] Refer to the attached Figure 2 illustrates a schematic structural diagram of a string prediction coding device based on multiple rotation operations provided by the present invention.

[0119] The present invention also provides a string prediction coding device 30 based on multiple rotation operations, including:

[0120] An input module 301, configured to input the set of pixels of the current coding unit;

[0121] A rotation module 302, configured to perform a rotation operation on the set of pixels of the current coding unit;

[0122] A first coding module 303, configured to perform string prediction coding on the rotated set of pixels to obtain string prediction coding parameters;

[0123] A second coding module 304, configured to perform entropy coding on the rotation operation type and the string prediction coding parameters, and the rotation operation type is determined by calculating the hash hit rate of the pixel sets after different rotation operations;

[0124] A writing module 305 for writing the entropy coding result into a bitstream;

[0125] A first determination module 306 for determining a set of reconstructed pixels of a current coding unit according to string prediction coding parameters;

[0126] A first reconstruction module 307 for performing a corresponding inverse operation on the set of reconstructed pixels according to the rotation operation type to obtain a set of reconstructed pixels of the current coding unit after the inverse operation.

[0127] A string prediction coding device 30 based on multiple rotation operations provided by the present invention can implement various decoding methods of screen content based on a semantic pixel library in the above method embodiments and can obtain the same technical effects. To avoid repetition, the present invention will not be elaborated herein.

[0128] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:

[0129] (1) In the present invention, by performing a rotation operation on the set of pixels of the current coding unit, pixel sets in different directions can be generated, providing more flexibility, so as to be able to more effectively process various rotation characteristics in a screen image.

[0130] (2) In the present invention, by performing string prediction coding on the rotated set of pixels to obtain string prediction coding parameters, entropy coding is performed on the rotation operation type and the string prediction coding parameters, and the entropy coding result is written into the bitstream, so that the types and quantities of provided string prediction samples are more abundant, significantly improving the coding efficiency.

[0131] Refer to the attached drawings of the specification Figure 3 which shows a schematic flowchart of a string prediction decoding method based on multiple rotation operations provided by an embodiment of the present invention.

[0132] Refer to the attached drawings of the specification Figure 4 which shows an extended string sample schematic diagram of a current coding unit rotated clockwise by 45 degrees provided by an embodiment of the present invention.

[0133] Refer to the attached drawings of the specification Figure 5 which shows an extended string sample schematic diagram of a current coding unit rotated counterclockwise by 45 degrees provided by an embodiment of the present invention.

[0134] Embodiments of the present invention provide a string prediction decoding method based on multiple rotation operations. This method can be implemented by a string prediction decoding device based on multiple rotation operations. The string prediction decoding device based on multiple rotation operations can be a terminal or a server. The processing flow of the string prediction decoding method based on multiple rotation operations can include the following steps:

[0135] S201: Obtain a bitstream.

[0136] S202: Parse the bitstream according to the decoding method corresponding to entropy coding, and extract the rotation operation type and string prediction coding parameters of the current coding unit. The rotation operation type is determined by calculating the hash hit rate for the pixel sets after different rotation operations.

[0137] In a possible implementation, the rotation operation specifically includes:

[0138] Horizontal central axis rotation.

[0139] Vertical central axis rotation.

[0140] Rotate 90 degrees clockwise.

[0141] Rotate 90 degrees counterclockwise.

[0142] Rotate 180 degrees.

[0143] Rotate clockwise by a first preset degree.

[0144] And / or rotate counterclockwise by a second preset degree.

[0145] The value ranges of both the first preset degree and the second preset degree are (0, 90) degrees.

[0146] Among them, the horizontal central axis rotation is specifically:

[0147] The pixels in the coding unit are horizontally rotated with the M-th column in the center as the central axis.

[0148] When M is equal to 0, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column.

[0149] When M is equal to 1, for the remaining columns except the middle two columns, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column.

[0150] For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column.

[0151] Among them, the vertical central axis rotation is specifically:

[0152] The pixels in the coding unit are vertically rotated with the M-th row in the center as the central axis.

[0153] When M is equal to 0, the pixel value at the j th row and the i th column within the coding unit is swapped with the pixel value at the (cuHeight - j - 1)th row and the i th column.

[0154] When M is equal to 1, for the remaining rows except the middle two rows, the pixel value at the j th row and the i th column within the coding unit is swapped with the pixel value at the (cuHeight - j - 1)th row and the i-th column.

[0155] For M less than cuWidth / 2, for the remaining rows except the middle 2 * M rows, the pixel value at the j th row and the i th column within the coding unit is swapped with the pixel value at the (cuHeight - j - 1)th row and the i th column.

[0156] Among them, a 90-degree clockwise rotation is specifically:

[0157] The pixel value at the i th row and the j th column within the coding unit is equal to the pixel value at the (cuheight - j - 1)th row and the i-th column.

[0158] A 90-degree counterclockwise rotation is specifically:

[0159] The pixel value at the i th row and the j th column is equal to the pixel value at the j th row and the (cuWidth - i - 1)th column.

[0160] A 180-degree rotation is specifically:

[0161] The pixel value at the j th row and the i th column within the coding unit is swapped with the pixel value at the (cuHeight - j - 1)th row and the (cuWidth - i - 1)th column.

[0162] A clockwise rotation of the first preset degree is specifically:

[0163] The pixel values in the clockwise first preset degree direction within the coding unit are sequentially swapped.

[0164] For example, in the clockwise first preset degree direction within the coding unit, it is a process of swapping the pixel values in the clockwise first preset degree direction of two adjacent rows. The process specifically includes:

[0165] Set the swap offset Among them, Trepresents the permutation offset, and ceil represents rounding up. represents the first preset degree;

[0166] Starting from the j th row, for the j th row and the j th + 1 row, perform the following operations:

[0167] Step 1: For the T th column that is greater than i -1 and less than cuWidth, according to the permutation offset, permute the pixel value of the j th row and the i th column in the coding unit with the pixel value of the j th + 1 row and the i - T th column;

[0168] Step 2: j is equal to j +2, execute Step 3;

[0169] Step 3: If j is less than cuHeight, repeat Step 1.

[0170] The counterclockwise rotation of the second preset degree is specifically:

[0171] The pixel values in the counterclockwise second preset degree direction within the coding unit are permuted in sequence.

[0172] For example, in the counterclockwise second preset degree direction within the coding unit, it is a process of permuting the pixel values in the counterclockwise second preset degree direction of two adjacent rows. The specific process includes:

[0173] Set the permutation offset where T represents the permutation offset, and ceil represents rounding up. represents the second preset degree;

[0174] Starting from the j th row, for the j th row and the j th + 1 row, perform the following operations:

[0175] Step 1: For the i th column that is greater than or equal to 0 and less than cuWidth - T, according to the permutation offset, permute the pixel value of the j th row and the i th column with the pixel value of the j th + 1 row and the i + T th column;

[0176] Step 2:j Equal to j +2, execute Step 3;

[0177] Step 3: If j is less than cuHeight, repeat Step 1.

[0178] Optionally, the process of pixel value permutation in the clockwise 45-degree direction within the coding unit is as follows:

[0179] Set the permutation offset T = 1;

[0180] Starting from the j row, for the j row and the j +1 row, perform the following operations:

[0181] For the i column greater than 0 and less than cuWidth, the pixel value of the j row and the i column is permuted with the pixel value of the j +1 row and the i -1 column;

[0182] Step 2: j Equal to j +2, execute Step 3;

[0183] Step 3: If j is less than cuHeight, repeat Step 1.

[0184] Optionally, the process of pixel value permutation in the counterclockwise 45-degree direction within the coding unit is as follows:

[0185] Set the permutation offset T = 1;

[0186] Starting from the j row, for the j row and the j +1 row, perform the following operations:

[0187] For the i column greater than or equal to 0 and less than cuWidth, the pixel value of the j row and the i column is permuted with the pixel value of the j +1 row and the i +1 column;

[0188] Step 2: j Equal to j +2, execute Step 3;

[0189] Step 3: If j is less than cuHeight, repeat Step 1.

[0190] Among them, i represents the column label, and its value range is greater than or equal to 0 and less than cuWidth. cuWidth represents the width of the coding unit. j represents the row label, and its value range is greater than or equal to 0 and less than cuHeight. cuHeight represents the height of the coding unit.

[0191] In a possible implementation manner, when the total number of rotation operation types is 2, the two rotation operation types are specifically rotation around the horizontal central axis and rotation around the vertical central axis. Or, clockwise rotation by 90 degrees and counterclockwise rotation by 90 degrees.

[0192] When the total number of rotation operation types is 4, the four rotation operation types are specifically rotation around the horizontal central axis, rotation around the vertical central axis, clockwise rotation by 90 degrees, and counterclockwise rotation by 90 degrees.

[0193] Optionally, when the total number of rotation operation types is equal to 3, the three rotation operations are any 3 selected from rotation around the horizontal central axis, rotation around the vertical central axis, rotation by 180 degrees; or clockwise rotation by 90 degrees, counterclockwise rotation by 90 degrees, and rotation by 180 degrees.

[0194] When the total number of rotation operation types is equal to 5, the five rotation operations are rotation around the horizontal central axis, rotation around the vertical central axis, clockwise rotation by 90 degrees, counterclockwise rotation by 90 degrees, and rotation by 180 degrees.

[0195] It should be noted that the rotation around the horizontal central axis and the rotation around the vertical central axis are rotations with the 0th column in the center as the central axis.

[0196] That is, the rotation around the horizontal central axis is the replacement of the pixel value of the i-th row and the j-th column in the coding unit with the pixel value of the i-th row and the cuWidth - i - 1-th column; the rotation around the vertical central axis is the replacement of the pixel value of the j-th row and the i-th column in the coding unit with the pixel value of the cuHeight - j - 1-th row and the i-th column. j row i column j and the pixel value of the i-th row and the cuWidth - i - 1-th column; the rotation around the vertical central axis is the replacement of the pixel value of the j-th row and the i-th column in the coding unit with the pixel value of the cuHeight - j - 1-th row and the i-th column. j row i column i and the pixel value of the cuHeight - j - 1-th row and the i-th column.

[0197] In the present invention, by reasonably selecting the rotation operation type, important features and details in the image can be better retained, and visual distortion introduced due to mismatched rotation operations can be reduced. At the same time, different image contents and structures have different adaptabilities to rotation operations. Through global or local image content analysis, the most suitable rotation operation type can be selected for specific image content, making the compression and reconstruction effects more flexible and accurate.

[0198] In a possible implementation, the total number of rotation operation types is determined through global or local image content analysis. The specific methods of image content analysis include:

[0199] For the pixel sets after different rotation operations, establish a hash table.

[0200] Statistically analyze the hash table to obtain the hash hit rate.

[0201] Based on the hash hit rate, decide whether to turn on or off the angle rotation operation type, and count the total number of all turned-on rotation operation types.

[0202] In a possible implementation, establishing a hash table specifically includes:

[0203] Among them, a hash table (Hash Table) is a data structure used to achieve efficient data storage and retrieval. It maps keys to a location in the table through a hash function, enabling fast data access in constant time.

[0204] Initialize the value range of the hash value.

[0205] Initialize the maximum number of hash chains.

[0206] Empty the hash chain.

[0207] Divide the image into multiple blocks.

[0208] Calculate the hash value of each block according to the CRC hash value calculation method.

[0209] Update the hash chain corresponding to the hash value.

[0210] Concatenate the image coordinates where each block is located on the hash chain with the same hash value.

[0211] Among them, the CRC (Cyclic Redundancy Check) hash value calculation method is a commonly used data verification technology, widely used in error detection and data integrity verification. CRC can detect errors that occur during data transmission or storage, ensuring the accuracy of the data.

[0212] Among them, a hash chain (Hash Chain) is a data structure based on a hash table, used to solve collision problems in the hash table and effectively store and retrieve data in the hash table.

[0213] Specifically, the range of the initialized hash value is M, the maximum number of initialized hash chains is M, the nodes of each chain are empty, the entire (frame) image is divided into 4x4 blocks, and for each component in each divided block, the hash value is calculated according to the CRC hash value calculation method to obtain the hash value of the block, the hash chain corresponding to the hash value is updated, and the image coordinates where the block is located are concatenated on the hash chain where the same hash value is located.

[0214] Among them, the calculation method of the hash hit rate is specifically as follows:

[0215] Calculate the hash values of the 4×4 blocks after different types of rotation operations respectively to obtain the hash value of each block.

[0216] For the hash value of each block, count the total number of pixels with the same hash value.

[0217] Calculate the ratio of the total number of pixels with the same hash value to the total number of pixels in the entire image to obtain the hash hit rate.

[0218] Among them, the hash hit rate is an important indicator to measure the performance of the hash table, reflecting the proportion of the hash table successfully finding the required data in actual operations. It is often used to evaluate the effectiveness of the hash table in data storage and retrieval. Understanding the hash hit rate can help optimize the design of the hash table and improve data processing efficiency.

[0219] Specifically, calculate the hash values of the 4×4 blocks after different types of rotation operations respectively to obtain the hash value of each block. For the hash value of each block, count the total number of pixels T with the same hash value, and the hash hit rate is the ratio of T to the total number of pixels in the entire image.

[0220] In the present invention, by establishing a hash table for the pixel sets after different rotation operations and calculating the hash hit rate, the effectiveness of each rotation operation can be evaluated. At the same time, through the analysis of the hash hit rate, it is possible to determine which rotation operation can best retain the structural features of the image content, so that more useful image information can be retained during the compression process, ensuring that the quality of the decoded image is closer to the original image.

[0221] In summary, by comprehensively considering the effects of rotation operation types and using the analysis of the hash table and the hash hit rate, it helps to select the optimal rotation operation, thereby improving the efficiency of data compression and recovery. At the same time, by reducing redundancy, improving matching accuracy, and optimizing the calculation process, the overall performance of image and video decoding is improved.

[0222] In a possible implementation manner, S202 specifically includes one of the following:

[0223] After decoding the string prediction parameters, decode the rotation operation type.

[0224] After decoding the rotation operation type, decode the string prediction parameters.

[0225] Or, the rotation operation type and the string prediction parameters are jointly decoded.

[0226] The specific method for decoding the rotation operation type is: fixed-length code, unary code or truncated unary code.

[0227] In the present invention, the implementation manner of entropy coding improves the decoding efficiency by optimizing the decoding method and order of data, and can adapt to different data processing scenarios.

[0228] In a possible implementation manner, the joint decoding of the rotation operation type and the string prediction parameters specifically includes one of the following:

[0229] The joint encoding and decoding method with the string type.

[0230] Or, the joint encoding and decoding method with the string vector.

[0231] In the present invention, by jointly decoding by combining the rotation operation type and the string prediction coding parameters, the redundancy of data in the encoding process can be reduced. The core goal of image or video compression is to minimize the bitstream size as much as possible, and by optimizing the selection of the rotation operation and the string prediction coding, the image data can be represented more efficiently. This way reduces unnecessary encoding operations while maximizing the preservation of the image quality, thereby improving the overall compression efficiency.

[0232] S203: Determine the reconstructed pixel set of the current coding unit according to the string prediction coding parameters.

[0233] Among them, the reconstructed pixel set (Reconstructed Pixel Set) is a key concept in the process of image or video decoding, which involves decoding and reconstructing the pixel data in the original image or video frame from the compressed bitstream. Specifically, the reconstructed pixel set refers to the set of pixel values restored from the compressed image / video data through the decoding process, and these pixels can approximately or completely restore the original image information.

[0234] In the present invention, through the decoding of the string prediction coding parameters, predicted pixel values can be generated at the decoder end, and only a small amount of prediction error information needs to be transmitted. The string prediction effectively reduces the redundant information in the bitstream and reduces the file size, thereby greatly improving the compression efficiency. At the same time, the reconstructed pixel set uses the string prediction coding parameters to more accurately predict the pixel information of the current coding unit, greatly reducing the prediction error, making the reconstructed pixel set closer to the original image, and thus obtaining a higher image quality after decoding.

[0235] S204: Perform an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain the reconstructed pixel set after the inverse operation of the current coding unit.

[0236] In the present invention, the inverse operation of the rotation operation is a key step in image decoding. By performing the correct inverse operation, it is ensured that the decoded pixel arrangement is consistent with the original image, which can significantly improve the accuracy and quality of the decoded image. At the same time, the rotation operation itself is a spatial transformation technique that can optimize image prediction and compression. During the decoding process, applying the inverse rotation operation is equivalent to restoring these rotational changes during decompression, ensuring that the spatial transformation during the prediction and compression processes is correctly restored. Therefore, this inverse operation can not only restore the original image but also improve the overall efficiency of the rotation process.

[0237] A string prediction decoding method based on multiple rotation operations provided by the present invention is the inverse process of the above encoding method embodiment. To avoid repetition, the present invention will not elaborate further.

[0238] The beneficial effects brought by the technical solutions provided by the embodiments of the present invention at least include:

[0239] (1) In the present invention, by parsing the code stream according to the decoding method corresponding to entropy coding and extracting the rotation operation type and string prediction coding parameters of the current coding unit, the rotation operation type and string prediction coding parameters can be efficiently extracted, improving the decoding efficiency.

[0240] (2) In the present invention, according to the string prediction coding parameters, the reconstructed pixel set of the current coding unit is determined, and an inverse operation corresponding to the rotation operation type is performed on the reconstructed pixel set to obtain the reconstructed pixel set after the inverse operation of the current coding unit, ensuring that the data is completely restored to the state before encoding after decoding, and effectively avoiding distortion and error recovery.

[0241] Refer to the attached Figure 6 illustrates a schematic structural diagram of a string prediction decoding device based on multiple rotation operations provided by the present invention.

[0242] The present invention also provides a string prediction decoding device 40 based on multiple rotation operations, including:

[0243] An acquisition module 401, configured to acquire a code stream;

[0244] An extraction module 402, configured to parse the code stream according to the decoding method corresponding to entropy coding, and extract the rotation operation type and string prediction coding parameters of the current coding unit. The rotation operation type is determined by calculating the hash hit rate for the pixel sets after different rotation operations;

[0245] The second determination module 403 is configured to determine a set of reconstructed pixels of the current coding unit according to the prediction coding parameters of the string.

[0246] The second reconstruction module 404 is configured to perform an inverse operation corresponding to the rotation operation type on the set of reconstructed pixels to obtain a set of reconstructed pixels of the current coding unit after the inverse operation.

[0247] In a possible implementation manner, the rotation operation specifically includes:

[0248] Rotation about the horizontal central axis;

[0249] Rotation about the vertical central axis;

[0250] Clockwise rotation by 90 degrees;

[0251] Counterclockwise rotation by 90 degrees;

[0252] Rotation by 180 degrees;

[0253] Clockwise rotation by a first preset degree;

[0254] And / or, counterclockwise rotation by a second preset degree;

[0255] The value ranges of the first preset degree and the second preset degree are both (0, 90) degrees;

[0256] Wherein, the rotation about the horizontal central axis is specifically:

[0257] The pixels in the coding unit are horizontally rotated with the M-th column located at the center as the central axis;

[0258] When M is equal to 0, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column;

[0259] When M is equal to 1, for the remaining columns except the middle two columns, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column;

[0260] For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the pixel value of the pixel at the j -th row and the i -th column in the coding unit is replaced with the pixel value of the pixel at the j -th row and the cuWidth - i - 1-th column;

[0261] Wherein, the rotation about the vertical central axis is specifically:

[0262] The pixels within the coding unit are vertically rotated with the M-th row located at the center as the central axis;

[0263] When M is equal to 0, the pixel value of the pixel at the j -th row and the i -th column within the coding unit is permuted with the pixel value of the pixel at the (cuHeight - j - 1)-th row and the i -th column;

[0264] When M is equal to 1, for the remaining rows except the middle two rows, the pixel value of the pixel at the j -th row and the i -th column within the coding unit is permuted with the pixel value of the pixel at the (cuHeight - j - 1)-th row and the i-th column;

[0265] For M less than cuWidth / 2, for the remaining rows except the middle 2 * M rows, the pixel value of the pixel at the j -th row and the i -th column within the coding unit is permuted with the pixel value of the pixel at the (cuHeight - j - 1)-th row and the i -th column;

[0266] Among them, the specific 90-degree clockwise rotation is as follows:

[0267] The pixel value of the pixel at the i -th row and the j -th column within the coding unit is equal to the pixel value of the pixel at the (cuheight - j - 1)-th row and the i-th column;

[0268] The specific 90-degree counterclockwise rotation is as follows:

[0269] The pixel value of the pixel at the i -th row and the j -th column within the coding unit is equal to the pixel value of the pixel at the j -th row and the (cuWidth - i - 1)-th column;

[0270] The specific 180-degree rotation is as follows:

[0271] The pixel value of the pixel at the j -th row and the i -th column within the coding unit is permuted with the pixel value of the pixel at the (cuHeight - j - 1)-th row and the (cuWidth - i - 1)-th column;

[0272] The specific clockwise rotation of the first preset degree is as follows:

[0273] The pixel values in the clockwise first preset degree direction within the coding unit are permuted in sequence;

[0274] The specific counterclockwise rotation of the second preset degree is as follows:

[0275] The pixel values in the encoding unit are sequentially replaced in the counterclockwise direction of the second preset degree;

[0276] Among them, i represents the column label, and the value range is greater than or equal to 0 and less than cuWidth, where cuWidth represents the width of the encoding unit. j represents the row label, and the value range is greater than or equal to 0 and less than cuHeight, where cuHeight represents the height of the encoding unit.

[0277] In a possible implementation manner, when the total number of rotation operation types is 2, the two rotation operation types are specifically rotation around the horizontal central axis and rotation around the vertical central axis; or, clockwise rotation by 90 degrees and counterclockwise rotation by 90 degrees.

[0278] When the total number of rotation operation types is 4, the four rotation operation types are specifically rotation around the horizontal central axis, rotation around the vertical central axis, clockwise rotation by 90 degrees, and counterclockwise rotation by 90 degrees.

[0279] In a possible implementation manner, the total number of rotation operation types is determined through global or local image content analysis. The specific methods of image content analysis include:

[0280] For the pixel sets after different rotation operations, a hash table is established;

[0281] The hash table is statistically analyzed to obtain the hash hit rate;

[0282] Based on the hash hit rate, it is determined whether to enable or disable the angle rotation operation type, and the total number of all enabled rotation operation types is statistically analyzed.

[0283] In a possible implementation manner, establishing a hash table specifically includes:

[0284] Initializing the hash value range;

[0285] Initializing the maximum number of hash chains;

[0286] Clearing the hash chain;

[0287] Dividing the image into multiple blocks;

[0288] Calculating the hash value of each block according to the CRC hash value calculation method;

[0289] Updating the hash chain corresponding to the hash value;

[0290] Concatenating the image coordinates where each block is located on the hash chain with the same hash value;

[0291] Among them, the calculation method of the hash hit rate is specifically:

[0292] Calculate the hash values of the 4×4 blocks respectively after different types of rotation operations to obtain the hash values of each block;

[0293] For the hash value of each block, count the total number of pixels with the same hash value;

[0294] Calculate the ratio of the total number of pixels with the same hash value to the total number of pixels in the entire image to obtain the hash hit rate.

[0295] In a possible implementation manner, the extraction module is used for one of the following:

[0296] After decoding the string prediction parameters, decode the rotation operation type;

[0297] After decoding the rotation operation type, decode the string prediction parameters;

[0298] Or, the rotation operation type and the string prediction parameters are jointly decoded;

[0299] The specific manner of decoding the rotation operation type is: fixed-length code, unary code or truncated unary code.

[0300] In a possible implementation manner, the joint decoding of the rotation operation type and the string prediction parameters specifically includes one of the following:

[0301] Joint encoding and decoding method with the string type;

[0302] Or, joint encoding and decoding method with the string vector.

[0303] A string prediction decoding device 40 based on multiple rotation operations provided by the present invention can implement various string prediction decoding methods in the above method embodiments and can obtain the same technical effects. To avoid repetition, the present invention will not be elaborated herein.

[0304] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:

[0305] (1) In the present invention, by parsing the code stream according to the decoding method corresponding to entropy encoding and extracting the rotation operation type and the string prediction coding parameters of the current coding unit, the rotation operation type and the string prediction coding parameters can be efficiently extracted, improving the decoding efficiency.

[0306] (2) In the present invention, according to the string prediction coding parameters, determine the reconstructed pixel set of the current coding unit, and perform an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain the reconstructed pixel set after the inverse operation of the current coding unit, ensuring that the data is completely restored to the state before encoding after decoding, and effectively avoiding distortion and error recovery.

[0307] As described above, this is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0308] The following points need to be explained:

[0309] (1) The attached drawings of the embodiments of the present invention only relate to the structures involved in the embodiments of the present invention, and other structures can refer to the general design.

[0310] (2) For clarity, in the attached drawings used to describe the embodiments of the present invention, the thickness of the layer or region is enlarged or reduced, that is, these drawings are not drawn according to the actual proportion. It can be understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element can be "directly" on or under the other element or there can be an intermediate element.

[0311] (3) Without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.

[0312] As above, this is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A string prediction coding method based on multiple rotation operations, characterized in that: include: S101: Input a pixel set of a current coding unit; S102: performing a rotation operation on the pixel set of the current coding unit; S103: performing string prediction coding on the rotated pixel set to obtain string prediction coding parameters; S104: performing entropy coding on the rotation operation type and the string prediction coding parameter, wherein the rotation operation type is determined by calculating a hash hit rate of a pixel set after different rotation operations; S105: writing the entropy coding result into the bit stream; The calculation method of the hash hit rate is as follows: the hash values ​​of the 4×4 blocks after different types of rotation operations are calculated respectively to obtain the hash value of each block; for the hash value of each block, the total number of pixels with the same hash value is counted; the ratio of the total number of pixels with the same hash value to the total number of pixels of the entire image is calculated to obtain the hash hit rate; The rotation operation specifically includes: Rotation around horizontal central axis; Rotation vertical to the central axis; Rotate 90 degrees clockwise; Rotate 90 degrees counterclockwise; Rotate 180 degrees; Rotate clockwise a first preset degree; and / or, rotating counterclockwise by a second preset degree; The interval range of the first preset degree and the second preset degree is (0, 90) degrees; The horizontal central axis rotation is specifically: The pixels in the coding unit are horizontally rotated with the Mth column located in the center as the central axis; When M is equal to 0, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; When M is equal to 1, for the remaining columns except the middle two columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; The vertical central axis rotation is specifically: The pixels in the coding unit are vertically rotated around the central axis of the Mth row located at the center; When M is equal to 0, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; When M is equal to 1, for the remaining rows except the middle two rows, the first j Line i The pixel value of the column is replaced with the pixel value of the i-th column in the cuHeight-j-1th row; For M less than cuWidth / 2, for the remaining rows except the middle 2*M rows, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; The clockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to the pixel value of the cuheight-j-1th row and the i-th column; The counterclockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to j The pixel value of the row and column cuWidth-i-1; The rotation of 180 degrees is specifically: The coding unit j Line i The pixel value of the column is replaced with the pixel value of the cuHeight-j-1th row and the cuWidth-i-1th column; The first preset degree of clockwise rotation is specifically: The pixel values ​​in the coding unit in a clockwise direction of a first preset degree are replaced in sequence; The second preset degree of counterclockwise rotation is specifically: The pixel values ​​in the coding unit in a second preset counterclockwise direction are replaced in sequence; in, i Indicates the column number, the value range is greater than or equal to 0 and less than cuWidth. cuWidth indicates the width of the coding unit. j Indicates the row number. The value range is greater than or equal to 0 and less than cuHeight. cuHeight indicates the height of the coding unit.

2. A string prediction encoding device based on multiple rotation operations, characterized in that: include: An input module, used for inputting a pixel set of a current coding unit; A rotation module, used to perform a rotation operation on the pixel set of the current coding unit; A first encoding module, used for performing string prediction encoding on the rotated pixel set to obtain string prediction encoding parameters; A second encoding module is used to perform entropy encoding on the rotation operation type and the string prediction encoding parameter, wherein the rotation operation type is determined by calculating the hash hit rate of the pixel set after different rotation operations; A writing module is used to write the entropy coding result into the bit stream; The calculation method of the hash hit rate is as follows: the hash values ​​of the 4×4 blocks after different types of rotation operations are calculated respectively to obtain the hash value of each block; for the hash value of each block, the total number of pixels with the same hash value is counted; the ratio of the total number of pixels with the same hash value to the total number of pixels of the entire image is calculated to obtain the hash hit rate; The rotation operation specifically includes: Rotation around horizontal central axis; Rotation vertical to the central axis; Rotate 90 degrees clockwise; Rotate 90 degrees counterclockwise; Rotate 180 degrees; Rotate clockwise a first preset degree; and / or, rotating counterclockwise by a second preset degree; The interval range of the first preset degree and the second preset degree is (0, 90) degrees; The horizontal central axis rotation is specifically: The pixels in the coding unit are horizontally rotated with the Mth column located in the center as the central axis; When M is equal to 0, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; When M is equal to 1, for the remaining columns except the middle two columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; The vertical central axis rotation is specifically: The pixels in the coding unit are vertically rotated around the central axis of the Mth row located at the center; When M is equal to 0, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; When M is equal to 1, for the remaining rows except the middle two rows, the first j Line i The pixel value of the column is replaced with the pixel value of the i-th column in the cuHeight-j-1th row; For M less than cuWidth / 2, for the remaining rows except the middle 2*M rows, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; The clockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to the pixel value of the cuheight-j-1th row and the i-th column; The counterclockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to j The pixel value of the row and column cuWidth-i-1; The rotation of 180 degrees is specifically: The coding unit j Line i The pixel value of the column is replaced with the pixel value of the cuHeight-j-1th row and the cuWidth-i-1th column; The first preset degree of clockwise rotation is specifically: The pixel values ​​in the coding unit in a clockwise direction of a first preset degree are replaced in sequence; The second preset degree of counterclockwise rotation is specifically: The pixel values ​​in the coding unit in a second preset counterclockwise direction are replaced in sequence; in, i Indicates the column number, the value range is greater than or equal to 0 and less than cuWidth. cuWidth indicates the width of the coding unit. j Indicates the row number. The value range is greater than or equal to 0 and less than cuHeight. cuHeight indicates the height of the coding unit.

3. A string prediction decoding method based on multiple rotation operations, characterized in that: include: S201: Obtain code stream; S202: parsing the bitstream according to a decoding method corresponding to entropy coding, extracting a rotation operation type and a string prediction coding parameter of a current coding unit, wherein the rotation operation type is determined by calculating a hash hit rate of a pixel set after different rotation operations; S203: Determine a reconstructed pixel set of a current coding unit according to the string prediction coding parameter; S204: performing an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain a reconstructed pixel set after the inverse operation of the current coding unit; The calculation method of the hash hit rate is as follows: the hash values ​​of the 4×4 blocks after different types of rotation operations are calculated respectively to obtain the hash value of each block; for the hash value of each block, the total number of pixels with the same hash value is counted; the ratio of the total number of pixels with the same hash value to the total number of pixels of the entire image is calculated to obtain the hash hit rate; The rotation operation specifically includes: Rotation around horizontal central axis; Rotation vertical to the central axis; Rotate 90 degrees clockwise; Rotate 90 degrees counterclockwise; Rotate 180 degrees; Rotate clockwise a first preset degree; and / or, rotating counterclockwise by a second preset degree; The interval range of the first preset degree and the second preset degree is (0, 90) degrees; The horizontal central axis rotation is specifically: The pixels in the coding unit are horizontally rotated with the Mth column located in the center as the central axis; When M is equal to 0, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; When M is equal to 1, for the remaining columns except the middle two columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; The vertical central axis rotation is specifically: The pixels in the coding unit are vertically rotated around the central axis of the Mth row located at the center; When M is equal to 0, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; When M is equal to 1, for the remaining rows except the middle two rows, the first j Line i The pixel value of the column is replaced with the pixel value of the i-th column in the cuHeight-j-1th row; For M less than cuWidth / 2, for the remaining rows except the middle 2*M rows, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; The clockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to the pixel value of the cuheight-j-1th row and the i-th column; The counterclockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to j The pixel value of the row and column cuWidth-i-1; The rotation of 180 degrees is specifically: The coding unit j Line i The pixel value of the column is replaced with the pixel value of the cuHeight-j-1th row and the cuWidth-i-1th column; The first preset degree of clockwise rotation is specifically: The pixel values ​​in the coding unit in a clockwise direction of a first preset degree are replaced in sequence; The second preset degree of counterclockwise rotation is specifically: The pixel values ​​in the coding unit in a second preset counterclockwise direction are replaced in sequence; in, i Indicates the column number, the value range is greater than or equal to 0 and less than cuWidth. cuWidth indicates the width of the coding unit. j Indicates the row number. The value range is greater than or equal to 0 and less than cuHeight. cuHeight indicates the height of the coding unit.

4. The string prediction decoding method based on multiple rotation operations according to claim 3, characterized in that: When the total number of rotation operation types is 2, the two rotation operation types are specifically horizontal central axis rotation and vertical central axis rotation; or, clockwise rotation of 90 degrees and counterclockwise rotation of 90 degrees; When the total number of rotation operation types is 4, the four rotation operation types are specifically horizontal central axis rotation, vertical central axis rotation, clockwise rotation of 90 degrees, and counterclockwise rotation of 90 degrees.

5. The string prediction decoding method based on multiple rotation operations according to claim 3, characterized in that: The total number of rotation operation types is determined by global or local image content analysis, and the specific method of image content analysis includes: For pixel sets after different rotation operations, a hash table is established; Counting the hash table to obtain a hash hit rate; According to the hash hit rate, it is determined whether to open or close the angle rotation operation type, and the total number of all opened rotation operation types is counted.

6. The string prediction decoding method based on multiple rotation operations according to claim 5, characterized in that: The establishment of the hash table specifically includes: Initialize the hash value range; The maximum number of initialized hash chains; Clear the hash chain; Divide the image into multiple blocks; Calculate the hash value of each block according to the CRC hash value calculation method; Update the hash chain corresponding to the hash value; Connect the image coordinates of each block in series on a hash chain with the same hash value; The calculation method of the hash hit rate is specifically as follows: Calculate the hash values ​​of the 4×4 blocks after different types of rotation operations to obtain the hash value of each block; For each block’s hash value, count the total number of pixels with the same hash value; The ratio of the total number of pixels with the same hash value to the total number of pixels in the entire image is calculated to obtain the hash hit rate.

7. The string prediction decoding method based on multiple rotation operations according to claim 3, characterized in that: The S202 specifically includes one of the following: After decoding the string prediction parameters, decode the rotation operation type; After decoding the rotation operation type, decode the string prediction parameters; Or, the rotation operation type is jointly decoded with the string prediction parameter; The specific mode of the decoding rotation operation type is: fixed-length code, unary code or truncated unary code.

8. The string prediction decoding method based on multiple rotation operations according to claim 7, characterized in that: The rotation operation type and the string prediction parameter joint decoding specifically include one of the following: Combined encoding and decoding method with string type; Alternatively, a string-vector joint encoding and decoding method may be used.

9. A string prediction decoding device based on multiple rotation operations, characterized in that: include: Acquisition module, used to obtain code stream; An extraction module, used to parse the bit stream according to a decoding method corresponding to entropy coding, and extract the rotation operation type and string prediction coding parameters of the current coding unit, wherein the rotation operation type is determined by calculating a hash hit rate of a pixel set after different rotation operations; A second determination module, configured to determine a reconstructed pixel set of a current coding unit according to the string prediction coding parameter; A second reconstruction module, configured to perform an inverse operation corresponding to the rotation operation type on the reconstructed pixel set to obtain a reconstructed pixel set after the inverse operation of the current coding unit; The calculation method of the hash hit rate is as follows: the hash values ​​of the 4×4 blocks after different types of rotation operations are calculated respectively to obtain the hash value of each block; for the hash value of each block, the total number of pixels with the same hash value is counted; the ratio of the total number of pixels with the same hash value to the total number of pixels of the entire image is calculated to obtain the hash hit rate; The rotation operation specifically includes: Rotation around horizontal central axis; Rotation vertical to the central axis; Rotate 90 degrees clockwise; Rotate 90 degrees counterclockwise; Rotate 180 degrees; Rotate clockwise a first preset degree; and / or, rotating counterclockwise by a second preset degree; The interval range of the first preset degree and the second preset degree is (0, 90) degrees; The horizontal central axis rotation is specifically: The pixels in the coding unit are horizontally rotated with the Mth column located in the center as the central axis; When M is equal to 0, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; When M is equal to 1, for the remaining columns except the middle two columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; For M less than cuWidth / 2, for the remaining columns except the middle 2*M columns, the first j Line i The pixel value of the column is j Replace the pixel value of the row cuWidth-i-1 column; The vertical central axis rotation is specifically: The pixels in the coding unit are vertically rotated around the central axis of the Mth row located at the center; When M is equal to 0, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; When M is equal to 1, for the remaining rows except the middle two rows, the first j Line i The pixel value of the column is replaced with the pixel value of the i-th column in the cuHeight-j-1th row; For M less than cuWidth / 2, for the remaining rows except the middle 2*M rows, the first j Line i The pixel value of the column is the same as the pixel value of the row cuHeight-j-1. i Column pixel value replacement; The clockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to the pixel value of the cuheight-j-1th row and the i-th column; The counterclockwise rotation of 90 degrees is specifically: The coding unit i Line j The pixel value of the column is equal to j The pixel value of the row and column cuWidth-i-1; The rotation of 180 degrees is specifically: The coding unit j Line i The pixel value of the column is replaced with the pixel value of the cuHeight-j-1th row and the cuWidth-i-1th column; The first preset degree of clockwise rotation is specifically: The pixel values ​​in the coding unit in a clockwise direction of a first preset degree are replaced in sequence; The second preset degree of counterclockwise rotation is specifically: The pixel values ​​in the coding unit in a second preset counterclockwise direction are replaced in sequence; in, i Indicates the column number, the value range is greater than or equal to 0 and less than cuWidth. cuWidth indicates the width of the coding unit. j Indicates the row number. The value range is greater than or equal to 0 and less than cuHeight. cuHeight indicates the height of the coding unit.

Citation Information

Patent Citations

  • Coding method for calculating hash values in different modes to establish hash table for searching

    CN111614961A

  • String length parameter encoding and decoding method and device

    CN112532990A