Encoding method and device based on unit characteristics, electronic equipment and storage medium

By using SVM classifier-based encoding unit texture complexity judgment and quadtree partitioning method, the problem of high computational complexity in encoding unit partitioning is solved, achieving fast and simplified encoding unit partitioning and improving encoding efficiency.

CN114938455BActive Publication Date: 2025-11-18PEKING UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210490707.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2025-11-18
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

Existing video codec standards such as AVS3 and VVC have high computational complexity in dividing coding units, and deep learning methods have poor model scalability, resulting in large computational loads. When transferring, the network structure and training need to be redesigned.

Method used

An SVM-based classifier approach is adopted. The texture complexity of the encoding unit is calculated to determine whether quadtree partitioning is required. The trained SVM classifier is used to determine whether the quadtree partitioning is horizontally or vertically expanded. Combined with encoder context information and pixel variance information, fast encoding unit partitioning is achieved.

Benefits of technology

It significantly reduces the space for attempting to divide coding units, improves coding speed, simplifies algorithm computation, and enhances coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114938455B_ABST
    Figure CN114938455B_ABST
Patent Text Reader

Abstract

The application relates to an encoding method and device based on unit characteristics, electronic equipment and a storage medium. The method comprises the following steps: obtaining a to-be-divided encoding unit; calculating the texture complexity of the to-be-divided encoding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity; if the texture complexity is less than a preset flat threshold, the to-be-divided encoding unit is not divided any more; if not, the to-be-divided encoding unit is divided by using a binary tree or an extended quadtree; if the extended quadtree is used, a trained SVM classifier is used to determine whether the to-be-divided encoding unit is subjected to horizontal extended quadtree division or vertical extended quadtree division; and the divided encoding unit is used to encode image information. The application fully utilizes the texture characteristics of the encoding unit itself and the surrounding encoding information, realizes fast division of the encoding unit before the encoding is completed, greatly reduces the trial space, and further improves the encoding speed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video coding, and more particularly to a coding method and device based on unit characteristics, an electronic device and a storage medium. BACKGROUND

[0002] AVS3 is the latest generation of video coding standard, mainly responsible for formulating common technical standards for compression, decompression, processing and representation of digital audio and video. AVS3 enriches and promotes the division of coding units (CU). However, since the division of coding units is recursive, and each layer needs to try all allowed division modes, actual coding is performed according to the corresponding division to compare performance and select the best one, so the time consumption is large.

[0003] The prior art also uses a deep learning method to assist the judgment process of CU division, for example, a convolutional neural network is designed for the CU division of VVC, the network is divided into 6 stages, each corresponding to 1 CU division mode, and each stage judges whether the current CU is divided according to the corresponding mode. However, the model has poor scalability, and when migrating, the network structure needs to be redesigned for different standard CU division modes, and the network needs to be retrained, resulting in complex calculation and large algorithm calculation amount. SUMMARY

[0004] Based on the above technical problems, the present application aims to use the divided coding unit to code the image information before the division of the coding unit based on the trained SVM classifier to determine whether the division of the coding unit is a horizontal expansion quadtree division or a vertical expansion quadtree division.

[0005] The first aspect of the present application provides a coding method based on unit characteristics, the method comprising:

[0006] obtaining a coding unit to be divided;

[0007] calculating the texture complexity of the coding unit to be divided, wherein the texture complexity includes horizontal texture complexity and vertical texture complexity;

[0008] if the texture complexity is less than a preset flatness threshold, the coding unit to be divided is not divided, otherwise, the coding unit to be divided is divided using a binary tree division or an expanded quadtree division;

[0009] if the expanded quadtree division is used, the SVM classifier is trained to determine whether the coding unit to be divided is a horizontal expansion quadtree division or a vertical expansion quadtree division;

[0010] using the divided coding unit to code the image information.

[0011] In some embodiments of the present application, the texture complexity of the to-be-divided coding unit is calculated, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity, and the calculation comprises:

[0012] The gradient in the horizontal direction and the gradient in the vertical direction of each pixel of the to-be-divided coding unit are calculated by using a horizontal Sobel operator and a vertical Sobel operator respectively;

