Method, device, electronic device and medium for predicting unit size decision
By deciding the size of the prediction unit in advance in the motion estimation and decision-making model of the encoding unit CU, the problem of long calculation processing time in the coding unit mode decision-making process in the prior art is solved, and efficient PU size decision in the IME stage is realized, which is significantly Reduced the number of candidates and circuit area for subsequent processing.
Patent Information
- Application Number
- CN202111574181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-24
- Filing Date
- 2021-12-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-12-21
AI Technical Summary
The existing coding standards require a large amount of rate distortion optimization calculation processing during the mode decision-making process of the encoding unit CU, which results in a long processing time of the entire encoder, making it difficult to realize efficient software and hardware encoder products.
By determining the first candidate size prediction units in advance based on the motion estimation result of the current encoding unit and the prediction unit decision model, the second candidate size prediction unit entering the sub-pixel motion estimation stage is determined during the whole pixel motion estimation process, and finally, The target prediction unit is determined based on the motion information of the pixel motion estimation stage.
In the IME stage, the PU division mode of each CU in the inter-frame CTU is judged in advance, reducing the number of candidate divisions entering FME and MD, reducing the storage cost and circuit area of FME, and improving coding efficiency.
Smart Images

Figure CN114422779B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to image coding and decoding processing technology, and in particular to a method, device, electronic device and medium for determining a prediction unit size. Background Art
[0002] The current mainstream coding standards usually adopt the CTU structure. In one way, each CTU supports the size of the coding unit CU from 64x64 to 8x8. In the standard implementation, whether it is intra-frame coding or inter-frame coding, the final current coding unit CU usually needs to go through a lot of rate-distortion optimization calculations and decisions before deciding the size mode of the current CU division.
[0003] However, this process is usually the most complex processing process of the entire encoder, and takes up more than half of the processing time of the entire encoder. Therefore, in order to achieve efficient software and hardware encoder products, it is necessary to study efficient and fast PU size advance decision methods. Summary of the invention
[0004] The present application provides a method, device, electronic device, and medium for determining a prediction unit size. According to one aspect of the present application, a method for determining a prediction unit size is provided, which includes:
[0005] Based on the motion estimation result of the current coding unit and the prediction unit decision model, a plurality of first candidate size prediction units are obtained;
[0006] Based on the prediction unit decision result determined in the whole pixel motion estimation process, determining a second candidate size prediction unit to enter the sub-pixel motion estimation stage from the plurality of first candidate size prediction units;
[0007] A target prediction unit is determined from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage.
[0008] Optionally, in another embodiment of the method of the present application, before obtaining a plurality of first candidate size prediction units based on the motion estimation result of the current coding unit and the prediction unit decision model, the method further includes:
[0009] The motion estimation cost of the current coding unit is calculated respectively using the absolute value of the Hadamard transform difference and the technique;
[0010] Determine a first motion vector, first Hadamard domain residual coefficient information, and pixel difference cost corresponding to each current coding unit;
[0011] The prediction unit decision model is established based on the first motion vector, the first Hadamard domain residual coefficient information and the pixel difference cost corresponding to each current coding unit.
[0012] Optionally, in another embodiment based on the above method of the present application, the motion estimation cost of the current coding unit is calculated respectively using the following formula:
[0013] J motion =SATD+λ motion MVBits
[0014] Where SATD represents the cost after Hadamard transformation between the current coding unit and its corresponding prediction unit, λ motion is the motion estimation Lagrange multiplier, and MVBits represents the number of bits corresponding to the motion vector.
[0015] Optionally, in another embodiment based on the above method of the present application, the prediction unit decision model is established using the following formula:
[0016] J RDO =D+λ mode (MVBits+ModeBitS+R)
[0017] Among them, ModeBitS represents the estimated number of bits corresponding to the prediction unit division mode, R represents the number of bits generated by the residual coefficient corresponding to the current prediction unit, and λ mode is the mode decision Lagrange multiplier.
[0018] Optionally, in another embodiment of the method of the present application, determining the target prediction unit from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage includes:
[0019] The division modes of the second candidate size prediction units in the current coding unit are compared, and the second candidate size prediction unit whose motion estimation cost is lower than a preset threshold is selected as the target prediction unit.
[0020] Optionally, in another embodiment of the method of the present application, the determining, based on the prediction unit decision result determined in the integer-pixel motion estimation process, a second candidate size prediction unit that enters the sub-pixel motion estimation stage from among the multiple first candidate size prediction units includes:
[0021] When it is determined that the first candidate size prediction unit is the minimum size in the current coding unit, the first candidate size prediction unit is used as the second candidate size prediction unit determined to enter the pixel-by-pixel motion estimation stage.
[0022] Optionally, in another embodiment of the method of the present application, the determining, based on the prediction unit decision result determined in the integer-pixel motion estimation process, a second candidate size prediction unit that enters the sub-pixel motion estimation stage from among the multiple first candidate size prediction units includes:
[0023] When it is determined that the first candidate size prediction unit is not equal to the minimum size in the current coding unit, the first candidate size prediction unit whose size value is lower than a preset threshold in the first candidate size prediction unit is used as the second candidate size prediction unit determined to enter the pixel-by-pixel motion estimation stage.
[0024] According to another aspect of the embodiment of the present application, a device for predicting unit size decision is provided, characterized in that it includes:
[0025] A generating module configured to obtain a plurality of first candidate size prediction units based on a motion estimation result of a current coding unit and a prediction unit decision model;
[0026] A selection module configured to determine, based on a prediction unit decision result determined in an integer-pixel motion estimation process, a second candidate size prediction unit to enter a sub-pixel motion estimation stage from among the plurality of first candidate size prediction units;
[0027] The determination module is configured to determine a target prediction unit from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage.
[0028] According to another aspect of the embodiments of the present application, an electronic device is provided, including:
[0029] A memory for storing executable instructions; and
[0030] The display is used to execute the executable instructions with the memory to complete the operation of any of the above-mentioned prediction unit size decision methods.
[0031] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided for storing computer-readable instructions, wherein the instructions, when executed, perform the operations of any of the above-mentioned methods for determining the size of a prediction unit.
[0032] In the present application, multiple first candidate size prediction units can be obtained based on the motion estimation result of the current coding unit and the prediction unit decision model; based on the prediction unit decision result determined by the whole pixel motion estimation process, the second candidate size prediction unit entering the pixel-by-pixel motion estimation stage is determined from the multiple first candidate size prediction units; according to the motion information in the pixel-by-pixel motion estimation stage, the target prediction unit is determined from the second candidate size prediction unit. By applying the technical solution of the present application, all possible PU partitioning modes of each CU in the inter-frame CTU can be judged in advance in the IME stage, and the partitioning results can be passed to FME and MD, which can significantly reduce the number of candidate partitions entering the two, reduce the required storage cost and the circuit area of FME.
[0033] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.
[0035] The present application can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0036] Figure 1 A schematic diagram of a method for predicting unit size decision proposed in this application;
[0037] Figure 2 A schematic diagram of an electronic device for predicting unit size decision proposed in this application;
[0038] Figure 3 A schematic diagram of an electronic device for predicting unit size decision proposed in this application. DETAILED DESCRIPTION
[0039] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application.
[0040] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0041] The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended to limit the present application, its application, or uses.
[0042] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0043] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0044] In addition, the technical solutions between the various embodiments of the present application can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0045] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0046] Combine the following Figure 1 The method for making prediction unit size decision according to the exemplary embodiment of the present application is described. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present application, and the embodiments of the present application are not limited in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario.
[0047] The present application also proposes a method, device, target terminal and medium for predicting unit size decision.
[0048] Figure 1 The following schematically shows a flow chart of a method for predicting unit size decision according to an embodiment of the present application. Figure 1 As shown, the method includes:
[0049] S101, obtaining a plurality of first candidate size prediction units based on a motion estimation result of a current coding unit and a prediction unit decision model.
[0050] S102, based on the prediction unit decision result determined in the whole pixel motion estimation process, determine a second candidate size prediction unit to enter the sub-pixel motion estimation stage from a plurality of first candidate size prediction units.
[0051] S103 , determining a target prediction unit from second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage.
[0052] Optionally, in another embodiment of the method of the present application, before obtaining a plurality of first candidate size prediction units based on the motion estimation result of the current coding unit and the prediction unit decision model, the method further includes:
[0053] The motion estimation cost of the current coding unit is calculated respectively using the absolute value of the Hadamard transform difference and the technique;
[0054] Determine a first motion vector, first Hadamard domain residual coefficient information, and pixel difference cost corresponding to each current coding unit;
[0055] A prediction unit decision model is established based on the first motion vector, the first Hadamard domain residual coefficient information, and the pixel difference cost corresponding to each current coding unit.
[0056] Optionally, in another embodiment based on the above method of the present application, the motion estimation cost of the current coding unit is calculated respectively using the following formula:
[0057] J motion =SATD+λ motion MVBits
[0058] Where SATD represents the cost after Hadamard transformation between the current coding unit and its corresponding prediction unit, λ motion is the motion estimation Lagrange multiplier, and MVBits represents the number of bits corresponding to the motion vector.
[0059] Optionally, in another embodiment based on the above method of the present application, the prediction unit decision model is established using the following formula:
[0060] J RDO =D+λ mode (MVBits+ModeBits+R)
[0061] Among them, ModeBits represents the estimated number of bits corresponding to the prediction unit division mode, R represents the number of bits generated by the residual coefficient corresponding to the current prediction unit, and λ mode is the mode decision Lagrange multiplier.
[0062] Optionally, in another embodiment of the method of the present application, determining the target prediction unit from the second candidate size prediction unit according to the motion information in the sub-pixel motion estimation stage includes:
[0063] The division modes of the second candidate size prediction units in the current coding unit are compared, and the second candidate size prediction unit whose motion estimation cost is lower than a preset threshold is selected as the target prediction unit.
[0064] Optionally, in another embodiment of the method of the present application, based on the prediction unit decision result determined in the integer-pixel motion estimation process, determining a second candidate size prediction unit to enter the sub-pixel motion estimation stage from a plurality of first candidate size prediction units includes:
[0065] When it is determined that the first candidate size prediction unit is the minimum size in the current coding unit, the first candidate size prediction unit is used as the second candidate size prediction unit to enter the pixel-by-pixel motion estimation stage.
[0066] Optionally, in another embodiment of the method of the present application, based on the prediction unit decision result determined in the integer-pixel motion estimation process, determining a second candidate size prediction unit to enter the sub-pixel motion estimation stage from a plurality of first candidate size prediction units includes:
[0067] When it is determined that the first candidate size prediction unit is not equal to the minimum size in the current coding unit, the first candidate size prediction unit whose size value is lower than the preset threshold is used as the second candidate size prediction unit to enter the pixel-by-pixel motion estimation stage.
[0068] First, in the whole pixel motion estimation IME process, the present application can use CTU as a unit to determine in advance whether the mode decision MD can be entered for all candidate size prediction units PU between frames corresponding to each CU. Furthermore, the present application needs to perform motion estimation on all first candidate size PUs. It should be noted that the traditional difference absolute value and algorithm SAD can only reflect the difference between pixels, but cannot reflect the frequency band information of residual pixels. Therefore, the present application can use the Hadamard transform difference absolute value and algorithm SATD instead of the SAD algorithm in the motion estimation process, so as to calculate the motion estimation cost of the first candidate size PU, and the formula can be:
[0069] J motion =SATD+λ motion MVBits
[0070] Where SATD represents the cost after Hadamard transformation between the current coding unit and its corresponding prediction unit, λ motion is the motion estimation Lagrange multiplier, and MVBits represents the number of bits corresponding to the motion vector.
[0071] It can be understood that through the above formula, the present application can complete motion estimation for all first candidate size PUs, such as all square and non-square PUs with sizes from 64x64 to 8x8 in AVS2 and HEVC, and generate the first motion vector, first Hadamard domain residual coefficient information and pixel difference cost corresponding to each PU to establish a prediction unit decision model. Among them, the first motion vector can be the optimal motion vector MV, the first Hadamard domain residual coefficient information can be the optimal Hadamard domain residual coefficient information H, and the first pixel difference cost can be the optimal pixel difference cost SATD.
[0072] Secondly, the present application can also use the information generated by the above IME to establish a prediction unit decision model using the following formula:
[0073] J RDO =D+λ mode (MVBits+ModeBits+R)
[0074] Among them, ModeBits represents the estimated number of bits corresponding to the prediction unit division mode, R represents the number of bits generated by the residual coefficient corresponding to the current prediction unit, and λ mode is the mode decision Lagrange multiplier.
[0075] In addition, in this application, the quantization step size Q corresponding to the Hadamard domain is obtained according to the residual coefficient H H The calculation formula is as follows:
[0076]
[0077] Where Q step is the encoding quantization step size, which is related to the encoding configuration, and the f value is 1 / 6. scale is the matrix scaling factor.
[0078] Furthermore, the matrix scaling factor in this application is calculated as follows:
[0079]
[0080] Where W is the width of the current Hadamard PU transform size. In this application, after obtaining the quantization step size Q H After that, each coefficient H can be quantized. And according to the above formula, the estimated distortion cost D and residual bit R can be obtained. In addition, the bit MVBits is directly implemented by the method corresponding to the motion estimation reference standard such as AVS2 and HEVC, and the method of determining MVBits in the present invention is:
[0081] ModeBits=log2(W)
[0082] Finally, according to the above steps, the estimated cost corresponding to each candidate PU can be obtained. Based on this, the various PU division methods in the current CU can be compared, and the one with the lowest cost can be selected to enter the FME and MD stages. Taking a CU of size 16x16 as an example, in standards such as AVS2 and HEVC, the PU size combinations that can be divided are 16x16, two 16x8, two 8x16, and four 8x8. Then, the optimal PU division method can be obtained by comparison using the following formula:
[0083]
[0084] This means that in the sub-pixel motion estimation FME process, only the 4 currently selected PUs will be used for interpolation and search, saving resources and reducing motion complexity.
[0085] Furthermore, through the above inter-frame PU fast size decision method in the IME stage, the number of candidate PUs entering the FME and MD stages can be reduced, which can effectively reduce the required circuit area, storage cost and processing complexity. However, since the RDO costs in the IME stage are all estimated, which is different from the real RDO costs, this means that making RDO decisions on the PU size in advance will inevitably result in coding performance losses. In order to minimize the inter-frame coding performance loss, the present application can also consider the PU size division results in the IME stage and partially adjust the inter-frame PU division results. The specific strategies are as follows.
[0086] In one method, if the IME stage determines that the PU size is the minimum size of the current CU, the MD stage will keep the same result as the current PU partition. For example, for a CU of size 16x16, the final PU selected in the IME stage is 4 8x8, then the PU partitions of sizes 16x16, 16x8, and 8x16 will be directly discarded in the MD stage and will not participate in the MD processing process.
[0087] In another way, if the IME stage determines that the PU size is not the smallest division method for the current PU, some small-sized PUs can be selectively enabled to enter MD according to the size of the PU. For example, for a CU of size 16x16, the final IME stage selects a PU of size 16x16, which means that all PUs of the following sizes can share the same motion vector, that is, PUs of sizes 8x8, 16x8, 8x16 and can use the same motion vector and prediction results, and then they can also enter the RDO process of MD. Although this will increase some computational complexity, hardware encoders are usually hard real-time processing circuits, and each size has its own circuit, so the PU division method that can enter RDO can be selected based on the existing processing circuit. For example, when there are circuits for processing PUs of sizes 16x16 and 8x8 in the circuit, in this case, the 8x8 PU circuit can also be processed to obtain better RDO processing performance.
[0088] In another embodiment of the present application, Figure 2 As shown, the present application also provides a device for predicting unit size decision. It includes a generation module 201, a selection module 202, and a determination module 203, wherein:
[0089] A generating module 201 is configured to obtain a plurality of first candidate size prediction units based on a motion estimation result of a current coding unit and a prediction unit decision model;
[0090] The selection module 202 is configured to determine a second candidate size prediction unit that enters a sub-pixel motion estimation stage from among the plurality of first candidate size prediction units based on a prediction unit decision result determined in an integer-pixel motion estimation process;
[0091] The determination module 203 is configured to determine a target prediction unit from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage.
[0092] In the present application, multiple first candidate size prediction units can be obtained based on the motion estimation result of the current coding unit and the prediction unit decision model; based on the prediction unit decision result determined by the whole pixel motion estimation process, the second candidate size prediction unit entering the pixel-by-pixel motion estimation stage is determined from the multiple first candidate size prediction units; according to the motion information in the pixel-by-pixel motion estimation stage, the target prediction unit is determined from the second candidate size prediction unit. By applying the technical solution of the present application, all possible PU partitioning modes of each CU in the inter-frame CTU can be judged in advance in the IME stage, and the partitioning results can be passed to FME and MD, which can significantly reduce the number of candidate partitions entering the two, reduce the required storage cost and the circuit area of FME.
[0093] In another embodiment of the present application, the generating module 201 further includes:
[0094] The generating module 201 is configured to calculate the motion estimation cost of the current coding unit respectively by using the Hadamard transform difference absolute value and algorithm;
[0095] A generating module 201 is configured to determine a first motion vector, first Hadamard domain residual coefficient information and a first pixel difference cost corresponding to each current coding unit;
[0096] The generating module 201 is configured to establish the prediction unit decision model based on the first motion vector, the first Hadamard domain residual coefficient information and the first pixel difference cost corresponding to each current coding unit.
[0097] In another embodiment of the present application, the method further includes: calculating the motion estimation cost of the current coding unit using the following formula:
[0098] J motion =SATD+λ motion MVBits
[0099] Where SATD represents the cost after Hadamard transformation between the current coding unit and its corresponding prediction unit, λ motionis the motion estimation Lagrange multiplier, and MVBits represents the number of bits corresponding to the motion vector.
[0100] In another embodiment of the present application, it further includes: establishing the prediction unit decision model using the following formula:
[0101] J RDO =D+λ mode (MVBits+ModeBits+R)
[0102] Among them, ModeBits represents the estimated number of bits corresponding to the prediction unit division mode, R represents the number of bits generated by the residual coefficient corresponding to the current prediction unit, and λ mode is the mode decision Lagrange multiplier.
[0103] In another embodiment of the present application, the generating module 201 further includes:
[0104] The generating module 201 is configured to compare the division modes of the second candidate size prediction units in the current coding unit, and select the second candidate size prediction unit whose motion estimation cost is lower than a preset threshold as the target prediction unit.
[0105] In another embodiment of the present application, the generating module 201 further includes:
[0106] The generating module 201 is configured to, when it is determined that the first candidate size prediction unit is the minimum size in the current coding unit, use the first candidate size prediction unit as the second candidate size prediction unit determined to enter the pixel-by-pixel motion estimation stage.
[0107] In another embodiment of the present application, the generating module 201 further includes:
[0108] The generation module 201 is configured to, when it is determined that the first candidate size prediction unit is not equal to the minimum size in the current coding unit, use the first candidate size prediction unit whose size value is lower than a preset threshold in the first candidate size prediction unit as the second candidate size prediction unit for determining to enter the pixel-by-pixel motion estimation stage.
[0109] Figure 3 3 is a logical structure block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0110] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory including instructions, the above instructions can be executed by an electronic device processor to complete the above prediction unit size decision method, the method comprising: based on the motion estimation result of the current coding unit and the prediction unit decision model, a plurality of first candidate size prediction units are obtained; based on the prediction unit decision result determined by the whole pixel motion estimation process, a second candidate size prediction unit entering the pixel-by-pixel motion estimation stage is determined from the plurality of first candidate size prediction units; according to the motion information in the pixel-by-pixel motion estimation stage, a target prediction unit is determined from the second candidate size prediction unit. Optionally, the above instructions can also be executed by the processor of the electronic device to complete the other steps involved in the above exemplary embodiments. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, an optical data storage device, etc.
[0111] In an exemplary embodiment, an application / computer program product is also provided, including one or more instructions, which can be executed by a processor of an electronic device to complete the above-mentioned prediction unit size decision method, the method comprising: obtaining multiple first candidate size prediction units based on the motion estimation result of the current coding unit and the prediction unit decision model; determining the second candidate size prediction unit that enters the pixel-by-pixel motion estimation stage from the multiple first candidate size prediction units based on the prediction unit decision result determined by the whole pixel motion estimation process; and determining the target prediction unit from the second candidate size prediction unit according to the motion information in the pixel-by-pixel motion estimation stage. Optionally, the above-mentioned instructions can also be executed by the processor of the electronic device to complete the other steps involved in the above-mentioned exemplary embodiment.
[0112] Figure 3 FIG. 3 is an example diagram of an electronic device 300. A person skilled in the art can understand that Figure 3 It is only an example of the electronic device 300 and does not constitute a limitation of the electronic device 300. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 300 may also include input and output devices, network access devices, buses, etc.
[0113] The processor 302 may be a central processing unit (CPU), 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 the processor 302 may also be any conventional processor, etc. The processor 302 is the control center of the electronic device 300, and uses various interfaces and lines to connect various parts of the entire electronic device 300.
[0114] The memory 301 can be used to store computer-readable instructions 303. The processor 302 implements various functions of the electronic device 300 by running or executing the computer-readable instructions or modules stored in the memory 301 and calling the data stored in the memory 301. The memory 301 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 300, etc. In addition, the memory 301 can include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM) or other non-volatile / volatile storage devices.
[0115] If the module integrated in the electronic device 300 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the computer-readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.
[0116] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0117] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for predicting unit size decisions, characterized in that: include: The motion estimation cost of the current coding unit is calculated respectively using the Hadamard transform difference absolute value and algorithm; Determine a first motion vector, first Hadamard domain residual coefficient information, and a first pixel difference cost corresponding to each current coding unit; Establishing the prediction unit decision model based on the first motion vector, the first Hadamard domain residual coefficient information and the first pixel difference cost corresponding to each current coding unit; Based on the motion estimation result of the current coding unit and the prediction unit decision model, a plurality of first candidate size prediction units are obtained; Based on the prediction unit decision result determined in the whole pixel motion estimation process, determining a second candidate size prediction unit to enter the sub-pixel motion estimation stage from the plurality of first candidate size prediction units; Determining a target prediction unit from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage; The motion estimation cost of the current coding unit is calculated using the following formula: J motion =SATD+λ motion ·MVBits Where SATD represents the cost after Hadamard transformation between the current coding unit and its corresponding prediction unit, λ motion is the motion estimation Lagrange multiplier, MVBits represents the number of bits corresponding to the motion vector, J motion The motion estimation cost of the current coding unit; The prediction unit decision model is established using the following formula: J RDO =D+λ mode ·(MVBits+ModeBits+R) Among them, ModeBits represents the estimated number of bits corresponding to the prediction unit division mode, R represents the number of bits generated by the residual coefficient corresponding to the current prediction unit, and λ mode is the mode decision Lagrange multiplier, J RDO is the prediction unit decision model; Determining a second candidate size prediction unit that enters a sub-pixel motion estimation stage from among the plurality of first candidate size prediction units comprises: When it is determined that the first candidate size prediction unit is the minimum size in the current coding unit, the first candidate size prediction unit is used as the second candidate size prediction unit determined to enter the pixel-by-pixel motion estimation stage; The method of determining a second candidate size prediction unit that enters a sub-pixel motion estimation stage from among the plurality of first candidate size prediction units based on a prediction unit decision result determined in an integer-pixel motion estimation process comprises: When it is determined that the first candidate size prediction unit is not equal to the minimum size in the current coding unit, the first candidate size prediction unit whose size value is lower than a preset threshold in the first candidate size prediction unit is used as the second candidate size prediction unit determined to enter the pixel-by-pixel motion estimation stage.
2. The method according to claim 1, characterized in that The step of determining a target prediction unit from the second candidate size prediction units according to the motion information in the pixel-by-pixel motion estimation stage comprises: The division modes of the second candidate size prediction units in the current coding unit are compared, and the second candidate size prediction unit whose motion estimation cost is lower than a preset threshold is selected as the target prediction unit.
3. A device for predicting unit size decision, used to implement the method of claim 1, characterized in that: include: A generating module configured to obtain a plurality of first candidate size prediction units based on a motion estimation result of a current coding unit and a prediction unit decision model; A selection module configured to determine, based on a prediction unit decision result determined in an integer-pixel motion estimation process, a second candidate size prediction unit to enter a sub-pixel motion estimation stage from among the plurality of first candidate size prediction units; The determination module is configured to determine a target prediction unit from the second candidate size prediction units according to the motion information in the sub-pixel motion estimation stage.
4. An electronic device, characterized in that: include: A memory for storing executable instructions; as well as, A processor is used to execute the executable instructions with the memory to complete the operation of the method for determining the size of the prediction unit in any one of claims 1-2.
5. A computer-readable storage medium for storing computer-readable instructions, characterized in that: When the instruction is executed, the operation of the method for determining the prediction unit size according to any one of claims 1-2 is performed.
Citation Information
Patent Citations
Rapid interframe mode selection method and device for AVS (Advanced Audio Video Coding Standard) coder
CN102685497A
Motion estimation method and device, electronic equipment and computer readable storage medium
CN110839155A