Video encoding processing method, apparatus, device and storage medium

CN116233440BActive Publication Date: 2026-02-10CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111466015.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2026-02-10
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

The existing H.265 intra-frame predictive coding, which predicts possible coding modes based on image texture complexity, increases computational complexity, becomes a coding bottleneck, and affects coding efficiency.

Method used

By calculating the rate-distortion cost of each coding mode of the target coding unit, multiple coding modes are selected as the first and second mode queues. The mode with the lowest coding distortion is determined as the target coding mode, and the coding unit division is terminated when its rate-distortion cost is less than a preset threshold, thereby improving the coding speed.

Benefits of technology

While ensuring coding quality, it significantly improves the coding speed and efficiency of intra-frame predictive video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233440B_ABST
    Figure CN116233440B_ABST
Patent Text Reader

Abstract

The application provides a video coding processing method, device and equipment and a storage medium. The method comprises the following steps: calculating rate-distortion cost values of each coding mode of H265 intra prediction of a target coding unit; selecting a plurality of coding modes from the coding modes as a first mode queue according to the depth of the target coding unit and the rate-distortion cost values of the coding modes; determining a plurality of optimal prediction modes of the target coding unit as a second mode queue; determining a target coding mode with the minimum coding distortion from the first mode queue and the second mode queue; stopping division of a smaller unit for the target coding unit if the rate-distortion cost value of the target coding mode is less than a preset threshold corresponding to the target coding mode; and performing coding processing of intra prediction on the target coding unit according to the target coding mode. The application can improve the coding processing speed and efficiency of frame prediction video coding while ensuring the coding quality of intra prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video processing technology, and in particular to a video encoding processing method, apparatus, device, and storage medium. Background Technology

[0002] Currently, most video content played on the internet undergoes video compression and encoding processing on servers before being accessed and viewed online. Video compression and encoding consumes significant server resources. Therefore, improving video compression and encoding speed while maintaining quality is the main direction of current development.

[0003] Currently, existing H.265 intra-frame predictive coding mainly relies on image texture complexity to predict possible coding patterns for intra-frame prediction.

[0004] However, predicting possible coding patterns based on image texture complexity also significantly increases the computational complexity of H.265 encoding, making intra-frame prediction speed a major bottleneck for H.265 encoding. Summary of the Invention

[0005] This invention provides a video coding processing method, apparatus, device, and storage medium that can improve the coding processing speed of frame prediction video coding while ensuring the coding quality of intra-frame prediction, thereby improving coding efficiency.

[0006] In a first aspect, the present invention provides a video encoding processing method, comprising:

[0007] For the target coding unit, calculate the rate-distortion cost of each coding mode predicted within the H265 frame for the target coding unit;

[0008] Based on the depth of the target coding unit and the rate-distortion cost of each coding mode, multiple coding modes are selected from the coding modes as a first mode queue.

[0009] Multiple optimal prediction modes of the target coding unit are determined as a second mode queue;

[0010] From the first mode queue and the second mode queue, determine the mode with the minimum encoding distortion as the target encoding mode;

[0011] If the rate-distortion cost of the target coding mode is determined to be less than the preset threshold corresponding to the target coding mode, then the division of the target coding unit into smaller units is stopped.

[0012] The target coding unit is subjected to intra-frame prediction coding processing according to the target coding mode.

[0013] In one possible design, the preset threshold is determined based on the partitioned pixel value and quantization parameters corresponding to the depth of the target coding unit.

[0014] In one possible design, the preset threshold corresponding to the target coding mode is determined based on the partitioned pixel value and quantization parameters corresponding to the depth of the target coding unit, as shown in the formula:

[0015] threshold D =a×b qp / 5.0 ×D×D

[0016] In the formula, threshold is the preset threshold corresponding to the target coding unit; D is the block size of the target coding unit; qp is the quantization parameter of the target coding unit; and a and b are constants after fitting with the target coding unit.

[0017] In one possible design, the target coding unit has a depth of 1, corresponding to a 32×32 coding unit partition, and a preset threshold of threshold. 32 =0.142098 × 2.0 qp / 5.0 ×32×32;

