A Coding Algorithm and System Based on Prediction Block Subblock Position Exchange

By searching for temporary search blocks from the reconstruction area, dividing and exchanging sub-blocks, and calculating and selecting the optimal prediction block in video encoding, the problem of a single determination form of similar blocks in the existing intra-block copy mode is solved, and the encoding performance is improved. .

CN114363620BActive Publication Date: 2024-10-11SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111590949.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-11
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

The existing intra-frame block copy mode has a single form of determining similar blocks in video coding, resulting in limited coding performance and difficulty in improving it.

Method used

By searching for temporary search blocks from the reconstructed area that has been encoded, sub-block division and position exchange are performed to generate multiple candidate prediction blocks, and the rate distortion cost of each candidate prediction block is calculated, from which the target prediction block is determined for encoding processing.

Benefits of technology

It increases the possibility of finding target prediction blocks with smaller rate distortion costs, enriches coding modes, reduces limitations, and improves coding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363620B_ABST
    Figure CN114363620B_ABST
Patent Text Reader

Abstract

The present invention discloses a coding algorithm and system based on the position exchange of prediction block sub-blocks. The present invention searches for a first temporary search block from a reconstructed area that has completed coding, performs sub-block division processing on the first temporary search block according to a preset division method to obtain multiple sub-blocks under different division methods, respectively performs position exchange processing on the multiple sub-blocks under each division method to obtain candidate prediction blocks under each division method, and fully utilizes the special texture contained in the first temporary search block to generate candidate prediction blocks without being limited to the first temporary search block; respectively calculates the first rate-distortion cost of the candidate prediction block, determines the target prediction block from the candidate prediction block according to the first rate-distortion cost and performs coding processing, thereby increasing the possibility of finding a target prediction block with a smaller first rate-distortion cost, reducing limitations, and being conducive to improving coding performance. The present invention can be widely applied to the field of video coding technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video coding, and in particular to a coding algorithm and system based on position exchange of prediction blocks and sub-blocks. Background Art

[0002] Nowadays, in the research of the video compression standard - Versatile Video Coding (VVC), screen content coding is one of its important target applications. As an efficient screen content compression tool, the intra block copy mode (IBC) is a coding technology applied at the block level. For each coding unit (CU), the encoder will search for the block most similar to the current coding in the reconstructed area, and then encode it according to the relevant parameters of the most similar block and the coding unit. However, in the existing IBC mode, the determination form of similar blocks is single and can only be selected from the reconstructed area, which has certain limitations and is not conducive to the improvement of coding performance. Therefore, a solution is needed. Summary of the invention

[0003] In view of this, in order to solve the above technical problems, an object of the present invention is to provide a coding algorithm and system based on prediction block sub-block position exchange to improve coding performance.

[0004] The technical solution adopted in the embodiment of the present invention is:

[0005] A coding algorithm based on the exchange of the positions of sub-blocks of a prediction block, comprising:

[0006] Searching for a first temporary search block from the reconstructed area where encoding has been completed;

[0007] Performing sub-block division processing on the first temporary search block according to a preset division method to obtain a plurality of sub-blocks in different division methods;

[0008] Performing position exchange processing on the multiple sub-blocks in each of the division modes respectively to obtain candidate prediction blocks in each of the division modes;

[0009] respectively calculating first rate-distortion costs of the candidate prediction blocks, and determining a target prediction block from the candidate prediction blocks according to the first rate-distortion costs;

[0010] Encoding processing is performed according to the target prediction block.

[0011] Furthermore, the sub-block division process is performed on the first temporary search block according to a preset division mode to obtain a plurality of sub-blocks in different division modes, including:

[0012] The first temporary search block is divided into sub-blocks according to different preset widths to obtain a plurality of sub-blocks in different division modes; each division mode corresponds to one of the preset widths.

[0013] Furthermore, the step of performing position exchange processing on the multiple sub-blocks in each partitioning mode to obtain the candidate prediction blocks in each partitioning mode includes:

[0014] The sub-blocks in each partitioning mode are exchanged with other sub-blocks in the partitioning mode to obtain the candidate prediction blocks in each partitioning mode after the exchange of positions.

