A coding method and apparatus based on intra-frame prediction decision mode selection
By extracting the texture direction of the prediction unit, the intra-frame prediction mode selection of the AVS3 video codec standard is optimized, which solves the encoding speed bottleneck and improves encoding efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2026-03-10
AI Technical Summary
The intra-frame coding process in the AVS3 video codec standard suffers from a coding speed bottleneck, resulting in low coding efficiency. Existing technologies struggle to quickly select the optimal intra-frame prediction mode.
By extracting the texture direction of the prediction unit of the coding unit to be decided, adding the angle prediction mode and non-angle prediction mode that are closest to the texture direction to the candidate mode list, and verifying the mode performance, the optimal mode is selected for encoding.
It enables rapid selection of intra-frame prediction modes, improves coding efficiency, ensures the accuracy of the optimal mode, and speeds up coding.
Smart Images

Figure CN115002453B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video encoding and decoding technology, and more specifically, to an encoding method and apparatus based on intra-frame prediction decision mode selection. Background Technology
[0002] AVS3 is the latest generation of video codec standards, primarily responsible for developing common technical standards for digital audio and video compression, decompression, processing, and representation. AVS3 enriches and promotes the division of coding units (CUs). AVS3 predefines 65 prediction modes for prediction units, including 3 non-angular prediction modes and 62 angular prediction modes.
[0003] The better modes are selected by comparing the encoding cost and performance, based on the SATD of the encoded residual and the bitstream of the encoding mode information. However, this process takes up most of the intra-frame encoding time, resulting in a encoding speed bottleneck and leaving considerable room for optimization. Summary of the Invention
[0004] Based on the above-mentioned technical problems, the present invention aims to make decisions on intra-frame prediction modes based on the texture direction of the prediction unit, so as to quickly select the optimal mode and improve coding efficiency.
[0005] The first aspect of this invention provides an encoding method based on intra-frame prediction decision mode selection, the method comprising:
[0006] Obtain the prediction unit corresponding to the coding unit to be decided;
[0007] Extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0008] Add the first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0009] Add non-angle prediction patterns to the candidate pattern list;
[0010] The predictive performance of the modes in the candidate mode list is examined, and a second preset number of optimal modes are selected.
[0011] Image information is encoded using the post-decision coding unit.
[0012] In some embodiments of the present invention, before verifying the predictive performance of the patterns in the candidate pattern list and deciding on a second preset number of optimal patterns, the method further includes:
[0013] Obtain the surrounding prediction units of the prediction unit corresponding to the coding unit to be decided;
[0014] If the surrounding prediction unit has been encoded, then the surrounding prediction unit is taken as the most likely pattern.
[0015] Add the most likely pattern to the candidate pattern list.
[0016] In some embodiments of the present invention, extracting the texture direction of the prediction unit corresponding to the coding unit to be decided includes:
[0017] The horizontal and vertical gradients of each pixel in the prediction unit corresponding to the coding unit to be decided are calculated using the horizontal and vertical Sobel operators.
[0018] For any pixel, calculate the texture direction of the pixel on the two-dimensional plane based on the gradient in the horizontal direction and the gradient in the vertical direction.
[0019] In some embodiments of the present invention, calculating the texture direction of the pixel on the two-dimensional plane based on the gradient in the horizontal direction and the gradient in the vertical direction includes:
[0020] The gradients in the horizontal direction and the gradients in the vertical direction are vectored together.
[0021] The result of adding the vectors is used as the texture direction of the pixel on the two-dimensional plane.
[0022] In some embodiments of the present invention, adding a first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list includes:
[0023] Determine the region location corresponding to the texture direction;
[0024] If the region corresponding to the texture direction is between two angle prediction modes, then a third preset number of angle prediction modes are selected along the directions of the two angle prediction modes respectively.
[0025] All angle prediction modes selected along the directions of the two angle prediction modes are taken as the first preset number of angle prediction modes.
[0026] In some embodiments of the present invention, after verifying the predictive performance of the patterns in the candidate pattern list and deciding on a second preset number of optimal patterns, the method further includes: determining whether the second preset number of optimal patterns in the candidate pattern list has been updated.
[0027] In some embodiments of the present invention, determining whether the second preset number of optimal modes in the candidate mode list has been updated includes:
[0028] If the second preset number of optimal modes in the candidate mode list has been updated, then the adjacent angle prediction mode is added to the candidate mode list;
[0029] If the second preset number of optimal modes in the candidate mode list is not updated, then the second preset number of optimal modes will be used as the decision result.
[0030] A second aspect of the present invention provides a coding apparatus based on intra-frame prediction decision mode selection, the apparatus comprising:
[0031] The acquisition module is used to acquire the prediction unit corresponding to the coding unit to be decided;
[0032] An extraction module is used to extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0033] Angle module, used to add a first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0034] The non-angle module is used to add non-angle prediction patterns to the candidate pattern list;
[0035] The peripheral module is used to test the predictive performance of the modes in the candidate mode list and decide on the second preset number of optimal modes.
[0036] The encoding module is used to encode image information using the decided encoding unit.
[0037] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0038] Obtain the prediction unit corresponding to the coding unit to be decided;
[0039] Extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0040] Add the first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0041] Add non-angle prediction patterns to the candidate pattern list;
[0042] The predictive performance of the modes in the candidate mode list is examined, and a second preset number of optimal modes are selected.
[0043] Image information is encoded using the post-decision coding unit.
[0044] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0045] Obtain the prediction unit corresponding to the coding unit to be decided;
[0046] Extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0047] Add the first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0048] Add non-angle prediction patterns to the candidate pattern list;
[0049] The predictive performance of the modes in the candidate mode list is examined, and a second preset number of optimal modes are selected.
[0050] Image information is encoded using the post-decision coding unit.
[0051] The technical solutions provided in this application embodiment have at least the following technical effects or advantages:
[0052] This application proposes to extract the texture direction of the prediction unit corresponding to the coding unit to be decided before encoding the image information, add a first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list, add non-angle prediction modes to the candidate mode list, test the prediction performance of the modes in the candidate mode list, and finally decide on a second preset number of optimal modes. This fully utilizes the texture characteristics of the prediction unit itself, realizes the rapid selection of intra-frame prediction modes, and ensures the accuracy of the selected optimal mode while speeding up the encoding speed, thereby improving the encoding efficiency.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0054] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0055] Figure 1 This illustration shows a schematic diagram of the coding method steps based on intra-frame prediction decision mode selection in an exemplary embodiment of this application;
[0056] Figure 2 A schematic diagram of the intra-frame mode decision algorithm architecture in an exemplary embodiment of this application is shown;
[0057] Figure 3 This illustration shows a schematic diagram of Sobel operator extracting image texture in an exemplary embodiment of this application;
[0058] Figure 4 This illustration shows a schematic diagram of angle prediction mode selection in an exemplary embodiment of this application;
[0059] Figure 5 A flowchart of an encoding method for selecting a decision mode based on intra-frame prediction in an exemplary embodiment of this application is shown;
[0060] Figure 6 A schematic diagram of the coding apparatus structure based on intra-frame prediction decision mode selection in an exemplary embodiment of this application is shown;
[0061] Figure 7 This application shows a schematic diagram of the structure of a computer device provided in an exemplary embodiment.
[0062] Figure 8 A schematic diagram of a storage medium provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0063] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application. It will be apparent to those skilled in the art that this application can be implemented without one or more of these details. In other instances, some technical features well-known in the art have not been described to avoid confusion with this application.
[0064] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of the stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or combinations thereof.
[0065] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. The drawings are not drawn to scale, and some details may be enlarged and omitted for clarity. The shapes of the various regions and layers shown in the figures, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0066] The following is in conjunction with the instruction manual appendix. Figure 1-8 Several embodiments are given to describe exemplary implementations according to this application. It should be noted that the following application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementations of this application are not limited in any way. Rather, the implementations of this application can be applied to any applicable scenario.
[0067] In some exemplary embodiments of this application, an encoding method based on intra-frame prediction decision mode selection is provided, such as... Figure 1 As shown, the method includes:
[0068] S1. Obtain the prediction unit corresponding to the coding unit to be decided;
[0069] S2. Extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0070] S3. Add the first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0071] S4. Add non-angle prediction modes to the candidate mode list;
[0072] S5. Examine the predictive performance of the modes in the candidate mode list and decide on the second preset number of optimal modes;
[0073] S6. Encode the image information using the decided coding unit.
[0074] Compared to existing technologies that propose a fast intra-frame prediction mode selection algorithm for the HEVC standard, this application has the advantage of saving time. After the standard RMD (Rough Mode Decision) process, the candidate prediction modes given by the RMD are examined, and two different schemes are proposed based on the prediction cell size. For example... Figure 2As shown, if the two optimal prediction modes in the RMD are both angular modes, then they are likely to fit the image texture well and are probably the optimal modes. Based on this, non-angular prediction modes and the most probable mode (MPM) are added for rate-distortion optimization (RDO). If the optimal RMD mode is a non-angular prediction mode, the current prediction unit may have unclear texture, and some angular prediction modes should be removed from the candidate list. However, this technique is proposed for the HEVC standard and cannot be applied to the AVS3 standard. This method performs poorly with large prediction units because large prediction units may have multiple texture directions, while this method can only fit to one main direction. This application avoids these problems.
[0075] In one specific implementation, S4 adds non-angular prediction modes to the candidate mode list. The non-angular prediction modes include DC, Plane, and Bilinear.
[0076] In one specific implementation, before S5 checks the predictive performance of modes in the candidate mode list and decides on the second preset number of optimal modes, the method further includes: obtaining the surrounding predictive units of the predictive unit corresponding to the encoding unit to be decided; if the surrounding predictive units have been encoded, then the surrounding predictive units are taken as the Most Probable Mode (MPM); and the Most Probable Mode is added to the candidate mode list. If the predictive mode corresponding to the MPM is not yet in the candidate list, then it is added; if it already exists, then it is skipped.
[0077] In one specific implementation, the texture direction of the prediction unit corresponding to the coding unit to be decided is extracted, such as... Figure 3 As shown, the process includes: using the horizontal Sobel operator and the vertical Sobel operator to calculate the gradient in the horizontal direction and the gradient in the vertical direction of each pixel of the prediction unit corresponding to the coding unit to be decided; for any pixel, calculating the texture direction of the pixel on the two-dimensional plane based on the gradient in the horizontal direction and the gradient in the vertical direction.
[0078] In one specific implementation, the texture direction of a pixel on a two-dimensional plane is calculated based on the gradients in the horizontal and vertical directions. This includes: adding the gradients in the horizontal and vertical directions as vectors; and using the result of the vector addition as the texture direction of the pixel on the two-dimensional plane. For example... Figure 3 As shown, the overall calculation results, as well as the calculation results in the horizontal and vertical directions, are illustrated.
[0079] In one specific implementation, a first preset number of angle prediction modes closest to the texture direction are added to the candidate mode list. This includes: determining the region position corresponding to the texture direction; if the region position corresponding to the texture direction is between two angle prediction modes, then selecting a third preset number of angle prediction modes along the directions of the two angle prediction modes respectively; and using all angle prediction modes selected along the directions of the two angle prediction modes as the first preset number of angle prediction modes. For more details, please refer to... Figure 4 An angle prediction mode close to the texture direction is selected. If the angle corresponding to the texture direction of the current prediction unit PU is between the angles corresponding to AVS3 angle prediction modes 16 and 17, then angle prediction modes 17, 18, and 19 are selected upwards, and angle prediction modes 16, 15, and 14 are selected downwards, for a total of 6 angle prediction modes entering the candidate list. Here, 3 is the third preset number, and 6 is the first preset number. As a variable implementation, if the PU texture angle happens to coincide with a certain angle prediction mode of AVS3, then based on selecting that angle prediction mode, 2 angle prediction modes are selected upwards and 3 angle prediction modes are selected downwards, for a total of 6. Similarly, Figure 4 For example, assuming the texture angle coincides with mode 17, then select angle prediction mode 17, and take angle prediction modes 18 and 19 upwards, and angle prediction modes 16, 15 and 14 downwards.
[0080] In one specific implementation, after examining the predictive performance of the patterns in the candidate pattern list and deciding on a second preset number of optimal patterns, the method further includes: determining whether the second preset number of optimal patterns in the candidate pattern list should be updated. (See reference) Figure 5 The performance of each prediction mode in the current candidate list is calculated. If a prediction mode has already been calculated in a previous iteration, the corresponding result can be reused to reduce computation. First, the PU is predicted according to the algorithm corresponding to the mode. The difference between the predicted value and the true value is used to obtain the residual value, and the absolute values of the residuals are summed. Second, the bitstream size required to encode the flag bit of the prediction mode is calculated. The weighted sum of the absolute values of the residuals and the bitstream size is calculated, and the corresponding modes are arranged in ascending order. The five best prediction modes are retained. If the five prediction modes retained after verification are the same as the five prediction modes obtained in the previous verification, the mode selection is completed.
[0081] In one specific implementation, it is determined whether the second preset number of optimal modes in the candidate mode list has been updated. If the second preset number of optimal modes in the candidate mode list has been updated, then adjacent angle prediction modes are added to the candidate mode list. For example, the initial prediction modes in the candidate mode list are: angle mode 13, angle mode 14, angle mode 15, angle mode 16, angle mode 17, angle mode 18, DC, Plane, Bilinear, and angle mode 6. Assume that, according to calculation, the top 5 prediction modes with the lowest encoding cost are: angle mode 6, angle mode 17, angle mode 15, DC, and Bilinear. That is, the top 5 prediction modes in the candidate list have changed. For the existing angle modes 6, 17, and 15, two adjacent angle prediction modes are selected respectively, namely angle mode 5, angle mode 7, angle mode 16, angle mode 18, angle mode 14, and angle mode 16. After deduplication, non-angle prediction modes are added to form a new candidate list: angle mode 5, 6, 7, 14, 15, 16, 17, 18, DC, and Bilinear. If the second preset number of optimal modes in the candidate mode list is not updated, then the second preset number of optimal modes will be used as the decision result.
[0082] This application proposes to extract the texture direction of the prediction unit corresponding to the coding unit to be decided before encoding the image information, add a first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list, add non-angle prediction modes to the candidate mode list, test the prediction performance of the modes in the candidate mode list, and finally decide on a second preset number of optimal modes. This fully utilizes the texture characteristics of the prediction unit itself, realizes the rapid selection of intra-frame prediction modes, and ensures the accuracy of the selected optimal mode while speeding up the encoding speed, thereby improving the encoding efficiency.
[0083] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention.
[0084] In some exemplary embodiments, this application also provides a coding apparatus based on intra-frame prediction decision mode selection, such as... Figure 6 As shown, the device includes:
[0085] The acquisition module 601 is used to acquire the prediction unit corresponding to the coding unit to be decided;
[0086] Extraction module 602 is used to extract the texture direction of the prediction unit corresponding to the coding unit to be decided;
[0087] Angle module 603 is used to add a first preset number of angle prediction modes that are closest to the texture direction to the candidate mode list;
[0088] Non-angle module 604 is used to add non-angle prediction modes to the candidate mode list;
[0089] The peripheral module 605 is used to examine the predictive performance of the modes in the candidate mode list and to decide on the second preset number of optimal modes.
[0090] The encoding module 606 is used to encode image information using the decided encoding unit.
[0091] Preferably, the coding apparatus for selecting a decision mode based on intra-frame prediction further includes an update module for updating the candidate mode list.
[0092] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention.
[0093] It should also be emphasized that the system provided in this application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0094] Please refer to the following. Figure 7 This illustrates a schematic diagram of a computer device provided by some embodiments of this application. For example... Figure 7 As shown, the computer device 2 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the encoding method based on intra-frame prediction decision mode selection provided in any of the foregoing embodiments of this application.
[0095] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0096] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Memory 201 is used to store programs. After receiving an execution instruction, processor 200 executes the program. The encoding method based on intra-frame prediction decision mode selection disclosed in any of the foregoing embodiments of this application can be applied to processor 200, or implemented by processor 200.
[0097] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.
[0098] This application also provides a computer-readable storage medium corresponding to the encoding method based on intra-frame prediction decision mode selection provided in the foregoing embodiments. Please refer to [link / reference]. Figure 8 , Figure 8The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the encoding method based on intra-frame prediction decision mode selection provided in any of the foregoing embodiments.
[0099] In addition, examples of the computer-readable storage medium may include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be described in detail here.
[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the encoding method based on intra-frame prediction decision mode selection provided in any of the foregoing embodiments, including: obtaining a prediction unit corresponding to a coding unit to be decided; extracting the texture direction of the prediction unit corresponding to the coding unit to be decided; adding a first preset number of angle prediction modes closest to the texture direction to a candidate mode list; adding non-angle prediction modes to the candidate mode list; verifying the prediction performance of the modes in the candidate mode list, and deciding on a second preset number of optimal modes; and encoding image information using the decided coding unit.
[0101] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. The required structure for constructing such devices is obvious from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of this application. Numerous specific details are set forth in the specification provided herein. However, it is to be understood that embodiments of this application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0102] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.
[0103] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed herein and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed herein may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0104] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation apparatus according to embodiments of this application. This application can also be implemented as a device or apparatus program for performing part or all of the methods described herein. A program implementing this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0105] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An encoding method based on intra prediction decision mode selection, characterized in that, The method comprises: acquiring a prediction unit corresponding to a to-be-decided coding unit; extracting a texture direction of the prediction unit corresponding to the to-be-decided coding unit; adding a first preset number of angle prediction modes closest to the texture direction to a candidate mode list; adding a non-angle prediction mode to the candidate mode list; checking prediction performance of modes in the candidate mode list, and deciding a second preset number of optimal modes; encoding image information using the decided coding unit; the adding of the first preset number of angle prediction modes closest to the texture direction to the candidate mode list comprises: judging a region position corresponding to the texture direction; if the region position corresponding to the texture direction is between two angle prediction modes, selecting a third preset number of angle prediction modes along directions of the two angle prediction modes respectively; taking all angle prediction modes selected along the directions of the two angle prediction modes as the first preset number of angle prediction modes; if two optimal modes in the decided second preset number of optimal modes are both angle prediction modes, adding a non-angle prediction mode and a most probable mode for rate-distortion optimization; if the optimal mode in the decided second preset number of optimal modes is a non-angle prediction mode, deleting part of angle prediction modes in the candidate mode list.
2. The method of claim 1, wherein, Before the checking of the prediction performance of the modes in the candidate mode list and the deciding of the second preset number of optimal modes, the method further comprises: acquiring a surrounding prediction unit of the prediction unit corresponding to the to-be-decided coding unit; if the surrounding prediction unit has been encoded, taking the surrounding prediction unit as a most probable mode; adding the most probable mode to the candidate mode list.
3. The method of claim 2, wherein, The extracting of the texture direction of the prediction unit corresponding to the to-be-decided coding unit comprises: calculating a gradient in a horizontal direction and a gradient in a vertical direction of each pixel of the prediction unit corresponding to the to-be-decided coding unit by using a horizontal Sobel operator and a vertical Sobel operator; for any pixel, calculating a texture direction of the pixel in a two-dimensional plane according to the gradient in the horizontal direction and the gradient in the vertical direction.
4. The method of claim 3, wherein, The calculating of the texture direction of the pixel in the two-dimensional plane according to the gradient in the horizontal direction and the gradient in the vertical direction comprises: vector adding the gradient in the horizontal direction and the gradient in the vertical direction; taking a vector addition result as the texture direction of the pixel in the two-dimensional plane.
5. The method of claim 1, wherein the selecting the intra-prediction decision mode is based on a decision mode selected from a group consisting of a direct mode, a planar mode, a DC mode, and a skip mode. After the checking of the prediction performance of the modes in the candidate mode list and the deciding of the second preset number of optimal modes, the method further comprises judging whether the second preset number of optimal modes in the candidate mode list are updated.
6. The method of claim 5, wherein, The judging of whether the second preset number of optimal modes in the candidate mode list are updated comprises: if the second preset number of optimal modes in the candidate mode list are updated, adding adjacent angle prediction modes to the candidate mode list; if the second preset number of optimal modes in the candidate mode list are not updated, taking the second preset number of optimal modes as a decision result.
7. An encoding apparatus based on intra prediction decision mode selection, characterized in that, The device comprises: an acquiring module configured to acquire a prediction unit corresponding to a to-be-decided coding unit; extracting a texture direction of a prediction unit corresponding to the to-be-decided coding unit; adding a first preset number of angle prediction modes closest to the texture direction to a candidate mode list; adding non-angle prediction modes to the candidate mode list; checking prediction performance of modes in the candidate mode list to decide a second preset number of optimal modes; encoding image information using the decided coding unit; the adding the first preset number of angle prediction modes closest to the texture direction to the candidate mode list comprises: determining a region position corresponding to the texture direction; if the region position corresponding to the texture direction is between two angle prediction modes, selecting a third preset number of angle prediction modes along directions of the two angle prediction modes respectively; taking all angle prediction modes selected along the directions of the two angle prediction modes as the first preset number of angle prediction modes; if two optimal modes in the decided second preset number of optimal modes are both angle prediction modes, adding non-angle prediction modes and most probable modes for rate-distortion optimization; if an optimal mode in the decided second preset number of optimal modes is a non-angle prediction mode, deleting part of angle prediction modes in the candidate mode list.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, the processor runs the computer program to implement steps of the method in any of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, the computer program is executed by the processor to implement steps of the method in any of claims 1-6.
Citation Information
Patent Citations
Discrete cosine transform (DCT)-based high efficiency video coding (HEVC) rapid in-frame mode decision algorithm
CN107396130A
CU division and PC prediction mode selection method and system in HEVC frame
CN108184115A
Intra-frame fast mode decision-making method for AVS2
CN112804524A