[0018] The target coding unit has a depth of 2, corresponding to a coding unit partitioning method of 16×16, and a preset threshold of threshold. 16 = 0.115242 × 2.3 qp / 5.0 ×16×16.

[0019] In one possible design, selecting multiple coding modes as a first mode queue based on the depth of the target coding unit and the rate-distortion cost of each coding mode includes:

[0020] If the depth of the target coding unit satisfies the first preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the first preset formula.

[0021] If the depth of the target coding unit satisfies the second preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the second preset formula.

[0022] Wherein, the first preset condition is that the depth of the target coding unit is greater than 2, and the first preset formula is RD level +1, where RD levelThe RDO (Rate Distortion Optimization) complexity for the target coding unit is calculated. A larger value indicates a more complex calculation method for RDO, with a value range of 1-6. The second preset condition is that the depth of the target coding unit is less than or equal to 2, and the second preset formula is 2 + RD. level -2.

[0023] In one possible design, determining multiple optimal prediction modes of the target coding unit as a second mode queue includes:

[0024] The number of optimal prediction modes is determined based on the depth of the target coding unit, resulting in multiple optimal prediction modes as a second mode queue.

[0025] In a second aspect, the present invention provides a video encoding processing apparatus, comprising:

[0026] The calculation module is used to calculate the rate-distortion cost of each coding mode predicted by the H265 intra-frame for the target coding unit.

[0027] The first mode queue determination module is used to select multiple coding modes as the first mode queue based on the depth of the target coding unit and the rate-distortion cost of each coding mode.

[0028] The second mode queue determination module is used to determine multiple best prediction modes of the target coding unit as the second mode queue.

[0029] The encoding mode selection module is used to determine the encoding mode with the minimum encoding distortion as the target encoding mode from the first mode queue and the second mode queue;

[0030] The threshold comparison processing module is used to stop dividing the target coding unit into smaller units if it is determined that the rate-distortion cost of the target coding mode is less than the preset threshold corresponding to the target coding mode.

[0031] The encoding processing module is used to perform intra-frame prediction encoding processing on the target coding unit according to the target coding mode.

[0032] Thirdly, the present invention provides a video encoding processing device, comprising: at least one processor and a memory;

[0033] The memory stores computer-executed instructions;

[0034] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video encoding processing method as described in the first aspect and various possible designs of the first aspect.

[0035] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video encoding processing method described in the first aspect and various possible designs of the first aspect.

[0036] The video coding processing method, apparatus, device, and storage medium provided by this invention select the corresponding coding mode through two mode queues to ensure the quality of intra-frame prediction coding, and then terminate the division of coding units in advance by threshold comparison to improve the coding speed of intra-frame prediction coding. It can improve the coding processing speed of intra-frame prediction video coding while ensuring the coding quality of intra-frame prediction, thereby improving coding efficiency. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic diagram of the system architecture for video encoding processing provided in an embodiment of the present invention;

[0039] Figure 2 This is a flowchart illustrating the video encoding processing method provided in an embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of the structure of the video encoding processing apparatus provided in an embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of the hardware structure of a video encoding processing device provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Glossary

[0044] Intra-frame prediction: Intra-frame prediction utilizes the correlation in the video spatial domain to predict the current pixel using neighboring encoded pixels within the same frame, thereby effectively removing temporal redundancy in the video.

[0045] Intra-frame predictive coding is a crucial part of H.265 coding, offering a significant improvement in coding performance compared to H.264 (saving 20% ​​of the bitstream at the same quality). However, H.265 intra-frame predictive coding primarily predicts possible coding patterns based on image texture complexity, which significantly increases the computational complexity and reduces the coding speed, thus impacting coding efficiency.