[0015] Further, respectively calculating the first rate-distortion costs of the candidate prediction blocks includes:

[0016] Calculating a difference value between each candidate prediction block and a coding unit;

[0017] Obtaining a number of coding bits; the number of coding bits represents the number of bits required for coding symbol information, the symbol information includes at least one of a coding mode symbol, a candidate prediction block identifier, and a coding mode sub-symbol, the coding mode sub-symbol representing a sub-mode under the coding mode;

[0018] The product of a preset trade-off factor and the number of coding bits is calculated, and the sum of each difference value and the product is respectively calculated to obtain a first rate-distortion cost of each candidate prediction block.

[0019] Further, the encoding process is performed according to the target prediction block, including:

[0020] Obtaining a candidate prediction block identifier corresponding to the target prediction block; each of the candidate prediction block identifiers represents a position exchange under a corresponding partitioning method;

[0021] Calculating a coding residual and a block vector between the coding unit and the target prediction block;

[0022] The candidate prediction block identifier, the coding residual and the block vector are coded.

[0023] Further, determining a target prediction block from the candidate prediction blocks according to the first rate-distortion cost includes:

[0024] When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost, determining the target prediction block according to the minimum first rate-distortion cost; the second rate-distortion cost is the rate-distortion cost of the second temporary search block searched from the reconstructed area that has been encoded;

[0025] or,

[0026] When the second rate-distortion cost is less than the minimum first rate-distortion cost, the target prediction block is determined according to the second rate-distortion cost.

[0027] Furthermore, the coding algorithm based on the prediction block sub-block position exchange further includes:

[0028] When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is the minimum value of the rate-distortion costs of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the first value, the candidate prediction block corresponding to the minimum first rate-distortion cost is determined as the target prediction block, and encoding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol;

[0029] Alternatively, when the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, the current coding mode is terminated;

[0030] Alternatively, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is the minimum value of the rate-distortion costs of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the second value, and encoding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol;

[0031] Alternatively, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, the current coding mode is terminated.

[0032] The embodiment of the present invention further provides a coding system, including:

[0033] A search module, used for searching a first temporary search block from a reconstructed area where encoding has been completed;

[0034] A division module, configured to perform sub-block division processing on the first temporary search block according to a preset division method to obtain a plurality of sub-blocks in different division methods;

[0035] An exchange module, used for performing position exchange processing on the multiple sub-blocks in each of the division modes to obtain candidate prediction blocks in each of the division modes;

[0036] a calculation module, configured to calculate first rate-distortion costs of the candidate prediction blocks respectively, and determine a target prediction block from the candidate prediction blocks according to the first rate-distortion costs;

[0037] The encoding module is used to perform encoding processing according to the target prediction block.

[0038] The embodiment of the present invention further provides a decoding system for decoding a coding processing result obtained by the coding algorithm based on the position exchange of the prediction block sub-block, comprising:

[0039] A decoding module, configured to decode the encoding processing result to obtain a prediction block identifier, a block vector, and a coding residual, determine a first temporary search block corresponding to the block vector according to the block vector, and exchange the position of the first temporary search block according to the prediction block identifier to obtain a target prediction block;

[0040] The superposition module performs superposition processing on the target prediction block and the coding residual to obtain a decoded sample value of the coding unit.

[0041] The beneficial effects of the present invention are as follows: by searching for a first temporary search block from a reconstructed area that has completed encoding, performing sub-block division processing on the first temporary search block according to a preset division method to obtain multiple sub-blocks under different division methods, performing position exchange processing on the multiple sub-blocks under each of the division methods to obtain candidate prediction blocks under each division method, making full use of special textures contained in the first temporary search block to generate candidate prediction blocks without being limited to the original first temporary search block; calculating the first rate-distortion costs of the candidate prediction blocks respectively, determining the target prediction block from the candidate prediction blocks according to the first rate-distortion costs, and performing encoding processing according to the target prediction block, the possibility of finding a target prediction block with a smaller first rate-distortion cost than the first temporary search block is increased, the solution form is richer than that of the prior art, the limitations are reduced, and it is beneficial to improve the encoding performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of the steps of the coding algorithm based on the exchange of the positions of the prediction blocks and sub-blocks of the present invention;