[0013] The variance of the gradient in the horizontal direction and the gradient in the vertical direction of all pixels of the to-be-divided coding unit are calculated to obtain a horizontal scalar value and a vertical scalar value;

[0014] The horizontal scalar value and the vertical scalar value are taken as the horizontal texture complexity and the vertical texture complexity respectively.

[0015] In some embodiments of the present application, a method for training an SVM classifier comprises:

[0016] Video sequences are selected from a standard video test set to form a training data set;

[0017] All coding units after coding and after quad-tree partitioning are counted as training samples in the training data set;

[0018] The horizontal texture complexity and the vertical texture complexity of the training samples are obtained;

[0019] The horizontal texture complexity and the vertical texture complexity of the training samples are combined with the encoder context information and the corresponding region pixel variance information of the training samples to form unit characteristics;

[0020] An SVM classifier is trained based on the unit characteristics.

[0021] In some embodiments of the present application, the training of the SVM classifier based on the unit characteristics comprises:

[0022] A preset quad-tree partitioning threshold is obtained, wherein the preset quad-tree partitioning threshold comprises a first preset quad-tree partitioning threshold and a second preset quad-tree partitioning threshold;

[0023] Training samples greater than or equal to the first preset quad-tree partitioning threshold are extracted;

[0024] The horizontal texture complexity of the extracted training samples is divided by the vertical texture complexity to obtain a first ratio, and the vertical texture complexity of the extracted training samples is divided by the horizontal texture complexity to obtain a second ratio;

[0025] If the first ratio or the second ratio is greater than or equal to the second preset extended quadtree splitting threshold, the training sample corresponding to the first ratio or the second ratio greater than or equal to the second preset extended quadtree splitting threshold is determined as a category of performing the extended quadtree splitting.

[0026] In some embodiments of the present application, if the texture complexity is less than the preset flat threshold, the to-be-split coding unit is not split any more, including:

[0027] The splitting and the no-splitting are taken as a binary classification result to train an SVM classifier;

[0028] The texture complexity is classified and predicted based on the trained SVM classifier;

[0029] If the prediction probability value is less than the preset flat threshold, the to-be-split coding unit is not split any more.

[0030] In some embodiments of the present application, the to-be-split coding unit is split by the binary tree splitting or the extended quadtree splitting, including:

[0031] The encoder decides the best mode of the to-be-split coding unit according to the constraint condition;

[0032] The to-be-split coding unit is split by the binary tree splitting or the extended quadtree splitting according to the decision result of the encoder.

[0033] In some embodiments of the present application, the encoder decides the best mode of the to-be-split coding unit, including:

[0034] The rate-distortion optimization cost of the optional splitting mode is calculated;

[0035] The splitting mode with the minimum rate-distortion optimization cost is determined as the best mode.

[0036] The second aspect of the present application provides an encoding device based on unit characteristics, the device including:

[0037] An acquisition module is configured to acquire a to-be-split coding unit;

[0038] A calculation module is configured to calculate a texture complexity of the to-be-split coding unit, wherein the texture complexity includes a horizontal texture complexity and a vertical texture complexity;

[0039] A judgment module is configured to determine whether the to-be-split coding unit is not split any more if the texture complexity is less than a preset flat threshold, or to split the to-be-split coding unit by a binary tree splitting or an extended quadtree splitting if not.

[0040] If the extended quadtree partitioning is adopted, the trained SVM classifier is used to determine whether the to-be-partitioned coding unit is subjected to horizontal extended quadtree partitioning or vertical extended quadtree partitioning.

[0041] The encoding module is configured to encode image information using the partitioned coding units.

[0042] The third aspect of the present application provides an electronic device comprising 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 implement the following steps:

[0043] Obtaining a to-be-partitioned coding unit;

[0044] Calculating the texture complexity of the to-be-partitioned coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity;

[0045] If the texture complexity is less than a preset flatness threshold, the to-be-partitioned coding unit is not further partitioned, otherwise, the to-be-partitioned coding unit is subjected to binary tree partitioning or extended quadtree partitioning;

