Image coding method and device, terminal equipment and decoding method

By performing single-channel tree division or non-single-channel tree division of the image block to be encoded according to preset rules in the image encoding method, the problem of low encoding efficiency in the prior art is solved, and more efficient image encoding is achieved.

CN119420938AActive Publication Date: 2025-02-11HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411543670.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing image encoding methods have the problem of low encoding efficiency, especially when dealing with scenes with complex pixel distributions.

Method used

By obtaining the image blocks to be encoded and performing single-channel tree division or non-single-channel tree division according to preset rules, the division mode is dynamically selected to improve coding efficiency.

Benefits of technology

It realizes dynamic selection of division modes based on the attribute information of the image block to be encoded, improves encoding effect and accuracy, reduces calculation complexity, and improves encoding speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420938A_ABST
    Figure CN119420938A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image coding, and provides an image coding method and device, terminal equipment and a decoding method, and the coding method comprises the steps: obtaining a to-be-coded image block; processing the to-be-coded image block according to a preset rule to obtain a target to-be-coded image block; the processing comprises single channel tree division; and coding the target to-be-coded image block to obtain a target coding result. According to the image coding method, the image coding efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image coding technology, and in particular to an image coding method, apparatus, terminal equipment and decoding method. Background Art

[0002] Image segmentation, prediction and transformation are usually used in image and video coding schemes to remove spatial redundancy, temporal redundancy and coding redundancy in videos.

[0003] Image pixels include brightness pixels and chrominance pixels. Compression technologies before the H.266 / VVC video coding standard divided brightness pixels and chrominance pixels together, that is, the division structure of brightness pixels and chrominance pixels is exactly the same. Usually in natural images, the distribution of brightness pixels is more complex, and the distribution of chrominance pixels is relatively simple. With the development of human technology, the colors of artificial lights are becoming more and more rich, and there will be scenes with simple brightness pixel distribution and complex chrominance pixel distribution, such as large night performance scenes and night cities. For complex pixel distribution, dividing into smaller blocks can bring better compression effect, and for simple pixel distribution, it is more suitable for larger blocks.

[0004] H.266 / VVC proposes a dual tree partitioning method in intra-frame compression. In this method, the division of brightness and chrominance is completely independent, but the brightness and chrominance division information is also encoded completely separately, which will cause chrominance prediction delay and reduce the efficiency of image coding.

[0005] In the video coding standard AVS3, the luminance pixels of the divided sub-blocks are divided again to make the luminance pixels have a finer division structure. However, this division requires re-deciding the prediction mode of the divided sub-blocks and calculating the distortion and bit number, which greatly increases the computational complexity and prolongs the processing time of image coding.

[0006] It can be seen that the existing image coding method has the problem of low coding efficiency of image coding. Summary of the invention

[0007] The present application provides an image encoding method, an apparatus, a terminal device and a decoding method, which can solve the problem of low encoding efficiency of image encoding.

[0008] In a first aspect, an embodiment of the present application provides an image encoding method, the image encoding method comprising:

[0009] Obtaining an image block to be encoded;

[0010] Processing the image block to be encoded according to a preset rule to obtain a target image block to be encoded; the processing includes single channel tree division;

[0011] The target image block to be encoded is encoded to obtain a target encoding result.

[0012] Optionally, the preset rule includes a first preset rule and a second preset rule;

[0013] Processing the image block to be encoded according to a preset rule to obtain a target image block to be encoded includes:

[0014] According to the first preset rule, it is determined whether the image block to be encoded meets the division termination condition. If so, the image block to be encoded is used as the first target image block to be encoded. Otherwise, the image block to be encoded is processed according to the second preset rule to obtain the second target image block to be encoded, and the target image block to be encoded includes the first target image block to be encoded and / or the second target image block to be encoded.

[0015] Optionally, the step of processing the image block to be encoded according to a second preset rule to obtain a second target image block to be encoded includes:

[0016] According to the second preset rule, it is determined whether the image block to be encoded meets the single-channel tree division condition. If so, the image division type of the image block to be encoded is determined, and the image block to be encoded is divided according to the image division type to obtain multiple divided sub-blocks; wherein the image division type includes brightness division and chrominance division, and the second target image block to be encoded is obtained according to the divided sub-blocks.