[0046] To address the aforementioned technical problems, this invention provides a video coding processing method. For a target coding unit, the rate-distortion cost of each coding mode in H.265 coding is calculated. Based on the rate-distortion cost of each coding mode and the depth of the target coding unit, the coding modes with the lowest rate-distortion cost are selected as a first mode queue. Furthermore, multiple optimal prediction modes of the target coding unit are selected as a second mode queue. The coding mode with the lowest distortion in both the first and second mode queues is chosen as the target coding mode. If the rate-distortion cost of the target coding mode is determined to be less than a preset threshold corresponding to the target coding mode, the division of the target coding unit into smaller units is stopped. Intra-frame prediction coding processing is then performed on the target coding unit according to the target coding mode. This embodiment combines the two mode queues to select the appropriate coding mode to ensure the quality of intra-frame prediction coding, and terminates the division of coding units early through threshold comparison to improve the coding speed of intra-frame prediction coding and increase coding efficiency.

[0047] Figure 1 This is a schematic diagram of the system architecture for video encoding processing provided in an embodiment of the present invention. Figure 1As shown, the system provided in this embodiment includes a terminal 101 and a server 102, which are connected via a network. The terminal 101 can be any type of terminal device; the terminal devices involved in this disclosure can be wireless or wired terminals. A wireless terminal can be a device that provides voice and / or other service data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) or a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device, which exchanges voice and / or data with the radio access network. For example, a wireless terminal can also be a Personal Communication Service (PCS) telephone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), or other similar devices. A wireless terminal can also be referred to as a system, subscriber unit, subscriber station, mobile station, mobile, remote station, remote terminal, access terminal, user terminal, user agent, user device, or user equipment; no specific terminology is limited here. Optionally, the aforementioned terminal devices can also be smartwatches, tablets, or other similar devices. Server 102 can be a single server or a cluster of multiple servers.

[0048] Figure 2 This is a flowchart illustrating the video encoding processing method provided in an embodiment of the present invention. The execution entity in this embodiment can be... Figure 1 The terminal in the illustrated embodiment can also be Figure 1 The server shown in the embodiment is not particularly limited here. Figure 2 As shown, the method includes:

[0049] S201: For the target coding unit, calculate the rate-distortion cost of each coding mode predicted by the H265 intra-frame for the target coding unit.

[0050] In this embodiment, there are 35 coding modes for intra-frame prediction in H.265, including Planar prediction mode, DC prediction mode and 33 prediction modes based on direction angle.

[0051] Specifically, a coarse RDO (Rate distortion optimization) is first performed on each coding mode, using SATD (Sum of Absolute Transformed Difference, which is the sum of absolute values ​​after transforming the time domain to the frequency domain) as the distortion degree, and the actual bit stream bits of the macro-coding mode as the bit rate. Then, the rate distortion cost RDCost for each coding mode is SATD + λ * bits, where λ is the mode weight.

[0052] S202: Based on the depth of the target coding unit and the rate-distortion cost of each coding mode, select multiple coding modes from the coding modes as a first mode queue.

[0053] In this embodiment, all encoding modes are arranged in ascending order of rate-distortion cost, and the encoding mode with the smallest preset number of rate-distortion costs is selected as the first mode queue. The preset number is determined based on the depth of the target encoding unit.

[0054] Specifically, if the depth of the target coding unit satisfies the first preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the first preset formula.

[0055] If the depth of the target coding unit satisfies the second preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the second preset formula.

[0056] Wherein, the first preset condition is that the depth of the target coding unit is greater than 2, and the first preset formula is RD level +1, where RD level The RDO (Rate Distortion Optimization) complexity for the target coding unit is calculated. A larger value indicates a more complex calculation method for RDO, with a value range of 1-6. The second preset condition is that the depth of the target coding unit is less than or equal to 2, and the second preset formula is 2 + RD. level -2.

[0057] S203: Determine multiple optimal prediction modes of the target coding unit as a second mode queue.

[0058] In this embodiment, multiple optimal prediction modes refer to the optimal prediction modes of multiple neighboring prediction units.

[0059] Specifically, the number of optimal prediction modes is determined based on the depth of the target coding unit, resulting in multiple optimal prediction modes as a second mode queue.