[0043] Figure 2 It is a first schematic diagram of sub-block division processing and position exchange processing according to a specific embodiment of the present invention;

[0044] Figure 3 A second schematic diagram of a sub-block division process and a position exchange process according to a specific embodiment of the present invention;

[0045] Figure 4 is a flow chart of the encoding process of a specific embodiment of the present invention;

[0046] Figure 5 The figure is a flowchart of a decoding process according to a specific embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0048] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0049] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0050] like Figure 1 As shown, an embodiment of the present invention provides a coding algorithm based on the position exchange of prediction block sub-blocks, including steps S100-S500:

[0051] S100: Search for a first temporary search block in a reconstructed area that has been encoded.

[0052] In the embodiment of the present invention, the reconstructed area that has been encoded refers to a set of video contents that have been encoded before the current moment. It should be noted that the coding modes of video coding include but are not limited to intra block copy mode (I BC), wide angle mode (WAIP), multi-reference line intra prediction technology (MRL), etc. When the coding mode is intra block copy mode (I BC), the coding unit will search in the reconstructed area that has been encoded, and the searched block is recorded as the first temporary search block.

[0053] S200 , performing sub-block division processing on the first temporary search block according to a preset division method to obtain a plurality of sub-blocks in different division methods.

[0054] Optionally, the preset division method includes three methods, each of which corresponds to a preset width. The first temporary search block is divided into sub-blocks according to different preset widths, so as to obtain multiple sub-blocks under different division methods, such as Figure 2 As shown, assuming that the width of the coding unit is W and the height is H, the preset width (first width) in the first division method (method one) is W / 2, so that the first temporary search block is divided into W / 2 sub-blocks A and W / 2 sub-blocks B; the preset width (second width) in the second division method (method two) is W3 / 4, so that the first temporary search block is divided into W3 / 4 sub-blocks A and W / 4 sub-blocks B; the preset width (third width) in the third division method (method three) is W / 4, so that the first temporary search block is divided into W / 4 sub-blocks A and W3 / 4 sub-blocks B. It should be noted that the number of preset division methods, the preset width, and the number of sub-blocks in each division method can be adjusted as needed and are not specifically limited.

[0055] S300 , performing position exchange processing on multiple sub-blocks in each partitioning mode respectively to obtain candidate prediction blocks in each partitioning mode.

[0056] Specifically, the sub-blocks in each partitioning mode are swapped with other sub-blocks in the same partitioning mode to obtain the candidate prediction blocks in each partitioning mode after the swapped positions. Figure 2 As shown, the sub-blocks A and B in the first division mode (mode 1), the second division mode (mode 2), and the third division mode (mode 3) are respectively subjected to position exchange processing, thereby obtaining the corresponding candidate prediction blocks in each division mode. It should be noted that when there are more than two sub-blocks in each division mode, the sub-blocks can be shuffled according to a predetermined rule or the order of the sub-blocks can be randomly shuffled to achieve position exchange processing.

[0057] like Figure 3 As shown, C represents a possible first temporary search block, and D represents a coding unit. After the first temporary search block is divided into sub-blocks and the position is exchanged, the candidate prediction block is matched with the coding unit, thereby improving the similarity between the candidate prediction block and the coding unit and reducing the coding residual.

[0058] S400 , calculating first rate-distortion costs of candidate prediction blocks respectively, and determining a target prediction block from the candidate prediction blocks according to the first rate-distortion costs.

[0059] Optionally, in step S400, first rate-distortion costs of candidate prediction blocks are calculated respectively, including steps S411-S413:

[0060] S411, calculating a difference value between each candidate prediction block and the coding unit.

[0061] S412: Obtain the number of coding bits.

[0062] S413: Calculate the product of the preset trade-off factor and the number of coding bits, and respectively calculate the sum of each difference value and the product to obtain a first rate-distortion cost of each candidate prediction block.

[0063] It should be noted that, the smaller the first rate-distortion cost is, the fewer bits are required for image encoding with the same image quality.

[0064] Specifically, the calculation formula of the first rate distortion cost is:

[0065] Cost=D+λR