[0046] If the extended quadtree partitioning is adopted, the trained SVM classifier is used to determine whether the to-be-partitioned coding unit is subjected to horizontal extended quadtree partitioning or vertical extended quadtree partitioning;

[0047] The encoding module is configured to encode image information using the partitioned coding units.

[0048] The fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the following steps:

[0049] Obtaining a to-be-partitioned coding unit;

[0050] Calculating the texture complexity of the to-be-partitioned coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity;

[0051] If the texture complexity is less than a preset flatness threshold, the to-be-partitioned coding unit is not further partitioned, otherwise, the to-be-partitioned coding unit is subjected to binary tree partitioning or extended quadtree partitioning;

[0052] If the extended quadtree partitioning is adopted, the trained SVM classifier is used to determine whether the to-be-partitioned coding unit is subjected to horizontal extended quadtree partitioning or vertical extended quadtree partitioning;

[0053] The encoding module is configured to encode image information using the partitioned coding units.

[0054] The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0055] The present application proposes that a to-be-divided coding unit is acquired first, and the texture complexity of the to-be-divided coding unit is calculated, wherein the texture complexity includes horizontal texture complexity and vertical texture complexity, if the texture complexity is less than a preset flat threshold, the to-be-divided coding unit is not divided any more, if not, the to-be-divided coding unit is divided by using a binary tree division or an extended quadtree division, if the extended quadtree division is used, the to-be-divided coding unit is determined to perform a horizontal extended quadtree division or a vertical extended quadtree division based on a trained SVM classifier, the texture characteristics of the coding unit itself and the surrounding coding information are fully utilized, the fast division of the coding unit is realized before the coding is completed, the trial space is greatly reduced, and the coding speed is improved. In particular, the horizontal texture complexity and the vertical texture complexity of the training sample are combined with the encoder context information and the corresponding regional pixel variance information of the training sample as unit characteristics, the SVM classifier is trained based on the unit characteristics, the to-be-divided coding unit is determined to perform a horizontal extended quadtree division or a vertical extended quadtree division based on the trained SVM classifier, the calculation is simple, the algorithm calculation amount is not large, and the coding unit division time is saved.

[0056] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0057] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of preferred embodiments, and are not meant to limit the present application. Moreover, the same reference numerals in different figures represent the same or similar components. In the drawings:

[0058] Figure 1 A step diagram of an encoding method based on unit characteristics in an exemplary embodiment of the present application is shown;

[0059] Figure 2 A division scheme diagram of a coding unit of AVS3 in the prior art is shown;

[0060] Figure 3 A division process diagram of a coding unit for VVC in the prior art is shown;

[0061] Figure 4 A calculation process and result diagram using horizontal and vertical Sobel operators in an exemplary embodiment of the present application is shown;

[0062] Figure 5 FIG. 1 shows a flowchart of a coding method based on cell characteristics in an example embodiment of the present application;

[0063] Figure 6 FIG. 2 shows a diagram of a variance calculation region in an example embodiment of the present application;

[0064] Figure 7 FIG. 3 shows a diagram of a coding device structure based on cell characteristics in an example embodiment of the present application;

[0065] Figure 8 FIG. 4 shows a diagram of an electronic device structure in an example embodiment of the present application;

[0066] Figure 9 FIG. 5 shows a diagram of a storage medium in an example embodiment of the present application. DETAILED DESCRIPTION

[0067] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It should be understood, however, that the description which will be given hereinafter is only exemplary and is not intended to limit the scope of the present application. Also in the following description, well-known functions or constructions are not described in detail since they would obscure the application in unnecessary detail. It should be understood that the present application can be implemented without one or more of these details.

[0068] It should be noted that the terms used herein are merely used to describe particular embodiments and are not intended to limit the scope of the example embodiments of the present application. As used herein, the singular forms are intended to include the plural forms as well unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "has," when used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0069] Now, example embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these example embodiments can be implemented in various different forms and should not be construed as limited to the embodiments set forth herein. The drawings are not to scale and some details can be exaggerated in order to clearly convey the concept of the present application. The shapes and relative sizes of the various regions, layers, and elements shown in the drawings are exemplary only and can vary depending on manufacturing techniques and / or design criteria. The shapes and relative sizes of the various regions, layers, and elements shown in the drawings are exemplary only and can vary depending on manufacturing techniques and / or design criteria.