[0060] In one embodiment of the present invention, if the depth of the target coding unit is 1, then the number of optimal prediction modes is 2; if the depth of the target coding unit is 2, then the number of optimal prediction modes is 1; otherwise, the number of optimal prediction modes is 0.

[0061] S204: Determine the coding mode with the minimum coding distortion from the first mode queue and the second mode queue as the target coding mode.

[0062] In this embodiment, the encoding distortion can be SATD.

[0063] S205: If it is determined that the rate-distortion cost of the target coding mode is less than the preset threshold corresponding to the target coding mode, then stop dividing the target coding unit into smaller units.

[0064] In this embodiment, traversing all coding units would consume a lot of computing resources, so the partitioning of the current coding unit (i.e., the target coding unit) needs to be terminated in advance.

[0065] S206: Perform intra-frame prediction coding processing on the target coding unit according to the target coding mode.

[0066] In this embodiment, the target coding mode is used to query the corresponding prediction unit and encode the target coding unit according to the corresponding intra-frame prediction.

[0067] As can be seen from the above description, by selecting the corresponding encoding mode through two mode queues to ensure the quality of intra-frame prediction coding, and by terminating the division of coding units in advance through threshold comparison to improve the coding speed of intra-frame prediction coding, the coding processing speed of intra-frame prediction video coding can be improved while ensuring the coding quality of intra-frame prediction, thereby improving coding efficiency.

[0068] In one embodiment of the present invention, the preset threshold corresponding to the target coding mode is determined based on the division pixel value and quantization parameter corresponding to the depth of the target coding unit.

[0069] Specifically, the preset threshold corresponding to the target coding mode is determined based on the segmented pixel value and quantization parameters corresponding to the depth of the target coding unit, as shown in the formula:

[0070] threshold D =a×b qp / 5.0 ×D×D

[0071] In the formula, threshold is the preset threshold corresponding to the target coding unit; D is the block size of the target coding unit; qp is the quantization parameter of the target coding unit; and a and b are constants after fitting with the target coding unit.

[0072] In this embodiment, D is the block size of the target coding unit. When the target coding unit depth is 0, D is 64; when the target coding unit depth is 1, D is 32; when the target coding unit depth is 2, D is 16; and when the target coding unit depth is 3, D is 8.

[0073] In this embodiment, the selection of preset thresholds corresponding to different depths of the target coding unit is the core solution of the present invention. When determining the threshold, it is necessary not only to ensure a high hit rate, but also to ensure that the error rate of early termination is not too high. Therefore, through a large amount of data comparison, it was found that the selection of preset thresholds corresponding to different depths of the target coding unit is related to the quantization parameters of the target coding unit. Therefore, the above formula is finally provided.

[0074] In one embodiment of the present invention, the depth of the target coding unit is 1, the corresponding coding unit partitioning method is 32×32, and the corresponding preset threshold is threshold. 32 =0.142098 × 2.0 qp / 5.0 ×32×32;

[0075] The target coding unit has a depth of 2, corresponding to a coding unit partitioning method of 16×16, and a preset threshold of threshold. 16 = 0.115242 × 2.3 qp / 5.0 ×16×16.

[0076] In this embodiment, specific preset threshold values ​​corresponding to different depths of the target coding unit are provided. By comparison, it is found that using the preset threshold values ​​mentioned above results in basically no change in coding quality (BD-rate increases by only 0.38%), but the coding speed is greatly improved (speed increases by 46.9%), that is, the speed is greatly improved while the coding quality remains basically unchanged.

[0077] Figure 3 This is a schematic diagram of the structure of a video encoding processing apparatus provided in an embodiment of the present invention. Figure 3As shown, the video encoding processing device 30 includes: a calculation module 301, a first mode queue determination module 302, a second mode queue determination module 303, an encoding mode selection module 304, a threshold comparison processing module 305, and an encoding processing module 306. Among them,

[0078] The calculation module 301 is used to calculate the rate-distortion cost of each coding mode of the H265 intra-frame prediction of the target coding unit for the target coding unit.

[0079] The first mode queue determination module 302 is used to select multiple coding modes as the first mode queue based on the depth of the target coding unit and the rate-distortion cost of each coding mode.