[0017] Optionally, obtaining a second target image block to be encoded according to the divided sub-blocks includes:

[0018] The divided sub-blocks are processed according to the first preset rule and / or the second preset rule until the new divided sub-blocks meet the division termination condition, and the new divided sub-blocks are used as the second target image block to be encoded.

[0019] Optionally, whether the image block to be encoded satisfies the non-single-channel tree partitioning condition is determined according to a second preset rule; if so, all sub-image blocks of the image block to be encoded are divided according to the partitioning pattern to obtain multiple divided sub-blocks; a third target image block to be encoded is obtained according to the divided sub-blocks, and the target image block to be encoded includes the third target image block to be encoded.

[0020] Optionally, obtaining a third target image block to be encoded according to the divided sub-blocks includes:

[0021] For each divided sub-block, determine whether the divided sub-block meets the division termination condition according to the first preset rule. If so, use the divided sub-block as the third target image block to be encoded. Otherwise, use the divided sub-block as the image block to be encoded and return to the step of processing the image block to be encoded according to the second preset rule to obtain the second target image block to be encoded, until the sub-block obtained by division meets the division termination condition, and use the current divided sub-block as the third target image block to be encoded.

[0022] In a second aspect, an embodiment of the present application provides an image encoding device, including:

[0023] An acquisition module, used for acquiring an image block to be encoded;

[0024] A partitioning module, used for processing the image block to be encoded according to a preset rule to obtain a target image block to be encoded; the processing includes single-channel tree partitioning or non-single-channel tree partitioning;

[0025] The encoding module is used to encode the target image block to be encoded to obtain a target encoding result.

[0026] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image encoding method when executing the above-mentioned computer program.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above-mentioned image encoding method when executed by a processor.

[0028] In a fifth aspect, an embodiment of the present application provides an image decoding method, the image decoding method comprising:

[0029] Get the target encoding result;

[0030] Processing the target encoding result according to a preset rule to obtain a target image block to be decoded, the processing including single channel tree division;

[0031] Decode the target image block to be decoded to obtain a target decoding result.

[0032] Optionally, the target encoding result includes division information, and the preset rule is determined based on the division information.

[0033] The above solution of the present application has the following beneficial effects:

[0034] In the embodiment of the present application, by obtaining the image block to be encoded, and then processing the image block to be encoded according to the preset rules to obtain the target image block to be encoded, and then encoding the target image block to be encoded, the target encoding result is obtained. It is possible to dynamically select different divisions according to the attribute information of the image block to be encoded, improve the effect and accuracy of encoding the image block to be encoded, and there is no need to obtain the division mode of the block to be encoded through complex calculations, which can effectively reduce the computational complexity of image encoding, improve the computational speed of image encoding, and further improve the encoding efficiency.

[0035] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 A flowchart of an image encoding method provided by an embodiment of the present application;

[0038] Figure 2 A schematic diagram of an image block to be encoded provided by an embodiment of the present application;

[0039] Figure 3 A schematic diagram of a single channel tree partition provided in an embodiment of the present application;

[0040] Figure 4 A specific flowchart of image encoding provided by an embodiment of the present application;

[0041] Figure 5 A flowchart of image encoding using single-channel tree partitioning provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of a specific process of dividing image blocks to be encoded provided in an embodiment of the present application;

[0043] Figure 7 A specific flowchart of image decoding provided by an embodiment of the present application;

[0044] Figure 8 A flowchart of image decoding using single channel tree partitioning provided in an embodiment of the present application;

[0045] Fig. 9 A schematic diagram of the structure of an image encoding device provided in one embodiment of the present application;

[0046] Fig.10 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0047] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0048] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0049] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0050] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0051] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0052] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0053] In view of the problem of low existing coding efficiency, an embodiment of the present application provides an image coding method, which obtains an image block to be coded, processes the image block to be coded according to a preset rule to obtain a target image block to be coded, and then codes the target image block to be coded to obtain a target coding result. It is possible to dynamically select different divisions according to the attribute information of the image block to be coded, improve the effect and accuracy of encoding the image block to be coded, and there is no need to obtain the division mode of the block to be coded through complex calculations, which can effectively reduce the computational complexity of image coding, improve the computational speed of image coding, and further improve the coding efficiency.