[0070] The accompanying drawings, which are incorporated herein by reference Figure 1 - the accompanying drawings Figure 9 Several embodiments will be given to describe exemplary embodiments according to the present application. It should be noted that the following application scenarios are only shown for the purpose of facilitating understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in any way in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0071] Embodiment 1:

[0072] In this exemplary embodiment, a coding method based on unit characteristics is provided, as shown in the following Figure 1 The method comprises the following steps:

[0073] S1, obtaining a to-be-divided coding unit;

[0074] S2, calculating a texture complexity of the to-be-divided coding unit, wherein the texture complexity comprises a horizontal texture complexity and a vertical texture complexity;

[0075] S3, if the texture complexity is less than a preset flatness threshold, the to-be-divided coding unit is not divided any more, otherwise, the to-be-divided coding unit is divided by a binary tree division or an extended quadtree division;

[0076] S4, if the extended quadtree division is adopted, a trained SVM classifier is used to determine whether the to-be-divided coding unit is subjected to a horizontal extended quadtree division or a vertical extended quadtree division;

[0077] S5, using the divided coding unit to code image information.

[0078] The common coding unit division scheme (CU division) of AVS3 can refer to Figure 2 , first determine whether to divide, if yes, first perform quadtree division, if not, further determine whether to perform extended quadtree division or binary tree division, as shown in Figure 2 , and continue to determine. The division of the coding unit is the basis for subsequent steps such as PU (Prediction Unit) division, intra prediction, and inter prediction. However, since the CU division is recursive, and each layer needs to try all allowed division modes, actual coding is performed according to the corresponding division to compare the performance and select the best one, which results in a large time consumption.

[0079] Figure 3 The CU division process for VVC is shown, and a deep learning method is used to assist the judgment process of CU division. A convolutional neural network is designed for the CU division of VVC, and the network is divided into 6 stages, each corresponding to one CU division mode, and each stage determines whether the current CU is divided according to the corresponding mode. As shown inFigure 3 As shown, the input of the network is the original CTU (Coding Tree Unit), which is first extracted by a convolution network containing a residual unit to obtain features, and then a sub-network is used to process the feature map to determine whether to perform the current partition. The sub-network is composed of a QP normalization layer, a convolution layer and a fully connected layer. For the CU that has been determined by a sub-network, subsequent calculation is not needed. However, the model scalability is poor, and when migrating, the network structure needs to be redesigned for different standard CU partition modes, and the network needs to be retrained, resulting in complex calculation and large algorithm calculation amount.

[0080] Therefore, in a specific implementation of the embodiment, the texture complexity of the to-be-partitioned coding unit is calculated, wherein the texture complexity includes horizontal texture complexity and vertical texture complexity, and the texture complexity is calculated according to the following formula: Figure 4 , comprising: calculating the gradient in the horizontal direction and the gradient in the vertical direction of each pixel of the to-be-partitioned coding unit by using a horizontal Sobel operator and a vertical Sobel operator respectively; calculating the variance of the gradient in the horizontal direction and the gradient in the vertical direction of all pixels of the to-be-partitioned coding unit to obtain a horizontal scalar value and a vertical scalar value; and taking the horizontal scalar value and the vertical scalar value as the horizontal texture complexity and the vertical texture complexity respectively.

[0081] In a specific implementation, a method for training an SVM classifier includes: selecting video sequences from a standard video test set to form a training data set, for example, selecting 3 video sequences from each of the standard video test sets Class B to Class E to form a training data set; counting all coding units of the four-tree partition after coding and expansion in the training data set as training samples; obtaining the horizontal texture complexity GradHor Var and the vertical texture complexity GradVer Var of the training samples; combining the horizontal texture complexity and the vertical texture complexity of the training samples with the encoder context information and the corresponding region pixel variance information of the training samples as the unit characteristics; and training the SVM classifier based on the unit characteristics. Wherein, the GradHor Var and the GradVer Var of all CUs are normalized to 0-1 by using the maximum value, so as to perform threshold judgment.