[0080] The second mode queue determination module 303 is used to determine multiple best prediction modes of the target coding unit as a second mode queue.

[0081] The encoding mode selection module 304 is used to determine the encoding mode with the minimum encoding distortion as the target encoding mode from the first mode queue and the second mode queue.

[0082] The threshold comparison processing module 305 is used to stop dividing the target coding unit into smaller units if it is determined that the rate-distortion cost of the target coding mode is less than the preset threshold corresponding to the target coding mode.

[0083] The encoding processing module 306 is used to perform intra-frame prediction encoding processing on the target coding unit according to the target coding mode.

[0084] In one possible design, the preset threshold is determined based on the partitioned pixel value and quantization parameters corresponding to the depth of the target coding unit.

[0085] In one possible design, the preset threshold corresponding to the target coding mode is determined based on the partitioned pixel value and quantization parameters corresponding to the depth of the target coding unit, as shown in the formula:

[0086] threshold D =a×b qp / 5.0 ×D×D

[0087] In the formula, threshold is the preset threshold corresponding to the target coding unit; D is the block size of the target coding unit; qp is the quantization parameter of the target coding unit; and a and b are constants after fitting with the target coding unit.

[0088] In one possible design, the target coding unit has a depth of 1, corresponding to a 32×32 coding unit partition, and a preset threshold of threshold.32 =0.142098 × 2.0 qp / 5.0 ×32×32;

[0089] The target coding unit has a depth of 2, corresponding to a coding unit partitioning method of 16×16, and a preset threshold of threshold. 16 = 0.115242 × 2.3 qp / 5.0 ×16×16.

[0090] In one possible design, the first pattern queue determination module 302 is specifically used to calculate the number of encoding patterns determined from the encoding patterns in ascending order of rate-distortion cost according to the first preset formula if the depth of the target encoding unit satisfies the first preset condition.

[0091] If the depth of the target coding unit satisfies the second preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the second preset formula.

[0092] Wherein, the first preset condition is that the depth of the target coding unit is greater than 2, and the first preset formula is RD level +1, where RD level The RDO (Rate Distortion Optimization) complexity for the target coding unit is calculated. A larger value indicates a more complex calculation method for RDO, with a value range of 1-6. The second preset condition is that the depth of the target coding unit is less than or equal to 2, and the second preset formula is 2 + RD. level -2.

[0093] In one possible design, the second mode queue determination module 303 is specifically used to determine the number of the best prediction modes based on the depth of the target coding unit, and obtain multiple best prediction modes as the second mode queue.

[0094] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0095] Figure 4 This is a schematic diagram of the hardware structure of a video encoding processing device provided in an embodiment of the present invention. Figure 4 As shown, the video encoding processing device 40 of this embodiment includes: a processor 401 and a memory 402; wherein

[0096] Memory 402 is used to store instructions executed by the computer;

[0097] The processor 401 is used to execute computer execution instructions stored in the memory to implement the various steps performed by the terminal or server in the above embodiments. For details, please refer to the relevant descriptions in the foregoing method embodiments.

[0098] Alternatively, the memory 402 can be either standalone or integrated with the processor 401.

[0099] When the memory 402 is set up independently, the video encoding processing device also includes a bus 403 for connecting the memory 402 and the processor 401.

[0100] This invention also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the video encoding processing method described above.

[0101] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the video encoding processing method described above.

[0102] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0103] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0104] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0105] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application.