[0054] Next, the image encoding method provided by this application is exemplified.

[0055] like Figure 1 As shown, the image encoding method provided by the present application includes the following steps:

[0056] Step 11, obtaining the image block to be encoded.

[0057] It should be noted that the above-mentioned image block to be encoded may be an image block that needs to be encoded and has been divided into a plurality of sub-image blocks, or may be an image block that has not been divided, and the image block to be encoded constitutes the image to be encoded. At the same time, a bit stream of the image block to be encoded may be obtained, and the bit stream is used to carry the encoding information of brightness (such as encoding method, coefficient, etc.) and chrominance related to the image block to be encoded.

[0058] The following is an exemplary description of the image block to be encoded in the present application with reference to a specific example.

[0059] The image block to be encoded is Figure 2 As shown in the figure, the dotted line is the image boundary of the sub-image block containing only chrominance pixels, the dashed line is the image boundary of the sub-image block containing only luminance pixels, and the solid line is the common boundary of the sub-image block containing chrominance pixels and the sub-image block containing luminance pixels. The image block is divided into 16 sub-image blocks, and the numbers in the figure are the numbers of the sub-image blocks.

[0060] Step 12: Process the image block to be encoded according to a preset rule to obtain a target image block to be encoded.

[0061] The above processing includes single-channel tree division, and the single-channel tree division is to perform brightness division only for the brightness block in the image block to be encoded or to perform chroma division only for the chroma block. Specifically, the single-channel tree division is (the sub-image block corresponding to the brightness division is the brightness block, and the sub-image block corresponding to the chroma division is the chroma block) only performs a single mode of division on the corresponding sub-image block of the image block to be encoded, and the corresponding mode includes brightness division and chroma division. For example, according to the above division mode, the division sub-block is obtained. If the subsequent sub-block is to be further divided, its sub-block can only choose single-channel tree division or not according to the preset rule, that is, the division sub-block on the brightness branch can only choose brightness division or not division, and the division sub-block on the chroma branch can only choose chroma division or not division. The preset rule includes a first preset rule and a second preset rule. The first preset rule is used to determine whether the image block meets the division termination condition. For example, the first preset rule can be based on the resolution of the image block (divided sub-block, image block to be encoded, etc.), the number of divisions, etc., to determine whether the division termination condition is met. The division termination condition can be that the resolution of the image block is less than the preset resolution, the number of divisions is reached, etc. If the resolution of the image block to be encoded is 128×128, which is larger than the preset resolution size of 64×64, the division termination condition is not met. The second preset rule is used to determine whether the image block meets the single-channel tree division condition. For example, the second preset rule is that when the textures of the luminance block and the chrominance block in the image block are consistent, the single-channel tree division condition is not met, and when the textures of the luminance block and the chrominance block in the image block are inconsistent, the single-channel tree division condition is met; it can also be a rule for determining whether the single-channel tree division condition is met according to the depth at which the image block to be encoded is divided (it can also be determined whether the single-channel tree division condition is met according to the pixel height of the image block to be encoded. The deeper the division depth or the more division times, the higher the pixel of the current image block. When the pixel value exceeds a certain threshold, the single-channel tree division condition is met, otherwise the single-channel tree division condition is not met); it can also be a rule for determining whether the single-channel tree division condition is met according to the rate-distortion optimization (RDO) technology (the balance point between the picture quality and the bit rate of the image block is calculated by RDO, and whether the single-channel tree division condition is met is determined by determining whether the image block meets the balance point).

[0062] Specifically, it is determined whether the image block to be encoded satisfies the division termination condition according to the first preset rule; if so, the image block to be encoded is used as the first target image block to be encoded; otherwise, the image block to be encoded is processed according to the second preset rule to obtain the second target image block to be encoded, and the target image block to be encoded includes the first target image block to be encoded and / or the second target image block to be encoded.