[0082] In a specific implementation, the SVM classifier is trained based on the unit characteristics, including: obtaining preset extended quadtree partition thresholds, wherein the preset extended quadtree partition thresholds include a first preset extended quadtree partition threshold and a second preset extended quadtree partition threshold; extracting training samples greater than or equal to the first preset extended quadtree partition threshold; taking the horizontal texture complexity of the extracted training samples divided by the vertical texture complexity as a first ratio, and taking the vertical texture complexity of the extracted training samples divided by the horizontal texture complexity as a second ratio; and if the first ratio or the second ratio is greater than or equal to the second preset extended quadtree partition threshold, determining the training samples corresponding to the first ratio or the second ratio greater than or equal to the second preset extended quadtree partition threshold as a category of extended quadtree partition.

[0083] In a specific implementation, if the texture complexity is less than a preset flat threshold, the to-be-partitioned coding unit is no longer partitioned, including: taking the partition and the no longer partition as a binary classification result, and training the SVM classifier; performing classification prediction on the texture complexity based on the trained SVM classifier; and if the prediction probability value is less than the preset flat threshold, the to-be-partitioned coding unit is no longer partitioned.

[0084] In another specific implementation, the to-be-partitioned coding unit is partitioned by the binary tree partition or the extended quadtree partition, including: according to the constraint condition, the encoder decides the best mode of the to-be-partitioned coding unit; and according to the decision result of the encoder, the to-be-partitioned coding unit is partitioned by the binary tree partition or the extended quadtree partition.

[0085] In other implementations, the encoder decides the best mode of the to-be-partitioned coding unit, including: calculating rate-distortion optimization costs of selectable partition modes; and determining the partition mode with the minimum rate-distortion optimization cost as the best mode.

[0086] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application.

[0087] Embodiment 2:

[0088] The present exemplary embodiment provides a coding method based on unit characteristics, which comprises: obtaining a to-be-divided coding unit; calculating texture complexity of the to-be-divided coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity; if the texture complexity is less than a preset flatness threshold, the to-be-divided coding unit is not divided any more, otherwise, the to-be-divided coding unit is divided by using a binary tree division or an extended quadtree division; if the extended quadtree division is used, based on a trained SVM classifier, it is determined whether the to-be-divided coding unit is subjected to horizontal extended quadtree division or vertical extended quadtree division; and using the divided coding unit to code image information.

[0089] Here, the method for obtaining a to-be-divided coding unit, calculating texture complexity of the to-be-divided coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity, and judging the texture complexity in the above coding method based on unit characteristics of the present embodiment 2 is regarded as method 1, and the reference is made to Figure 5 Next, if the texture complexity is less than a preset flatness threshold, the to-be-divided coding unit is not divided any more, otherwise, the to-be-divided coding unit is divided by using a binary tree division or an extended quadtree division. Preferably, in the specific implementation, the method 1 comprises: taking division and no division as a binary classification result, training an SVM classifier; based on the trained SVM classifier, the texture complexity is classified and predicted; if a predicted probability value is less than a preset flatness threshold, the to-be-divided coding unit is not divided any more.

[0090] In the specific implementation, a horizontal Sobel operator and a vertical Sobel operator are respectively used to calculate a gradient in a horizontal direction and a gradient in a vertical direction of each pixel of the to-be-divided coding unit; variances of the gradients in the horizontal direction and the vertical direction of all pixels of the to-be-divided coding unit are calculated to obtain a horizontal scalar value and a vertical scalar value; and the horizontal scalar value and the vertical scalar value are respectively taken as the horizontal texture complexity and the vertical texture complexity.