[0066] Among them, Cost is the first rate-distortion cost, D is the difference between the reconstructed value and the actual value (i.e., the difference value between each candidate prediction block and the coding unit), R is the number of bits required to encode the remaining information (i.e., the number of coding bits), and λ is the preset weighting factor; the first rate-distortion cost of each candidate prediction block can be calculated by the above formula. It should be noted that the difference value can be calculated by SAD or SATD, and the preset weighting factor is related to the rate-distortion control and can be set as needed. Optionally, the remaining information may be symbol information, and the symbol information includes a coding mode symbol, a candidate prediction block identifier, and a coding mode sub-symbol, and other embodiments may include one or more of them; it should be noted that, taking the coding modes supported by the coding unit including the intra block copy mode (I BC), the wide angle mode (WAIP), and the multi-reference line intra prediction technology (MRL) as an example, the value of the coding mode symbol indicates which coding mode is adopted, for example, the coding mode symbol I BC_flag=1 of the intra block copy mode (I BC) indicates that the intra block copy mode (I BC) is used for encoding, and I BC_flag=0 indicates that the intra block copy mode (I BC) is not used for encoding; the value of the coding mode sub-symbol represents which sub-mode of the intra block copy mode (I BC) is adopted, for example, when I BC_flag=1 and the coding mode sub-symbol SwapFlag=1, the first sub-mode is adopted: the intra block copy mode based on sub-block position exchange, and when SwapFlag=0, the first sub-mode is adopted: the intra block copy mode based on sub-block position exchange, and the second ... ag=0, then the second sub-mode is adopted: original intra-frame block copy mode. It should be noted that, in the embodiment of the present invention, the first value is 1, and the second value is 0.

[0067] Optionally, the candidate prediction block identifier represents a position exchange under different partitioning methods, and each partitioning method has a corresponding encoding method. As shown in Table 1, the candidate prediction block identifier in the first partitioning method (method one) is Swap0, and the encoding method is 0. The candidate prediction block identifier in the second partitioning method (method two) is Swap1, and the encoding method is 10. The candidate prediction block identifier in the third partitioning method (method three) is Swap2, and the encoding method is 11. During subsequent decoding, the target prediction block in the decoding mode can be determined according to the decoded coding mode symbol, the candidate prediction block identifier, and the coding mode sub-symbol.

[0068] Table 1

[0069] Candidate prediction block identifier Encoding Swap0 0 Swap1 10 Swap2 11

[0070] Optionally, determining the target prediction block from the candidate prediction blocks according to the first rate-distortion cost in step S400 includes step S420 or S430:

[0071] S420: When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost, determine a target prediction block according to the minimum first rate-distortion cost.

[0072] In the embodiment of the present invention, the second rate-distortion cost is the rate-distortion cost of the second temporary search block searched from the reconstructed area that has been encoded; the calculation method of the second rate-distortion cost is similar to the calculation method of the first rate-distortion cost, which is not described again. It should be noted that the first temporary search block is a temporary search block determined by the first sub-mode: intra-frame block copy mode based on sub-block position exchange, and the second temporary search block is a temporary search block determined by the second sub-mode: original intra-frame block copy mode, and the two temporary search blocks are independent of each other.

[0073] Optionally, determining the target prediction block according to the minimum first rate-distortion cost in step S420 may include step S4201 or S4202:

[0074] S4201. When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is the minimum value of the rate-distortion costs of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the first value, the candidate prediction block corresponding to the minimum first rate-distortion cost is determined as the target prediction block, and encoding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol.

[0075] In an embodiment of the present invention, when the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is the minimum value of the rate-distortion cost of all coding modes (for example, intra block copy mode (I BC), wide angle mode (WAIP), and multi-reference line intra prediction technology (MRL)), the coding mode symbol I BC_flag=1 and the coding mode sub-symbol SwapF l ag=1 are set, and the candidate prediction block corresponding to the minimum first rate-distortion cost is determined as the target prediction block, and then encoding processing is performed according to the coding mode symbol, the target prediction block, and the coding mode sub-symbol.

[0076] S4202: When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, end the current coding mode.