[0063] That is, according to the first preset rule, it is determined whether the image block to be encoded meets the division termination condition. If so, the image block to be encoded is used as the first target image block to be encoded, and the first encoding result is obtained by encoding, and the first encoding result is used as the target encoding result. Otherwise, the image block to be encoded is processed according to the second preset rule to obtain the second target image block to be encoded (that is, if the image block to be encoded can be further divided, the image block to be encoded is further processed according to the second preset rule to obtain the second target image block to be encoded), and the target image block to be encoded includes the first target image block to be encoded and / or the second target image block to be encoded. It should be noted that if the image block to be encoded meets the division termination condition, the non-division mark is encoded into the bit stream, and if the image block to be encoded does not meet the division termination condition, the division mode is encoded into the bit stream, and the image block to be encoded is processed according to the second preset rule (for example, according to the second preset rule, it is determined whether the image block to be encoded meets the single-channel tree division condition, and the image block to be encoded is processed accordingly according to the judgment result).

[0064] The second target image block to be encoded obtained by processing the image block to be encoded according to the second preset rule is specifically:

[0065] According to the second preset rule, it is determined whether the image block to be encoded meets the single-channel tree division condition. If so, the image division type of the image block to be encoded is determined, and the image block to be encoded is divided according to the image division type to obtain multiple divided sub-blocks; wherein the image division type includes brightness division and chrominance division, and the second target image block to be encoded is obtained according to the divided sub-blocks.

[0066] More specifically, whether the image block to be encoded satisfies the single-channel tree partitioning condition is determined according to the second preset rule. If so, the partitioning mode and image partitioning type of the image block to be encoded are determined, and the sub-image block corresponding to the image partitioning type in the image block to be encoded is divided according to the partitioning mode to obtain a plurality of partitioned sub-blocks; wherein the image partitioning type is brightness partitioning or chrominance partitioning, the sub-image block corresponding to the brightness partitioning is a brightness block, and the sub-image block corresponding to the chrominance partitioning is a chrominance block, and the partitioned sub-block is used as the target image block to be encoded.

[0067] Exemplarily, if the single-channel tree division condition is met, the division mode and image division type of the image block to be encoded are determined. The division mode can be binary tree division, ternary tree division, quadtree division, extended quadtree division, etc., and the image division type is brightness division or chrominance division. If the single-channel tree division condition is not met, all sub-image blocks of the image block to be encoded are divided according to the non-single-channel tree division method. The division mode is the division mode encoded into the bit stream when the division termination condition is not met. At this time, in addition to brightness division or chrominance division, the image division type can also be other image division types (such as shape division, space division, etc.).

[0068] In some embodiments of the present application, the above-mentioned step of processing the image block to be encoded according to preset rules to obtain the target image block to be encoded also includes: judging whether the image block to be encoded satisfies the division termination condition according to the first preset rule, and encoding the division mode into the bit stream according to the judgment result, and then selecting to encode the single-channel tree identifier or the non-single-channel tree identifier into the bit stream according to the second preset rule, and finally determining the image division type of the image block to be encoded, and encoding the image division type into the bit stream.

[0069] The above step of obtaining the second target image block to be encoded according to the divided sub-blocks is specifically: processing the divided sub-blocks according to the first preset rule and / or the second preset rule until the new divided sub-blocks meet the division termination condition, and using the new divided sub-blocks as the second target image block to be encoded.

[0070] More specifically, for each divided sub-block, it is determined according to the first preset rule whether the divided sub-block meets the division termination condition. If so, the divided sub-block is used as the second target image block to be encoded; otherwise, the divided sub-block is used as the image block to be encoded and returns to the step of processing the image block to be encoded according to the second preset rule to obtain the second target image block to be encoded, until the sub-block obtained by division meets the division termination condition, and the current divided sub-block is used as the second target image block to be encoded.

[0071] In some embodiments of the present application, whether the image block to be encoded satisfies the non-single-channel tree partitioning condition is determined according to a second preset rule. If so, all sub-image blocks of the image block to be encoded are divided according to the partitioning pattern to obtain multiple divided sub-blocks, and a third target image block to be encoded is obtained according to the divided sub-blocks, and the target image block to be encoded includes the third target image block to be encoded.