[0106] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0107] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0108] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0109] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0110] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0111] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A video encoding processing method, characterized in that, include: For the target coding unit, calculate the rate-distortion cost of each coding mode predicted within the H265 frame for the target coding unit; Based on the depth of the target coding unit and the rate-distortion cost of each coding mode, multiple coding modes are selected from the coding modes as a first mode queue. Multiple optimal prediction modes of the target coding unit are determined as a second mode queue; From the first mode queue and the second mode queue, determine the mode with the minimum encoding distortion as the target encoding mode; If the rate-distortion cost of the target coding mode is determined to be less than the preset threshold corresponding to the target coding mode, then the division of the target coding unit into smaller units is stopped. The target coding unit is subjected to intra-frame prediction coding processing according to the target coding mode; The step of selecting multiple coding modes as a first mode queue based on the depth of the target coding unit and the rate-distortion cost of each coding mode includes: If the depth of the target coding unit satisfies the first preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the first preset formula. If the depth of the target coding unit satisfies the second preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to the second preset formula. Wherein, the first preset condition is that the depth of the target coding unit is greater than 2, and the first preset formula is RD level +1, where RD level The complexity of Rate-Distortion Optimization (RDO) for the target coding unit is calculated. A larger value indicates a more complex calculation method for RDO, with a value range of 1-6. The second preset condition is that the depth of the target coding unit is less than or equal to 2, and the second preset formula is RD. level .

2. The method according to claim 1, characterized in that, The preset threshold is determined based on the pixel values ​​and quantization parameters corresponding to the depth of the target coding unit.

3. The method according to claim 2, characterized in that, The preset threshold corresponding to the target coding mode is determined based on the pixel values ​​and quantization parameters corresponding to the depth of the target coding unit, as shown in the formula: threshold D =a×b qp / 5.0 ×D×D In the formula, threshold D qp is the preset threshold corresponding to the target coding unit; D is the block size of the target coding unit; qp is the quantization parameter of the target coding unit; a and b are constants after fitting with the target coding unit.

4. The method according to claim 3, characterized in that, The target coding unit has a depth of 1, corresponding to a 32×32 coding unit partitioning method, and a preset threshold of threshold. 32 =0.142098 × 2.0 qp / 5.0 ×32×32; The target coding unit has a depth of 2, corresponding to a coding unit partitioning method of 16×16, and a preset threshold of threshold. 16 = 0.115242 × 2.3 qp / 5.0 ×16×16.

5. The method according to claim 1, characterized in that, The step of determining multiple optimal prediction modes of the target coding unit as a second mode queue includes: The number of optimal prediction modes is determined based on the depth of the target coding unit, resulting in multiple optimal prediction modes as a second mode queue.

6. A video encoding processing apparatus, characterized in that, include: The calculation module is used to calculate the rate-distortion cost of each coding mode predicted by the H265 intra-frame for the target coding unit. The first mode queue determination module is used to select multiple coding modes as the first mode queue based on the depth of the target coding unit and the rate-distortion cost of each coding mode. The second mode queue determination module is used to determine multiple best prediction modes of the target coding unit as the second mode queue. The encoding mode selection module is used to determine the encoding mode with the minimum encoding distortion as the target encoding mode from the first mode queue and the second mode queue; The threshold comparison processing module is used to stop dividing the target coding unit into smaller units if it is determined that the rate-distortion cost of the target coding mode is less than the preset threshold corresponding to the target coding mode. The encoding processing module is used to perform intra-frame prediction encoding processing on the target coding unit according to the target coding mode; The first mode queue determination module is specifically used to calculate the number of encoding modes determined from the encoding modes in ascending order of rate-distortion cost according to the first preset formula if the depth of the target encoding unit meets the first preset condition. If the depth of the target coding unit satisfies a second preset condition, the number of coding patterns determined from the coding patterns in ascending order of rate-distortion cost is calculated according to a second preset formula; wherein, the first preset condition is that the depth of the target coding unit is greater than 2, and the first preset formula is RD level +1, where RD level The complexity of Rate-Distortion Optimization (RDO) for the target coding unit is calculated. A larger value indicates a more complex calculation method for RDO, with a value range of 1-6. The second preset condition is that the depth of the target coding unit is less than or equal to 2, and the second preset formula is RD. level .

7. The apparatus according to claim 6, characterized in that, The preset threshold is determined based on the pixel values ​​and quantization parameters corresponding to the depth of the target coding unit.

8. A video encoding processing device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video encoding processing method as described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the video encoding processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Depth map coding method and device

    CN102790892A

  • Fast selection method and device of inter-frame prediction mode, and electronic equipment

    CN108124154A