[0077] In an embodiment of the present invention, when the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is not the minimum value of the rate-distortion cost of all coding modes (for example, intra block copy mode (I BC), wide angle mode (WAIP), and multi-reference line intra prediction technology (MRL)), the current coding mode is terminated, that is, the intra block copy mode (I BC) is terminated, and then encoding can be performed using other coding modes.

[0078] S430: When the second rate-distortion cost is less than the minimum first rate-distortion cost, determine a target prediction block according to the second rate-distortion cost.

[0079] Optionally, determining the target prediction block according to the second rate-distortion cost in step S430 may include step S4301 or S4302:

[0080] S4301. When the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is the minimum rate-distortion cost of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the second value, and coding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol.

[0081] In this embodiment of the present invention, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is the minimum rate-distortion cost of all coding modes (for example, intra block copy mode (I BC), wide angle mode (WAIP), and multi-reference line intra prediction technology (MRL)), the coding mode symbol I BC_flag=1 and the coding mode sub-symbol SwapF l ag=0 are set, and coding processing is performed according to the coding mode symbol, the target prediction block, and the coding mode sub-symbol.

[0082] S4302: When the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, end the current coding mode.

[0083] In an embodiment of the present invention, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the minimum first rate-distortion cost is not the minimum value of the rate-distortion cost of all coding modes (for example, intra block copy mode (IBC), wide angle mode (WAIP), and multi-reference line intra prediction technology (MRL)), the current coding mode is terminated, that is, the intra block copy mode (IBC) is terminated, and then encoding can be performed using other coding modes.

[0084] S500: Perform encoding processing according to the target prediction block.

[0085] Optionally, step S500 includes steps S510-S530:

[0086] S510: Obtain a candidate prediction block identifier corresponding to the target prediction block.

[0087] For example, when the target prediction block is a candidate prediction block of the second partitioning method (method 2), the candidate prediction block identifier is Swap1, and the corresponding encoding method is 10.

[0088] S520: Calculate a coding residual and a block vector between the coding unit and the target prediction block.

[0089] It should be noted that the coding unit marks the target prediction block by a block vector. The coding performance of the intra block copy mode (IBC) is mainly affected by the size of the residual and the block vector. The more similar the target prediction block is to the coding unit, the smaller the (coding) residual is, the less information needs to be transmitted, the fewer bits need to be transmitted, and the better the compression performance is. Similarly, the smaller the block vector, that is, the closer the distance between the coding unit and the target prediction block is, the better the coding performance is.

[0090] S530: Encode the candidate prediction block identifier, the encoding residual, and the block vector.

[0091] Optionally: 1) When the coding unit only supports the intra-block copy mode based on the sub-block position exchange, the coding process can be performed according to the candidate prediction block identifier, the coding residual and the block vector;

[0092] 2) When the coding unit supports the intra block copy mode based on sub-block position exchange and the original intra block copy mode, the coding may include coding processing according to the candidate prediction block identifier, the coding residual, the block vector and the coding mode sub-symbol;

[0093] 3) When the coding unit supports intra block copy mode (I BC), wide angle mode (WAIP), multi-reference line intra prediction technology (MRL) and other modes, the encoding may include encoding processing according to the candidate prediction block identifier, the coding residual, the block vector, the coding mode sub-symbol and the coding mode symbol.

[0094] like Figure 4 As shown, the above encoding algorithm is described with a specific embodiment:

[0095] Using the intra-block copy mode based on sub-block position exchange to obtain the first temporary search block to determine the prediction block (specifically, the candidate prediction block), using the original intra-block copy mode to determine the prediction block (specifically, the second temporary search block), calculating the rate-distortion cost of the candidate prediction block (specifically, the first rate-distortion cost Cost2) and calculating the rate-distortion cost of the second temporary search block (specifically, the second rate-distortion cost Cost1), and determining whether Cost1 is greater than (or greater than or equal to) the minimum Cost2;

[0096] If Cost1 is not greater than (or greater than or equal to) the minimum Cost2, determine whether the second rate-distortion cost is the minimum rate-distortion cost of all coding modes (i.e., the minimum rate-distortion cost). If it is the minimum rate-distortion cost, set I BC_fl ag=1, SwapF l ag=0, encode I BC_fl ag and SwapF l ag, obtain the coded residual and block vector corresponding to the second temporary search block for encoding, and end the encoding process. If it is not the minimum rate-distortion cost, end the encoding process and use other coding modes for encoding.