[0072] The above-mentioned obtaining the third target image block to be encoded according to the divided sub-blocks includes:

[0073] For each divided sub-block, determine whether the divided sub-block meets the division termination condition according to the first preset rule. If so, use the divided sub-block as the third target image block to be encoded. Otherwise, use the divided sub-block as the image block to be encoded and return to the step of processing the image block to be encoded according to the second preset rule to obtain the second target image block to be encoded, until the sub-block obtained by division meets the division termination condition, and use the current divided sub-block as the third target image block to be encoded.

[0074] It should be noted that, according to the first preset rule, it is determined whether the image block to be encoded meets the division termination condition, and the division mode is encoded into the bit stream according to the judgment result (if the division termination condition is met, the non-division mark is encoded into the bit stream), and then according to the judgment result of the second preset rule, the single-channel tree identifier or the non-single-channel tree identifier is selected to be encoded into the bit stream. If the single-channel tree division condition is not met, the non-single-channel tree identifier is encoded into the bit stream. Finally, the division mode of the image block to be encoded is determined, the division mode is encoded into the bit stream, and at the same time, all sub-image blocks of the image block to be encoded are divided according to the division mode to obtain multiple divided sub-blocks (that is, the luminance block and the chrominance block are divided according to the division mode to obtain corresponding divided sub-blocks.

[0075] Step 13, encode the target image block to be encoded to obtain a target encoding result.

[0076] Specifically, the target image block to be encoded obtained in step 12 is encoded to obtain a first encoding result, and the first encoding result is used as the target encoding result. More specifically, it is determined according to a first preset rule whether the image block to be encoded satisfies the division termination condition. If so, the image block to be encoded is used as the target image block to be encoded, and the target image block to be encoded is encoded to obtain a first encoding result, and the first encoding result is used as the target encoding result. If it is determined according to the first preset rule that the image block to be encoded does not meet the division termination condition: 1. Determine whether the image block to be encoded meets the single-channel tree division condition according to the second preset rule. If so, determine the image division type of the image block to be encoded, divide the image block to be encoded according to the image division type to obtain multiple divided sub-blocks, and for each divided sub-block, determine according to the first preset rule whether the divided sub-block meets the division termination condition. If so, use the divided sub-block as the second target image block to be encoded, and encode the divided sub-block to obtain a second encoding result. Otherwise, determine a second division mode of the divided sub-block, and continue to divide the sub-image block corresponding to the image division type in the divided sub-block according to the second division mode to obtain a target sub-block, until the target sub-block meets the division termination condition, use the target sub-block as the second target image block to be encoded, and encode the target sub-block to obtain a third encoding result; use the second encoding result or each third encoding result as a target encoding result. At the same time, the sub-image blocks that have not been divided in the above-mentioned image block to be encoded are encoded to obtain a fourth encoding result, and the fourth encoding result is used as a target encoding result; 2. According to the second preset rule, it is judged whether the image block to be encoded meets the non-single-channel tree division condition. If so, all sub-image blocks of the image block to be encoded are divided according to the division mode to obtain multiple divided sub-blocks, and for each divided sub-block, it is judged according to the first preset rule whether the divided sub-block meets the division termination condition. If so, the divided sub-block is used as the third target image block to be encoded, and the divided sub-block is encoded to obtain a fifth encoding result; otherwise, a second division mode of the divided sub-block is determined, and all sub-image blocks of the divided sub-block are continuously divided according to the second division mode to obtain a target sub-block, until the target sub-block meets the division termination condition, the target sub-block is used as the third target image block to be encoded, and the third target image block to be encoded (i.e., the target sub-block) is encoded to obtain a sixth encoding result; the fifth encoding result or each sixth encoding result is used as a target encoding result.

[0077] Exemplarily, the above steps can be understood as, when the target image block to be encoded is the image block to be encoded, encoding the image block to be encoded; when the target image block to be encoded corresponds to a divided sub-block, for each divided sub-block, judging whether the divided sub-block meets the division termination condition according to the first preset rule, if so, encoding the divided sub-block, otherwise, processing the divided sub-block according to the second preset rule until the divided sub-block meets the division termination condition and encoding the divided sub-block.

[0078] It should be noted that the image blocks (divided sub-blocks, image blocks to be encoded, etc.) can be encoded through predictive coding, compression coding and other technologies. After the image blocks are encoded, the corresponding reconstruction information and division mode need to be encoded into the bit stream. The reconstruction information is the information required for decoding, such as prediction information (information generated after encoding using predictive coding technology for predicting the pixel value of the current pixel through the pixel values ​​of surrounding pixels), quantization information, quantization parameters, etc.

[0079] The above-mentioned single channel tree division is exemplarily described below with reference to a specific example.

[0080] like Figure 3 As shown, Figure 3 (a) is the partitioning process of single-channel tree partitioning when the image partitioning type is brightness partitioning (Luma_QT). Figure 3 (b) is the partitioning process of single-channel tree partitioning when the image partitioning type is chroma partitioning (Chroma_QT).

[0081] The above steps are illustrated below with reference to a specific example.

[0082] like Figure 4 As shown, after the start, the image block to be encoded is obtained, and it is determined whether it needs to be divided. If it does not need to be divided, the non-division mark is encoded, and the current image block (i.e., the image block to be encoded) is directly encoded. If it needs to be divided, the division mode information is encoded, and it is determined whether to use single-channel tree division. If not, the single-channel tree division mark is encoded, and the corresponding division operation is performed on the entire image block according to the division mode, and each sub-block after the division is encoded. If the single-channel tree division condition is met and the single-channel tree division is adopted, the single-channel tree division mark is encoded into the bit stream, and it is determined whether the image division type is brightness division. If so, the brightness branch mark is encoded, and the corresponding division operation is performed on the brightness block (i.e., the current brightness block is divided using the aforementioned division mode encoded into the bit stream), and each brightness sub-block after the division and the non-divided chrominance block are encoded. If it is not brightness division, the chrominance branch mark is encoded, and the corresponding division operation is performed on the chrominance block, and each chrominance sub-block after the division and the non-divided brightness block are encoded, and the end is ended.

[0083] Figure 4 The specific process of using single channel tree partitioning for encoding is as follows Figure 5 As shown, after the start, the block to be encoded and the current branch information are obtained to determine whether it is a brightness branch. If so, it is determined whether brightness division is adopted. Otherwise, it is determined whether chroma division is adopted. If brightness division is adopted, the division mode is encoded and the corresponding division operation is performed, and each brightness sub-block after division is encoded. If chroma division is adopted, the division mode is encoded, the corresponding division operation is performed, and each chroma sub-block after division is encoded. If brightness division and chroma division are not adopted, the non-division mark is encoded, and the prediction information, residual information, etc. of the current block are encoded into the bit stream.

[0084] For example, Figure 2 The result obtained by dividing the image block to be encoded according to the method of the present application is as follows Figure 6 As shown, the circle indicates a temporary node where the image block size is not fixed, the dotted line box without content in the box indicates that the chrominance block size in the image block at this time is fixed, and the luminance block size is not fixed (the luminance block will be divided next), and the long dotted line box without content in the box indicates that the luminance block size in the image block at this time is fixed, and the chrominance block size is not fixed (the chrominance block will be divided next). As can be seen from the figure, after the first division, a division result sub-block 1 is first obtained, and the next division will be performed on other sub-blocks. In the second branch obtained after the first division, the sub-block 1 is located The adjacent sub-block on the right is further divided to obtain sub-block 2 and sub-block 7, and the adjacent sub-block located on the right of sub-block 2 is divided into luminance block 3 and luminance block 4, the adjacent sub-block located below sub-block 2 is divided into chrominance block 5 and chrominance block 6, and binary tree luminance division is performed in the third branch to obtain luminance block 8 and its adjacent sub-blocks, and the adjacent sub-block located below luminance block 8 is divided into luminance block 10 and luminance block 11. Chroma division is performed in the fourth branch to obtain chrominance block 12, chrominance block 13, chrominance block 14, chrominance block 15 and chrominance block 16.

[0085] It should be noted that after performing the image encoding in the above steps, the embodiment of the present application also provides an image decoding method, which specifically includes:

[0086] The first step is to obtain the target encoding result.

[0087] In some embodiments of the present application, the target encoding result includes division information, and the division information when the target encoding result is encoded can be obtained by accessing the bit stream corresponding to the target encoding result.

[0088] It should be noted that the above target encoding results are all target encoding results of the image blocks to be encoded obtained by the image encoding method of the present application.

[0089] In the second step, the target encoding result is processed according to preset rules to obtain the target image block to be decoded, and the processing includes single channel tree division.

[0090] The preset rules are determined according to the division information, and are used to obtain the target image block to be decoded according to the target encoding result, such as combining all target encoding results according to the corresponding positions of the corresponding target image blocks to be encoded described in the division information in the image block to be encoded.

[0091] The third step is to decode the target image block to obtain the target decoding result.

[0092] Specifically, all target encoding results obtained in the above steps are combined according to the corresponding positions in the image block to be encoded to obtain the target image block to be decoded. At the same time, the division mode and image division type when each target encoding result is encoded can be obtained through the bit stream, and then the target image block to be decoded is divided accordingly according to all the division modes and image division types in turn to obtain the division results, and then the division results are decoded using the decoding technology corresponding to the encoding technology used during encoding (such as the inverse algorithm of the predictive coding algorithm) to obtain the target decoding result.

[0093] It is worth mentioning that by obtaining decoding-related information from the bit stream, effective management of information can be achieved without using other devices or equipment to obtain relevant information, thereby improving decoding efficiency.

[0094] The above decoding process is exemplarily described below with reference to a specific example.

[0095] like Figure 7 As shown, after the start, the image block to be decoded (i.e., the target image block to be decoded) and the corresponding bit stream are obtained, the division information is parsed from the bit stream, and it is determined whether it is divided. If not, the current image block (i.e., the target image block to be decoded, at this time, the target image block to be decoded is the image block to be decoded) is decoded based on the bit stream. If it is divided, it is determined whether it is a single-channel tree division. If not, the corresponding division operation is performed on the entire image block, and each sub-block after the division is decoded based on the bit stream. If it is a single-channel tree division, the branch information is parsed from the bit stream to determine whether it is a brightness division. If it is a brightness division, the corresponding division operation is performed on the brightness block of the image block to be decoded, and each brightness sub-block after the division and the undivided chroma block are decoded based on the bit stream. If it is not a brightness division, the corresponding division operation is performed on the chroma block, and each chroma sub-block after the division and the undivided brightness block are decoded based on the bit stream.

[0096] Figure 7 The specific process of using a single channel tree to divide and decode is as follows Figure 8As shown, after the start, the image block to be decoded, the corresponding bit stream and the current branch information are obtained, and then the division information is parsed from the bit stream to determine whether to divide. If so, the division operation is performed on the image block, and each sub-block is decoded based on the bit stream and branch information. Otherwise, no division is performed, and each sub-block is directly decoded based on the bit stream and branch information.

[0097] The image encoding device provided in the present application is exemplarily described below.

[0098] like Fig. 9 As shown, an embodiment of the present application provides an image encoding device, and the image encoding device 900 includes:

[0099] An acquisition module 901 is used to acquire an image block to be encoded;

[0100] A division module 902 is used to process the image block to be encoded according to a preset rule to obtain a target image block to be encoded; the processing includes single-channel tree division or non-single-channel tree division;

[0101] The encoding module 903 is used to encode the target image block to be encoded to obtain a target encoding result.

[0102] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0103] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment 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. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0104] like Fig.10 As shown, an embodiment of the present application provides a terminal device. The terminal device D10 of this embodiment includes: at least one processor D100 ( Fig.10Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.

[0105] Specifically, when the processor D100 executes the computer program D102, it obtains the image block to be encoded, processes the image block to be encoded according to a preset rule to obtain a target image block to be encoded, and then encodes the target image block to be encoded to obtain a target encoding result. It is possible to dynamically select different divisions according to the attribute information of the image block to be encoded, improve the effect and accuracy of encoding the image block to be encoded, and there is no need to obtain the division mode of the block to be encoded through complex calculations, which can effectively reduce the computational complexity of image encoding, improve the computational speed of image encoding, and further improve the encoding efficiency.

[0106] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0107] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.