[0091] During training, video sequences are selected from a standard video test set to form a training data set, such as 3 video sequences from each of standard video test sets Class B to Class E to form a training data set; all completed coding and extended quadtree partitioning coding units in the training data set are counted as training samples; the horizontal texture complexity GradHor Var and the vertical texture complexity GradVer Var of the training samples are obtained; the horizontal texture complexity and the vertical texture complexity of the training samples are combined with the encoder context information and the corresponding region pixel variance information of the training samples as unit characteristics; and the SVM classifier is trained based on the unit characteristics. The GradHor Var and the GradVer Var of all CUs are normalized to 0-1 using the maximum value, so as to perform threshold judgment. Figure 5the trained SVM classifier in the training process, the GradHor Var and GradVer Var of all the "EQT partition" CUs are obtained. The threshold TH H and the threshold TH Ratio are set as the first preset extended quadtree partition threshold and the second preset extended quadtree partition threshold, GradHor Var and GradVer Var are arranged in ascending order, so that at least 85% of GradHor Var and at least 85% of GradVer Var are greater than the threshold TH H, i.e. the first preset extended quadtree partition threshold, GradHor Var / GradVer Var and GradVer Var / GradHor Var are arranged in ascending order, so that at least 90% of GradHor Var / GradVer Var and at least 90% of GradVer Var / GradHor Var are greater than the threshold TH Ratio, i.e. the second preset extended quadtree partition threshold. The thresholds are configured when the SVM classifier is trained, and the subsequent trained conditions can directly identify the target coding unit. In the test running process of the algorithm, for the CU whose GradHor Var and GradVer Var (both normalized) are greater than TH H and satisfies GradHor Var / GradVer Var>TH Ratio or GradVer Var / GradHor Var>TH Ratio, it is considered to satisfy the EQT partition condition. For the CU satisfying the EQT partition condition, further feature extraction is performed to determine whether it is a horizontal EQT or a vertical EQT. First, the context information when the encoder processes the current CU is extracted, i.e. the depth of the current CU partition, QP, the number of bits used in the header information, and the number of bits used in the current frame, which can be directly obtained from the encoder. Second, the variance of the pixel value of the current complete CU, the sum of the variances of the pixel values of the sub-CUs after horizontal EQT partition, and the sum of the variances of the pixel values of the sub-CUs after vertical EQT partition are calculated as the measurement of the image content features after the attempted partition. For example, the horizontal EQT partition is considered to be satisfied when the sum of the variances of the pixel values of the sub-CUs after the horizontal EQT partition is greater than the sum of the variances of the pixel values of the complete CU, and the vertical EQT partition is considered to be satisfied when the sum of the variances of the pixel values of the sub-CUs after the vertical EQT partition is greater than the sum of the variances of the pixel values of the complete CU. Figure 6As shown, for the current unpartitioned complete CU, the pixel value variance of region ① is calculated, and the pixel value variance of sub-regions ①, ②, ③ and ④ which should be partitioned horizontally is calculated and summed up respectively; the pixel value variance of sub-regions ①, ②, ③ and ④ which should be partitioned vertically is calculated and summed up respectively, and finally the above three aspects of information are combined, i.e. the horizontal and vertical texture complexity of the to-be-encoded unit, the context information of the to-be-encoded unit and the pixel variance information of the corresponding region are combined as the characteristics of the encoding unit. Then the SVM classifier is trained by using the characteristics of the encoding unit, and then the actual application scene before encoding is performed.

[0092] The present application proposes that a to-be-partitioned encoding unit is first acquired, and the texture complexity of the to-be-partitioned encoding unit is calculated, wherein the texture complexity includes horizontal and vertical texture complexity. If the texture complexity is less than a preset flat threshold, the to-be-partitioned encoding unit is not partitioned any more. If not, the to-be-partitioned encoding unit is partitioned by using a binary tree or an extended quadtree. If the extended quadtree is used, the to-be-partitioned encoding unit is determined to be partitioned by using a horizontal extended quadtree or a vertical extended quadtree based on the trained SVM classifier. The texture characteristics of the encoding unit itself and the surrounding encoding information are fully utilized, the fast partitioning of the encoding unit is realized before the encoding is completed, the trial space is greatly reduced, and the encoding speed is improved. In particular, the horizontal and vertical texture complexity of the training sample is combined with the context information of the training sample and the pixel variance information of the corresponding region as the characteristics of the unit. The SVM classifier is trained based on the characteristics of the unit. The to-be-partitioned encoding unit is determined to be partitioned by using a horizontal extended quadtree or a vertical extended quadtree based on the trained SVM classifier. The calculation is simple, the algorithm calculation amount is not large, and the encoding unit partitioning time is saved.