[0097] If Cost1 is greater than (or greater than or equal to) the minimum Cost2, determine whether the minimum first rate-distortion cost is the minimum rate-distortion cost of all coding modes (i.e., the minimum rate-distortion cost). If it is the minimum rate-distortion cost, set IBC_f l ag = 1, SwapF l ag = 1, encode I BC_f l ag, SwapF l ag and the sub-block swap mode identifier (i.e., candidate prediction block identifier) ​​of the candidate prediction block (i.e., target prediction block) corresponding to the minimum first rate-distortion cost, obtain the coded residual and block vector corresponding to the target prediction block for coding, and end the coding process. If it is not the minimum rate-distortion cost, end the coding process and use other coding modes for coding.

[0098] The embodiment of the present invention further provides a coding system, including:

[0099] A search module, used for searching a first temporary search block from a reconstructed area where encoding has been completed;

[0100] A division module, used for performing sub-block division processing on the first temporary search block according to a preset division mode to obtain a plurality of sub-blocks in different division modes;

[0101] An exchange module, used for performing position exchange processing on multiple sub-blocks under each division mode respectively, to obtain candidate prediction blocks under each division mode;

[0102] A calculation module, used to calculate the first rate-distortion costs of the candidate prediction blocks respectively, and determine the target prediction block from the candidate prediction blocks according to the first rate-distortion costs;

[0103] The encoding module is used to perform encoding processing according to the target prediction block.

[0104] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0105] The embodiment of the present invention further provides a decoding system for decoding a coding processing result obtained by the above coding algorithm based on the position exchange of the prediction block sub-block, comprising:

[0106] A decoding module, used for decoding the encoding processing result, obtaining a prediction block identifier, a block vector and a coding residual, determining a first temporary search block corresponding to the block vector according to the block vector, and exchanging the position of the first temporary search block according to the prediction block identifier to obtain a target prediction block;

[0107] The superposition module performs superposition processing on the target prediction block and the coding residual to obtain the decoded sample value of the coding unit.

[0108] It should be noted that, as recorded in step S530, the content of the encoding processing result may be different, and the corresponding decoded content during decoding will be different.

[0109] like Figure 5 As shown, the decoding process of the above decoding system is described by taking a specific embodiment as an example:

[0110] Decode I BC_flag from the encoding processing result and determine whether I BC_flag is 1;

[0111] If I BC_flag is 1, decode I BC_flag, determine whether I BC_flag is 1, if I BC_flag is 1, decode the sub-block exchange mode identifier (i.e., candidate prediction block identifier), and then decode the block vector and residual (encoded residual), if I BC_flag is not 1, directly decode the block vector and residual (encoded residual);

[0112] After decoding the block vector and the residual (coding residual), determine whether SwapF l ag is 1. If the prediction block (specifically, the target prediction block) is obtained based on the intra-frame block copy mode of sub-block position exchange, the target prediction block is superimposed with the coding residual to obtain the decoded sample value of the coding unit, and the decoding process is terminated; if SwapF l ag is not 1, the prediction block (specifically, the second temporary search block) is obtained using the original intra-frame block copy mode, the second temporary search block is superimposed with the coding residual to obtain the decoded sample value of the coding unit, and the decoding process is terminated;

[0113] If I BC_flag is not 1, the decoding process ends.