[0108] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0109] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the image coding method device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0111] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0112] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0113] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An image coding method, characterized in that: include: Obtaining an image block to be encoded; Processing the image block to be encoded according to a preset rule to obtain a target image block to be encoded; the processing includes single channel tree division; The target image block to be encoded is encoded to obtain a target encoding result.

2. The image encoding method according to claim 1, characterized in that The preset rules include a first preset rule and a second preset rule; The step of processing the to-be-encoded image block according to a preset rule to obtain a target to-be-encoded image block includes: According to the first preset rule, it is determined whether the image block to be encoded meets the division termination condition; if so, the image block to be encoded is used as the first target image block to be encoded; otherwise, the image block to be encoded is processed according to the second preset rule to obtain a second target image block to be encoded, and the target image block to be encoded includes the first target image block to be encoded and / or the second target image block to be encoded.

3. The image encoding method according to claim 2, characterized in that The step of processing the to-be-encoded image block according to a second preset rule to obtain a second target to-be-encoded image block includes: According to a second preset rule, it is determined whether the image block to be encoded satisfies the single-channel tree division condition; if so, the image division type of the image block to be encoded is determined, and the image block to be encoded is divided according to the image division type to obtain a plurality of divided sub-blocks; wherein the image division type includes luminance division and chrominance division, and the second target image block to be encoded is obtained according to the divided sub-blocks.