[0093] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application.

[0094] Embodiment 3:

[0095] The present exemplary embodiment provides an encoding device based on unit characteristics, which comprises Figure 7 As shown, the device comprises:

[0096] The acquisition module 701 is configured to acquire a to-be-partitioned encoding unit.

[0097] The calculation module 702 is configured to calculate the texture complexity of the to-be-partitioned encoding unit, wherein the texture complexity includes horizontal and vertical texture complexity.

[0098] The judging module 703 judges whether the texture complexity is less than a preset flatness threshold. If yes, the to-be-partitioned coding unit is not further partitioned. If not, the to-be-partitioned coding unit is partitioned by using a binary tree partitioning or an extended quadtree partitioning.

[0099] The partitioning module 704 judges whether the to-be-partitioned coding unit is partitioned by using an extended quadtree partitioning. If yes, the to-be-partitioned coding unit is partitioned by using a horizontal extended quadtree partitioning or a vertical extended quadtree partitioning based on the trained SVM classifier.

[0100] The encoding module 705 is configured to encode image information by using the partitioned coding unit.

[0101] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application.

[0102] It should be further emphasized that the system provided in the embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is a theory, method, technology and application system for using a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain optimal results. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0103] Please refer to Figure 8 which shows a schematic diagram of an electronic device provided by some embodiments of the present application. As Figure 8 shown, the electronic 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 through the bus 202; the memory 201 stores a computer program which can run on the processor 200, and the processor 200 runs the computer program to execute the coding method based on unit characteristics provided by any of the preceding embodiments of the present application.

[0104] 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.

[0105] 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. The memory 201 is used to store programs. After receiving an execution instruction, the processor 200 executes the program. The unit characteristic-based encoding method disclosed in any of the foregoing embodiments of this application can be applied to the processor 200, or implemented by the processor 200.

[0106] 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.

[0107] This application also provides a computer-readable storage medium corresponding to the unit characteristic-based encoding method provided in the foregoing embodiments. Please refer to [link / reference]. Figure 9 , Figure 9The 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 unit characteristic-based encoding method provided in any of the foregoing embodiments.

[0108] 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.

[0109] The computer-readable storage medium provided in the above embodiments of this application and the quantum key distribution channel allocation method in the space division multiplexing optical network provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0110] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the unit-based encoding method provided in any of the foregoing embodiments, including: obtaining encoding units to be divided; calculating the texture complexity of the encoding units to be divided, wherein the texture complexity includes horizontal texture complexity and vertical texture complexity; if the texture complexity is less than a preset flatness threshold, then the encoding units to be divided are no longer divided; otherwise, the encoding units to be divided are divided using a binary tree or an extended quadtree; if an extended quadtree is used, the encoding units to be divided are divided using a trained SVM classifier to determine whether to perform a horizontally extended quadtree or a vertically extended quadtree; and using the divided encoding units to encode image information.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] 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. The 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.

[0115] 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 cell characteristics, characterized by, The method comprises: acquiring a to-be-divided coding unit; calculating texture complexity of the to-be-divided coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity; if the texture complexity is less than a preset flat threshold, no longer dividing the to-be-divided coding unit, otherwise, adopting binary tree division or extended quadtree division for the to-be-divided coding unit; if the extended quadtree division is adopted, determining the to-be-divided coding unit to perform horizontal extended quadtree division or vertical extended quadtree division based on a trained SVM classifier; encoding image information by using the divided coding unit; a method for training an SVM classifier, comprising: selecting video sequences from a standard video test set to form a training data set; counting all coding units after encoding and having performed extended quadtree division in the training data set as training samples; acquiring horizontal texture complexity and vertical texture complexity of the training samples; combining the horizontal texture complexity and the vertical texture complexity of the training samples with encoder context information and corresponding region pixel variance information of the training samples as unit characteristics, wherein normalized horizontal texture complexity and vertical texture complexity are set with a threshold according to statistical distribution, so that texture complexity of at least 85% of the training samples is greater than the threshold; training an SVM classifier based on the unit characteristics.