[0114] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0115] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0116] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0117] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A coding algorithm based on the exchange of prediction block sub-block positions, characterized in that: include: Searching for a first temporary search block from the reconstructed area where encoding has been completed; Performing sub-block division processing on the first temporary search block according to a preset division method to obtain a plurality of sub-blocks in different division methods; Performing position exchange processing on the multiple sub-blocks in each of the division modes respectively to obtain candidate prediction blocks in each of the division modes; respectively calculating first rate-distortion costs of the candidate prediction blocks, and determining a target prediction block from the candidate prediction blocks according to the first rate-distortion costs; Performing encoding processing according to the target prediction block; The sub-block division process is performed on the first temporary search block according to a preset division mode to obtain a plurality of sub-blocks in different division modes, including: The first temporary search block is divided into sub-blocks according to different preset widths to obtain a plurality of sub-blocks in different division modes; each division mode corresponds to one preset width; The respectively calculating the first rate-distortion costs of the candidate prediction blocks comprises: Calculating a difference value between each candidate prediction block and a coding unit; Obtaining a number of coding bits; the number of coding bits represents the number of bits required for coding symbol information, the symbol information includes at least one of a coding mode symbol, a candidate prediction block identifier, and a coding mode sub-symbol, the coding mode sub-symbol representing a sub-mode under the coding mode; Calculating the product of a preset trade-off factor and the number of coding bits, and respectively calculating the sum of each difference value and the product to obtain a first rate-distortion cost of each candidate prediction block; The encoding process is performed according to the target prediction block, comprising: Obtaining a candidate prediction block identifier corresponding to the target prediction block; each of the candidate prediction block identifiers represents a position exchange under a corresponding partitioning method; Calculating a coding residual and a block vector between the coding unit and the target prediction block; Encoding the candidate prediction block identifier, the coding residual and the block vector; The determining a target prediction block from the candidate prediction blocks according to the first rate-distortion cost comprises: When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost, determining the target prediction block according to the minimum first rate-distortion cost; the second rate-distortion cost is the rate-distortion cost of the second temporary search block searched from the reconstructed area that has been encoded; When the second rate-distortion cost is less than the minimum first rate-distortion cost, the target prediction block is determined according to the second rate-distortion cost.

2. The coding algorithm based on the position exchange of prediction block sub-blocks according to claim 1 is characterized in that: The step of performing position exchange processing on the multiple sub-blocks in each division mode to obtain the candidate prediction blocks in each division mode includes: The sub-blocks in each partitioning mode are exchanged with other sub-blocks in the partitioning mode to obtain the candidate prediction blocks in each partitioning mode after the exchange of positions.

3. The coding algorithm based on the position exchange of prediction block sub-blocks according to claim 1 is characterized in that: The coding algorithm based on the prediction block sub-block position exchange also includes: When the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is the minimum value of the rate-distortion costs of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the first value, the candidate prediction block corresponding to the minimum first rate-distortion cost is determined as the target prediction block, and encoding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol; Alternatively, when the second rate-distortion cost is greater than or equal to the minimum first rate-distortion cost and the minimum first rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, the current coding mode is terminated; Alternatively, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is the minimum value of the rate-distortion costs of all coding modes, the coding mode symbol is set to the first value and the coding mode sub-symbol is set to the second value, and encoding processing is performed according to the coding mode symbol, the target prediction block and the coding mode sub-symbol; Alternatively, when the second rate-distortion cost is less than the minimum first rate-distortion cost and the second rate-distortion cost is not the minimum value of the rate-distortion costs of all coding modes, the current coding mode is terminated.

4. A coding system for implementing a coding algorithm as claimed in any one of claims 1 to 3, characterized in that: include: A search module, used for searching a first temporary search block from a reconstructed area where encoding has been completed; A division module, configured to perform sub-block division processing on the first temporary search block according to a preset division method to obtain a plurality of sub-blocks in different division methods; An exchange module, used for performing position exchange processing on the multiple sub-blocks in each of the division modes to obtain candidate prediction blocks in each of the division modes; a calculation module, configured to calculate first rate-distortion costs of the candidate prediction blocks respectively, and determine a target prediction block from the candidate prediction blocks according to the first rate-distortion costs; The encoding module is used to perform encoding processing according to the target prediction block.

5. A decoding system, characterized in that: The method is used for decoding the coding processing result obtained by the coding algorithm based on the position exchange of the prediction block sub-block as claimed in any one of claims 1 to 3, comprising: A decoding module, configured to decode the encoding processing result to obtain a prediction block identifier, a block vector, and a coding residual, determine a first temporary search block corresponding to the block vector according to the block vector, and exchange the position of the first temporary search block according to the prediction block identifier to obtain a target prediction block; The superposition module performs superposition processing on the target prediction block and the coding residual to obtain a decoded sample value of the coding unit.