4. The image encoding method according to claim 3, characterized in that: The step of obtaining the second target image block to be encoded according to the divided sub-blocks includes: The divided sub-block is processed according to the first preset rule and / or the second preset rule until the new divided sub-block meets the division termination condition, and the new divided sub-block is used as the second target image block to be encoded.

5. The image encoding method according to claim 2, characterized in that: According to the second preset rule, it is determined whether the image block to be encoded satisfies the non-single-channel tree division condition; if so, all sub-image blocks of the image block to be encoded are divided according to the division mode to obtain multiple divided sub-blocks; a third target image block to be encoded is obtained according to the divided sub-blocks, and the target image block to be encoded includes the third target image block to be encoded.

6. The image encoding method according to claim 5, characterized in that: The step of obtaining the third target image block to be encoded according to the divided sub-blocks comprises: For each of the divided sub-blocks, determine whether the divided sub-block meets the division termination condition according to the first preset rule; if so, use the divided sub-block as the third target image block to be encoded; otherwise, use the divided sub-block as the image block to be encoded and return to the step of processing the image block to be encoded according to the second preset rule to obtain the second target image block to be encoded, until the sub-block obtained by division meets the division termination condition, and use the current divided sub-block as the third target image block to be encoded.

7. An image encoding device, characterized in that include: An acquisition module, used for acquiring an image block to be encoded; A division module, used for processing the image block to be encoded according to a preset rule to obtain a target image block to be encoded; the processing includes single-channel tree division or non-single-channel tree division; The encoding module is used to encode the target image block to be encoded to obtain a target encoding result.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image encoding method according to any one of claims 1 to 6 is implemented.

9. An image decoding method, characterized in that: include: Obtaining a target encoding result as described in any one of claims 1 to 6; Processing the target encoding result according to a preset rule to obtain a target image block to be decoded, wherein the processing includes single channel tree division; The target image block to be decoded is decoded to obtain a target decoding result.

10. The decoding method according to claim 9, characterized in that: The target encoding result includes division information, and the preset rule is determined according to the division information.

Citation Information

Patent Citations

  • Method of video coding using separate coding tree for luma and chroma

    CN107079160A

  • Transformation selection of small-size block

    CN110944174A

  • Method and device for encoding / decoding image, and recording medium having stored bitstream

    CN111149359A

  • Luma and chroma block partitioning

    CN112385239A

  • Intra-frame prediction method and device of video sequence

    CN114205591A