2. The method of claim 1, wherein, The calculating of the texture complexity of the to-be-divided coding unit, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity, comprises: respectively calculating gradients in a horizontal direction and gradients in a vertical direction of each pixel of the to-be-divided coding unit by using a horizontal Sobel operator and a vertical Sobel operator; calculating variances of the gradients in the horizontal direction and the gradients in the vertical direction of all pixels of the to-be-divided coding unit to obtain a horizontal scalar value and a vertical scalar value; respectively taking the horizontal scalar value and the vertical scalar value as the horizontal texture complexity and the vertical texture complexity.

3. The method of claim 1, wherein, The training of the SVM classifier based on the unit characteristics comprises: acquiring a preset extended quadtree division threshold, wherein the preset extended quadtree division threshold comprises a first preset extended quadtree division threshold and a second preset extended quadtree division threshold; extracting training samples greater than or equal to the first preset extended quadtree division threshold; taking the horizontal texture complexity of the extracted training samples divided by the vertical texture complexity as a first ratio, and taking the vertical texture complexity of the extracted training samples divided by the horizontal texture complexity as a second ratio; if the first ratio or the second ratio is greater than or equal to the second preset extended quadtree division threshold, determining training samples corresponding to the first ratio or the second ratio greater than or equal to the second preset extended quadtree division threshold as a category of performing extended quadtree division.

4. The method of claim 3, wherein, The no longer dividing the to-be-divided coding unit if the texture complexity is less than the preset flat threshold comprises: taking division and no longer division as a binary classification result to train an SVM classifier. classifying the texture complexity based on the trained SVM classifier; if the prediction probability value is less than a preset flat threshold, the coding unit to be divided is not divided any more.

5. The method of claim 1, wherein, the adopting the binary tree division or the extended quad-tree division on the coding unit to be divided comprises: the encoder decides the best mode of the coding unit to be divided according to the constraint condition; the adopting the binary tree division or the extended quad-tree division according to the decision result of the encoder.

6. The method of claim 5, wherein, the best mode of the coding unit to be divided decided by the encoder comprises: calculating rate-distortion optimization cost of selectable division modes; determining the division mode with the minimum rate-distortion optimization cost as the best mode.

7. An encoding apparatus based on a cell characteristic, characterized by, The apparatus comprises: an acquisition module for acquiring a coding unit to be divided; a calculation module for calculating texture complexity of the coding unit to be divided, wherein the texture complexity comprises horizontal texture complexity and vertical texture complexity; a judgment module for, if the texture complexity is less than a preset flat threshold, not dividing the coding unit to be divided any more, and for, if not, adopting a binary tree division or an extended quad-tree division on the coding unit to be divided; a division module for, if the extended quad-tree division is adopted, determining the coding unit to be divided to perform horizontal extended quad-tree division or vertical extended quad-tree division based on a trained SVM classifier; an encoding module for encoding image information using the divided coding unit; a method for training an SVM classifier, comprising: selecting video sequences from a standard video test set to form a training data set; counting all coding units after encoding and having performed extended quad-tree division in the training data set as training samples; acquiring horizontal texture complexity and vertical texture complexity of the training samples; combining the horizontal texture complexity and the vertical texture complexity of the training samples with encoder context information and corresponding region pixel variance information of the training samples as unit characteristics, wherein the normalized horizontal texture complexity and the vertical texture complexity are set with threshold values according to statistical distribution, so that texture complexity of at least 85% of the training samples is greater than the threshold value; training an SVM classifier based on the unit characteristics.

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 according to any one 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 according to any one of claims 1-6.

Citation Information

Patent Citations

  • Rapid CU partition decision method for H.266 / VVC

    CN111654698A

  • CU sub-division based on CU texture complexity

    CN111885383A

  • VVC intra-frame coding rapid CU division decision method based on random forest

    CN112437310A